Design Techniques for Building Streaming Data, Cloud-Native Applications: Part 1 - Spark, Flink, and Friends

A Look at Streaming Engines and Fast Data Architectures

This is the first of six posts in our cloud-native series that focuses on streaming data applications. We’ll discuss requirements, architecture considerations, design patterns, specific tools, etc.

For a more detailed examination of these topics, see my free O’Reilly report, Fast Data Architectures for Streaming Applications. The last several posts in this series on streaming will discuss serving machine learning and artificial intelligence models in streaming applications. My colleague Boris Lublinsky will write those posts. For an in-depth analysis of this topic, see his free O’Reilly report, Serving Machine Learning Models.

In this first post, I’ll discuss some requirements to consider, a few architecture points, and then discuss streaming data engines, which are standalone services that do a lot of heavy lifting for streaming data pipelines.

The next post will look at an alternative approach, using streaming data libraries to embed streaming semantics in your microservices. This approach provides greater flexibility, but requires you to implement some of the capabilities you get “for free” from the engines.

Requirements for Streaming Data Applications

In brief, these forces drive requirements for streaming (“fast data”) architectures, where I’ll use the term batch processing as a catch-all term for data warehousing and other “off-line” forms of data analytics:

  1. It’s a competitive advantage to extract useful information from data as quickly as possible.
  2. Many applications need data faster than batch processing, like ad serving and mobile apps; however, some data analytics can be done using batch processing ahead of time).
  3. Because of the time sensitivity, streaming analytics need to be integrated with other processing systems in the environment, more than is typical for batch processing.
  4. Stream processing applications are “always on,” which means they require greater resiliency, availability, and dynamic scalability than their batch-oriented predecessors.

Characteristics of Streaming Data Architectures

While the requirements in the previous section can be implemented many ways, the following characteristics are widely used in implementation architectures. See also Figure 1 below:

  • A stream-oriented data backplane is required for capturing incoming data and serving it to consuming services, which then need to use the same backplane for results needed by downstream services. Today, Apache Kafka is the most popular choice for this data backplane. As an interservice integration tool, Kafka helps support heterogeneous environments, since everything needs to be closely linked, but not too closely linked.
  • The microservices community has developed mature techniques for meeting the requirements for resiliency, availability, and scalability. Hence, streaming systems need to adopt these techniques, making them work more like conventional microservices compared to batch systems.
  • If we extract and exploit information more quickly, leading to a more integrated environment between our microservices and stream processors, then our streaming architectures must be flexible enough to support heterogeneous workloads. This dovetails with the parallel trend toward large, heterogeneous clusters manage with Kubernetes or similar resource managers.
Figure 1: Representative Streaming Architecture

Figure 1 is taken from my Fast Data Architectures for Streaming Applications report. The numbers correspond to notes in the report. I won’t discuss all the details here, but note a few things. Kafka plays the central role of integrating services, both data processing and microservices, and capturing incoming data. Apache Spark and Apache Flink are popular tools for processing data. (We’ll discuss Akka Streams and Kafka Streams in the next post.) A wide range of persistence options are possible, depending on the requirements.

Characteristics of a Streaming Engine

If you know the Hadoop ecosystem, you know that the three core components of Hadoop are the following:

경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com

  1. Hadoop Distributed File System (HDFS) for data storage
  2. MapReduce, Spark, or similar for processing the data (“compute”)
  3. YARN for managing resources and application instances (e..g, jobs and tasks in Hadoop parlance)

In the streaming world, the analogs are these:

  1. Kafka for storage of “in-flight, i.e., streaming data
  2. Spark, Flink, Akka Streams, Kafka Streams, or similar for compute
  3. Kubernetes or similar for managing resources and application instances

Akka Streams and Kafka Streams are examples streaming libraries, as discussed above. In this post, we’ll focus on Spark and Flink as the two most popular streaming engines, representative of many alternatives available, both commercial and open-source.

Spark and Flink share a few common characteristics:

  • They provide high-level abstractions for working with data as a whole, such as SQL with streaming extensions and APIs that support definitions of “data flows”.
  • They support large datasets and high volumes of data per unit time by partitioning the data and distributing it across a cluster.
  • The mechanics of partitioning large data sets across a cluster and managing multiple services and application instances for processing the partitions is largely hidden from the user.
  • The levels of abstraction between high-level constructs, like SQL, and low-level runtime implementation details allows these tools to support several useful features:
    • Sophisticated streaming semantics, like event-time windowing, processing triggers, SQL over streams, etc.
    • Durability and resiliency mechanisms to enable effectively once processing of records and preservation of evolving application state, even in the presence of failures.

All the work these engines do for you is a great labor-saving benefit, but they have a few drawbacks.

  • Integration with other microservices usually requires that you run the engines separately from the microservices and exchange data through Kafka topics or other means. This adds some latency and more running applications at the system level, but also helps prevent monolithic applications.
  • If your application doesn’t fit the runtime model of the engine, you have to use something else.
  • These systems can be difficult to tune and manage.
  • The overhead of these systems make them less ideal for smaller data streams, e.g., those that don’t require partitioning.

[출처] https://www.lightbend.com/blog/cloud-native-streaming-data-with-spark-flink

 

 

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
27 [wordpress, 워드프레스] 워드프레스로 쉽게 랜딩 페이지 만들기 (feat. 엘리멘터, GeneratePress, Divi) file 졸리운_곰 2024.12.20 545
26 [wordpress, 워드프레스] WordPress 페이지또는 글에 별도 CSS와 JavaScript 추가하기 file 졸리운_곰 2024.12.19 354
25 [wordpress 플러그인] 코스모스팜. 회원관리 1.메뉴에 로그인 넣기 file 졸리운_곰 2024.08.25 513
24 [wordpress 플러그인] WP-Members로 회원제 사이트 만들기 file 졸리운_곰 2024.08.25 750
23 [php worldpress] 워드프레스 새 서버 이전시 페이지 안나오는 문제 : How to Rewrite URLs with mod_rewrite for Apache on Ubuntu 20.04 file 졸리운_곰 2024.08.07 775
22 [php worldpress] PHP query to SQL server database (wordpress) 졸리운_곰 2024.07.28 503
21 [php worldpress] [위 에]wordpress 사용자 암호 화 원리 및 알고리즘 분석 졸리운_곰 2022.04.11 377
20 [wordpress] WPForms 워드프레스 폼빌더 사용법 file 졸리운_곰 2021.04.25 1715
19 [wordpress][워드프레스] 워드프레스에서 wpdb를 사용한 CRUD 작업 예 졸리운_곰 2021.04.15 356
18 워드프레스에서 wpdb를 사용한 CRUD 작업 예 졸리운_곰 2021.01.12 459
17 워드프레스 – CRUD file 졸리운_곰 2021.01.02 502
16 워드프레스 데이터베이스 들여다보기. file 졸리운_곰 2020.08.04 673
15 워드프레스 플러그인과 테마 비교 - 사이트별 플러그인 만들기 졸리운_곰 2020.04.21 501
14 워드프레스에서 js 스크립트 파일과 스타일시트를 올바르게 로드하는 방법 졸리운_곰 2020.04.21 737
13 워드프레스 플러그인 만들기 file 졸리운_곰 2020.04.21 500
12 워드프레스 숏코드: 완벽 가이드 file 졸리운_곰 2020.04.21 513
11 워드프레스 페이지 분석 file 졸리운_곰 2019.11.19 515
10 내가 본 워드프레스 핵심 구조 및 기능 (Wordpress Architecture and Function) file 졸리운_곰 2019.11.19 452
9 Embedding three.js in WordPress 워드프레스에서 three.js 사용 졸리운_곰 2019.11.08 517
8 How to Super Charge your WordPress with Microservices 워드프레스 마이크로서비스 file 졸리운_곰 2019.11.03 374
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED