2024/๊ฐœ๋ฐœ

Spring Cloud Data Flow ํ†บ์•„๋ณด๊ธฐ - Architecture (1)

mjin.park 2024. 8. 10. 17:35

๐Ÿ“ ๊ฐœ์š”

[2024/๊ฐœ๋ฐœ] - Spring Cloud Data Flow ๋กœ์ปฌ ๊ตฌ์ถ•๊ธฐ๋ฅผ ํ†ตํ•ด ๋กœ์ปฌ PC์— ๊ตฌ์ถ•์€ ์„ฑ๊ณตํ–ˆ์œผ๋‚˜,

์–ด๋–ค ๊ตฌ์กฐ๋กœ ๋™์ž‘ํ•˜๋Š”์ง€๋‚˜ ์–ด๋–ค ๊ธฐ๋Šฅ์ด ์ œ๊ณต๋˜๋Š”์ง€ ๋“ฑ์— ๋Œ€ํ•ด์„œ ๋ชจ๋ฅด๋‹ˆ ๋ญ˜ ํ•  ์ˆ˜๊ฐ€ ์—†๋‹ค.

 

Spring Cloud Data Flow ๊ณต์‹ ์‚ฌ์ดํŠธ์—์„œ ์„ค๋ช…ํ•ด์ฃผ๋Š” ๋‚ด์šฉ๋“ค์„ ๊ณต๋ถ€ํ•ด๋ณด์ž.

๐Ÿ‘จ‍๐Ÿ’ป Spring Cloud Data Flow ํ†บ์•„๋ณด๊ธฐ - Architecture (1)

Data Flow๋Š” ์ฃผ์š” ์ปดํฌ๋„ŒํŠธ๋กœ Data Flow Server์™€ Skipper Server๋ฅผ ๊ฐ€์ง„๋‹ค.

 

์ฃผ๋กœ Data Flow Server์—์„œ ์ œ๊ณตํ•˜๋Š” RESTful API๋ฅผ ์ด์šฉํ•˜์—ฌ Data Flow๋ฅผ ์ด์šฉํ•œ๋‹ค.

Web Dashboard, Data Flow Shell๋„ Data Flow Server์—์„œ ์ œ๊ณตํ•˜๋Š” RESTful API๋ฅผ ํ˜ธ์ถœํ•˜๋Š” ๊ตฌ์กฐ์ด๋‹ค.

Spring Data Flow Architecture
Spring Data Flow Architecture

Data Flow Server

Data Flow Server๋Š” ๋‹ค์Œ์„ ๋‹ด๋‹นํ•œ๋‹ค.

  • Domain-Specific Language(DSL)๋กœ ์ •์˜๋œ Stream, Batch Job์„ ํŒŒ์‹ฑํ•œ๋‹ค.
  • Stream, Batch Job ์ •์˜๋ฅผ ๊ฒ€์ฆํ•˜๊ณ  ์œ ์ง€ํ•œ๋‹ค.
  • DSL๋กœ ์‚ฌ์šฉ๋˜๋Š” jar๋‚˜ Docker ์ด๋ฏธ์ง€๋ฅผ artifact๋กœ ๋“ฑ๋กํ•œ๋‹ค.
  • Batch Job์„ ํ•˜๋‚˜ ์ด์ƒ์˜ ํ”Œ๋žซํผ์— ๋ฐฐํฌํ•œ๋‹ค.
  • ์ž‘์—… ์Šค์ผ€์ฅด๋ง์„ ํ”Œ๋žซํผ์œผ๋กœ ์ „๋‹ฌํ•œ๋‹ค.
  • Task, Batch Job์— ๋Œ€ํ•œ ์ˆ˜ํ–‰ ์ด๋ ฅ์„ ์ œ๊ณตํ•œ๋‹ค.
  • Stream์œผ๋กœ ๋ฉ”์„ธ์ง€ ํ†ต์‹ ์„ ํ†ตํ•ด ์„ค์ • ์ •๋ณด๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๋‹ค.
  • Skipper๋กœ Stream ๋ฐฐํฌ ์ˆ˜ํ–‰์„ ์ „๋‹ฌํ•œ๋‹ค.
  • Stream, Batch Job ์ƒ์„ฑ, ๋ฐฐํฌ, ์‚ญ์ œ ๋™์ž‘์„ ์ˆ˜ํ–‰ํ•œ๋‹ค.
  • Stream, Batch Job DSL ์ž๋™์™„์„ฑ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•œ๋‹ค.

Skipper Server

Skipper Server๋Š” ๋‹ค์Œ์„ ๋‹ด๋‹นํ•œ๋‹ค.

  • Stream์„ ํ•˜๋‚˜ ์ด์ƒ์˜ ํ”Œ๋žซํผ์— ๋ฐฐํฌํ•œ๋‹ค.
  • ํ•˜๋‚˜ ์ด์ƒ์˜ ํ”Œ๋žซํผ์—์„œ Stream์„ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜๊ฑฐ๋‚˜ ๋กค๋ฐฑํ•œ๋‹ค. (๋ธ”๋ฃจ-๊ทธ๋ฆฐ ์—…๊ทธ๋ ˆ์ด๋“œ ์ •์ฑ…)
  • ๊ฐ Stream์— ๋Œ€ํ•œ manifest ๋ณ€๊ฒฝ์ด๋ ฅ์„ ์ €์žฅํ•œ๋‹ค.

Database

Data Flow Server, Skipper Server๋Š” RDBMS๊ฐ€ ํ•„์š”ํ•˜๋‹ค.

๊ธฐ๋ณธ๊ฐ’์œผ๋กœ๋Š” ๋‚ด์žฅ H2 Database๋ฅผ ์‚ฌ์šฉํ•˜๊ณ , ์™ธ๋ถ€ Database๋ฅผ ์—ฐ๊ฒฐํ•˜์—ฌ ์ด์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

์ง€์›๋˜๋Š” RDBMS๋กœ๋Š” H2, HSQLDB, MariaDB, Oracle, Postgresql, DB2, SqlServer๊ฐ€ ์žˆ๋‹ค.

Security

Data Flow Server, Skipper Server๋Š” ์ธ์ฆ ๋ฐฉ์‹์œผ๋กœ Basic Auth, OAuth 2.0์„ ์ง€์›ํ•œ๋‹ค.

ํ•„์š”ํ•˜๋‹ค๋ฉด ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์œผ๋กœ๋„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๋„๋ก ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜๋Š” ๊ฒƒ์œผ๋กœ ๋ณด์ธ๋‹ค.

Application Types

๋‘๊ฐ€์ง€ ํƒ€์ž…์˜ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์ œ๊ณตํ•œ๋‹ค.

  • Long-lived applications : ๋ฌด์ œํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ๋ฉ”์„ธ์ง€ ๊ธฐ๋ฐ˜์œผ๋กœ ์ฒ˜๋ฆฌํ•˜๋Š” ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜
    • ๋‹จ์ผ ์ž…/์ถœ๋ ฅ ๋˜๋Š” ๋‹ค์ˆ˜ ์ž…/์ถœ๋ ฅ์„ ๊ฐ€์งˆ ์ˆ˜ ์žˆ๋‹ค.
  • Short-lived applications : ์œ ํ•œํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ์ฒ˜๋ฆฌํ•˜๊ณ  ์ข…๋ฃŒ๋˜๋Š” ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜
    • Data Flow DB์— ์ˆ˜ํ–‰ ์ƒํƒœ๋ฅผ ๊ธฐ๋กํ•˜๋ฉด์„œ ์ฝ”๋“œ๋ฅผ ์ˆ˜ํ–‰ํ•˜๋Š” Task
      Java ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์ด ์•„๋‹Œ Spring Cloud Task Framework๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜๋„ ์žˆ๋‹ค.
    • Spring Batch ํ”„๋ ˆ์ž„์›Œํฌ๋ฅผ ํฌํ•จํ•œ Task ํ™•์žฅ

์ผ๋ฐ˜์ ์œผ๋กœ,

Spring Cloud Stream๊ธฐ๋ฐ˜ Long-lived application๊ณผ

Spring Cloud Task/Spring Batch ๊ธฐ๋ฐ˜ Short-lived application์„ ์‚ฌ์šฉํ•œ๋‹ค.

 

๊ผญ Spring์„ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋”๋ผ๋„ Data Flow Application์œผ๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ,

๋‹ค๋ฅธ ์–ธ์–ด๋กœ ์ž‘์„ฑ๋œ ๊ฒƒ ๋˜ํ•œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

 

Application์€ Maven Repository, File Location, HTTP๋กœ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋Š” uber-jar ๋‚˜ Docker image๋กœ ํŒจํ‚ค์ง•์„ ํ•˜๋ฉด ๋œ๋‹ค.

๐Ÿ’ฌ ๋งบ์Œ๋ง

์ตœ์ดˆ Spring Batch ์ž‘์—…์„ ๊ด€๋ฆฌํ•˜๋Š” ๋„๊ตฌ๋ฅผ ์ฐพ๊ธฐ ์‹œ์ž‘ํ•œ ์—ฌ์ • ์ค‘

Spring Batch์™€ ๊ด€๋ จ๋œ ๋‚ด์šฉ๋“ค์ด ํ•˜๋‚˜์”ฉ ๋‚˜์˜ค๋‹ˆ ์žฌ๋ฏธ์žˆ๋„ค์š”.

 

๋‹ค์Œ ํŽธ์€ Long-lived Applications, Short-lived Applications ๋” ์•Œ์•„๋ณด๊ธฐ๋กœ ์ฐพ์•„๋ต™๊ฒ ์Šต๋‹ˆ๋‹ค.

๋ฐ˜์‘ํ˜•

'2024 > ๊ฐœ๋ฐœ' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

Spring Cloud Data Flow ๋กœ์ปฌ ๊ตฌ์ถ•๊ธฐ  (0) 2024.08.01
Spring Batch ๊ด€๋ฆฌ ๋„๊ตฌ Jenkins ๋Œ€์•ˆ ํƒ์ƒ‰๊ธฐ  (0) 2024.07.28
GenAI ? LLM ?  (2) 2024.04.22