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

 

 

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
106 [HTML/Javascript] 웹소켓 튜터리얼 졸리운_곰 2022.11.15 771
105 [html, javascript] JavaScript에서 함수가 완료 될 때까지 기다립니다 졸리운_곰 2022.11.15 591
104 [IE javascript to Chrome] A universal createPopup() replacement 졸리운_곰 2022.11.14 515
103 [HTML/Javascript] indexedDB에 대해 알아보자! file 졸리운_곰 2022.09.15 563
102 [HTML][Javascript] JavaScript - DOM 요소의 생성 및 삭제, innerHTML, CSS 스타일 적용, JavaScript 스타일 적용 file 졸리운_곰 2022.09.09 519
101 [JWT} [WEB] JWT(Json Web Token)란? 개념 정리 및 예제 file 졸리운_곰 2022.07.15 517
100 [web개발][javascript] javascript - 주소의 파라미터값 변수로 받기 졸리운_곰 2021.10.19 333
99 [Javascript, ajax] <jQuery>Ajax, json(제이손) 파싱해서 가져오기 졸리운_곰 2021.05.17 492
98 [Javascript, ajax] XMLHttpRequest, jQuery Ajax 예제 file 졸리운_곰 2021.05.17 597
97 [javascript] Javascript JSON.parse(), JSON.stringify() 사용하는법 졸리운_곰 2021.05.17 368
96 [JAVASCRIPT에서 session 값 가져다 쓰는 법] 가져오는 법, string data type과 비교하는 법 졸리운_곰 2021.05.14 2592
95 [javascript] 다른 도메인으로 AJAX을 위한 Access-Control-Allow-Origin 졸리운_곰 2021.05.14 675
94 [javascript] html 로드시 자동실행 javascript : 자동 실행 함수 (window.onload, $(document).ready()) 졸리운_곰 2021.05.14 635
93 [javascript] 순수 javascript로 동기 ajax, Sync ajax without jquery? 졸리운_곰 2021.05.14 989
92 [javascript][hello world]자바스크립트] 문자열 출력 함수, 텍스트 쓰기; HTML-JavaScript Print String 졸리운_곰 2021.05.14 597
91 [JavaScript] How to Write a Simple Interpreter in JavaScript file 졸리운_곰 2021.04.13 519
90 [javascript, 자바스크립트] 자동 실행 함수 (window.onload, $(document).ready()) 졸리운_곰 2021.02.13 449
89 배민찬은 Vue를 어떻게 사용하나요? file 졸리운_곰 2020.12.02 354
88 [Javascript] with 명령에 대하여 졸리운_곰 2020.09.16 459
87 Webpack 완전정복하기!! file 졸리운_곰 2020.07.20 726
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED