복합 이벤트 처리 (Complex Event Processing)에 대한 연구를 하다 보니 오픈 소스는 Esper, Siddhi 기반 으로한 WSO2 등 많은 엔진이 있다.

하지만 데이터스트림을 처리하는데 있어서 오픈 프레임워크는 spark와 storm 대표적이다.

Spark 같은 경우는 Memory를 기반으로 분산 컴퓨팅을 지원한다고 하는데 , 추후에 시간이 있을 때 다시 정리를 하겠습니다.

STORM 같은 경우에는 오픈소스로 오래 되었고, 안정적이라고한다.

아파치 스톰 홈페이지 http://storm.apache.org/index.html

 

Why use Storm?

Apache Storm is a free and open source distributed realtime computation system. Storm makes it easy to reliably process unbounded streams of data, doing for realtime processing what Hadoop did for batch processing. Storm is simple, can be used with any programming language, and is a lot of fun to use!

Storm has many use cases: realtime analytics, online machine learning, continuous computation, distributed RPC, ETL, and more. Storm is fast: a benchmark clocked it at over a million tuples processed per second per node. It is scalable, fault-tolerant, guarantees your data will be processed, and is easy to set up and operate.

Storm integrates with the queueing and database technologies you already use. A Storm topology consumes streams of data and processes those streams in arbitrarily complex ways, repartitioning the streams between each stage of the computation however needed. Read more in the tutorial.

스톰을 쓰는 곳은 트위터, 야후, 엘프, 필립보드, 그룹폰 등등 많은 곳에서 쓰고 있다.

 

Storm 구성하는 기본 요소

Topology, stream, spout, bolt 로 구성

 

Topology

스톰의 분산 연산 구조로 stream, spout, bolt로 구성됨.

spout과 bolt 간의 연관관계를 정의해서 데이터의 관계를 정의해 놓은 것 .

: 하둡과 같은 배치 처리 시스템의 잡과 거의 비슷하지만, Batch Job은 연산의 처음과 끝지점이 명확하게 정의되어 있는 반면에

Storm의 Topology는 죽이거나 언디플로이 할 때까지 계속 동작.

Stream

튜플은 스톰의 기본 데이터 구조체이며, key-value pair의 목록이며, 스트림은 연속된 튜플들로 정의를 함.

스톰 튜플을 CEP의 이벤트로 생각하면 된다.

 

Spout

Spout에서는 데이터를 읽어들이는 데이터 소스(Storm Topology로들어가는 입구)이다. 또한 데이터를 나타내는 tuple을 생성하는데, Tuple은 데이터를 보관하는 단위를 나타낸다.

Adaptor로 동작하는데 데이터 소스와 연결을 맺고 데이터를 튜플로 변환하여 스트림으로 튜플을 내보내는 일을 한다.

Bolt

 

Bolt는 읽어드린 데이터를 처리하는 함수, CEP에서는 연산자, 실시간연산으로 생각하면됨, 입력값으로 데이터 스트림을 받고, 로직에 따라 다른 bolt로 넘겨주거나 종료.

 

위의 그림과 같이 토폴로지는 하나의 spout과 여러 개의 bolt로 이루어진다.

 

https://trenbe.onelink.me/uRnQ/b38091c7

'BackEnd > ETC' 카테고리의 다른 글

[gradle] CreateProcess error=206  (0) 2020.04.25
Git remote: Permission to  (0) 2020.03.08
http 상태 코드  (0) 2020.01.19
CQRS란 ?  (1) 2020.01.19

+ Recent posts