Swimming in the Data River or: How We Got to Streaming Analytics
Apr 16, 2019
Rachel Pedreschi
A long time ago in a galaxy far, far away…
Someone had the bright idea to begin asking for metrics about their business….
The conversation probably went something like this: “Hey, remember when we planned those things, and then we did those things… did the, uh, numbers change the way we wanted?”
What followed was the creation of a global data analytics industry that spawned thousands of companies to answer this seemingly simple question.
The answer has been a *resounding* “definitely… maybe…”.
It’s been long known that metrics are critical for any business. Key metrics can vary from business to business, and range from sales figures, to product/user engagement, marketing campaigns, and everything in between. Businesses need to understand how their metrics change across many facets of their operations, and this is the core idea behind data analytics.
The easy part of data analytics is formulating questions. The hard part is finding answers. As companies grow, it is not uncommon that their data volumes and data complexity scales exponentially. It can be very challenging to find the right tool(s) for the job. Furthermore, people keep inventing new buzzwords so it’s impossible to tell what value add the latest machine learning / artificial intelligence / blockchain / edge computing thing is actually providing. In this post, I’m going to try to give you the high level picture of how the data analytics space has evolved and how we’re answering questions today. Why? I’ve spent my career in this space and have been both fascinated by and proud of its growth. Also, I work at a data analytics company and want you to buy our very excellent product.
The (Very) Old School
Long before unicorns, free t-shirts, and brogrammers, people struggled to understand their business. They struggled because data analytics wasn’t yet a thing, and because of various technical limitations of the era (mainly limitations in database architectures: difficulties in querying across multiple disparate data sources, constraints in CPUs, memory, storage, and networks, and myriad other factors).
Even as businesses grew to understand the importance of data analytics, many still struggled to actualize insights because analytic workloads took valuable resources away from the transactional systems that were the backbone of the business.
Consider the following example. AwesomeCo has an awesome Point of Sale (POS) system, and a database they use to mail out advertising flyers. AwesomeCo has an awesome marketing team making awesome ads and they are spending a lot of money to create and distribute these ads. But, AwesomeCo has a problem: it has no way to see how advertising is directly influencing sales, which customer segments are actually responding to the ads, and the general efficiency of its marketing process. Is everything truly awesome? This central problem led to the creation of data warehouses, databases specifically created to efficiently answer analytics questions. Data warehouses promised to solve the underlying and pervasive problem at the heart of companies like AwesomeCo: the data required to run a business was locked up in siloed applications and inaccessible to decision makers.
Fun fact #1: loyalty cards at supermarkets were created when stores first gained the ability to get answers to their analytic questions, and wanted to tie promotions and buying behavior directly to an individual or household.
Data Warehouses Emerge for Analytics
As the need for analytics grew, the industry moved swiftly through a number of design paradigms before eventually settling on batch Extract, Transform, Load (ETL) from Online Transaction Processing (OLTP) databases (the databases that power business products) to data warehouses such as Redbrick, Netezza, Greenplum, and many others. By the 90s, most companies had an architecture that looked something like this:
With CRM, ERP, and POS data available in a single location, decision makers could finally understand how the business as a whole was performing. The data warehouse gave corporations a way to unlock the data concealed within their many stovepipe applications.
For awhile, things were good, but not great. One big problem was because of that innocuous looking little step called ETL that I briefly mentioned before. The sad reality was that ETL was anything but innocuous or little. When I built a reporting database for Vail Resorts around the turn of the century, it took me 10 months to translate analytic reporting requirements and 32 separate data sources into a functional data mart for the marketing department. Although this tiny system stored only stored a few gigabytes of data, the intricacies are what made it ornery. But it could have been worse. My friends at other companies would tell me that it would routinely take 18 – 24 months to get an enterprise-wide data warehouse up and running.
The problem is obvious: you can’t make valid business decisions based on 18 month old data. Yet, that’s exactly what life was like a mere 15 years ago. Pull data from source systems (Extract), massage it just right (Transform), and deploy it into a data warehouse (Load). It was painful. The “T” part was especially intricate: data was stored in star or snowflake schemas and needed to be normalized into structures that were easier to report on.
Another problem was that as businesses grew to rely on their data warehouses, the warehouses faced increasing scale up challenges. The RDBMSs that formed the heart of data repositories of the time were architected to grow vertically on single machines, so more data meant more hardware, and more hardware meant bigger and costlier machines. Scaling up was extremely expensive and time consuming, so companies were forced to reduce the amount of data they were storing.
Fun Fact #2: Remember those loyalty programs? Do you also remember when some stores just stopped? It was because it was getting too expensive (I’m looking straight at you Oracle) and time consuming to store all the data, and it was taking too long to get meaningful information out of these systems.
Legacy solutions struggled to process billions of transactions each minute. The problem magnified as volumes grew and the same number of transactions needed to be processed each second, and then each millisecond. There was simply too much data.
Companies searched for a cheap way to store this data on commodity hardware to reduce costs. They found a promising answer in an up and coming open source project called Hadoop. Hadoop consists of two main components, a distributed file system called HDFS, and batch data processing framework called MapReduce. Hadoop provided the foundation for Data Lake architectures.
The Rise of the Data Lake
A data lake is a distributed file system that can store many different file types. Many modern query engines designed for data lakes embrace the idea that storage and compute are separate systems. The data lake acts as a central storage location for all of your structured, unstructured, and semi-structured data. In the most setups with data lakes, different query engines optimized for different workloads (warehousing, ML/AI, search, etc) connect to the data lake, pull data from it as needed for queries, and compute the answers to those queries.
The data lake gave us a relatively cheap place to store data, and removed the timeliness constraints presented by the data warehouse. We no longer had to structure data (or even use it right away), and that pesky T from ETL could take longer than our total load window for the day. The process shifted so that we can collect all the data, put it into Hadoop, and decide what to do with it later. ETL had given way to EL( and then eventually)T. Simply put, things got cheaper, faster, and more scalable.
Streaming Architectures Gain Momentum
Data lake architectures solved many of the scaling problems that plagued companies for years. Today, all of the public cloud providers offer a data lake and a variety of query systems that can pull data from the lake for queries. However, as with all great systems that see widespread adoption, people realized data lakes weren’t a panacea.
As data lakes became ubiquitous, people started naturally wondering, “hey, now we’ve made all these analytics systems work at scale, can we also make them way faster?” Although data lakes are scalable and cheap, they are not particularly fast at loading data, and there is a lot of performance overhead when downstream systems need to access data in lakes for queries. After all, Hadoop’s mascot is an elephant, not a jackrabbit. One of the biggest limitations of data lakes is that they fundamentally stored data in static files. For most businesses, especially ones that have invested heavily in digital products, data is not created as a static file, but as a continuous stream of discrete events.
At the same time data lakes gained momentum, a little known open source project spun out of LinkedIn called Apache Kafka started becoming popular as a way of collecting data from a system or application and delivering that data to the data lake. A part of the reason for Kafka’s popularity lay in the fact it could deliver events immediately after they occurred to downstream systems in real-time. Today, Kafka is one of the most widely adopted open source projects in the data space and has many similarities to the data lake: it is a storage and transfer system for real-time streams (as opposed to batch files). As Kafka has grown, some of the more forward-thinking businesses realized if query systems could connect to Kafka directly, and leverage Kafka as the central storage and delivery layer, they could build an entire end-to-end streaming analytics stack. This architecture could bypass writing to and reading from the data lake, thus providing end users with the ability to make much faster decisions on their data.
However, one last challenge remained to actualize the streaming vision: query systems, even modern ones, were built with static data in mind. To truly support streaming data and real-time workloads, they too would need to be reimagined.
The Data River
I’ve given you a rundown of the evolution of data analytics technology and how business requirements drove us towards a more low-latency world. I want to now introduce the idea of the Data River, an end-to-end streaming analytics stack that will give us the ability to ingest real-time data, store it for the foreseeable future, and execute complex queries to access not just the stored historical data, but also brand new, freshly minted data, hot off the proverbial wire.
The data river architecture consists of 3 primary components:
Data delivery: to deliver events from one location to another
Data processing (optional): to clean or transform data
Data querying: to store and analyze data
In a data river, each piece of the stack works natively with streams and is designed to do a specific set of things very well. The combination of technologies is flexible enough to handle a wide variety of processing requirements and query loads.
You can read all about data rivers in detail here, the summarized ideas are as follows.
Data delivery systems are responsible for delivering events from one location to another. The most common open source data delivery system is Kafka. You can install Kafka producers on your servers that hold the data that needs to be analyzed, and deliver them directly to a Kafka cluster. Kafka will stream data from producers to downstream consumers, which in our proposed architecture, will be a data processing system.
Data processing systems that are designed for streams are known as stream processors. Well-known stream processors include Apache Flink, Spark Streaming, Kafka Streams, and there are many others. Although some of these systems can support simple analytic queries, stream processors typically do not store data in formats that are optimized for such queries. However, their core architectures are very well suited for data processing (ETL).
Data querying systems are primarily responsible for storing and analyzing data. While a traditional data warehouse can be considered to be a query system, data warehouses are a poor fit for streaming data. Data warehouses are not optimized for streaming ingestion, ad-hoc analysis, or workloads that require low-latency query response on real-time data. A more modern query system is Apache Druid, which has a reimagined architecture. Druid is built from the ground up for streaming ingestion and ad-hoc queries, for interactive exploration of real-time and historical data. Disclaimer: I work for Imply, the company behind Druid, so I naturally have a bias here.
The data river architecture is already starting to see plenty of adoption across a wide variety of industries. If one day in the future the data river becomes a buzzword you are sick of hearing, just remember you read it here first!
Final Thoughts
In the same way we have evolved from cassette tapes to Spotify, Duran Duran to Cardi B, and mullets to hipster beards, and Return of the Jedi to Solo, we have dramatically improved our ability to handle all data types over the past 3 decades. Whether it came as a sheer necessity from the changes to our digital lifestyle, or from the needs of corporations to monetize that digital data, architectures have evolved and the age of streaming data is very much here. If you are looking to empower your users with the ability to make decisions quickly across a wide spectrum of use cases, I hope I was able to convince you that the data river architecture is worth a look.
Other blogs you might find interesting
No records found...
Sep 27, 2023
Introducing incremental encoding for Apache Druid dictionary encoded columns
In this blog post we deep dive on a recent engineering effort: incremental encoding of STRING columns. In preliminary testing, it has shown to be quite promising at significantly reducing the size of segment...
Migrate Analytics Data from MongoDB to Apache Druid
This blog presents a concise guide on migrating data from MongoDB to Druid. It includes Python scripts to extract data from MongoDB, save it as CSV, and then ingest it into Druid. It also touches on maintaining...
How Druid Facilitates Real-Time Analytics for Mass Transit
Mass transit plays a key role in reimagining life in a warmer, more densely populated world. Learn how Apache Druid helps power data and analytics for mass transit.
Migrate Analytics Data from Snowflake to Apache Druid
This blog outlines the steps needed to migrate data from Snowflake to Apache Druid, a platform designed for high-performance analytical queries. The article covers the migration process, including Python scripts...
Apache Kafka, Flink, and Druid: Open Source Essentials for Real-Time Applications
Apache Kafka, Flink, and Druid, when used together, create a real-time data architecture that eliminates all these wait states. In this blog post, we’ll explore how the combination of these tools enables...
Visualizing Data in Apache Druid with the Plotly Python Library
In today's data-driven world, making sense of vast datasets can be a daunting task. Visualizing this data can transform complicated patterns into actionable insights. This blog delves into the utilization of...
Bringing Real-Time Data to Solar Power with Apache Druid
In a rapidly warming world, solar power is critical for decarbonization. Learn how Apache Druid empowers a solar equipment manufacturer to provide real-time data to users, from utility plant operators to homeowners
When to Build (Versus Buy) an Observability Application
Observability is the key to software reliability. Here’s how to decide whether to build or buy your own solution—and why Apache Druid is a popular database for real-time observability
How Innowatts Simplifies Utility Management with Apache Druid
Data is a key driver of progress and innovation in all aspects of our society and economy. By bringing digital data to physical hardware, the Internet of Things (IoT) bridges the gap between the online and...
Three Ways to Use Apache Druid for Machine Learning Workflows
An excellent addition to any machine learning environment, Apache Druid® can facilitate analytics, streamline monitoring, and add real-time data to operations and training
Apache Druid® is an open-source distributed database designed for real-time analytics at scale. Apache Druid 27.0 contains over 350 commits & 46 contributors. This release's focus is on stability and scaling...
Unleashing Real-Time Analytics in APJ: Introducing Imply Polaris on AWS AP-South-1
Imply, the company founded by the original creators of Apache Druid, has exciting news for developers in India seeking to build real-time analytics applications. Introducing Imply Polaris, a powerful database-as-a-Service...
In this guide, we will walk you through creating a very simple web app that shows a different embedded chart for each user selected from a drop-down. While this example is simple it highlights the possibilities...
Automate Streaming Data Ingestion with Kafka and Druid
In this blog post, we explore the integration of Kafka and Druid for data stream management and analysis, emphasizing automatic topic detection and ingestion. We delve into the creation of 'Ingestion Spec',...
This guide explores configuring Apache Druid to receive Kafka streaming messages. To demonstrate Druid's game-changing automatic schema discovery. Using a real-world scenario where data changes are handled...
Imply Polaris, our ever-evolving Database-as-a-Service, recently focused on global expansion, enhanced security, and improved data handling and visualization. This fully managed cloud service, based on Apache...
Introducing hands-on developer tutorials for Apache Druid
The objective of this blog is to introduce the new set of interactive tutorials focused on the Druid API fundamentals. These tutorials are available as Jupyter Notebooks and can be downloaded as a Docker container.
In this blog article I’ll unpack schema auto-discovery, a new feature now available in Druid 26.0, that enables Druid to automatically discover data fields and data types and update tables to match changing...
Druid now has a new function, Unnest. Unnest explodes an array into individual elements. This blog contains design methodology and examples for this new Unnest function both from native and SQL binding perspectives.
What’s new in Imply Polaris – Our Real-Time Analytics DBaaS
Every week we add new features and capabilities to Imply Polaris. This month, we’ve expanded security capabilities, added new query functionality, and made it easier to monitor your service with your preferred...
Apache Druid® 26.0, an open-source distributed database for real-time analytics, has seen significant improvements with 411 new commits, a 40% increase from version 25.0. The expanded contributor base of 60...
How to Build a Sentiment Analysis Application with ChatGPT and Druid
Leveraging ChatGPT for sentiment analysis, when combined with Apache Druid, offers results from large data volumes. This integration is easily achievable, revealing valuable insights and trends for businesses...
In this blog, we will compare Snowflake and Druid. It is important to note that reporting data warehouses and real-time analytics databases are different domains. Choosing the right tool for your specific requirements...
Learn how to achieve sub-second responses with Apache Druid
Learn how to achieve sub-second responses with Apache Druid. This article is an in-depth look at how Druid resolves queries and describes data modeling techniques that improve performance.
Apache Druid uses load rules to manage the ageing of segments from one historical tier to another and finally to purge old segments from the cluster. In this article, we’ll show what happens when you make...
Real-Time Analytics: Building Blocks and Architecture
This blog identifies the key technical considerations for real-time analytics. It answers what is the right data architecture and why. It spotlights the technologies used at Confluent, Reddit, Target and 1000s...
What’s new in Imply Polaris – Our Real-Time Analytics DBaaS
This blog explains some of the new features, functionality and connectivity added to Imply Polaris over the last two months. We've expanded ingestion capabilities, simplified operations and increased reliability...
Wow, that was easy – Up and running with Apache Druid
The objective of this blog is to provide a step-by-step guide on setting up Druid locally, including the use of SQL ingestion for importing data and executing analytical queries.
Tales at Scale Podcast Kicks off with the Apache Druid Origin Story
Tales at Scale cracks open the world of analytics projects and shares stories from developers and engineers who are building analytics applications or working within the real-time data space. One of the key...
Real-time Analytics Database uses partitioning and pruning to achieve its legendary performance
Apache Druid uses partitioning (splitting data) and pruning (selecting subset of data) to achieve its legendary performance. Learn how to use the CLUSTERED BY clause during ingestion for performance and high...
Easily embed analytics into your own apps with Imply’s DBaaS
This blog explains how developers can leverage Imply Polaris to embed robust visualization options directly into their own applications without them having to build a UI. This is super important because consuming...
Building an Event Analytics Pipeline with Confluent Cloud and Imply’s real time DBaaS, Polaris
Learn how to set up a pipeline that generates a simulated clickstream event stream and sends it to Confluent Cloud, processes the raw clickstream data using managed ksqlDB in Confluent Cloud, delivers the processed...
We are excited to announce the availability of Imply Polaris in Europe, specifically in AWS eu-central-1 region based in Frankfurt. Since its launch in March 2022, Imply Polaris, the fully managed Database-as-a-Service...
Should You Build or Buy Security Analytics for SecOps?
When should you build—or buy—a security analytics platform for your environment? Here are some common considerations—and how Apache Druid is the ideal foundation for any in-house security solution.
Combating financial fraud and money laundering at scale with Apache Druid
Learn how Apache Druid enables financial services firms and FinTech companies to get immediate insights from petabytes-plus data volumes for anti-fraud and anti-money laundering compliance.
This is a what's new to Imply in Dec 2022. We’ve added two new features to Imply Polaris to make it easier for your end users to take advantage of real-time insights.
Imply Pivot delivers the final mile for modern analytics applications
This blog is focused on how Imply Pivot delivers the final mile for building an anlaytics app. It showcases two customer examples - Twitch and ironsource.
For decades, analytics has been defined by the standard reporting and BI workflow, supported by the data warehouse. Now, 1000s of companies are realizing an expansion of analytics beyond reporting, which requires...
Apache Druid is at the heart of Imply. We’re an open source business, and that’s why we’re committed to making Druid the best open source database for modern analytics applications
When it comes to modern data analytics applications, speed is of the utmost importance. In this blog we discuss two approximation algorithms which can be used to greatly enhance speed with only a slight reduction...
The next chapter for Imply Polaris: celebrating 250+ accounts, continued innovation
Today we announced the next iteration of Imply Polaris, the fully managed Database-as-a-Service that helps you build modern analytics applications faster, cheaper, and with less effort. Since its launch in...
We obviously talk a lot about #ApacheDruid on here. But what are folks actually building with Druid? What is a modern analytics application, exactly? Let's find out
Elasticity is important, but beware the database that can only save you money when your application is not in use. The best solution will have excellent price-performance under all conditions.
Druid 0.23 – Features And Capabilities For Advanced Scenarios
Many of Druid’s improvements focus on building a solid foundation, including making the system more stable, easier to use, faster to scale, and better integrated with the rest of the data ecosystem. But for...
Apache Druid 0.23.0 contains over 450 updates, including new features, major performance enhancements, bug fixes, and major documentation improvements.
Imply Polaris is a fully managed database-as-a-service for building realtime analytics applications. John is the tech lead for the Polaris UI, known internally as the Unified App. It began with a profound question:...
There is a new category within data analytics emerging which is not centered in the world of reports and dashboards (the purview of data analysts and data scientists), but instead centered in the world of applications...
We are in the early stages of a stream revolution, as developers build modern transactional and analytic applications that use real-time data continuously delivered.
Developers and architects must look beyond query performance to understand the operational realities of growing and managing a high performance database and if it will consume their valuable time.
Building high performance logging analytics with Polaris and Logstash
When you think of querying with Apache Druid, you probably imagine queries over massive data sets that run in less than a second. This blog is about some of the things we did as a team to discover the user...
Horizontal scaling is the key to performance at scale, which is why every database claims this. You should investigate, though, to see how much effort it takes, especially compared to Apache Druid.
When you think of querying with Apache Druid, you probably imagine queries over massive data sets that run in less than a second. This blog is about some of the things we did as a team to discover the user...
Building Analytics for External Users is a Whole Different Animal
Analytics aren’t just for internal stakeholders anymore. If you’re building an analytics application for customers, then you’re probably wondering…what’s the right database backend?
After over 30 years of working with data analytics, we’ve been witness (and sometimes participant) to three major shifts in how we find insights from data - and now we’re looking at the fourth.
Every year industry pundits predict data and analytics becoming more valuable the following year. But this doesn’t take a crystal ball to predict. There’s instead something much more interesting happening...
Today, I'm prepared to share our progress on this effort and some of our plans for the future. But before diving further into that, let's take a closer look at how Druid's core query engine executes queries,...
Product Update: SSO, Cluster level authorization, OAuth 2.0 and more security features
When you think of querying with Apache Druid, you probably imagine queries over massive data sets that run in less than a second. This blog is about some of the things we did as a team to discover the user...
When you think of querying with Apache Druid, you probably imagine queries over massive data sets that run in less than a second. This blog is about some of the things we did as a team to discover the user...
Druid Nails Cost Efficiency Challenge Against ClickHouse & Rockset
To make a long story short, we were pleased to confirm that Druid is 2 times faster than ClickHouse and 8 times faster than Rockset with fewer hardware resources!.
Unveiling Project Shapeshift Nov. 9th at Druid Summit 2021
There is a new category within data analytics emerging which is not centered in the world of reports and dashboards (the purview of data analysts and data scientists), but instead centered in the world of applications...
How we made long-running queries work in Apache Druid
When you think of querying with Apache Druid, you probably imagine queries over massive data sets that run in less than a second. This blog is about some of the things we did as a team to discover the user...
Uneven traffic flow in streaming pipelines is a common problem. Providing the right level of resources to keep up with spikes in demand is a requirement in order to deliver timely analytics.
Community Discoveries: multi-value dimensions in Apache Druid
Hellmar Becker is an Imply solutions engineer based in Germany, where he has been delving into the nooks-and-crannies of multi-valued dimension support in Druid. In this interview, Hellmar explains why...
Community Spotlight: Apache Pulsar and Apache Druid get close…
The community team at Imply spoke with an Apache Pulsar community member, Giannis Polyzos, about how collaboration between open source communities generates great things, and more specifically, about how...