Apache Pulsarの概要と近況

5.5K Views

October 05, 21

スライド概要

Apache Pulsar Meetup Japan #4
https://japan-pulsar-user-group.connpass.com/event/222026/

profile-image

2023年10月からSpeaker Deckに移行しました。最新情報はこちらをご覧ください。 https://speakerdeck.com/lycorptech_jp

シェア

またはPlayer版

埋め込む »CMSなどでJSが使えない場合

関連スライド

各ページのテキスト
1.

Apache Pulsarの概要と近況 ヤフー株式会社 津⽥ 秀介 Copyright ©2021 (C)Yahoo 2020 Japan Yahoo Corporation Japan Corporation. All rights Allreserved. Rights Reserved.

2.

⾃⼰紹介 名前: - 津⽥ 秀介 経歴: - 2008/04〜 SIer(ほぼ携帯キャリア系) - 2016/02〜 Web業界のバックエンド系プラットフォーム (配信系、会員、ポイント、決済等) - 2019/04〜 「Apache Pulsar」を使った社内向けメッセージングプラットフォーム ©2021 Yahoo Japan Corporation All rights reserved. 2

3.

アジェンダ 1. Apache Pulsarとは 2. Apache Pulsarの概要 3. Apache Pulsarの近況 4. Appendix ©2021 Yahoo Japan Corporation All rights reserved. 3

4.

アジェンダ 1. Apache Pulsarとは 2. Apache Pulsarの概要 3. Apache Pulsarの近況 4. Appendix ©2021 Yahoo Japan Corporation All rights reserved. 4

5.

1. Apache Pulsarとは Apache Pulsarとは • Publish-Subscribe⽅式でメッセージを送受信できるプラットフォーム (Yahoo! Inc.で開発) • 2016年9⽉にOSSとして公開し、2018年9⽉にOSSコミュニティ⽀援団体である「The Apache Software Foundation」のトップレベルプロジェクトに昇格 ©2021 Yahoo Japan Corporation All rights reserved. 5

6.

1. Apache Pulsarとは 特徴 • マルチテナント • 配信保証 • ⾼スループット、低レンテンシー • ⽔平スケール可能 • ジオレプリケーション • 永続メッセージ ©2021 Yahoo Japan Corporation All rights reserved. 6

7.

1. Apache Pulsarとは Users • Verizon Media (現: Yahoo! Inc.) • StreamNative • DataStax • Splunk • Tencent • Zhaopin • Yahoo Japan Corporation • Etc. ©2021 Yahoo Japan Corporation All rights reserved. 7

8.

アジェンダ 1. Apache Pulsarとは 2. Apache Pulsarの概要 3. Apache Pulsarの近況 4. Appendix ©2021 Yahoo Japan Corporation All rights reserved. 8

9.

2. Apache Pulsarの概要 そもそもPublish-Subscribe⽅式とは • トピックに登録されたメッセージを単⼀もしくは複数のConsumerに配信すること • トピックはエンドポイント、Producer(Publisher)はトピックにメッセージを登録するク ライアント、Consumer(Subscriber)はトピックからmessageを受信するクライアント Pub-Sub System Producer msgA msgA ConsumerA トピック msgA ©2021 Yahoo Japan Corporation All rights reserved. ConsumerB 9

10.

2. Apache Pulsarの概要 Apache Pulsarにおけるトピック • ネームスペース、テナントを含む persistent://<テナント>/<ネームスペース>/<トピック> • ネームスペースはトピックを束ねるモノ、テナントはネームスペースを束ねるモノ ProducerA テナントA ネームスペースA トピックA トピックB ProducerB ネームスペースB トピックC ©2021 Yahoo Japan Corporation All rights reserved. ConsumerA ConsumerB ConsumerC 10

11.

2. Apache Pulsarの概要 サブスクリプション • Consumerがトピックからメッセージを購読する際に指定する識別⼦ • サブスクリプション単位でConsumerがどこまでメッセージを受信したか管理 トピックA サブスクリプションA ProducerA msgE msgD msgC msgB msgA サブスクリプションB ©2021 Yahoo Japan Corporation All rights reserved. msgB msgA ConsumerA msgA ConsumerB 11

12.

2. Apache Pulsarの概要 サブスクリプションタイプ • メッセージをどのように購読するかのモード (Exclusive, Shared, Failover, Key_Shared) 例. Sharedの場合 ProducerA msgC msgB msgA msgC トピックA サブスクリプションA (Shared) msgA ConsumerA msgB ConsumerB ©2021 Yahoo Japan Corporation All rights reserved. 12

13.

2. Apache Pulsarの概要 Apache Pulsarの構成 • 基本的にはBroker, Bookkeeper, Zookeeperから構成 Producer msgA msgA Broker Consumer msgA Bookie ZooKeeper ©2021 Yahoo Japan Corporation All rights reserved. 13

14.

2. Apache Pulsarの概要 Apache Pulsarの構成 – Broker • 主にメッセージの送受信を仲介するコンポーネント • Admin⽤のREST API、ジオレプリケーション Producer msgA msgA Broker Consumer msgA Bookie ZooKeeper ©2021 Yahoo Japan Corporation All rights reserved. 14

15.

2. Apache Pulsarの概要 Broker – ジオレプリケーション • 他クラスターにメッセージをレプリケーション clusterA Producer msgA Broker clusterB msgA ConsumerA msgA メッセージをレプリケーション Broker ©2021 Yahoo Japan Corporation All rights reserved. msgA ConsumerB 15

16.

2. Apache Pulsarの概要 Apache Pulsarの構成 – Bookie(Apache Bookkeeper) • Producerから受信したメッセージを保持するコンポートネント Producer msgA msgA Broker Consumer msgA Bookie ZooKeeper ©2021 Yahoo Japan Corporation All rights reserved. 16

17.

2. Apache Pulsarの概要 Apache Pulsarの構成 – ZooKeeper(Apache ZooKeeper) • ネームスペース等の設定情報やBroker, BookKeeperのメタ情報等を保存するコンポーネ ント(Configuration Store(旧: Global ZooKeeper), Local ZooKeeperの2プロセスが存 在) Producer msgA msgA Broker Consumer msgA Bookie ZooKeeper ©2021 Yahoo Japan Corporation All rights reserved. 17

18.

2. Apache Pulsarの概要 クライアントライブラリ 6つのクライアントライブラリを提供 • • • Java • C++ • Python • Node.js • Go • C#(.NET) メッセージの圧縮、暗号化などの機能も充実 ©2021 Yahoo Japan Corporation All rights reserved. 18

19.

2. Apache Pulsarの概要 WebSocket API • クライアントライブラリが提供されていない⾔語からでもApache Pulsarを利⽤できるよ うにするためのモノ Producer msgA WebSocket API msgA Consumer msgA msgA Broker ©2021 Yahoo Japan Corporation All rights reserved. 19

20.

2. Apache Pulsarの概要 ユーティリティツール – Pulsar-Client • 簡易的にメッセージの送受信(Produce/Consume)ができるCUI • Produceの実⾏例 $ pulsar-client produce -m "Hello World" -n 10 persistent://tenant1/ns1/t1 • Consumeの実⾏例 $ pulsar-client consume -s sub1 -n 10 persistent://tenant1/ns1/t1 ©2021 Yahoo Japan Corporation All rights reserved. 20

21.

2. Apache Pulsarの概要 ユーティリティツール – Pulsar-Admin • テナントやネームスペースを作成したり、トピックの統計情報や保存されているメッ セージの内容を確認することができるCUI • Brokerが提供するAdmin⽤のREST APIを利⽤ • トピックの統計情報を確認する際の実⾏例 $ pulsar-admin persistent stats persistent://tenant1/ns1/t1 ©2021 Yahoo Japan Corporation All rights reserved. 21

22.

アジェンダ 1. Apache Pulsarとは 2. Apache Pulsarの概要 3. Apache Pulsarの近況 4. Appendix ©2021 Yahoo Japan Corporation All rights reserved. 22

23.

3. Apache Pulsarの近況 リリース – Apache Pulsar 2021年 2019年 2020年 v2.5 v2.6 v2.7 • 最新バージョンはv2.8 • v2.7からCGOクライアントライブラリが削除 ©2021 Yahoo Japan Corporation All rights reserved. 現在 v2.8 23

24.

3. Apache Pulsarの近況 リリース – Apache Pulsar v2.5 〜 v2.6 • v2.7 〜 v2.8 Introduce publish rate-limiting on • topic Support acknowledging a list of messages • Support batch receive in java client • Exclusive producer • Support acknowledgment at batch • Tenant and namespace level rate index level • Etc. limiting • Etc. ©2021 Yahoo Japan Corporation All rights reserved. 24

25.

3. Apache Pulsarの近況 リリース – ネイティブなGoクライアント 2021年 2019年 2020年 v0.1 v0.2 • 最新バージョンはv0.6 • 2020年4⽉にファーストリリース v0.3 現在 v0.4 ©2021 Yahoo Japan Corporation All rights reserved. v0.5 v0.6 25

26.

3. Apache Pulsarの近況 リリース – Node.js 2021年 2019年 2020年 v1.1 v1.2 • 最新バージョンはv1.4 • v1.3よりType Scriptをサポート 現在 v1.3 ©2021 Yahoo Japan Corporation All rights reserved. v1.4 26

27.

3. Apache Pulsarの近況 リリース – C#(.NET) 2021年 2019年 2020年 v0.9 v0.10 現在 v1.0 v1.1 • 最新バージョンはv1.1 • Apache Pulsarのv2.6がリリースされた2020年6⽉にApacheに寄贈 ©2021 Yahoo Japan Corporation All rights reserved. 27

28.

3. Apache Pulsarの近況 コミュニティの活動 – イベント 2021年 2019年 2020年 Pulsar Summit Pulsar Hackathon Pulsar Summit 2020年〜: Pulsar Summit(https://pulsar-summit.org/) • • Pulsar Summit 現在 • 2021年10⽉6⽇: Pulsar Virtual Summit Europe 2021 • 2021年11⽉20, 21⽇: Pulsar Summit Asia 2021 2021年: Pulsar Hackathon ©2021 Yahoo Japan Corporation All rights reserved. 28

29.

3. Apache Pulsarの近況 コミュニティの活動 – Pulsar Summit ©2021 Yahoo Japan Corporation All rights reserved. 29

30.

3. Apache Pulsarの近況 コミュニティの活動 – Pulsar Summit ©2021 Yahoo Japan Corporation All rights reserved. 30

31.

3. Apache Pulsarの近況 コミュニティの活動 – Pulsar Summit ©2021 Yahoo Japan Corporation All rights reserved. 31

32.

3. Apache Pulsarの近況 コミュニティの活動 – Pulsar Summit ©2021 Yahoo Japan Corporation All rights reserved. 32

33.

3. Apache Pulsarの近況 コミュニティの活動 – その他 • ブログ Apache Pulsar: https://pulsar.apache.org/blog/ StreamNative: https://streamnative.io/en/blog/ Yahoo Japan Corporation: https://developer.yahoo.co.jp/oss/pulsar/ • YouTube StreamNative: https://www.youtube.com/channel/UCywxUI5HlIyc0VEKYR4X9Pg ©2021 Yahoo Japan Corporation All rights reserved. 33

34.

3. Apache Pulsarの近況 Apache Pulsarリポジトリのstar数 PulsarのOSS公開⽇: 2016/09/07 KafkaのOSS公開⽇: 2011/01/11 ©2021 Yahoo Japan Corporation All rights reserved. 34

35.

3. Apache Pulsarの近況 Apache Pulsarリポジトリのcontributor数 PulsarのOSS公開⽇: 2016/09/07 KafkaのOSS公開⽇: 2011/01/11 ©2021 Yahoo Japan Corporation All rights reserved. 35

36.

3. Apache Pulsarの近況 まとめ • 継続的な機能開発及び拡張、リリース • 継続的なイベント開催、情報発信 • GitHubリポジトリのstar数、contributor数は順調に推移 ©2021 Yahoo Japan Corporation All rights reserved. 36

37.

アジェンダ 1. Apache Pulsarとは 2. Apache Pulsarの概要 3. Apache Pulsarの近況 4. Appendix ©2021 Yahoo Japan Corporation All rights reserved. 37

38.

4. Appendix 紹介しきれなかった機能やコンポーネント • パーティションドトピック • persistent, non-persistent • Pulsar-Functions • Pulsar SQL • Pulsar IO • Pulsar Adapters • Pulsar Manager • Etc. ©2021 Yahoo Japan Corporation All rights reserved. 38

39.

4. Appendix ドキュメント、お問い合わせ • ドキュメント: https://pulsar.apache.org/ • Slack: https://apache-pulsar.slack.com • メール: users@pulsar.apache.org ©2021 Yahoo Japan Corporation All rights reserved. 39

40.

©2021 Yahoo Japan Corporation All rights reserved.