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
MarketStore_LT.pdf
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
dakimura
December 21, 2018
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
MarketStore_LT.pdf
Alpacaが開発する時系列データ特化型データベースMarket Storeのチュートリアル
dakimura
December 21, 2018
More Decks by dakimura
See All by dakimura
[GoCon2019autumn]Mercari sponsor session
dakimura
0
280
Featured
See All Featured
Between Models and Reality
mayunak
4
500
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Prompt Engineering for Job Search
mfonobong
0
520
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
740
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
59k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Documentation Writing (for coders)
carmenintech
77
5.6k
Designing Experiences People Love
moore
143
24k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
710
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
460
A Soul's Torment
seathinner
8
3.8k
From π to Pie charts
rasagy
1
400
Transcript
5分で完全理解! MarketStore Daito AKIMURA (@akkie30)
自己紹介 - Daito Akimura • 本職: メルカリ の Backend Engineer •
副業: 先月からAlpaca Japanにて MarketStore開発 • 仕事では Java, Python, PHP, Go を使っています • Twitter: @akkie30 • GitHub: dakimura
次回は「MarketStoreなにもわからない」になります
MarketStoreとは • 金融取引に関わる時系列データに特化した超高速データベースサーバ ◦ Alpacaがゼロから設計開発 ◦ 実装はGolang • QueryとWriteが可能 •
公式クライアントはPythonで書かれた pymarketstore
MarketStoreの特徴 • QueryはPythonのデータ解析フレームワークPandasのDataFrame型を返却する • 3rd partyの(go) pluginを開発できる ◦ バックグラウンド処理 /
トリガ処理 • 既にAlpacaで本番運用実績がある
なにはともあれ使ってみよう
起動 $ docker run -i -p 5993:5993 alpacamarkets/marketstore:latest
pymarketstoreインストール $ pip install pymarketstore
Data Write & Query >>> import pymarketstore, numpy, pandas >>>
data = numpy.array([(1544400000, 10.0)], dtype=[('Epoch', 'i8'), ('Ask', 'f4')]) >>> cli = pymarketstore.Client() >>> data = numpy.array([(1544400000, 10.0)], dtype=[('Epoch', 'i8'), ('Ask', 'f4')]) >>> cli.write(data, 'TEST/1Min/Tick') # write data >>> cli.query(pymarketstore.Params('TEST', '1Min', 'Tick')).first().df() # read data Epoch Ask 2018-12-10 00:00:00+00:00 10.0
一緒に開発しましょう! https://github.com/alpacahq/marketstore