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
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
Scaling GitHub
holman
464
140k
Paper Plane (Part 1)
katiecoart
PRO
2
11k
Balancing Empowerment & Direction
lara
6
1.3k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
300
It's Worth the Effort
3n
188
29k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
WCS-LA-2024
lcolladotor
0
830
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
900
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Embracing the Ebb and Flow
colly
88
5.2k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.1k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
530
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