<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mark Burgess on Medium]]></title>
        <description><![CDATA[Stories by Mark Burgess on Medium]]></description>
        <link>https://medium.com/@markburgess_osl?source=rss-41e8f81629f9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lfHiKvZOyzON1tkaJd-hYA.jpeg</url>
            <title>Stories by Mark Burgess on Medium</title>
            <link>https://medium.com/@markburgess_osl?source=rss-41e8f81629f9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 22:34:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@markburgess_osl/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Storytelling in the Dataverse]]></title>
            <link>https://medium.com/aljabr/storytelling-in-the-dataverse-2b57e3559174?source=rss-41e8f81629f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b57e3559174</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[automated-reasoning]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[data-pipeline]]></category>
            <dc:creator><![CDATA[Mark Burgess]]></dc:creator>
            <pubDate>Thu, 23 May 2019 10:04:59 GMT</pubDate>
            <atom:updated>2019-05-24T12:16:58.638Z</atom:updated>
            <content:encoded><![CDATA[<p>When Quantum Gravity governs your pipeline! (sort of :-))</p><p><em>In developing data platforms for the cloud era, we are effectively building (cognitive) learning systems that span a wide range of scales — agents that receive inputs and compute results, sometimes with feedback. Virtualization and parallelism throw a layer of obfuscation over the tracing of dataflows, as well as performance measurement and causality. Data pipelines from the </em><strong><em>edge</em></strong><em> of the </em><strong><em>cloud</em></strong><em> to the </em><strong><em>centre</em></strong><em> and back are especially vulnerable to distortion and loss of traceability, as they muddle the expectation of deterministic processing with the randomness of arrival times arising from the uncertainties of distributed processing. Sometimes dependency tracing takes care of this, but if we pool results into a `data lake’ we then wipe out meaningful order, rendering the timing moot. The result is that many users don’t have any control over what their data are telling them.</em></p><p>It’s not often one could say that Quantum Gravity has much use in the everyday world, but (as I explain in my book <a href="https://www.amazon.com/Smart-Spacetime-information-challenges-process/dp/1797773704">Smart Spacetime</a>) basic spacetime physics holds the keys to understanding a lot of what goes on in the cloud. There are simple principles relevant to every aspect of change that explain the meaning of connectivity and the ordering of events. When data sources are distributed, we have to deal with partial ordering — sets of data whose causal order (as defined by a <a href="https://en.wikipedia.org/wiki/Causal_sets">Causal Sets</a> approach <a href="http://markburgess.org/semantic_spacetime.html">to Semantic Spacetime</a>) is not absolute or even well defined.</p><p>No one teaches us this stuff in college!</p><p>The problem in the cloud is that parallelism and distribution lead to a classic problem of data <em>relativity</em>. No observer has complete information about everything locally — we rely on messages passed between agents inside of the system. These travel at finite speed, and may not be available to all parties. Data collection (which is central to monitoring) is, in fact, closely related to the more widely discussed <em>data consensus</em> problem. In <strong>consensus</strong> systems, we are trying to ensure that a broad audience sees that same version of local history as we do; in <strong>data collection</strong>, we are trying to aggregate local histories into a meaningful timeline that a single observer can make sense of.</p><h3>Mapping interior and exterior context</h3><p>Most information gathering (usually logging) systems simply push out data without calibrating their meanings, or aligning their causal order. They leave the entire burden of interpretation to human postmortem pathologists. This is a wasted opportunity.</p><p>The key to understanding complex systems is to break them down by separating behaviours by <strong>timescale</strong> — not just by function. We can sort and classify garbage using the machinery of the cloud, if we organize by scale. We don’t have to dump problems onto human operators. The machinery of our data processing universe are there to help.</p><p>This starts with the classic separation of decision processes from implementation, using platform tools like Kubernetes, but it continues by using<em> embedded instrumentation</em> that acquires knowledge from within each local process, so that context is not lost. We need to be clear about where the boundary between observer and observed lies, when collecting data, to avoid losing the ability to interpret it later. <strong>What we did </strong>versus <strong>what happened</strong> to us should be distinguishable. Not all data processes are simple input output graphs — they take considerably more work to comprehend. When we reach the level of an ecosystem, things get hard to understand — but not impossible.</p><p>In Koalja, we can define a data circuit (pipeline or cluster) using a simple declaration like the one below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*nQunlmd9MwcuV90KHzYQmQ.png" /><figcaption>A pair of DAG pipelines conjoined by a service (declaration)</figcaption></figure><p>This defines a model “tfmodel” that consists of two pipelines that are correlated by a service relationship (see figure).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/0*0EhaeCU46uwUO9nV" /><figcaption>A pair of DAG pipelines conjoined by a service (visual)</figcaption></figure><p>Two separate (parallel) processes are defined, with independent causation. Above, there is a training process that accumulates data and builds a machine learning model, then uploads this model into a service for use by a recognition process. Below, the recognition process independently collects data for classification. It converts the forms into something compatible with the model, and then a prediction phase performs a lookup to the service maintained by the first pipeline. This is not a classic single DAG relationship, but a service dependency (query-response). Once the service returns, the predictor can complete its computation of a result and send it for output through the lower pipe.</p><p>The second pipeline has a formal output, the first doesn’t. All such combinations of input and output pattern are possible in data circuitry. But how can we see this as a causal trace? This challenges us both with <em>configuration</em>, <em>comprehension of operation</em>, and <em>comprehension of outcome</em>.</p><p>Which version of the model was being served when a particular output was processed? Are we even aware of the hidden dependency between the two pipelines? If we consider only DAG models, we couldn’t possibly know.</p><p>We need to be able to debug these processes in two ways: by the <strong>invariable relationships</strong> between their parts, and by the timelines of <strong>variable events</strong> that pass through them.</p><h3>Time and space to the rescue</h3><p>History plays a big role in our understanding of systems. We are storytellers by nature, so we look for truth in logs and journals. The problem is that logs and journals are written by single authors (or single processes).</p><p>In the cloud, we want to aggregate logs into a library of journals. However, because IT has had no strong theoretical underpinning, the approach has simply been to aggregate pages from everyone’s journals indiscriminately and join them together in a single journal, without pausing to keep separate what was causally independent. We believe we can throw the job of searching aggregate logs to a process of unlimited power, by brute force.</p><p>Aggregation is entropy. It creates garbage landfill. Technology is supposed to help us recycle meaning as well as help with the work of being an efficient collector. Dumping everything in a giant landfill to be sifted through for body parts in times of trouble (the opening scene of many a murder mystery) is not a good strategy. It’s very expensive and perhaps not even possible to piece together forensic information that has been thrown away. So let’s keep it.</p><p>We need to use information technology more intelligently, and spacetime principles are free and open for the picking.</p><p>Most logs use Unix clock time as the measure of causal order. But clocks are independent and potentially different on every machine. This no longer makes sense in a parallel world, or a world of turbulent coroutines that interleave timelines and threads. Logs have meaning on a different scale than what the kernel uses for timesharing, and this is again different from the scale on which data processing has meaning. If we muddle these, we just create muddle.</p><p>Computer programs are causal process threads. Order lies in their execution on the process interior, not in the arrival of messages between them. There is a proper time (NOW) related to the moment at which a process passes key landmarks in its code. Other messages may interpolate details with deltas relative to those. When we seek a so-called “root cause” of an event, a Unix time log is a garbage heap, but a causally ordered proper time log can point back to the root(s) from whence the event came — i.e. those earlier landmarks that fed into the current moment.</p><p>Even resource anomaly detection can be processed in line, to capture environmental changes with proper causal order. By designing the careful separation of <strong>variants</strong> (event instances) from <strong>invariants </strong>(persistent patterns), raw observational data can be highly compressed — far more efficiently than text based logs, without being too slow:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/0*P-qL-XpWsKtB4JsL" /></figure><p>The meaning, however, is far richer than current logging formats. The trace below was generated from an <a href="https://github.com/AljabrIO/koalja-operator/blob/master/pkg/history/cmd/test_history.go">illustrative test process</a> to show how logs can express proper causation, even in programs with co-routines and parallel execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/0*dK7dp1kzfUoZ2tei" /></figure><p>An anomalous CPU spike, during this containerized execution, becomes a signpost in the timeline of the process — measured from within, as Einstein taught us. We can also attempt to detect and point out interior non-simple causality, such as that produced by co-routines.</p><p>The traditional timestamps in the example are for real context guidance only: they can’t be considered accurate, but we still like to know roughly what was going on in the outside world. The sequence numbers from the code flow indicate the occurrence of major “signpost events”. This is how we told the time (before the invention of clocks) — we attached meaning to significant events: e.g. the year of the flood, the Christmas outage, etc. Such <strong>process anomalies</strong> are meaningful to us, but clock times are just repeating patterns that need further explanation.</p><p>Indentation, added by <em>post hoc</em> presentation helps to show the subordination of interior “subtime” deltas within the larger intentional scheme of a process. All this can dropped into code using normal logging-style messages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*DBKivUl6zUISce1lzPzeUQ.png" /></figure><p>The history of this thinking goes back to CFEngine and its machine learning anomaly detection, modified for the modern world. The Cellibrium project further developed an experimental fork of those ideas. The layers of wrapping and containment in the cloud detach causation from observable metrics, but this provides a more targeted “intentional” way of promising the state of containerized workloads.</p><h3>Sum over histories</h3><p>Histories are only one part of understanding. Meaningful concepts emerge by invariant pattern and repetition, not as single events. The <strong>path well-trodden</strong> by data events leads to an invariant average behaviour that we can call the <em>stable path of action</em>, intended by the code. The emergence of such invariants from repeated trials is what we mean by <strong>learning</strong>.</p><p><em>[Remarkably, this has a lot in common with the way we describe quantum physics: there is a general distribution of assets associated with conservation of resources, but the precise locations or values of observables are hard to pin down with certainty. The world is probabilistic when you see it second hand. Over time, it wears a path of `stationary action’, which is what we call the principle of least action, which is actually a principle of superposition of alternatives.]</em></p><p>We can do more with a spacetime model than trace simple path histories. By labelling the channels of influence using their spacetime semantics, we can separate and relate them according to the information that transmits their relevant influence — going beyond guesswork. By accessing a properly labelled aggregate overview, generated by iterative learning from cluster data, we can reconstruct a god’s eye view of the system over the past, for future prediction. The significance of invariants persists, and can be used to infer behaviour in the future.</p><p>This is the scientific method in action: in cases of sufficient stability, we are able to use the past as a guide to the future.</p><p><em>Advanced boundary conditions are what I have earlier called convergent processes — other names like “CALM” logical monotonicity have been used, but the spacetime structure is the simple common denominator that unifies these ideas.</em></p><p>The output from <strong>Koalja,</strong> from declared knowledge combined with process invariants, leads to a self-organization of persistent concepts, which is partially ordered by causal ordering. This tells a diagnostician far more than a log of ephemeral events — and can be used together with the proper timeline to elevate meaning above quantity — recycling meaning before it hits the landfill.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/0*nvGVCg3wNggZQeRv" /><figcaption>Automated reasoning based on theprinciples for <a href="http://markburgess.org/spacetime.html">Semantic Spacetime</a></figcaption></figure><p>By following only causally ordered pathways that generalize as “volumes of generalization” along different “spacetime” channels, we can quickly make predictions about complex outcomes based on past behaviours, without having to trawl logs in a lengthy and speculative postmortem. It’s the very same principle used in Quantum Gravity to attach directed evolution to networks. The `classical paths’ are the paths most travelled, worn by the common elements of repeated learning.</p><h3>Turning Search into Certainty</h3><p>I am not a fan of current logging systems. Koalja is not a logging library — but it embeds a semantically enhanced recording device that enables meaningful diagnosis of processes running in cloud. Experience has shown that the data measured in most such libraries say almost nothing that isn’t obvious about a system today.</p><p>One could say that going through someone’s garbage gives them a complete picture of their distributed lives. Certainly this is the logging and tracing approach to distributed systems (including microservice architectures), but surely there is a better way when the parties are collaborating. Not everything should be a murder mystery.</p><p>Meaning decays quickly with time, as human users stare helplessly at wiggly lines like paranoid security guards. As I wrote in my book <a href="http://markburgess.org/certainty.html"><em>In Search of Certainty</em></a>, it all seems a lot like trying to diagnose the cause of a bad mood by taking someone’s pulse. The best part of reinventing system instrumentation, from the bottom up, is that we can choose more practical and efficient formats for it, that preserve simple signalling semantics and detailed diagnostic causation. For the data circuitry in the cloud, this is more important than ever.</p><p><em>You can read more about these issues, in my </em><a href="http://markburgess.org/smartspacetime.html"><em>new book:</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/289/1*kqDY_F1rJNy_GlkC-9hXMw.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b57e3559174" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aljabr/storytelling-in-the-dataverse-2b57e3559174">Storytelling in the Dataverse</a> was originally published in <a href="https://medium.com/aljabr">Aljabr</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[15# Beyond data pipelines]]></title>
            <link>https://medium.com/aljabr/15-beyond-data-pipelines-8f22b2102cf?source=rss-41e8f81629f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f22b2102cf</guid>
            <category><![CDATA[data-pipeline]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[internet-of-things]]></category>
            <dc:creator><![CDATA[Mark Burgess]]></dc:creator>
            <pubDate>Mon, 10 Dec 2018 15:50:13 GMT</pubDate>
            <atom:updated>2018-12-10T15:50:13.174Z</atom:updated>
            <content:encoded><![CDATA[<h3>Realizing Smart Workspaces</h3><p><em>In this series of posts, we’ve described many issues that encircle data pipelines, past and present, mainly from the traditional sense of workflow management. Yet this story, even with all its historical twists and turns, is the tip of an iceberg that is currently expanding throughout businesses and social spaces. As we extend data services into every corner of our living and working environments, as sophistication in service engineering and bulk processing accumulates, so the problems of distributed data access and data processing take on an entirely new significance. We are heading from an abstract, far-away cloud towards the embedded modularization of pervasive specialized</em> spaces<em> — with data as the glue that holds it all together.</em></p><h3>Pervasive ubiquity</h3><p>When is a pipeline not a pipeline? When it’s plumbing. Your house, your workplace, your town, and your country have pipes that carry utility services — water, gas, sewage, electricity. These networks are partly centralized and partly decentralized for sharing common resources, but they have access points everywhere. We may start with simple pipelines, but as the plumbing expands, the scope of the pipelining transforms into something else entirely. Moreover, on top of this public plumbing there is even more specialized and private plumbing — the linkage of human process flows, with policies, barriers, access controls and adaptive responses.</p><p>It’s 20 years since the terms <em>ubiquitous</em> and <em>pervasive</em> computing were coined, around the innovative work of Xerox PARC. During that time, Information Technology infrastructure has undergone something of a revolution to open up hardware and software. Without that change, ubiquitous computing was never going to take hold. Today we’ve rebranded it, as the Internet of Things, and a few companies have taken the first baby steps. Pervasive computing didn’t pass in the night — it’s still on its way, building momentum, and navigating the changing trajectories of business. The trajectory is clear. What a few giant companies do with data today, everyone will be doing in the next decade. But today, it’s still too hard to plumb even simple systems in a scalable way. Product developers build for one use-case at a time. How about building for growth and maintainability?</p><h3>Plumbing the depths and the edges</h3><p>We want to instrument human processes all the way out to the edges of our involvement in the world — from distant space probes, to homes and cities, as well as from inside businesses. We might talk about the computing cloud as if it’s everything there is, but it’s not there yet. Even that pales into insignificance compared to the logistical processes that keep an economy running. The growing topic of `serverless’ computing is trying to reinvent the cloud as a single transparent multi-user time sharing system, but so far it doesn’t address practicalities of real world needs. The cloud itself is evolving — and will eventually encompass far more of those edge computers too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/0*MkU90wVbFfZb3vp0" /></figure><p>Sources come from environments that equip data with both <em>context </em>and <em>semantics</em>. Those are the gold that data processing is sieving for — and they are only found at the edge. Centralized datacentres can provide brute force to dispatch certain large tasks that go beyond individual resources, but there is an abundance of wasted capacity at the edge to be reclaimed by a better, more inclusive platform. If there is one lesson we’ve learned from dataprocessing, it should be that processes benefit from being context aware — from being <em>data aware</em> — a complete separation of concerns leads to an inefficiency of layers. As long as there is no unified data aware network stack to plug into, IT innovation for that new era will be choked off by its own complexity. It doesn’t have to be like that.</p><p>There’s enormous scope for the routing and scheduling of `business processes’ (whether in the public or private sectors) on new multi-scale platforms. Key processes want to live in two kinds of location:</p><ul><li><strong>Detached</strong>,<em> in situ</em>, at the edge (<strong>ingress tasks</strong>):</li><li>Close to the data sources, you deploy initial logic to handle the smart sampling, selection and ingestion of data, discarding noise at the outset.</li><li>You keep the source data in a repository, with replication for disaster recovery as long as it could be needed.</li><li><strong>Integrated</strong>, <em>in virto</em>, in the cloud (<strong>core tasks</strong>):</li><li>Selected data are pulled on demand into the more powerful cloud.</li><li>Process containers manipulate and transform data, and publish results as accessible, available URIs.</li></ul><p>In between these extremity locations lies a limited network that cannot absorb every bit of data we produce (even if that were a good idea), and a storage layer that has mostly forgotten about garbage collection. I wonder how long before IT confronts its own plastic crisis — and we move from images of plastic mountains in Indochina to documentaries about choking derelict data graveyards in the cloud that consume electricity and spur on global warming by their massive energy inefficiency?</p><h3>Getting DNA</h3><p>Tracking what went into and what came out of a cauldron of mixed up data isn’t just a practical issue, but one of security and integrity. That’s especially true as data processing becomes integral to embedded services on all levels of society. Chains of evidence, in business and public processes are important in everything from forensic records, to blockchain transactional records. The traditional tools for monitoring individual time-sharing systems (apart from being 40 years old) are next to useless for tracing behaviours in a micro-modular cloud environment. Something better is on the horizon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XlJkQKnATbq51Mlb" /></figure><p>From inputs to outputs, data driven processes conceal execution traces, that are labelled by provenance, and by intent. Standing on the edge of data processes, Koalja exploits ways to distill insight from these flows and can provide actionable, semantic data for realtime and forensic analyses — a rescaling and a modernization of kernel tracing for a new generation. This is <a href="https://www.youtube.com/channel/UCxoHs7KK2GCYcEZK6ttigaA/videos">Promise Theory</a> in action.</p><h3>From the plumbing to the workspaces</h3><p>The core challenges of computing are not about endless layers of APIs, or programming language choices — quite apart from the scaling of physical and virtual infrastructure — they amount to a few common issues about the smart management of space and time:</p><ul><li>Breaking a computation into an expressive graph of stages.</li><li>Storing essential data, “close to” users with <em>low latency</em> and <em>without loss of context.</em></li><li><em>Distributing data</em> efficiently, presenting a <em>consistent index</em> of updates.</li><li>Accessing versioned data in a consistent state.</li><li>Tracing processes for understanding and diagnostics.</li></ul><p>The last of these is more important than we tend to admit — today computer systems are living evolving things, not stable machinery. The goal of data processing is to understand stuff — a process involving humans as well as IT infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/0*bUhk8XpwGdssohUk" /></figure><p>Service ecosystems begin as simple processing pipelines, but that doesn’t capture their real significance. At Aljabr we are more interested in the long term trajectory of data processing, starting with the practical simplicity to bring it to a broad audience. Solving today’s problems, without addressing the underlying and upcoming challenges, would be missing an opportunity to provide stability to a generation of users.</p><h3>Smart workspaces</h3><p>We work together around single tasks because that is how humans organize. We already saw the shift to a tradesman model in IT with microservices allowing separation of concerns for complete lifecycle management of specializations. Heating, lighting, building engineers, (Smiths, Carpenters, Coopers, even Burgesses — pick a surname) have been doing this for centuries. Overlapping but independent concerns benefit from smart assistance, and communicate through community meeting places.</p><p>Today, we are still getting into a muddle over IT complexity, grappling with relatively new challenges of the Information Age. Tomorrow, we’ll return to the old model of human society, with modular trades, while making room for automation and even AI. The enabler for that Integration Age will be smart plumbing. The next step will be to go from smart plumbing to smart spaces, with smart virtual ecosystems, extending all the way out to the edge. The ingredients are available today from leading edge companies. The composition of those maturing ideas is Aljabr’s pipeline task.</p><p><em>The goal of smart infrastructure, with tasks and links, DAGs and DCGs, is not to just wire stuff together, but to act as coherent data circuitry, to be the “linker” in a multiscale compiled language — -binding jobs that are written in totally different tongues.</em></p><h3>It’s programming…</h3><p>We’ve exposed many of the basic requirements for future pipelines, and beyond, over the course of this blog, based on almost fifty years of lessons derived from history and experiences. If we forget about the transitory novelty of technologies in the news: microservices, Kubernetes, Knative, serverless, unikernels, service mesh, and so on, what it all amounts to is: how to scale a programming system from a single PC to world-spanning mega-computer — formed from many parts, partially shared by the private individuals, and changing in realtime. The <a href="http://shop.oreilly.com/product/0636920038542.do">principles</a> are known and reasonably understood — so it’s time to get on and integrate them for the emergent, interoperable cloud.</p><p><em>This is the final blog post for this year. In the New Year, we’ll return with new posts on the future of data aware infrastructure.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f22b2102cf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aljabr/15-beyond-data-pipelines-8f22b2102cf">15# Beyond data pipelines</a> was originally published in <a href="https://medium.com/aljabr">Aljabr</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[14# From wireframe to fully rendered]]></title>
            <link>https://medium.com/aljabr/14-from-wireframe-to-fully-rendered-3c740e7312b?source=rss-41e8f81629f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c740e7312b</guid>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-pipeline]]></category>
            <dc:creator><![CDATA[Mark Burgess]]></dc:creator>
            <pubDate>Wed, 05 Dec 2018 12:23:40 GMT</pubDate>
            <atom:updated>2018-12-05T12:23:40.232Z</atom:updated>
            <content:encoded><![CDATA[<h4>Resampling for trial and error</h4><p><em>The interplay between scale and reasoning contains </em><a href="https://www.infoq.com/articles/microservices-economics-small-things"><em>many pitfalls</em></a><em> for the unwary, as we discussed in the last posts. It is not one that users should need to confront on a technical level. Prototyping and testing code causes headaches for data scientists and may waste a considerable amount of computational resources. To avoid dealing with massive (non portable) data sets, it’s common generate fake data, much smaller in size, that can be tested quickly, but in doing so we might lose track of real causal effects — which combinations of changes were the ones the mattered? In this post we look at how a smart platform can shield users from these chores.</em></p><h3>Wireframing</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/0*B0v3e1yycqMC_KO2" /></figure><p>Most readers will have seen the movies <em>Avatar</em> and <em>Jurassic Park, </em>and will have been amazed at the realism of the computer generated graphics in those movies. But the finished and polished version of the movies is very different from the models used during the planning and directing of the film. In the initial stages, skimpy wireframe skeletons move around the screen, with varying levels of filling over time (see the figure below). Only in the final cut are the details rendered fully at the maximum resolution of the final format.</p><p>The same principle is true when developing test data for a later full processing. The larger the input data, the more painful it becomes to test and debug processes using the real thing later (e.g. when I re-published my old novel <a href="https://www.amazon.com/dp/1521035105?ref_=pe_870760_150889320">Slogans</a>, on the Amazon platform, through an online book production service, the validation of the 500 page PDF document took several hours each time before crashing without a useful error message). When you try to fake data you inevitably miss the real issues that come back to bite you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/0*l2MMlnqyYQM5jNw3" /></figure><p>While developing their story-lines, directors and CGI graphic designers work with simple real-time wireframe models. They run the same experiments over and over again, to get the details right. Later, when all the details are known, the entire experiment is run at full resolution as a batch job that might take significantly longer. The same is true of digital music rendering at different bit densities. All that happens at the flip of a switch. Data resolution affects the promise made by the final artifact. In a production environment, we want data to keep its best promises, but for wireframing a storyline strategy, we only need an outline of the data. The final rendering can be done later, in batch, in the cloud.</p><h3>The ghosts in the shell</h3><p>We can imagine a kind of “volume level” attached to data streams that governs their intensities, much like the volume controls on the different stages of your stereo system, from source to amplifier, etc. The lightest possible rendition of data analysis is to turn the volume to minimum, doing no sampling at all! Perhaps that sounds silly, but it could be used as a simulation of the pipeline, with no actual data, just empty messages to validate the connectivity and control flow. Tools like this have been common for modelling TCP/IP networks and Petri Nets for years.</p><p>Like the Internet, batching of dataflow is basically a traffic problem. There are stages (tasks) and there are links that guide the flow in a forward direction (links). Each stage needs to wait for enough data to arrive to make it worth while to process.</p><p>There are lots of ways to selectively sample data for testing, depending on file formats and batching strategies. For example:</p><ul><li>First n records,</li><li>Every ⅓ record,</li><li>Skip a stage.</li><li>Dummy transformation.</li></ul><p>Data scientists may only need to provide a notion of what the minimum acceptable sample is that can be used to generate an output. As steps are taken to full resolution — described as policy for the pipeline — smart links could adapt automatically to build low-resolution artifacts. These temporary artifacts could be cached as just another version attribute too, allowing re-scalings to take place without mandatory re-computation of every stage.</p><h3>Pump up the volume!</h3><p>Suppose we imagine a data pipeline with several stages (in the figures below). At each <strong>smart link</strong> in the process (dashed boxes), one could imagine a slider or volume knob, something like what you find on an audio-visual mixing desk, which would cause the link to alter the throughput of data by sub-sampling transparently. The user’s task code need never know anything about the fullness of the sample — the user can keep the setting low while working from the hammock on the beach. And turn it to full once the code and data are both believed to be for the final cut.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jQWiLnfJAMbAlgZW" /></figure><p>Turning up the volume on the lower link (between task 2 and task3) might spawn a flood of data, which the link can then respond to by parallelizing its task. At low resolution, the user can save CPU cycles and time by turning down the resolution. If running the pipeline on a laptop from the beach, you don’t want to be pulling data over the WiFi. Later when you run it in the cloud, congestion is less of an issue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jK3tvZ5GCSG4A-DE" /></figure><p>These are very simple helper functions for users, but they can make all the difference.</p><h3>The beginning of a platform</h3><p><em>Behaviours that make a real difference to user focus should only need the permission and guidance of users, not complex re-coding and associated administrative skills — and it should especially not require any special incantations to summon forth changes to cloud infrastructure. Kubernetes is the beginning of a great platform, but it should never be mistaken for a cool toy to engage users. Its job is to disappear. One of Aljabr’s goals with the Koalja project is to enable platform transparency for users in all organizations. No one should need a team of SREs just to get simple work done flexibly and scalably.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c740e7312b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aljabr/14-from-wireframe-to-fully-rendered-3c740e7312b">14# From wireframe to fully rendered</a> was originally published in <a href="https://medium.com/aljabr">Aljabr</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[13# The 4 R’s]]></title>
            <link>https://medium.com/aljabr/13-the-4-rs-5688f38241bb?source=rss-41e8f81629f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/5688f38241bb</guid>
            <category><![CDATA[data-processing]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[data-pipeline]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Mark Burgess]]></dc:creator>
            <pubDate>Thu, 22 Nov 2018 13:16:45 GMT</pubDate>
            <atom:updated>2018-11-22T13:16:45.349Z</atom:updated>
            <content:encoded><![CDATA[<h3>Reading, ‘Riting, Recursion, and Reusability</h3><p><em>Data pipelines connect graphs of tasks together, reading and writing over data links in between. In previous posts, we’ve hinted at how a platform with smarter links and smarter tasks could help users to develop and test processing circuitry. It could simplify — perhaps even eliminate — certain issues that plague data pipelines, letting the platform do the work of processing, instead of forcing technical acrobatics onto end users. In this post, we point out how to enable simple breadboarding for a generalized circuitry model, based on a smart pipeline paradigm.</em></p><p>Data pipelines obviously read and write data, but while folks normally mention Directed Acyclic Graph (DAG) flowcharts, that model is limiting, and in general we need something more expressive — as the Ko language showed internally at Google. There is also a powerful case to be made for extending DAGs to include ordinary programming constructs like loop iteration and recursion in the evaluation of results.</p><p>When data get shared over wide areas, there’s usually a need to distribute the processing too. That turns the network into a giant computer. But we shouldn’t oversell this (the call for Turing Completeness in all things always feels more like a protest than a carefully considered position) — but let’s rather say that there are cases where reasoning needs to be distributed, because it’s impractical to localize computation when dealing with “Big Data”.</p><h3>Distributed reasoning</h3><p>Data processing can benefit from explicit and implicit loops, with privisos. Everyone understands the idea of iterating over queues and lists, re-using the same code on each item. Recursion means that we first promise an outcome then calculate it `just in time’. The imperative approach would be to build all prerequisites for a result one by one, and then combine them at the end. The result is the same, but putting detail before understanding results in a clumsier form of expression.</p><p>In the last post we emphasized the relationship between process safety and data privacy, mentioning the importance of handling the 3 F’s (faults, error, and flaws). In this piece, we are jumping from the 3 F’s to the 4 R’s: reading, writing, recursion, and reusability. As mentioned, reproducibility is a common business imperative, but any public (global and mutable) data involved in a processing pipeline will render it potentially <em>non-reproducible</em>, and push the burden of managing process safety onto the user. That might well be an unjust burden if the user is primarily interested in data science. In the cloud, the stakes are higher, as the potential ramifications of scaling up a disaster could have potentially unbounded cost.</p><h3>Recursion and privacy at scale</h3><p>To do more general processing at scale, you might use a mixture of iteration and recursion, across distributed shared data, for:</p><ul><li>Reusability of code in the same process</li><li>Reusability of data in the same process</li></ul><p>The classical way to achieve reuse of code is to use local variables and parameter passing, with private workspace, just like passing parameters to functions. The problem when doing this at scale is that, for large data sets this can involve copying large amounts of data to the “stack frame” of every call. It’s expensive and unnecessary as long as input data are immutable.</p><p>The temptation to just let the “infinite cloud” handle it is also compelling, especially for inexperienced users who don’t know what goes on behind the scenes. Moreover, even some old school system developers still think in terms of simplistic patterns like the “good old load balancing middlebox” and may feel that they’ve handled scale just by throwing a naive load balancer process into the flow.</p><p>Moving data to and from functions directly, instead of pointing to it by reference, will lead to data bottlenecks that plague classical middlebox load balancers. Instead of “eating” data, processes can sit alongside the pipeline and dip into that data on a “need to know” basis (Don’t Eat, Take a Seat). This can lead to a side benefit of very useful helper functionality, for partial data analyses, such as in testing (see the next post #14).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*C24FjsD_NRT15tjD" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xOQumGE40-htsmU9" /></figure><p>For a platform to take smart decisions, on behalf of users, it needs to scale data processing in a smart way, taking the computation to the data rather than vice versa. It needs to make that computation safe to recursion and iteration, with guard rails against unintended mistakes and inexperienced choices.</p><h3>Looping out of control</h3><p>Users love databases as a means of permanent and temporary storage, but databases are global variables, and may lead to covert back channels. If a persistent non-ordered datastore, say a vanilla SQL database, is used instead of an explicit FIFO, a pipeline may end up revisiting values that it has already worked on before — because they don’t automatically disappear from the queue once done. At best this might be wasteful, at worst it may lead to inconsistency, unbounded loops, and deadlocks. Fortunately, the issues can be handled with <a href="https://www.usenix.org/legacy/publications/library/proceedings/lisa97/full_papers/15.burgess/15_html/main.html">adaptive locking</a> policies, and the discipline of making outcomes <a href="https://www.sciencedirect.com/science/article/pii/S0167642303000479">idempotent</a>. These disciplines can also be embedded as a service within smart platform as an optional convenience. Letting the platform provide meaningful assistance is a powerful way of keeping control over the pipeline on a local level, as well as simplifying major details for users.</p><p>Let’s look at such a hypothetical example of a pipeline, which is not a true DAG, and try to formulate the problem as `bread boarded’ pipeline, as simply as possible. The figure below shows a simplistic web crawler, seeded by a few URLs, which reaches out to those URLs and scans them for further links, returning any new URLs to the queue to visit in turn. The process is a process DAG, wrapped in an implicit data loop, making it an implicitly cyclic graph — with all the potential dangers of infinite looping, etc. Let’s further assume that the data are dropped into a plain old database that is not explicitly a part of the pipeline. Inexperienced users naturally find this convenient, and may not appreciate the issues. It could easily get stuck in an infinite loop by crawling the same pages again and again. Each thread is superficially a DAG, but the entire process is an endless non-deterministic loop. What the example needs is a proper FIFO queue, with repeated values expunged for a policy-determined interval of time.</p><p>The way we are taught to think about programming is through imperative constructions, from left to right. So, without special assistance, we might first create a process to spawn off a number of worker threads, then each thread can pass along its stages in separate channels. To share the data and keep track we write to a database (see the figure below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*u2fEq-l3wipBSEuS" /></figure><p>As shown, this pipeline does nothing until some data are fed into the serial queue. To get it started we have to pre-seed the data queue with some URLs, by dropping them into the database out of band — then off it goes crawling from those locations and accumulating more. But crucially, it does nothing to avoid getting stuck in loops, e.g. if pages refer to one another, the entire pipeline can oscillate back and forth between the same URLs without end. The scaled process needs to avoid retracing recent paths.</p><h3>Locks for short term memory</h3><p>We can improve on this first draft in a few ways — first, by adding locking protection from revisiting recently visited URLs somewhere in the loop, with an expiry date on blocking data for repeat crawling (this is basically why neurons have a dead time after firing — to preventing tight loop seizures). We can also remove the explicit parallel logic, which is of no interest to a data scientist, and make the parallelism automatic according to the number of pending URLs in the stream, and a resource limit. In this way, when the pipeline is quiet, or when we are happy to “nice” it to a lower priority, we can reduce the number of threads without halting the process or losing its state. The diagram below shows this behaviour.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*rNK4Gg4ETTBIYHqh" /></figure><p>The obvious point, however, is why should the pipeline user need to think about these issues, and define the parallel processes at all. They are not part of the logic. In its simplest form, we can forget about all the scaling issues, and draw the process entirely in terms of its dependencies (see below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/0*VCR9BT117yp-XoOw" /></figure><p>We may then leave implicit or as a configuration parameter the amount of parallelism (say maximum of 3 threads) to be handled automatically by smart wrappers for the tasks and links. For the user, the whole thing could look as simple as this:</p><pre><br># Pipeline notebook<br></pre><pre>ingress -&gt; getURLs</pre><pre>getURLs -&gt;3 “crawl neighbours”</pre><pre>        -&gt; “store graph”</pre><pre>        -&gt; getURLs<br></pre><pre># Notes</pre><pre>[crawl neighbours]</pre><pre>Container = crawler_*.docker.img</pre><pre>Version = 1.2</pre><p>The labels represent functions, some of which may need further configuration, annotated at the bottom for instance, in a notebook approach. Very few details need be given explicitly, and the need for locking can be detected implicitly from the self-reference implied by the loop.</p><p>To handle looping, the getURLs function only has to aggregate its inputs from two sources unambiguously: i) the ingress source where hints get dropped off, and ii) the data queue returned from crawling. A few policy choices are needed to disambiguate the method fully, but is otherwise well defined and automatable. The figure below sketches schematically how inputs may be aggregated. The details are for another time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*51-cnXshjbAASl8k" /></figure><h3>Smart and SmartRRRR</h3><p><em>In this post, we considered how reading and writing of data, as well as recursion, and re-usability of code, can be handled safely and efficiently across multiple data channels, without unnecessary copying to repetition. Alongside those considerations, we can remove awkward issues, like scaling, into the abstractions about connectivity and task management. The role of a smart platform starts to look helpful in dealing with these issues. In the next post, we’ll return to dig deeper into the sampling of data across links — and see what smarter links could do to help users test pipelines.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5688f38241bb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aljabr/13-the-4-rs-5688f38241bb">13# The 4 R’s</a> was originally published in <a href="https://medium.com/aljabr">Aljabr</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[12# One step forwards, two steps backwards]]></title>
            <link>https://medium.com/aljabr/12-one-step-forwards-two-steps-backwards-459a2e3caca3?source=rss-41e8f81629f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/459a2e3caca3</guid>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[data-pipeline]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Mark Burgess]]></dc:creator>
            <pubDate>Wed, 14 Nov 2018 09:09:51 GMT</pubDate>
            <atom:updated>2018-11-14T09:09:51.012Z</atom:updated>
            <content:encoded><![CDATA[<h3>Faults, flaws, errors, and policy</h3><p><em>In the previous post, we looked at how </em><strong><em>policy decisions</em></strong><em> about slicing the data cake can affect a pipeline’s ability to process data effectively, determine scale decisions, and decide the semantics of a correct outcome. There are also plenty of subtle issues in data sharing that can lead to </em>indeterminism<em>. If the goal of a pipeline is to enable reproducible version-controlled computation — -in a way that supports of proper chain of custody, then we need to look at the influence of scope, errors, and caching, with versioning of data and software too. This quickly becomes a combinatoric issue of challenging proportions. Thankfully, proper tooling can make this easier, but it can’t take away the problem completely. In this post, we look at the issues: from smart caching policy of the intermediate stages, to the scope and mutability of data. How can we recover from broken pipes, undo bad changes? What should be the Time To Live (TTL) for data in a pipeline cache? How shall we handle </em><strong><em>faults, flaws, and errors</em></strong><em>…</em></p><h3>The three F’s</h3><p>The three F’s (faults, errors, and flaws) are unavoidable parts of any real world system. But what do they have to do with data policy?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rZ3cqq1s1tgIsE75" /></figure><p>With clear definitions (see figure above and <a href="http://markburgess.org/treatise.html">Treatise on Systems, volume 2</a>), the answer becomes quite apparent:</p><ul><li>Faults are <em>failures to keep an intended promise</em>;</li><li>Errors are <em>execution anomalies or mistakes; and</em>,</li><li>Flaws are <em>inappropriate intentions/promises for the intended context</em> at design stage.</li></ul><p>In other words, you can’t define a fault, error, or flaw, without making promises about what your intent is, so decision-making, policy, and faults are joined at the hip. But programming of a system (whether by code or edict) can be dangerous when promises don’t deal with all the cases. Logic presumes complete enumerability, but our real world leads to the unexpected.</p><p>If a promise is broken, it is not simply “not kept”, the remediation may be to do it again, or have someone else do it, but it might be too late, especially in a “realtime” setting. This sounds easy enough, but nothing about distributed systems is ever easy.</p><h3>So what promises does a data pipeline make?</h3><p>Even simple data pipelines need to keep a lot of promises in order to hang together. When pipelines become large in number of stages or amount of data, span wide areas, or play mission/time critical roles in a process, like data processing onboard a vehicle, priorities may change significantly as compared to the more leisurely processing of a web crawler data or error logs in web applications.</p><ul><li><strong>Scale / parallelism: </strong>a promise to suck up all the data presented at the input and process it within a certain amount of time. A user might be able to speed up processing of data by utilizing parallelism, as long as a job does not rely on the serial order of data. Data processing might have a Service Level Objective (SLO) to promise, as part of a time-critical business process. This can also be a flawed idea. There will be limits to any system — and therefore eventually faults. No pipeline can ingest arbitrary volumes of data at an arbitrarily fast rate without managing flow control, and ultimately having to drop something (like TCP/IP).</li></ul><p>If a parallel branch fails because of incorrect splitting, improper coordination, or resource exhaustion, the final result may be damaged, reordered, or incapable of completing. A damaged result might be more harmful than no result at all, and vice versa. That value judgement may require a forensic determination only after the incident — all very unsatisfactory for programmers who want “truth”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/0*useAlJSTwArQv6x0" /></figure><ul><li><strong>Accuracy:</strong> This promise depends on the amount of data and the algorithm used by the data transformations. Software bugs and encoding mismatches could lead to errors and flaws in the software plugged into your pipeline. But when you are riding on top of a whole stack of infrastructure turtles from hardware to virtualized software, the possibility of being affected by faults in infrastructure has to be taken seriously. Networking is a common cause of errors, because it relies on so many collaborating parts.</li><li><strong>Locality and latency</strong>: A more hidden promise relates to the effective location of data artifacts implicit in a computation. Where should these artifacts be located virtually and physically? How does that affect their timely arrival? Volumes in Kubernetes might be local or remotely mounted. There is often something to be said for keeping data on local disk. Only the largest datacentres may have shadow networks with fibre channel for storage. Latency is data transportation is a key issue — -and, while Ethernet is many times faster than the computer’s internal bus, this doesn’t necessarily translate into better performance for reading and writing data. Finite size limitations on memory and disk storage are equally common. When memory is short, computers start to fall apart — -CPU flies off the handle trying to page memory to disk, and this has a cascading impact on other services.</li></ul><p>Underneath these issues, there are many dependent promises made by platform infrastructure too (see box below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*SeUJNNA9NCvr9Bfka8P6nA.png" /><figcaption>See also <a href="https://kubernetes.io/docs/concepts/workloads/pods/disruptions/">Kubernetes disruptions</a>.</figcaption></figure><h3>Data permanence — smart caching</h3><p>In the last post we talked about how to decide when enough data are ready for processing, by buffering inputs into batches. A related issue is what happens when previously accepted data need to be recomputed, because of errors, faults, and flaws in previous runs. Recomputations may or may not need to preserve a sense of the original time and conditions, but they need to be reproducible in order to trust the process.</p><p>Data pipelines typically need to buffer, cache, and aggregate data, and even maintain state though their transformation rules could be stateless. Data transformations, which convolute data further, may need access to multiple <em>constant</em> data values that might be too large to load into a single container. They need attached storage that can be addressed using a method appropriate to the process.</p><p>Some computations are one-time events, with a clean expiry date; but data scientists may also want to <em>revisit the data timelines</em> many times in order to shape their thinking and perfect their code. They may not initially know what they need from data, but may need to be able to revisit sources until some “statute of limitations” has expired, e.g. for legal reasons, such as tax audits. The time in between might be decades (as for criminal investigations, movies, and music performance master tapes) — far in excess of the lifetime of a computing cluster in the public cloud. On the other hand, it might be mere hours for routine flight data telemetry. All this adds up to a need to archive sourced inputs for future reference, in a secure immutable location <em>with relevant contextual metadata for reference</em>. This is part of a larger story about knowledge management in IT.</p><p>A smart platform can assist in these matters:</p><ul><li>By caching<strong> original upstream sources</strong> and tracking downstream changes.</li><li>By ensuring reproducibility of downstream results, with <strong>smart cache buffers</strong> and preservation of <strong>metadata context</strong>. (Caching may be “permanent” and from the initial ingress)</li></ul><p>Then results can be recreated from cached source material if need be. Keeping a copy of any external source is essential for reproducibility, while retention of later stages is non-critical but convenient for speedup.</p><h3>Hidden flaws: scope and reproducibility</h3><p>The downside of caching and snapshotting of data is that it freezes time even when time keeps on going. We work hard in IT to maintain the illusion of <a href="http://markburgess.org/certainty.html">determinism</a>, but the most pernicious source of uncertainty is reliance on data that are exterior to a process. The analogous case is the use of global variables in programming.</p><p><strong>Global variables</strong> (i.e. shared memory) are much maligned in computing these days, but they are a necessary evil for cooperation (and therefore for scaling) — all databases are global shared memory, for instance. You just need to understand the implications. If you want <strong>reproducibility,</strong> and the ability to roll reproducibility back and forth in time while debugging your process semantics, through different versions of code and computation, then you should stick cautiously to local pipeline data channels. For example, compiling a software version is “safe”, but crawling the web is not “safe”.</p><p>Of course many processes don’t aspire to reproducibility, they are quite ad hoc, e.g. machine learning, daily stats, etc. But some variations may have greater consequences than others! The hard truth about hidden flaws: anything you read from or write to that is <em>mutable</em>, over the duration of your process, i.e. is beyond the controlled scope of local links, will lead to <em>non-reproducible results</em>. If you read from an external source, you could cache the response to ensure a form of reproducibility, but if you write to anywhere outside the pipeline (except say a passive log) then you’ve changed the world. Caching can be a helpful tool in allowing you to replay the past — that’s why it can be crucial to those inevitable calls for “roll back”.</p><h3>Intended and unintended outcomes</h3><p>Some pipelines are based on intentional processes (like a deliberate query of a source), some on `realtime capture’ from sensors or streams, which is unintentional (take what you get as `best’ as you can). Should the system protect itself or crash on error? In order to survive, a process might have to drop data batches (as routers and switches do). Caching can help to buffer processing, but clearly we can’t cache everything forever. There has to be garbage collection. You have to forget data sometime. It will be interesting to see how many Photos and Videos on the Internet survive the decade.</p><p>When users pull data from mutable sources, the result can be different on each trial. “Tell me the latest” is not a reproducible query, so mutable outcomes will lead to flawed reproducibility. This is made worse when pipelines are recursive, i.e. when they feed back on themselves, we have to deal with the possibility of mutable state (global variables). A single immutable timeline, based on its own internal clock, is what Kafka ties to provide. This is an expensive solution though — perhaps not all users would be willing to pay for the infrastructure cost for this level of “truth”. It depends on the stakes.</p><p><em>Putting data into a database is a classic solution that brings with it a classic problem: databases, caches and storage eliminate causal ordering. You may try to replace process time ordering with timestamps according to someone’s clock, but that might not be a consistent set with respect to a query process using its own clock. Whenever you put data into a cache, database, or aggregate store (including a neural or Bayesian learning network) it becomes a “big grey mess”.</em></p><p>The upshot of all of this is that we cannot definitively promise reproducibility of <em>process outcomes</em>, only reproducibility of <em>pipeline behaviours</em>. Repeating the same actions will not always lead to the same result. It will always be incumbent on users to understand the process they are initiating.</p><h3>Policy for handling simple interruptions</h3><p>Caching can help trade latency for backlog, and avoid wasting energy costly CPU, at the expense of memory, but there are limits to how much caching can be tolerated.</p><p><em>All of us have some experience of intermediate caching for data with trivial semantics. Think of download managers for large files — such as video or music — these usually have a progress bar cursor. In case of interruptions, data transfers can be picked up where they left off, by keeping a cursor in the input stream. A cursor remembers its place within immutable source data, but becomes useless if the source data can change in “real time”.</em></p><p>During a recovery, we would always like to avoid doing work more than once, unless it was performed incorrectly (or the definition of correct changes). This might not only be convenient but necessary to deliver some level of reproducibility. However, a data process cannot know whether data were processed correctly or not, unless the process is aware of the data payload, at some level. A tantalizing question is therefore: <em>can we make this data awareness a clear reality at a platform level? </em>There are some hard <strong>policy issues</strong> lurking in this question.</p><p>It often comes as a shock to many that data science is <em>itself </em>an <a href="https://www.infoq.com/articles/microservices-economics-small-things">unstable process</a> when scaling data. Small changes in data and processing policy can reverse the conclusions determined, because of the naive use coarse grain resolution, or a Boolean view of decision making.</p><p><em>In this post, we’ve discussed some of the important issues around caching and copying of data for continuity, and the distortions that come from the three F’s. We deliberately avoided the issue of data consistency between parallel process lanes, but that is an additional complication. From a purely dependency perspective, there is a great deal of room to improve the user burden and quality of experience by supporting traceable caching of artifacts. Ultimately, we cannot definitively promise reproducibility of process outcomes, only reproducibility of pipeline behaviours. It will always be up to the users to understand the process they are initiating. In the next post, we look at how batching could be used to make policy based trade-offs between accuracy and speed, during testing.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=459a2e3caca3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aljabr/12-one-step-forwards-two-steps-backwards-459a2e3caca3">12# One step forwards, two steps backwards</a> was originally published in <a href="https://medium.com/aljabr">Aljabr</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Aljabr in the news]]></title>
            <link>https://medium.com/aljabr/aljabr-in-the-news-6181072a83fc?source=rss-41e8f81629f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/6181072a83fc</guid>
            <category><![CDATA[big-data]]></category>
            <dc:creator><![CDATA[Mark Burgess]]></dc:creator>
            <pubDate>Fri, 09 Nov 2018 08:40:14 GMT</pubDate>
            <atom:updated>2018-11-09T08:40:14.791Z</atom:updated>
            <content:encoded><![CDATA[<ul><li><a href="https://thenewstack.io/aljabr-aims-to-simplify-care-and-feeding-of-data-pipelines/">Aljabr Aims to Simplify Care and Feeding of Data Pipelines - The New Stack</a></li><li><a href="https://thenewstack.io/aljabr-bringing-pipelines-together/">Aljabr, Bringing Pipelines Together - The New Stack</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6181072a83fc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aljabr/aljabr-in-the-news-6181072a83fc">Aljabr in the news</a> was originally published in <a href="https://medium.com/aljabr">Aljabr</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>