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
MarketStore_LT.pdf
Search
dakimura
December 21, 2018
190
0
Share
MarketStore_LT.pdf
Alpacaが開発する時系列データ特化型データベースMarket Storeのチュートリアル
dakimura
December 21, 2018
More Decks by dakimura
See All by dakimura
[GoCon2019autumn]Mercari sponsor session
dakimura
0
270
Featured
See All Featured
Are puppies a ranking factor?
jonoalderson
1
3.3k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
Utilizing Notion as your number one productivity tool
mfonobong
4
290
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.2k
The Invisible Side of Design
smashingmag
303
52k
Google's AI Overviews - The New Search
badams
0
980
Bash Introduction
62gerente
615
210k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.9k
Agile that works and the tools we love
rasmusluckow
331
21k
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