Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Momento会 #8 Serverless with TiDB/Momento/Postman
Search
bohnen
December 24, 2023
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Momento会 #8 Serverless with TiDB/Momento/Postman
bohnen
December 24, 2023
More Decks by bohnen
See All by bohnen
Momento会 #9 TiDB ServerlessとMomentoの話
bohnen
0
110
Cloud on the beach - いろいろな雲のかたち
bohnen
1
110
TiUG #1 TiDB overview and update
bohnen
0
310
みんなのPython勉強会: 最近のDB事情 TiDB Serverlessの紹介
bohnen
1
900
Postman Tokyo Meetup - Serverless Integration with Flows
bohnen
2
270
Serverless Meetup Re:boot 福岡 TiDB Serverlessの紹介
bohnen
1
190
Serverless Meetup Fukuoka Workshop TiDB
bohnen
0
120
TiUG #0 発表資料: TiDBの紹介と最新情報
bohnen
0
310
Momento Topics使ってみた
bohnen
0
230
Featured
See All Featured
sira's awesome portfolio website redesign presentation
elsirapls
0
410
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
850
Writing Fast Ruby
sferik
630
63k
The Invisible Side of Design
smashingmag
301
52k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
ラッコキーワード サービス紹介資料
rakko
1
4.8M
The Spectacular Lies of Maps
axbom
PRO
1
990
Code Review Best Practice
trishagee
74
20k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
450
Paper Plane (Part 1)
katiecoart
PRO
1
11k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.9k
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/ 是非試してみてください!