Choosing the right database is a critical choice when building any software application. All databases have different strengths and weaknesses when it comes to performance, so deciding which database has the most benefits and the most minor downsides for your specific use case and data model is an important decision. Below you will find an overview of the key concepts, architecture, features, use cases, and pricing models of Apache Druid and OSI PI Data Historian so you can quickly see how they compare against each other.
The primary purpose of this article is to compare how Apache Druid and OSI PI Data Historian perform for workloads involving time series data, not for all possible use cases. Time series data typically presents a unique challenge in terms of database performance. This is due to the high volume of data being written and the query patterns to access that data. This article doesn’t intend to make the case for which database is better; it simply provides an overview of each database so you can make an informed decision.
Apache Druid vs OSI PI Data Historian Breakdown
Time series database/data historian
Druid can be deployed on-premises, in the cloud, or using a managed service
OSIsoft PI System is a suite of software products designed for real-time data collection, storage, and analysis of time series data in industrial environments. The PI System is built around the PI Server, which stores, processes, and serves data to clients, and it can be deployed on-premises or in the cloud.
Real-time analytics, OLAP, time series data, event-driven data, log analytics, ad tech, user behavior analytics
Industrial data management, real-time monitoring, asset health tracking, predictive maintenance, energy management
Horizontally scalable, supports distributed architectures for high availability and performance
Supports horizontal scaling through distributed architecture, data replication, and data federation for large-scale deployments
Apache Druid Overview
Apache Druid is an open-source, real-time analytics database designed for high-performance querying and data ingestion. Originally developed by Metamarkets in 2011 and later donated to the Apache Software Foundation in 2018, Druid has gained popularity for its ability to handle large volumes of data with low latency. With a unique architecture that combines elements of time series databases, search systems, and columnar storage, Druid is particularly well-suited for use cases involving event-driven data and interactive analytics.
OSI PI Data Historian Overview
OSI PI, also known as OSIsoft PI System, is an enterprise-level data management and analytics platform specifically designed for handling time series data from industrial processes, sensors, and other sources. Developed by OSIsoft (acquired by AVEVA in 2021), the PI System has been widely used in various industries such as energy, manufacturing, utilities, and pharmaceuticals since its introduction in the 1980s. It provides the ability to collect, store, analyze, and visualize large volumes of time series data in real-time, allowing organizations to gain insights, optimize processes, and improve decision-making.
Apache Druid for Time Series Data
Apache Druid is designed for real time analytics and can be a good fit for working with time series data that needs to be analyzed quickly after being written. Druid also offers integrations for storing historical data in cheaper object storage so historical time series data can also be analyzed using Druid.
OSI PI Data Historian for Time Series Data
OSI PI was created for storing time series data, making it an ideal choice for organizations that need to manage large volumes of sensor and process data. Its architecture and components are optimized for collecting, storing, and analyzing time series data with high efficiency and minimal latency. The PI System’s scalability and performance make it a suitable solution for organizations dealing with vast amounts of data generated by industrial processes, IoT devices, or other sources.
Apache Druid Key Concepts
- Data Ingestion: The process of importing data into Druid from various sources, such as streaming or batch data sources.
- Segments: The smallest unit of data storage in Druid, segments are immutable, partitioned, and compressed.
- Data Rollup: The process of aggregating raw data during ingestion to reduce storage requirements and improve query performance.
- Nodes: Druid’s architecture consists of different types of nodes, including Historical, Broker, Coordinator, and MiddleManager/Overlord, each with specific responsibilities.
- Indexing Service: Druid’s indexing service manages the process of ingesting data, creating segments, and publishing them to deep storage.
OSI PI Data Historian Key Concepts
- PI Server: The core component of the PI System, responsible for data collection, storage, and management.
- PI Interfaces and PI Connectors: Software components that collect data from various sources and send it to the PI Server.
- PI Asset Framework: A modeling framework that allows users to create a hierarchical structure of assets and their associated metadata, making it easier to understand and analyze data.
- PI DataLink: An add-in for Microsoft Excel that enables users to access and analyze PI System data directly from Excel.
- PI ProcessBook: A visualization tool for creating interactive, graphical displays of PI System data.
Apache Druid Architecture
Apache Druid is a powerful distributed data store designed for real-time analytics on large datasets. Within its architecture, several core components play pivotal roles in ensuring its efficiency and scalability. Here is an overview of the core components that power Apache Druid.
- Historical Nodes are fundamental to Druid’s data-serving capabilities. Their primary responsibility is to serve stored data to queries. To achieve this, they load segments from deep storage, retain them in memory, and then cater to the queries on these segments. When considering deployment and management, these nodes are typically stationed on machines endowed with significant memory and CPU resources. Their scalability is evident as they can be expanded horizontally simply by incorporating more nodes.
- Broker Nodes act as the gatekeepers for incoming queries. Their main function is to channel these queries to the appropriate historical nodes or real-time nodes. Intriguingly, they are stateless, which means they can be scaled out to accommodate an increase in query concurrency.
- Coordinator Nodes have a managerial role, overseeing the data distribution across historical nodes. Their decisions on which segments to load or drop are based on specific configurable rules. In terms of deployment, a Druid setup usually requires just one active coordinator node, with a backup node on standby for failover scenarios.
- Overlord Nodes dictate the assignment of ingestion tasks, directing them to either middle manager or indexer nodes. Their deployment mirrors that of the coordinator nodes, with typically one active overlord and a backup for redundancy.
- MiddleManager and Indexer Nodes are the workhorses of data ingestion in Druid. While MiddleManagers initiate short-lived tasks for data ingestion, indexers are designed for long-lived tasks. Given their intensive operations, these nodes demand high CPU and memory resources. Their scalability is flexible, allowing horizontal expansion based on the volume of data ingestion.
- Deep Storage is a component that serves as Druid’s persistent storage unit. Druid integrates with various blob storage solutions like HDFS, S3, and Google Cloud Storage.
- Metadata Storage is the repository for crucial metadata about segments, tasks, and configurations. Druid is compatible with popular databases for this purpose, including MySQL, PostgreSQL, and Derby.
OSI PI Data Historian Architecture
OSI PI is a data management platform built around the PI Server, which is responsible for data collection, storage, and management. The PI System uses a highly efficient, proprietary time series database to store data. PI Interfaces and PI Connectors collect data from various sources and send it to the PI Server. The PI Asset Framework (AF) allows users to model their assets and their associated data in a hierarchical structure, making it easier to understand and analyze the data. Various client tools, such as PI DataLink and PI ProcessBook, enable users to access and visualize data stored in the PI System.
Free Time-Series Database Guide
Get a comprehensive review of alternatives and critical requirements for selecting yours.
Apache Druid Features
Apache Druid supports both real-time and batch data ingestion, allowing it to process data from various sources like Kafka, Hadoop, or local files. With built-in support for data partitioning, replication, and roll-up, Druid ensures high availability and efficient storage.
Scalability and Performance
Druid is designed to scale horizontally, providing support for large-scale deployments with minimal performance degradation. Its unique architecture allows for fast and efficient querying, making it suitable for use cases requiring low-latency analytics.
Druid stores data in a columnar format, enabling better compression and faster query performance compared to row-based storage systems. Columnar storage also allows Druid to optimize queries by only accessing relevant columns.
Druid’s indexing service creates segments with time-based partitioning, optimizing data storage and retrieval for time-series data. This feature significantly improves query performance for time-based queries. Data Rollups
Druid’s data rollup feature aggregates raw data during ingestion, reducing storage requirements and improving query performance. This feature is particularly beneficial for use cases involving high-cardinality data or large volumes of similar data points.
OSI PI Data Historian Features
Data collection and storage
OSI PI’s PI Interfaces and PI Connectors enable seamless data collection from a wide variety of sources, while the PI Server efficiently stores and manages the data.
The PI System is highly scalable, allowing organizations to handle large volumes of data and a growing number of data sources without compromising performance.
The PI Asset Framework (AF) provides a powerful way to model assets and their associated data, making it easier to understand and analyze complex industrial processes.
Tools like PI DataLink and PI ProcessBook enable users to analyze and visualize data stored in the PI System, facilitating better decision-making and process optimization.
Apache Druid Use Cases
Apache Druid provides support for geospatial data and queries, making it suitable for use cases that involve location-based data, such as tracking the movement of assets, analyzing user locations, or monitoring the distribution of events. Its ability to efficiently process large volumes of geospatial data enables users to gain insights and make data-driven decisions based on location information.
Machine Learning and AI
Druid’s high-performance data processing capabilities can be leveraged for preprocessing and feature extraction in machine learning and AI workflows. Its support for real-time data ingestion and low-latency querying make it suitable for use cases that require real-time predictions or insights, such as recommendation systems or predictive maintenance.
Apache Druid’s low-latency querying and real-time data ingestion capabilities make it an ideal solution for real-time analytics use cases, such as monitoring application performance, user behavior, or business metrics.
OSI PI Data Historian Use Cases
OSI PI can help organizations identify inefficiencies, monitor performance, and optimize their industrial processes by providing real-time insights into time series data from sensors and other sources.
By analyzing historical data and detecting patterns or anomalies, OSI PI enables organizations to implement predictive maintenance strategies, reducing equipment downtime and maintenance costs.
OSI PI can be used to track energy consumption across various assets and processes, allowing organizations to identify areas for improvement and implement energy-saving measures.
Apache Druid Pricing Model
Apache Druid is an open source project, and as such, it can be self-hosted at no licensing cost. However, organizations that choose to self-host Druid will incur expenses related to infrastructure, management, and support when deploying and operating Druid in their environment. These costs will depend on the organization’s specific requirements and the chosen infrastructure, whether it’s on-premises or cloud-based.
For those who prefer a managed solution, there are cloud services available that offer Apache Druid as a managed service, such as Imply Cloud. With managed services, the provider handles infrastructure, management, and support, simplifying the deployment and operation of Druid. Pricing for these managed services will vary depending on the provider and the selected service tier, which may include factors such as data storage, query capacity, and data ingestion rates.
OSI PI Data Historian Pricing Model
Pricing for OSI PI is typically based on a combination of factors such as the number of data sources, the number of users, and the level of support required. Pricing details are not publicly available, as they are provided on a quote basis depending on the specific needs of the organization.
Get started with InfluxDB for free
InfluxDB Cloud is the fastest way to start storing and analyzing your time series data.