Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Momento会 #8 Serverless with TiDB/Momento/Postman
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
bohnen
December 24, 2023
0
91
Momento会 #8 Serverless with TiDB/Momento/Postman
bohnen
December 24, 2023
Tweet
Share
More Decks by bohnen
See All by bohnen
Momento会 #9 TiDB ServerlessとMomentoの話
bohnen
0
84
Cloud on the beach - いろいろな雲のかたち
bohnen
1
85
TiUG #1 TiDB overview and update
bohnen
0
260
みんなのPython勉強会: 最近のDB事情 TiDB Serverlessの紹介
bohnen
1
830
Postman Tokyo Meetup - Serverless Integration with Flows
bohnen
2
220
Serverless Meetup Re:boot 福岡 TiDB Serverlessの紹介
bohnen
1
170
Serverless Meetup Fukuoka Workshop TiDB
bohnen
0
84
TiUG #0 発表資料: TiDBの紹介と最新情報
bohnen
0
270
Momento Topics使ってみた
bohnen
0
180
Featured
See All Featured
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
Designing Experiences People Love
moore
144
24k
Balancing Empowerment & Direction
lara
5
880
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
140
YesSQL, Process and Tooling at Scale
rocio
174
15k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
3.9k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
420
Transcript
もめんと Meet-up #8 開発者のためのServerless with TiDB/Momento/Postman PingCAP Developer Advocate 関⼝匡稔
@bohnen
PingCAP会社紹介 New SQLデータベース TiDBを継続的に開発 • 2015年設⽴後、OSSとしてTiDBを開発 • 2017年には商⽤版もリリースし、毎年メジャーアップ デート •
フルマネージド型DBaaS「TiDB Cloud」の展開を強化 ワールドワイドでビジネス展開 • 800億以上の資⾦調達に成功し、積極的な事業展開 • 2021年4⽉に⽇本⽀社設⽴ • ⽇本のお客様へ⽇本語によるサポートを提供 TiDBはグローバルで3000社以上で採⽤ OSSの中でもトップクラスの⾼評価、信頼性
TiDB Serverless AWS上の 最強のサーバレスデータベース ‧‧‧を⽬指してます
YES! True Serverless DB
TiDB Serverless TiDB Cloud CLI VS Code @TiDB_Developer 豊富な開発ツールサポート 慣れてるインターフェース
使い慣れたフレームワーク MySQL 互換 従量課金 HTAP AI Powered オート スケール 生成AIをデータベースにも DB界で最速実装 Serverlessデータベース初?! OLTPだけじゃなくて、分析まで 複雑な構成は不要 使った分だけ課金 上限設定あり! Edge 対応 Proxy不要で すぐに使える
No Hassle Production Ready 冗⻑構成‧⾃動復旧 オートスケール モニタリング&バックアップ
Sysbenchシミュ 0 から ~1.3M QPS まで20分 そこから0まで スケールダウンに14分 トータル30分! 設定不要!
🎉 ※やる前に教えてください
OSSInsight on TiDB Serverless データ量 - 12 TBs, 60億⾏を超える過去‧現在の github過去イベント(リアルタイム)
混在ワークロード - 決められたSQLのダッシュボー ドと、とんでもないクエリを吐く AI 予測出来ないトラフィック - Hackernewsでバズる と 7x のトラフィック 72.7% Cost Reduction Zero Manual Intervention During Spikes 5X Development Efficiency for LLM Data Apps
Real Agile DBaaS • Serverless GA • Chat2Query • Data
Service (API Gatewayみたいなもの) • Private Link対応 • Branching • Serverless Driver • Vercel連携 (Preview機能にも対応) • 分析ストレージのS3対応 全部今年!!
Memento フレンド
Momentoフレンドライクな点 Memento Cache サーバレスな⾼速揮発性データストア Momento Topics サーバレスな⾮同期通信バス TiDB サーバレスな永続データストア サーバレスバックエンドを提供する仲間!!
⾊々なパターンでのMomentoの活⽤ Read/Write Aside Read/Write Through (Inline) Write Behind Async
Write Behindの柔軟性 〜 Momento Exchange Rate Publisher Order Executor (本来は)LPの価格に利益を乗せて顧客に提供する
価格はtopicsを使ってリアルタイ ムに同報通信 注文はRESTエンドポイントを呼び 出し 注文が実勢価格よりも一定以上 乖離しているとnothing(失効) 実際はLPに投げる LP(Liquidity Provider) 業者向けに価格を提供して、 その値段で注文を受け付け る業者 金融機関や取引所など ここの部分を今回追加 https://speakerdeck.com/bohnen/momento-topicsshi-tutemita
それぞれの役割 TiDB Postman Momento DB + API • データストア •
受信したデータをただ INSERT • SQLからAPIも提供できる API Test + API Gateway • APIのテスト • FlowsでAPI Gatewayとして も利用 Pub/Sub + Webhook • 今回の機能の追加 • コード変更なしで分岐先 を追加できる
実装タイム!
TiDBでやったこと TiDB ① テーブル定義 ② API⽣成 ③ Postman連携 ChatGPTにお任せ 単純CRUDなら全⾃動
URLをimportするだけ
Postmanでやったこと ① API変数設定 ② Flows作成 ③ テスト 認証トークン設定 ポチポチ ログを⾒ながら
Postman
Mementoでやったこと ① Webhook設定 topic名とURL指定するだけ!! いくつも増やせる Momento
Memento Topic 最⾼ 既存のシステムに影響を与えず、接続先を増やせる Momento
まとめ TiDB Postman Momento どこからでも利⽤できるTopicは⾮常に強⼒ • 宛先を指定しないRPCみたいなもの • fanoutが可能で、デバッグが容易 TiDBで簡単データ永続化
• HTTPでもAPIでも利⽤可能でフロントエンドからの親和性⾼い • Topicsのメッセージ永続化‧モニタリングにどうぞ!
THANK YOU. https://pingcap.co.jp/tidb-cloud/ 是非試してみてください!