<?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 Axel van &#39;t Westeinde on Medium]]></title>
        <description><![CDATA[Stories by Axel van &#39;t Westeinde on Medium]]></description>
        <link>https://medium.com/@axel.westeinde?source=rss-ca0fbb69c050------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hEimTkBUxUZii8DsgXzdlg.jpeg</url>
            <title>Stories by Axel van &amp;#39;t Westeinde on Medium</title>
            <link>https://medium.com/@axel.westeinde?source=rss-ca0fbb69c050------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 17:19:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@axel.westeinde/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[Unifying Batch and Stream Processing in a Data Lakehouse]]></title>
            <link>https://medium.com/@axel.westeinde/unifying-batch-and-stream-processing-in-a-data-lakehouse-61fe3441ae48?source=rss-ca0fbb69c050------2</link>
            <guid isPermaLink="false">https://medium.com/p/61fe3441ae48</guid>
            <category><![CDATA[data-lakehouse]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[data-platforms]]></category>
            <category><![CDATA[big-data]]></category>
            <dc:creator><![CDATA[Axel van 't Westeinde]]></dc:creator>
            <pubDate>Tue, 27 Sep 2022 10:16:58 GMT</pubDate>
            <atom:updated>2023-01-31T14:28:08.048Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lwjl5Dcb59RL1kOJGNf4OA.jpeg" /></figure><p><em>This blog is the third in a series that highlights exciting developments within the world of data platforms. Check out the first and second parts here:</em></p><ul><li><a href="https://medium.com/@axel.westeinde/the-arrival-of-the-data-lakehouse-fc28faf4dd95">The Arrival of the Data Lakehouse | by Axel van ‘t Westeinde | Medium</a>;</li><li><a href="https://medium.com/@axel.westeinde/monolith-modular-mesh-modern-architecture-for-modern-data-platforms-2c0802ee0881">Monolith, Modular, Mesh: modern architecture for modern data platforms | by Axel van ‘t Westeinde | Medium</a></li></ul><p><a href="https://medium.com/@axel.westeinde/the-arrival-of-the-data-lakehouse-fc28faf4dd95">In one of my previous articles</a>, I gave a brief introduction to the data lakehouse concept and why it’s taking the data world by storm. By combining the high performance of data warehouses with the scalability, cost-efficiency, and flexibility of data lakes, a data lakehouse provides possibilities for getting the best of both worlds in terms of analytical data storage and processing within modern data platforms. In this article, I will highlight how a lakehouse architecture can unify batch and real-time data processing flows and which challenges arise during implementation. These lessons are based on recent experiences for one of our clients at ALTEN.</p><p><strong>Greek architectures</strong></p><p>Many modern cloud data platforms today separate the data flows for historical analytics and real-time analytics, respectively nicknamed a ‘cold’ and ‘hot’ path. This architectural pattern is also known as a <em>lambda (Λ) </em>architecture. (This Greek letter is chosen because, just like the architecture, it branches out in two paths.) The cold path in a lambda architecture utilizes batch-oriented data processing methods to handle incoming data with a given frequency (e.g., daily). Because batch processing methods are unsuitable for real-time analytics, the hot path is intended for using streaming methods to give live views of incoming data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*l5TuglwTTHDdYo-_RWewWQ.png" /><figcaption><em>Visualization of a lambda architecture. Courtesy of Microsoft: </em><a href="https://docs.microsoft.com/en-us/azure/architecture/data-guide/big-data/#lambda-architecture"><em>https://docs.microsoft.com/en-us/azure/architecture/data-guide/big-data/#lambda-architecture</em></a></figcaption></figure><p>The main reason to opt for a lambda architecture is to enable real-time analytical insights within your organization. The batch processing methods used in a cold path are too resource-intensive to use for (near) real-time processing, mainly when dealing with larger volumes of data. Utilizing a hot path for real-time views on incoming data can support time-critical business processes. Unfortunately, it does come with a drawback: the quality of the real-time data can vary. One of the reasons batch processing is resource-intensive and time consuming, is that it aims to give a comprehensive and accurate representation of the data. The hot paths in lambda architectures have no such ambitions. Some of the transformations necessary for integrating new with existing data are too resource intensive to perform in a hot path. Therefore, the stream processing in a hot path can be seen more as a ‘quick and dirty’ view on incoming data than as the most recent representation of an organization’s state of affairs.</p><p>Another drawback of the lambda architecture is that both the hot and cold paths within the data platform will feature separate resources with separate codebases. Lambda architectures therefore introduce technical complexity which impedes development and maintenance. Naturally, the data industry has been searching for alternatives which alleviate these shortcomings.</p><p>One of the current alternatives is a <em>kappa </em>architecture. A kappa architecture solely makes use of streaming technologies to process both streaming and batch data. Because the kappa architecture considers data streams to be immutable, one major drawback is that reprocessing a dataset involves ‘replaying’ the past streams to get to the correct representation. This requires the streaming applications (e.g., message queues/brokers) to store a significant amount of history, which impedes the applications’ performance and goes against their original purpose. However, this is fine when the proportion of batch data is relatively small compared to the proportion of streaming data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*YSvZ6s4001qopyKIePsuUQ.png" /><figcaption><em>Visualization of a kappa architecture. Courtesy of Microsoft: </em><a href="https://docs.microsoft.com/en-us/azure/architecture/data-guide/big-data/#kappa-architecture"><em>https://docs.microsoft.com/en-us/azure/architecture/data-guide/big-data/#kappa-architecture</em></a></figcaption></figure><p>The shortcomings of lambda and kappa architectures have paved the road for a new type of Greek-letter architecture: the <em>delta </em>architecture. Just like the respective letters <em>Λ </em>and <em>Δ, </em>the difference between a lambda and delta architecture is that the delta architecture unifies the two ends of a lambda. Similar to a kappa architecture, it combines batch and streaming data in one processing flow with one codebase. The key difference between kappa and delta architectures is that in a delta architecture, every processed record is considered a ‘delta’ (i.e., change or differential, which can be of the type <em>insert</em>, <em>update</em>, or <em>delete</em>) record instead of an append-only record. (A delta architecture can therefore be seen as an upgrade to a kappa architecture, but less lightweight.) These two characteristics of a delta architecture aim to alleviate the pains of the lambda and kappa architectures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zrBinakNWq1XoQTUHbB3hQ.gif" /><figcaption><em>Example of a delta architecture. Courtesy of Jixin Jia: </em><a href="https://jixjia.com/delta-architecture/"><em>https://jixjia.com/delta-architecture/</em></a></figcaption></figure><p><strong>Delta architecture and the data lakehouse</strong></p><p>Although the term ‘delta architecture’ <a href="https://www.databricks.com/discover/getting-started-with-delta-lake-tech-talks/beyond-lambda-introducing-delta-architecture">has originally been coined by Databricks</a> as a marketing term for their lakehouse implementation Delta Lake, it is relevant for almost every current lakehouse implementation out there. In lambda architectures, the setup includes almost always a data lake store for staging data and a data warehouse plus temporary (often NoSQL) data store for cold and hot path analytics respectively. In a lakehouse setup, the data warehouse and temporary data store become redundant because high-speed analytics can all be performed in the data lake store itself. (For more information on how this works, <a href="https://medium.com/@axel.westeinde/the-arrival-of-the-data-lakehouse-fc28faf4dd95">see this previous article</a>.) Therefore, a data lakehouse setup lends itself perfectly for unifying batch and streaming data flows, and is nearly synonymous to a delta architecture.</p><p>Thanks to modern data processing engines such as <a href="https://spark.apache.org/docs/latest/index.html">Apache Spark</a>, <a href="https://flink.apache.org/flink-architecture.html">Apache Flink</a>, and <a href="https://trino.io/">Trino</a>, unifying batch and streaming data flows while maintaining all logic in one codebase, has never been easier. Each of these processing engines also has support for at least one of the big three lakehouse implementations of this moment (Hudi, Delta Lake, and Iceberg), making delta architectures increasingly feasible for all organizations.</p><p>In the introduction of this article, I promised to discuss a couple of highlights from a recent delta architecture implementation we have done for one of our clients at ALTEN. Since Apache Spark is currently the most prevalent engine for big data processing, especially in a data lakehouse setup, we have chosen to implement a delta architecture using Apache Spark. Therefore, the rest of this article will be scoped to an implementation in Spark. Now, let’s move on to discussing how to implement a delta architecture using a data lakehouse setup.</p><p><strong>Structured streaming</strong></p><p>One of the key features in Spark, especially for unifying batch and streaming data flows, is <a href="https://spark.apache.org/docs/latest/structured-streaming-programming-guide.html"><em>structured streaming</em></a>. In essence, it is a technique through which Spark breaks down incoming data into configurable micro-batches which can be processed using their DataFrame and Dataset APIs. The size of these micro-batches can be configured based on their desired timespan, ranging from seconds to minutes to hours, from continuous (process a micro-batch as soon as the previous one is done) to one- off (process everything that is available and then exit, similar to regular batch processing). Structured streaming effectively eliminates the need to maintain separate data flows for batch and streaming data, because it can handle both types of data, as well as anything in between. Hence, it is a perfect tool to build your delta architecture around.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*uPSooAhNI369oi4DDy__Hw.png" /><figcaption><em>You can only pick two.</em></figcaption></figure><p>Unfortunately, structured streaming is not a one-way ticket to paradise. Creating a delta architecture using Spark involves a delicate balancing act of choosing between low latency, low costs, and a large number of (near) real-time tables. You can’t have all three of these factors at once due to the resource- intensive nature of Spark. It is important for every use case to discover the right balance between these three factors based on the requirements at hand.</p><p><strong>Building a data processing application for a lakehouse setup</strong></p><p>Recently, one of our clients at ALTEN expressed the wish to start extracting and centralizing data from their operational systems. From an analytics perspective, their information landscape was in a greenfield state. This left many architectural options open for creating a centralized analytical platform. The main requirements we were given for data processing included: 1) the platform must have high flexibility to changes and support for different types of structured and unstructured data; 2) the platform must have the ability to process both batch data that is delivered periodically and change data capture feeds from operational systems; and 3) processed data must be highly auditable.</p><p>These requirements led us to almost immediately to advising a data lakehouse setup, including its corresponding <a href="https://www.databricks.com/glossary/medallion-architecture">medallion design pattern</a>, because: 1) a lakehouse has more flexibility to schema changes and data model changes than a regular data warehouse, as well as support for any type of data; 2) a lakehouse eases the setup of a delta architecture where batch and streaming data flows are unified; and 3) the medallion design pattern within a data lakehouse ensures that the raw data is stored as-is, transformed data is stored separately, and every lakehouse implementation supports ‘time travel’ to previous states of a table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Puhq8uaM2WeJxAeH634S3w.jpeg" /><figcaption><em>Medallion design pattern. Courtesy of Databricks: </em><a href="https://www.databricks.com/glossary/medallion-architecture"><em>https://www.databricks.com/glossary/medallion-architecture</em></a></figcaption></figure><p>For the technical implementation of the data lakehouse, we have opted for <a href="https://delta.io/">Delta Lake</a> because it was the most technologically mature at the time. The obvious choice would be to go for a Delta Lake implementation using Databricks, because of their proprietary Delta Lake features. However, we had to choose Apache Spark Pools in Azure Synapse Analytics because of the easier integration with the existing RBAC permissions model in AAD and the more straightforward network isolation features. (Both of these features weren’t generally available in Databricks at the time.)</p><p>The most difficult part was designing a future-proof, modular data processing application which formed the heart of our data lakehouse. I will take you through the most important design choices we’ve made along the way.</p><p>Firstly, we have chosen to build the application’s processing logic as a regular Python project. While this sounds obvious (languages aside), nowadays many organizations opt for encapsulating their code in notebook form, either Jupyter or Databricks. Notebooks also have modular features, but usually come with some caveats that go against software engineering best practices. Two of them that come to mind are: 1) the source control workflow for notebooks often feels clunky and, in the case of Databricks notebooks, require you to utilize a still immature UI; and 2) importing modules from other files is done implicitly, which means it isn’t clear which functions or classes are imported when you import a notebook. The latter especially produces unexpected behavior when objects with the same name are imported. Thus, we have chosen to structure our Spark project folder around modular ‘jobs’ encapsulated in <em>.py </em>files, a Python package which contains reusable functions and classes, and a generic ‘spark-submit’ Bash script to launch any of the jobs in any environment by passing the relevant command line arguments. (The main inspiration for structuring our Spark project like this, can be found <a href="https://towardsdatascience.com/how-to-setup-the-pyspark-environment-for-development-with-good-software-engineering-practices-5fb457433a86">here</a>.) This setup allows your files to be committed, reviewed, and merged using a standard Git workflow. It also allows for explicit importing of code from various modules.</p><p>Secondly, each job follows the same structure and utilizes Spark’s structured streaming API, such that batch and streaming jobs are syntactically the same. In fact, the black-and-white distinction between batch and streaming jobs has effectively been dismantled. Each job has its own ‘trigger window’, designating the amount of data included in a micro-batch expressed in a period of time, where every processing time on the spectrum from daily to sub-second is possible. Another benefit of unifying batch and stream processing jobs is that every job can easily be built using generic and reusable Python modules. This is further aided by our chosen project structure.</p><p>While this unification of batch and streaming data flows is elegant, it still requires careful balancing of the aforementioned factors: latency, cost, and the number of real-time tables. One of the requirements we had received was that every table had to be processed ‘near real-time’ to ensure the CDC records from their operational systems were processed as soon as possible. Since the definition of near real- time wasn’t set in stone, we agreed upon setting it at a maximum of 15 minutes delay, 24/7. This allowed us to keep costs within reasonable limits given the relatively small volumes of data that needed to be processed.</p><p>Another way we were able to keep costs low, is by running as many of the structured streams as possible in parallel on the same Spark cluster. Because of the relatively loose definition of near real-time and the small volumes of data, we were able to run all streams for roughly 70 source tables in parallel on the same cluster. Every stream is restarted daily, to allow for daily updates to the processing jobs.</p><p><strong>Limitations and current developments</strong></p><p>Even though Spark’s structured streaming capabilities form an exceptional opportunity for simplifying a data platform’s architecture, it isn’t a one-size-fits-all solution. Especially for use cases with smaller data volumes, like in the setup I described before, Spark can be a bit of overkill. The overhead of parallelization doesn’t weigh up to the performance benefits in small data use cases. Unfortunately, we were bound by Spark because it was the only method of creating a near real-time data lakehouse using Delta Lake at the time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*uupp865BJPDQ3oie72QfqA.png" /><figcaption><em>Replacing Spark as the go-to method for processing data in a lakehouse setup.</em></figcaption></figure><p>Luckily, the Delta Lake technology has been maturing at a rapid pace in the past few months. A cheaper and faster way to process relatively small datasets would be to use a serverless computing service like <a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-overview">Azure Functions</a> or <a href="https://aws.amazon.com/lambda/">AWS Lambda</a>. Since <a href="https://docs.databricks.com/sql/index.html">Databricks SQL</a> has become generally available on Azure and AWS (and in public preview on GCP), every Databricks customer is now able to process their structured data into Delta Lake using an ODBC or JDBC connector. Combining the serverless computing services with Databricks SQL allows for a cheaper, much more lightweight data lakehouse implementation than by using Apache Spark. It also lowers the bar for implementing an event-driven processing application instead of a time-triggered one, thus further improving the processing time within a lakehouse.</p><p>If your organization is more into open-source technology, then keep an eye out for the <a href="https://github.com/delta-io/delta-rs"><em>delta-rs </em>project</a>. It is an open-source interface for Delta Lake outside of Apache Spark, including bindings for Rust, Python, and Ruby. As of yet, the project doesn’t support writes to Delta tables using Python and Ruby, but the project is quickly advancing.</p><p><strong>Conclusion</strong></p><p>The era of technically complex lambda architectures is coming to an end. Recent attempts to unify batch and real-time processing flows within data platforms are gaining traction, and rightfully so. Personally, I believe the delta architecture, especially combined with a data lakehouse at the heart of it, offers excellent opportunities for implementing a scalable and flexible data platform for both big and small data use cases. Both Spark structured streaming and the new Delta Lake interfaces for languages such as Python offer accessible and effective methods of unifying batch and streaming data flows. This opens up the possibilities for real-time analytics in more and more organizations.</p><p><em>This article concludes my three-part series on the future of data platform architecture. Haven’t read any of the previous articles? They can be found </em><a href="https://medium.com/@axel.westeinde/the-arrival-of-the-data-lakehouse-fc28faf4dd95"><em>here</em></a><em> and </em><a href="https://medium.com/@axel.westeinde/monolith-modular-mesh-modern-architecture-for-modern-data-platforms-2c0802ee0881"><em>here</em></a><em>. Make sure to stay tuned for new articles on current developments within the world of data!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61fe3441ae48" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Monolith, Modular, Mesh: modern architecture for modern data platforms]]></title>
            <link>https://medium.com/@axel.westeinde/monolith-modular-mesh-modern-architecture-for-modern-data-platforms-2c0802ee0881?source=rss-ca0fbb69c050------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c0802ee0881</guid>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[data-platforms]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-mesh]]></category>
            <dc:creator><![CDATA[Axel van 't Westeinde]]></dc:creator>
            <pubDate>Tue, 12 Jul 2022 11:26:39 GMT</pubDate>
            <atom:updated>2022-07-12T11:45:35.067Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l3j3Mos25Enb3FDsK8n2ew.jpeg" /></figure><p><em>This blog is the second in a series that highlights exciting developments within the world of data platforms. Check out the first part here: </em><a href="https://medium.com/@axel.westeinde/the-arrival-of-the-data-lakehouse-fc28faf4dd95">The Arrival of the Data Lakehouse | by Axel van ‘t Westeinde | Medium</a></p><p><em>(This blog is also featured here: </em><a href="https://www.alten.nl/2022/07/12/monolith-modular-mesh-modern-architecture-for-modern-data-platforms/"><em>Monolith, Modular, Mesh: modern architecture for modern data platforms — ALTEN Netherlands</em></a><em>)</em></p><p>Modularity is a hot topic within the field of software design. Especially since the explosion of microservices architectures in the 2010s, development teams all over the world have been scrambling to see which (parts) of their applications they could break down into smaller, more easily maintainable pieces. Within the world of data platforms, modularity is still a relative newcomer, but it is a welcome one. I would even say, amidst all the current debate, that modularity is currently the only type of “unbundling” which benefits the modern data stack.</p><p>Introducing modularity in data platform architectures is key to designing future-proof data platforms. Modularity, which can be applied on different levels, can greatly enhance the flexibility and scalability of a data platform. Later in this article I will highlight why this is the case, but first I will discuss a brief history of data platform architecture to understand why its emergence is logical and timely. At the end of this article I will discuss the latest application of modularity within data platform architectures: the data mesh.</p><p>Starting off, I think it’s important to give the two important definitions that are used throughout this article. Within the context of this article, I define <em>modular</em> as something which consists of multiple components which can be developed, maintained, scaled, or can function independently from the other components. The term modular can be used on many different levels: e.g., platform level, code level, and others. As the opposite to modular, I define <em>monolithic</em> as something which doesn’t consist of components which can be developed, maintained, scaled, or can function independently. Again, this term can be used on many different levels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*rmBksEsyzVKO_-Fd5E6wBA.jpeg" /><figcaption>One of the better known monoliths out there</figcaption></figure><p><strong>Past: monolithic data platforms</strong></p><p>Before the rise of cloud technologies, the standard for building a centralized, analytical data platform was to build a data warehouse located in an on-premises data center. The flow of data within these traditional data warehouses follows the Extract-Transform-Load (ETL) paradigm. This means that the extraction, transformation, and loading of data is encapsulated in the same process, even though these are very different operations. Because the different operations within traditional data warehouses can’t be carried out independently from each other, the architecture of these data warehouses is <em>monolithic</em>.</p><p>Monolithic data platforms bring about several problems. First of all, monolithic data platforms have flexibility issues. Replacing components within the application is hard because if data flows are end-to-end and thus sequential (characteristic within the ETL paradigm), every step of the data flow depends on the previous one. Then, making changes has a high chance of breaking something downstream. This makes extensive regression testing crucial.</p><p>The second problem with monolithic data platforms is their maintainability (or rather the lack thereof). Every new data product within the platform needs a new ETL process to be defined. This leads to a new end-to-end data flow which needs to be defined, or an existing flow which needs to be expanded. Either way, this makes the ETL codebase expand (nearly) linearly with each new data product and, in reality, this brings about an enormous ETL code spaghetti which is hard to maintain. Combined with the high risk of downstream products breaking, this doesn’t allow for a pleasant development or operations experience.</p><p>Lastly, monolithic data platforms have limited scalability. Because these platforms are monolithic, they allow vertical scaling perfectly fine, but won’t lend themselves to horizontal scaling. Since vertical scaling is (mostly) finite, monolithic data platforms with larger volumes of data will sooner or later reach their capacity limits, resulting in data processing times of multiple hours.</p><p>This doesn’t mean that the monolithic data platform is dead. Evidently, if there is no business case for adding technical complexity by introducing modularity, please refrain from resorting to anything else but a simple monolith. Additionally, in greenfield or proof-of-concept scenarios it can be beneficial to start with a minimum viable product which can immediately deliver business value. Then using an agile development process, you can incrementally improve and migrate to a more modular architecture when necessary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*6f6XfXwlGc9FFPY_UQUVpw.jpeg" /><figcaption>Introducing: modularity!</figcaption></figure><p><strong>Present: the rise of modularity</strong></p><p>In the old on-premises world, enormous sums of money went into purchasing enterprise software packages from one or two vendors, to gather everything necessary for building a data platform. Vendors had every incentive to make their applications as big and interdependent as possible, to create vendor lock-in. With the rise of the open-source community in the 2000s, which <a href="https://en.wikipedia.org/wiki/Embrace,_extend,_and_extinguish">traditional vendors like Microsoft tried their very best to prevent</a>, the collection of available applications fragmented into smaller, more specialized software. The rise in popularity and adoption of open-source software accelerated even more when cloud technologies became ubiquitous in the 2010s. Pillars from the open-source mindset, especially the aversion to vendor lock-in and a DIY mentality supported by open-source programming languages, have since been embraced by the majority of the software and data (platform) engineering communities.</p><p>Because of this change in mindset, various organizations and their engineers increasingly discovered and developed various alternatives to the old data platform technology and fixed the limitations that were exposed by growing data volumes. A single trend unifies all these new advances of existing technology within the world of data platforms: increasing modularity.</p><p>Modularity can exist at various levels within platform architecture. I will discuss the most common forms of modularity for data platform architecture, based on the problems from the monolithic data platform era they aim to solve.</p><p><strong>Scalability</strong></p><p>One of the main problems on the agenda for organizations with big data workloads was the scalability problem of traditional, monolithic data platforms. Monolithic data platforms only lend themselves well to vertical scaling: the need for more processing power meant upgrading to servers with more firepower and capacity. This limitation on scaling possibilities meant your scalability was finite to the point of the current technological advances in processors and storage. Therefore, there was a crucial need for solutions which allowed horizontal scaling. And so, distributed computing skyrocketed in popularity. The idea behind distributed computing is to divide a processing workload over multiple machines, which then execute their respective tasks in parallel and come together in the end to assemble the result. Distributed computing theoretically enables infinite scaling (horizontally) because the only limit to how many machines you can put next to each other, is the software coordinating the effort. Within the data platform landscape, the most popular implementation of distributed computing used to be the open-source big data processing framework <em>Apache</em> <em>Hadoop</em> (<em>MapReduce</em>) but has since been dethroned by <em>Apache Spark</em> because of its improved performance and improved support for streaming data.</p><p>Distributed computing effectively solved an important part of the scalability problem of monolithic data platforms. Distributed data processing frameworks can, however, not really be classified as introducing modularity into a platform architecture, since computing nodes within a distributed system are highly dependent on each other. Nonetheless, it did signal a change in mentality for data platform architecture from relying on bulky, standalone servers, to creatively dividing workloads over multiple components. And, even more importantly, it laid the foundation for the rise of a pivotal concept within data platform architecture: the separation of storage and compute power.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*oLHRl6zkK0Ye-x_w663kNg.png" /><figcaption>Separating compute from storage resources in platform architecture</figcaption></figure><p>The idea behind distributed computing, i.e., dividing workloads over multiple machines to allow for increased scalability, was indicative of a newly emerged dogma: dividing a large monolithic application into smaller components improves the application’s scalability, flexibility, and maintainability. From this philosophy, a logical next step for data platforms was to separate a data platform’s storage and compute resources into separate components which can be scaled separately from each other. After all, the main performance bottleneck of traditional data warehouse servers lay in the limited capacities for scaling processing power, not in the limited capacities for scaling storage. Since the rise of distributed computing allowed for new possibilities in horizontal (theoretically infinite) scaling of processing power, separating compute resources from storage resources was an obvious choice for creating scalable data platform architectures.</p><p>Dividing storage and compute into separate applications was an essential step for enabling data platforms to handle big data workloads. It’s the first main shift from monolithic data platforms to modular data platforms. And, because the cloud abstracts the complex management of clusters of separated compute and storage resources, modernizing data platform architectures became very feasible even for smaller organizations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*K7BkodIXHhAlf6q14ui_Jg.png" /><figcaption>ETL vs ELT</figcaption></figure><p><strong>Flexibility</strong></p><p>After processing power had been divided into distributed systems, and compute and storage resources in turn had been separated into distinct applications, it was time for the next vital paradigm shift within data platform architecture: the shift from the Extract-Transform-Load (ETL) to the Extract-Load-Transform (ELT) paradigm. Don’t let the seemingly minor change in terminology fool you; this shift has been crucial in improving the flexibility of data platforms, as well as greatly improving the time-to-value of data products.</p><p>As previously discussed, the ETL paradigm caused numerous problems with the flexibility and consequently the maintainability of traditional data platforms. End-to-end data flows where ingestion and transformation are one process, ensure problems with the entire data flow when either of those two complex steps fail. Therefore, it was once again time to introduce some modularity in the architecture of data platforms, enabled by the newly minted standard of separating storage and compute resources. Because the relatively cheap storage capacity could now be scaled independently from the expensive compute resources for data processing, growing data volumes were no longer a real bottleneck. Especially in the cloud, data architects and engineers no longer needed to worry much about the limits of data storage. Previously, architects and engineers had to think of how to extract source data from operational systems efficiently into a temporary staging area for transformations before loading it into a data warehouse, because of that data warehouse’s storage limits. Now, they could just extract and load the source data directly into a data warehouse or lake and do the transformations later, effectively creating a permanent staging area where raw data is kept for advanced analytics, lineage, or auditing use cases. This decoupling of data ingestion and data transformation is known as the ELT paradigm.</p><p>Alongside serving new use cases, the ELT paradigm fixes some of the aforementioned problems from the ETL era. ELT killed the necessity for end-to-end data flows and thus allowed for more modular data processing. Every step of the ingestion and transformation processes could now be defined as separate blocks of processing logic. Moreover, code for data ingestion and transformation could now be made generic in some places, because the code didn’t have to be tailored to a specific combination of source, transformation, and destination. This makes for more maintainable code bases, which don’t have to expand linearly for each new data flow. Each data flow could now exist, albeit not always fully, out of modular, reusable building blocks.</p><p><strong>Microservices for data</strong></p><p>The newly conceived possibilities for creating modular, reusable building blocks for defining data processing logic enabled by the ELT paradigm, closely resembles a parallel trend that started a few years earlier within the field of software engineering: the rise of microservices architectures.</p><p>The microservices architecture pattern involves dividing a single application into multiple loosely coupled, fine-grained services, each of which can be developed, deployed, and operated independently from one another. Microservices communicate using protocols which abstract the services’ internal logic into standardized interfaces (e.g., REST). In other words, microservices are one of the best examples of modularity within an application, following the definition used in this article.</p><p>Microservices architectures have been immensely popular over the past decade or so. It is the pinnacle of the modern dogma of breaking down large monoliths into smaller, more maintainable, more flexible, and more scalable components. Moreover, all of the aforementioned developments within data platform architecture (i.e., distributed computing, separation of storage and compute, the rise of ELT) have made the timing perfect for also introducing microservices architectures into the world of data platforms.</p><p>Within modern data platforms, the pattern of using microservices for data processing is becoming more prevalent. Small, generic processes are increasingly encapsulated in containerized microservices (built and orchestrated using Docker and Kubernetes) which can be used for both batch processing and real-time, event-based processing. Cloud services like AWS Lambda and Azure Functions make it even easier to achieve the same results by abstracting most of the underlying infrastructure so that engineers can focus on coding the processing logic.</p><p>It is, however, important to note that introducing microservices for data processing isn’t necessarily the right solution for your organization’s data platform. Microservices usually require knowledge of imperative programming languages such as Python, but this knowledge isn’t always available within an organization. Organizations without complex data processing needs or programming skills can mostly be satisfied by using low-code cloud solutions such as Azure Data Factory or AWS Glue or even any other orchestration tool that is able to run SQL stored procedures. These tools don’t require you to take on the same technical complexity as creating your own microservices.</p><p><strong>Modularity of the future: organization level modularity and the data mesh</strong></p><p>Thus far, we have seen many examples of modularity that involve dividing a centralized data platform into smaller components. Recently, a new way of introducing modularity has emerged within the world of data platform architecture: achieving organizational-level modularity by means of a data mesh architecture. Before we go into the details of this exciting new development, we must first explore the architectural problems from which the data mesh has emerged.</p><p>Over the past few years, many organizations have adopted the modularity principles mentioned in this article to improve on the scalability, flexibility, and maintainability of their data platforms. Often, organizations build centralized data platforms, developed and operated by centralized data teams consisting of specialized data professionals. Every data product is therefore manufactured by centralized teams, who have to cope with overflowing backlogs containing the analytics needs and wishes for an entire organization. In smaller organizations, this is usually not problematic: the collection of data products is still fairly organized and usually the business domain is small enough to comprehend for a single data team. But, in larger organizations, a centralized data team can become a bottleneck for the time-to-value for data products. Additionally, the value of data products in itself can decrease, because it is nearly impossible for centralized teams to have domain knowledge of all business segments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*vLFvfoqRVnJ7UeIThHBqvA.png" /><figcaption>Example of a data mesh architecture</figcaption></figure><p>The data mesh architecture has been brought into existence to manage these problems. A data mesh architecture steps away from developing and operating a centralized data platform, and instead advocates for developing and operating decentralized data platforms for various business domains, owned by decentralized teams, but governed by organization-wide standards. It provides a solution for bottlenecks in the time-to-value for data products in centralized data teams, and ensures that domain knowledge is always available in the teams responsible for creating those data products. Data mesh architecture is in fact a form of modularity on the organizational level: it requires breaking down a centralized data platform into multiple decentralized data platforms, such that they can be loosely coupled but never dependent on each other.</p><p>It is important to stress the importance of the difference between decentralized data platforms in a data mesh, and inaccessible data siloes. Fragmenting your data landscape under the disguise of a data mesh architecture ensures you’ll encounter the same problems as in the era before the data warehouse: valuable datasets will be stuck in operational systems without any possibilities for integration and enrichment. Instead, decentralized data platforms serve data products based on centralized governance standards and standardization for interoperability. For example, a product team should be able to discover and use the data products of a financial domain within the same organization for their own purposes (of course, given that they have the clearance to see this data). This interoperability forms the backbone of a data mesh’s success; interoperability is an absolute must for enabling domain data ownership of integrated data, instead of creating fragmented and inaccessible siloes of operational data.</p><p>(An in-depth analysis of data mesh architecture unfortunately lies beyond the scope of this article, but I highly recommend reading Zhamak Dehghani’s <a href="https://martinfowler.com/articles/data-monolith-to-mesh.html">founding paper</a> and the numerous contributions by others that have built upon it.)</p><p>Just like a microservices architecture, a data mesh architecture isn’t a one-size-fits-all solution. The primary advantage, solving bottlenecks that block the creation of valuable data products, is mainly applicable to large organizations. The business case for smaller organizations usually doesn’t justify the technical and organizational complexity a data mesh architecture brings. Bottlenecks in the development of data products only exist when the demand for data products within an organization is high, which means the organization’s data literacy is also high. Therefore, organizations with lower data literacy can easily go without the complexity of introducing modularity on the organizational level.</p><p><strong>Conclusion</strong></p><p>Modern (cloud) technologies have brought about numerous possibilities for revolutionizing data platform architecture. Modularity is the new standard, and rightfully so. Even though monolithic applications still have their own use cases, introducing a little modularity in your data platform can work wonders for its flexibility, scalability, and maintainability. Many modern cloud-based data platforms already feature distributed computing, separation of storage and compute resources, and already follow the ELT paradigm. Still, many data platform architectures could gain some additional advantage from introducing modularity in the form of microservices, given that the added complexity is justified by the business case. And if that still doesn’t satisfy your organization’s flexibility, scalability, and maintainability requirements, it might be time to introduce organizational-level modularity and migrate to a data mesh.</p><p>I am eager to see how modularity in data platform architecture evolves over time and which new concepts or drawbacks will emerge. Every paradigm shift has its limits, and I’m sure that in ten years a sequel to this article will point out all the limits of our current methods of introducing modularity at the platform- and organizational-levels.</p><p><em>The third and last part in this series will be a case study about the challenges that occur when architecting and building the data platforms of the future. Stay tuned!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c0802ee0881" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Arrival of the Data Lakehouse]]></title>
            <link>https://medium.com/@axel.westeinde/the-arrival-of-the-data-lakehouse-fc28faf4dd95?source=rss-ca0fbb69c050------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc28faf4dd95</guid>
            <category><![CDATA[data-lakehouse]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[data-platforms]]></category>
            <category><![CDATA[delta-lake]]></category>
            <dc:creator><![CDATA[Axel van 't Westeinde]]></dc:creator>
            <pubDate>Thu, 13 Jan 2022 18:15:46 GMT</pubDate>
            <atom:updated>2023-01-31T14:24:52.230Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RQ1tepQaC5V8MPXsASIlYQ.jpeg" /></figure><p><em>This blog is the first in a series that highlights exciting developments within the world of data platforms. I am happy to share these new technologies which we have already successfully applied at projects at </em><a href="http://alten.nl/"><em>ALTEN</em></a><em>.</em></p><p>A new buzzword has entered the already overcrowded vocabulary of the data profession: the <em>data lakehouse</em>. Even the less data-savvy professionals have heard of data warehouses and data lakes, but now a new means of centrally storing data for analytical purposes has emerged. The potential of data lakehouses has even been recognized by Bill Inmon, the father of traditional data warehousing, who recently wrote <a href="https://databricks.com/p/ebook/building-the-data-lakehouse">a book</a> about the value of a data lakehouse within the modern data platform. But, to understand the data lakehouse concept we must first go through a brief history of analytical storage.</p><p><strong>The origins of analytical storage</strong></p><p>Ever since the start of the digital revolution in the second half of the 20th century, data is being processed in exponentially increasing amounts. Especially since computers were found to be useful for more than merely performing complex calculations. In the 1960s and 1970s, computers were starting to be used for handling transactional workloads for organizations, thus automating the task of record-keeping which had traditionally been carried out manually. Whenever compute and storage technologies advanced, the volumes of data grew along with them. However, one big problem emerged when organizations tried to analyze the data they had gathered along the way: querying a database for analysis reallocates costly resources from its transactional and operational workloads, thus creating bottlenecks in both processes. Enter the <em>data warehouse</em>: a single source of truth where an organization’s data is centralized in separate databases that are optimized for analytical use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lB9etcnp7Ajt6drm_2grDg.jpeg" /><figcaption>The inspiration behind data warehousing</figcaption></figure><p>Old-school data warehouses traditionally take transactional databases and spreadsheets as their input. Ingesting data is done through a model of Extract, Transform, and Load (ETL), where a staging area is used for performing transformations before data is loaded in the data warehouse, because these transformations are resource intensive operations. The traditional ETL process is batch-oriented and therefore ingests large chunks of data at once, following a predetermined schedule. Storage within data warehouses is done according to the relational model, which has been the de facto standard since the 1980s. The relational model imposes structure in the storage of data, and this brought about high performance and ease of use while consuming limited resources. Nonetheless, this structured storage of data also introduces rigidity. Schemas need to be defined beforehand and implementing changes afterwards can be cumbersome, especially with big datasets.</p><p><strong>From data lakes to data swamps</strong></p><p>In the late 2000s and early 2010s, the volumes of analytical data that organizations wished to process exploded beyond the capacity of many traditional on-premise data warehouses. The era of big data arrived and with it came data in various formats different from the structured format compatible with data warehouses. To address these challenges, the <em>data lake</em> was brought into existence. Data lakes can store data in any format, from structured to semi-structured to unstructured, while also supporting possibilities for real-time data ingestion. Moreover, the compute resources necessary for queries were decoupled from storage resources for the first time. This provided a stark contrast with the on-premise data warehouses in terms of scalability. Especially combined with the emergence of cloud technologies, where the ceiling for scalability is extraordinarily high and the costs of storage are low, did the data lake develop itself as the main choice for storage of analytical big data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A9azJ8vyoidkqq72skz7nA.jpeg" /><figcaption>The grim outlook of a data swamp</figcaption></figure><p>Organizations that needed to handle big data workloads swiftly transitioned from data warehouses towards the flexible and scalable (cloud) data lakes. Unfortunately, efficiently implementing and managing a data lake is a herculean task. Without proper design, the unstructured nature of stored data frequently brings about a performance decrease with respect to structured storage. In addition to that, bottlenecks can form because of limited capacity for parallel querying. Data lakes are better optimized for writes than for reads, since they were meant to enable organizations to continuously dump all of their data in one place without enforcing structure. Because more data with less structure produces the need for well-defined governance, many data lakes have become data swamps in absence of proper management. These data swamps make data discovery almost impossible and get in the way of successfully extracting analytical insights.</p><p><strong>Combining the best of both worlds</strong></p><p>In the past few years, an attempt has been made to reconcile the data warehouse and the data lake concepts by making use of modern technologies. Ideally, you would want the efficiency of the data warehouse accompanied by the flexibility of the data lake, combined into a scalable solution. Out of this ideal, the data lakehouse concept was born and is now realized on the shoulders of recent technological advances. Its power is captured in a number of key characteristics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ok7D4PsYeiEvKYFEexsg4A.png" /><figcaption>Data warehouses vs data lakes vs data lakehouses. Courtesy of Databricks: <a href="https://databricks.com/blog/2020/01/30/what-is-a-data-lakehouse.html">https://databricks.com/blog/2020/01/30/what-is-a-data-lakehouse.html</a></figcaption></figure><p>First of all, data in lakehouses is stored in an unstructured format, but can be efficiently queried as if it was structured (by means of ‘schema-on-read’). Even videos and images can be processed in this manner. This is achieved by storing metadata on top of files in the data lakehouse. This metadata mainly contains the past insertions and updates on these files, along with some form of schema, which allows processing engines to treat the files as ‘virtual’ tables. This allows files to be queried with SQL, just like regular tables in a data warehouse.</p><p>Secondly, a data lakehouse divides its storage and compute resources, which enables users to store their data in cheap, scalable (cloud) data lake storage and basically only pay for the compute power necessary for processing. In data lakes this was already the case, but, as discussed in an earlier paragraph, data lakes bring other problems to the table in return. Modern data warehouses also feature a decoupling of storage and compute resources but have only done so since the rise of the cloud and even so, costs of data warehouse storage are still much higher than those of data lake storage. Therefore, data lakehouses are more cost-efficient than modern data warehouses.</p><p>Furthermore, data lakehouses allow for real-time data ingestion and analysis. Previously, many data platforms had to separate real-time data flows from batch data flows. In these so-called <em>lambda</em> architectures, real-time data and batch data are processed separately because data warehouses traditionally don’t support real-time ingestion and analysis. The main processing engines for data lakehouses on the other hand, already feature this, which enables both real-time and batch data flows to be ingested and queried in the same way.</p><p>Lastly, data lakehouses feature Atomic, Consistent, Isolated, and Durable (ACID) transactions. This means that changes and insertions of data, very simply put, don’t get into each other’s way so that data doesn’t get corrupted. These quality guarantees for data transactions were up until now only possible in structured databases and data warehouses because of their structured nature of storage. Because data lakehouses perform their create, read, update, and delete operations not only based on data files, but also based on added metadata, they impose sufficient structure to enable ACID transactions in their processing, even though their storage is unstructured.</p><p><strong>Current implementations</strong></p><p>The main implementations of the data lakehouse concept right now are <a href="https://delta.io/">Delta Lake</a>, <a href="https://hudi.apache.org/">Apache Hudi</a>, and <a href="https://iceberg.apache.org/">Apache Iceberg</a>. Hudi and Iceberg have recently been made open source by their creators at Uber and Netflix respectively, but neither are as fleshed out as their counterpart Delta Lake. Delta Lake is, at the time of writing, the most advanced of these three and made available both open source and hosted — with extra functionalities — by Databricks, the organization that created Delta Lake. Databricks releases new features of Delta Lake at least every month, where especially in the last year we have seen multiple large additions. A recent example is Databricks SQL, which includes an SSMS-like interface for executing highly performant queries on your data lakehouse, as well as out-of-the-box connectors for most major data visualization tools such as PowerBI and Tableau. These features weren’t possible on regular data lakes, but provide a familiar UI and UX to analysts who are used to writing SQL queries on data warehouses. This enables organizations that wish to process bigger data volumes, process more various sources of data, and/or process data in real-time, to smoothly transition from the rigidity of a data warehouse to the flexibility of the data lakehouse.</p><p><strong>Teething problems</strong></p><p>Naturally, every new technology also brings about its own drawbacks. One of the main arguments currently held against data lakehouses is that they are not yet as refined as their counterparts. Up until now this has held back many organizations from implementing a data lakehouse. Fortunately, more and more organizations have adopted the lakehouse concept and found that it has already matured sufficiently to deliver on its promises in production scenarios. Another drawback, which we at ALTEN have already experienced ourselves, is that the current data lakehouse implementations aren’t optimized for small datasets yet, because they rely on big data processing frameworks such as Apache Spark. Fortunately, Databricks is working on their new processing engine for Delta Lake (<em>Photon)</em>, which should bring about better performance for every type of workload. But, as of now, the Photon engine is still in beta and thus for the time being, using this new engine in production scenarios is discouraged. Until Photon or any other upcoming alternatives are generally available, you won’t get as much value for your money with small data workloads as with big data workloads, unless you creatively utilize the resources in your data lakehouse.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NAg-T8fAkNEE9IgYSNCELw.png" /><figcaption>Photon engine performance compared to previous versions of Databricks engine based on processing a 1 TB workload. Courtesy of Databricks: <a href="https://databricks.com/blog/2021/06/17/announcing-photon-public-preview-the-next-generation-query-engine-on-the-databricks-lakehouse-platform.html">https://databricks.com/blog/2021/06/17/announcing-photon-public-preview-the-next-generation-query-engine-on-the-databricks-lakehouse-platform.html</a></figcaption></figure><p><strong>Conclusion</strong></p><p>The data lakehouse concept is very promising and a game changer for data platforms architecture-wise. Combining the high performance of data warehouses with the scalability, cost-efficiency, and flexibility of data lakes provides possibilities for getting the best of both worlds in terms of analytical data storage and processing within modern data platforms. Of course, the data lakehouse concept has experienced some teething problems in the past, but, fortunately, it has matured at an astonishing pace which it looks to maintain in the coming years. At ALTEN, we have already successfully deployed data platforms featuring data lakehouses for our clients and will certainly continue to do so in the future. We’re eager to see where this concept is going, so we’re definitely keeping an eye out for new developments within the field, such as improved performance on small datasets and enhanced built-in capabilities for data lineage and data quality assurance.</p><p><em>The next parts in this series will feature modular microservices architectures for data platforms and how to harmonize data lakehouses and microservices architectures into the development of not just a modern data platform, but a futuristic data platform.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc28faf4dd95" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>