1. Spring Cloud Data Flow の紹介
http://www.yahoo.co.jp/
ヤフー株式会社 浅沼 孝信
2017年7月27日
2. 自己紹介
• 名前
• 浅沼 孝信
• 業務履歴
• 2012年新卒入社
• Hadoop周りの業務(HDFS ECの開発など)
• 最近はデータフロー
Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止
2
3. 目次
Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止
3
• Spring Cloud Data Flow とは
• 開発された動機
• ステート管理
• まとめ
4. 目次
Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止
4
• Spring Cloud Data Flow とは
• 開発された動機
• ステート管理
• まとめ
5. Spring Cloud Data Flow とは
• ストリーム処理とバッチ処理に関する
Springアプリケーションの統合デプロイメント
Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止
5
Spring Cloud Data Flow
Spring Cloud Stream Spring Cloud Task
Spring
Integration
Spring Boot Spring Batch
BatchStreaming
deploy
use use
6. Spring Cloud Data Flow とは
• データフローの作成
- Web UI
- UNIXプログラミング風のDSL(シェル)
Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止
6
http --port=12345 | filter | hdfs
7. Spring Cloud Data Flow とは
• データフローの作成
- Web UI
- UNIXプログラミング風のDSL(シェル)
各プロセスはSpring Bootアプリケーションとして起動
Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止
7
http --port=12345 | filter | hdfs
8. Spring Cloud Data Flow とは
• デプロイメント
さまざまなモダンなプラットフォームに対する
SPI実装が用意されている
- Cloud Foundry
- Kubernetes
- YARN
- Mesos
- local(開発用)
Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止
8
9. Spring Cloud Data Flow とは
Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止
9
SCDF
Server
REST-API
Deployer SPI
deploy
RDBMS
Data
Source
Data
Source
Web UI Shell
10. 目次
Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止
10
• Spring Cloud Data Flow とは
• 開発された動機
• ステート管理
• まとめ
11. 開発された動機
Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止
11
SCDF
Server
REST-API
Deployer SPI
Spring XD Spring Cloud Data Flow
• Spring Cloud Data Flowの前身
• 普通のサーバー上で動く
• モノリシックな設計
• Spring XDの課題を踏まえて再設計
• マイクロサービスの思想
• コンテナプラットフォームに最適化
• 2016年7月に1.0 GAがリリース
XD Admin
ZooKeeper
XD Container XD Container
M
M
M
M
12. 目次
Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止
12
• Spring Cloud Data Flow とは
• 開発された動機
• ステート管理
• まとめ
13. ステート管理
Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止
13
• The Twelve-Factor App
– Herokuの中の人たちが作成
– クラウドネイティブなアプリケーションを
作るのに必要な規則・指針
VI. プロセス
アプリケーションを1つもしくは複数の
ステートレスなプロセスとして実行する
14. ステート管理
Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止
14
SCDF
Server
REST-API
Deployer SPI
deploy
RDBMS
Stateless
• Spring Cloud Data Flowが生成するSpring Bootは
ステートレスなアプリケーション
15. ステート管理
Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止
15
SCDF
Server
REST-API
Deployer SPI
deploy
RDBMS
Stateful
• ステートが発生する部分はコンテナプラットフォームの
外で管理する
データフローの定義など
データフローの解析
Spring Boot間のメッセージング
Stateless
16. 目次
Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止
16
• Spring Cloud Data Flow とは
• 開発された動機
• ステート管理
• まとめ
17. まとめ
• Spring Cloud Data Flow とは
ストリーム処理とバッチ処理の統合デプロイメント
• マイクロサービスの思想でSpring XDを再設計
クラウドネイティブなプラットフォームに最適化されている
• コンテナプラットフォームの中では
ステートレスなアプリケーションが稼働している
ステートが発生する部分は外で管理する
Copyright (C) 2016 Yahoo Japan Corporation. All Rights Reserved. 無断引用・転載禁止
17