Module 01 · What Is Big Data?
Introduction to Emerging Big Data Technologies新兴大数据技术导论
Estimated time: 30 minutes
预计时间:30 分钟
Introduction 引言
In the evolving world of big data, new technologies are emerging to address the growing need for faster, more scalable, and efficient data processing. Traditional systems like Hadoop and Spark have been the backbone of big data processing, but modern technologies such as Apache Pulsar, Apache Druid, and PrestoDB are gaining popularity for their unique capabilities. This reading will explore these technologies and compare their features to Hadoop and Spark, providing you with a broader understanding of the current big data landscape.
在大数据不断发展的世界中,新的技术正在涌现以满足对更快、更具可扩展性和更高效的数据处理日益增长的需求。传统的 Hadoop 和 Spark 系统一直是大数据处理的核心,但 Apache Pulsar、Apache Druid 和 PrestoDB 等现代技术因其独特功能而日益受到欢迎。本阅读材料将探讨这些技术,并将它们的特性与 Hadoop 和 Spark 进行比较,为您提供对当前大数据格局的更全面的理解。
Objectives 目标
By the end of this reading, learners will be able to:
通过本阅读材料的学习,学习者将能够:
- Explain the core functionalities and use cases of modern big data technologies
解释现代大数据技术的核心功能和使用场景 - Differentiate traditional and emerging solutions
区分传统解决方案和新兴解决方案 - Recognize the specific scenarios where each technology—Pulsar for messaging and streaming, Druid for real-time analytics, and PrestoDB for distributed querying—is best suited
识别每种技术——Pulsar 用于消息传递和流处理,Druid 用于实时分析,PrestoDB 用于分布式查询——最适合的具体场景 - Evaluate the scalability, performance, and latency trade-offs of these emerging technologies compared to traditional big data systems
评估这些新兴技术与传统大数据系统相比在可扩展性、性能和延迟方面的权衡 - Determine the right technology stack for real-world applications
确定适用于实际应用的正确技术栈
1. Apache Pulsar
Overview 概述
Apache Pulsar is an open-source, cloud-native, distributed messaging and streaming platform developed by Yahoo in 2016. It was built to handle high-throughput, low-latency messaging for large-scale, globally distributed systems. Pulsar combines features of both message queueing systems (like Kafka) and real-time streaming platforms, making it highly versatile for modern data architectures.
Apache Pulsar 是由雅虎于 2016 年开发的一个开源、云原生、分布式消息和流平台。它旨在处理大规模、全球分布式系统中的高吞吐量、低延迟消息。Pulsar 结合了消息队列系统(如 Kafka)和实时流平台的功能,使其在现代数据架构中具有高度通用性。
Key features 关键特性
- Unified messaging model: Pulsar supports both message queueing and real-time streaming in a single system. This reduces the need to integrate multiple solutions for different use cases.
统一消息模型:Pulsar 支持在单一系统中同时进行消息队列和实时流处理。这减少了为不同用例集成多个解决方案的需求。 - Multi-tenancy and isolation: Pulsar architecture is designed with multi-tenancy in mind, allowing multiple clients or teams to share the same Pulsar cluster while maintaining strong isolation between their workloads. This makes Pulsar ideal for large organizations with various use cases.
多租户和隔离:Pulsar 架构设计考虑了多租户,允许多个客户端或团队共享同一个 Pulsar 集群,同时在他们的工作负载之间保持严格的隔离。这使得 Pulsar 成为具有多种用例的大型组织的理想选择。 - Geo-replication: Pulsar natively supports geo-replication, allowing seamless data replication across multiple geographic locations, which is critical for building globally distributed systems.
地理复制:Pulsar 原生支持地理复制,允许在多个地理位置之间无缝复制数据,这对于构建全球分布式系统至关重要。 - Topic compaction and retention: Pulsar supports topic compaction, which keeps only the most recent values for each key, and message retention policies that can store messages for defined periods.
主题压缩和保留:Pulsar 支持主题压缩,保留每个键的最新值,以及可以存储消息一段时间的消息保留策略。 - Scalability and performance: Pulsar separates compute and storage (via Apache BookKeeper), allowing horizontal scaling with minimal impact on performance. Its architecture ensures low-latency message delivery and can scale to millions of topics.
可扩展性与性能:Pulsar 将计算与存储分离(通过 Apache BookKeeper),实现水平扩展,同时对性能影响最小。其架构确保低延迟消息传递,并能够扩展到数百万个主题。
Use cases 用例
- Real-time analytics: Pulsar is well-suited for capturing real-time events and streaming them to downstream analytics engines like Apache Druid or Apache Spark.
实时分析:Pulsar 非常适合捕获实时事件,并将其传输到下游分析引擎,如 Apache Druid 或 Apache Spark。 - Event-driven architectures: Pulsar ability to handle both message queueing and streaming makes it ideal for event-driven applications such as microservices.
事件驱动架构:Pulsar 处理消息队列和流的能力使其成为事件驱动应用程序的理想选择,例如微服务。 - Data pipeline orchestration: It can serve as the backbone of complex data pipelines, ensuring real-time, fault-tolerant message delivery.
数据管道编排:它可作为复杂数据管道的骨干,确保实时、容错的消息传递。
Limitations 限制
- Learning curve for deployment and operation
部署和操作的 learning curve - Limited community and ecosystem compared to Kafka
与 Kafka 相比,社区和生态系统有限
2. Apache Druid
Overview 概述
Apache Druid is a real-time analytics database designed for rapid ingestion and querying of event-driven data. Originally developed by Metamarkets (later acquired by Snap Inc.), Druid excels at handling high volumes of time-series data, such as logs, metrics, and clickstreams.
Apache Druid 是一款专为快速摄入和查询事件驱动数据而设计的实时分析数据库。最初由 Metamarkets(后被 Snap Inc. 收购)开发,Druid 在处理大量时间序列数据方面表现出色,例如日志、指标和点击流。
Key features 主要特性
- Columnar data storage: Druid stores data in a columnar format, which allows for fast aggregation and filtering of large data sets. This structure is optimized for analytical queries that scan large amounts of data.
列式数据存储:Druid 以列式格式存储数据,这允许对大型数据集进行快速聚合和过滤。这种结构针对分析查询进行了优化,能够扫描大量数据。 - Real-time data ingestion: Druid can ingest streaming data from sources like Apache Kafka or Pulsar and provide near-instant query results. Its ability to combine streaming and batch data ingestion makes it highly versatile.
实时数据摄入:Druid 可以从 Apache Kafka 或 Pulsar 等源摄入流数据,并提供近乎实时的查询结果。其结合流式和批量数据摄入的能力使其具有高度通用性。 - Time-series analysis: Druid architecture is optimized for time-based data, making it ideal for use cases like time-series data analysis, trend monitoring, and anomaly detection.
时间序列分析:Druid 架构针对基于时间的数据进行了优化,使其非常适合用于时间序列数据分析、趋势监控和异常检测等用例。 - Horizontal scalability: Druid can scale horizontally by adding more nodes, allowing it to handle petabytes of data efficiently.
水平扩展性:Druid 可以通过添加更多节点进行水平扩展,从而高效地处理 PB 级数据。 - Optimized for OLAP: Druid is purpose-built for Online Analytical Processing (OLAP) workloads, which involve complex queries that aggregate large datasets.
针对 OLAP 优化:Druid 是专门为在线分析处理(OLAP)工作负载设计的,这类工作负载涉及复杂的查询,需要聚合大型数据集。
Use cases 用例
- Interactive dashboards: Druid is commonly used for powering interactive analytics dashboards where users need to query large datasets in real time.
交互式仪表板:Druid 常用于为交互式分析仪表板提供支持,用户需要实时查询大型数据集。 - Fraud detection: Its ability to analyze large volumes of real-time data makes it suitable for detecting patterns of fraud or suspicious activity.
欺诈检测:其分析大量实时数据的能力使其适用于检测欺诈模式或可疑活动。 - Operational analytics: Businesses use Druid to monitor and analyze metrics from their operational systems, such as monitoring system logs or user activity.
运营分析:企业使用 Druid 来监控和分析其运营系统的指标,例如监控系统日志或用户活动。
Limitations 局限性
- Complexity in setup and configuration
设置和配置的复杂性 - Limited flexibility for non-time-series data
非时间序列数据的灵活性有限
3. PrestoDB
Overview 概述
PrestoDB is an open-source distributed SQL query engine, developed by Facebook, that allows querying across large data sets stored in a variety of systems such as HDFS, S3, MySQL, and NoSQL stores. Presto is designed to execute complex queries at interactive speeds, making it an ideal solution for businesses looking for fast querying without moving data.
PrestoDB 是由 Facebook 开发的一个开源分布式 SQL 查询引擎,它允许跨多种系统(如 HDFS、S3、MySQL 和 NoSQL 存储)中的大型数据集进行查询。Presto 设计用于以交互式速度执行复杂查询,使其成为那些寻求快速查询而不移动数据的企业的理想解决方案。
Key features 主要特性
- Federated queries: Presto can query data from multiple sources, combining data sets from different systems into a single query. This eliminates the need for ETL (Extract, Transform, Load) processes, making it easier to work with disparate data sources.
联邦查询:Presto 可以从多个数据源查询数据,将不同系统的数据集组合成一个查询。这消除了对 ETL(提取、转换、加载)过程的需求,使得处理异构数据源更加便捷。 - Interactive query speeds: Presto is optimized for running SQL queries with low-latency, making it a popular choice for business intelligence (BI) tools where fast querying of large datasets is essential.
交互式查询速度:Presto 针对低延迟的 SQL 查询进行了优化,使其成为商业智能(BI)工具的首选,这些工具需要快速查询大型数据集。 - Pluggable architecture: Presto offers extensible architecture that allows for integration with a wide range of data sources through custom connectors.
可插拔架构:Presto 提供可扩展的架构,通过自定义连接器可以与各种数据源集成。 - Scalability: Presto can scale horizontally across clusters, enabling it to handle large data sets spread across different storage systems.
可扩展性:Presto 可以在集群中水平扩展,使其能够处理分布在不同存储系统中的大型数据集。
Use cases 用例
- Data lake querying: Presto is frequently used to query data in distributed data lakes such as those built on top of HDFS or AWS S3.
数据湖查询:Presto 通常用于查询分布式数据湖中的数据,例如那些建立在 HDFS 或 AWS S3 之上的数据湖。 - Interactive analytics: Business intelligence and reporting tools use Presto to provide users with fast, interactive access to large data sets.
交互式分析:商业智能和报告工具使用 Presto 为用户提供对大型数据集的快速、交互式访问。 - Ad hoc data exploration: Data scientists and engineers use Presto for exploratory data analysis across multiple data sources.
临时性数据探索:数据科学家和工程师使用 Presto 进行跨多个数据源的探索性数据分析。
Limitations 局限性
- Not designed for transaction processing or streaming workloads
不适合事务处理或流式工作负载 - Requires careful tuning for large-scale queries
大规模查询需要仔细调优
Comparison with Hadoop and Spark 与 Hadoop 和 Spark 的比较
| Feature 功能 | Apache Hadoop | Apache Spark | Apache Pulsar | Apache Druid | PrestoDB | |
|---|---|---|---|---|---|---|
| 1 | Core functionality 核心功能 | Batch processing 批量处理 | Batch + Stream processing 批量+流处理 |
Message queueing + Streaming 消息队列 + 流式传输 |
Real-time analytics database 实时分析数据库 |
SQL query engine SQL 查询引擎 |
| 2 | Primary use case 主要应用场景 | Large-scale ETL 大规模 ETL | Real-time and batch analytics 实时与批量分析 |
Event-driven microservices 事件驱动微服务 |
Real-time + historical queries 实时+历史查询 |
Interactive querying 交互式查询 |
| 3 | Data processing 数据处理 | Disk-based, MapReduce 基于磁盘的 MapReduce | In-memory processing 内存中处理 | Stream and message processing 流和消息处理 |
Real-time ingestion 实时摄取 | SQL queries across sources 跨源 SQL 查询 |
| 4 | Latency 延迟 | High 高 | Low (in-memory) 低(内存中) | Low 低 | Low (optimized for OLAP) 低(针对 OLAP 优化) |
Low 低 |
| 5 | Scalability 可扩展性 | High but requires tuning 高,但需要调整 |
High 高 | Very high (geo-replication) 非常高(地理复制) |
Horizontally scalable 水平可扩展 | Horizontally scalable 水平可扩展 |
| 6 | Data ingestion 数据摄取 | Batch 批量 | Batch + Stream 批量 + 流式 | Stream 流式 | Batch + Stream 批量 + 流式 | Batch 批量 |
| 7 | Strengths 优势 | High fault-tolerance, mature ecosystem 高容错性,成熟的生态系统 |
Fast, in-memory computing, ML libraries 快速,内存内计算,机器学习库 |
Unified messaging and streaming 统一消息和流 |
Time-series analysis, fast aggregations 时间序列分析,快速聚合 |
Fast interactive queries across multiple data sources 跨多个数据源的快速交互式查询 |
| 8 | Weaknesses 缺点 | High latency, not suitable for real-time 高延迟,不适用于实时 |
Complex for small-scale tasks 针对小规模任务复杂 |
Complex configuration, smaller ecosystem 复杂配置,较小生态系统 |
Limited non-time-series flexibility 有限的非时间序列灵活性 |
Requires tuning for optimal performance 需要调优以实现最佳性能 |
Conclusion 结论
While traditional big data platforms like Hadoop and Spark remain foundational, the growing complexity and real-time requirements of modern data systems have led to the rise of specialized tools like Apache Pulsar, Apache Druid, and PrestoDB. These technologies provide solutions for real-time analytics, event-driven architectures, and fast querying across distributed data, making them essential for organizations facing modern data challenges. Understanding these emerging tools is beneficial for building efficient, scalable, and future-proof data systems.
尽管传统的 Hadoop 和 Spark 等大数据平台仍然是基础,但现代数据系统的日益复杂性和实时性要求导致了 Apache Pulsar、Apache Druid 和 PrestoDB 等专用工具的兴起。这些技术为实时分析、事件驱动架构以及跨分布式数据的高速查询提供了解决方案,使其成为应对现代数据挑战的组织所必需的。了解这些新兴工具对于构建高效、可扩展和面向未来的数据系统是有益的。