Closed goodboy closed 2 years ago
Ok so my plan forward on this is to try and wrap the final few TODOs and make issues/tasks for all the follow up stuff.
Pushed a few more piker.data._sharedmem
changes from #302 which fixed some shm pushing / slicing edge cases.
Replaces #247 and #305 (merging history from both) and instead adds a more formal "storage layer" for retrieving and storing large ohlcv series from all major backends. The work here is best experienced with the new incremental update patchset from #302 in order to see the new graphics performance improvements at work though this should work moderately well as is.
TL;DR:
marketstore
docker container supervisor actor which allows spawning by passingpikerd --tsdb
-> this closes https://github.com/pikers/piker/issues/143pikerd
) shortly aftermarketstored
(the container super) is startedasync with open_history_client()
support toib
,binance
,kraken
which allows pulling in and storing a large amount of history in the tsdb,marketstore
.datetime
range, new special exception signals can be used (NoData
,DataUnavailable
) to signal that the backend can't deliver data for a given range (or at all).trimeter
in the backends that can handle it (currently onlybinance
).datetime
ranges that are passed to thetrimeter
request scheduler and which dynamically adjusts the request-time index when a gap is detected.piker.data.marketstore.Storage
api/layer which allows async, high level operations. the intention is to eventually have this layer support more tsdb providers likearctic
,techtonicdb
. Currently the only backend ismarketstore
with client-side operations implemented using ouranyio-marketstore
library:fqsn
with appropriate request size limiting with.read_ohlcv()
fqsn
with appropriate limits with.write_ohlcv()
Storage.delete_ts()
What this does (yet) not introduce:
marketstore
storesh
interactive repl for managing the tsdb, there is a minimalipython
embedding at the moment but it is nowhere complete and we need a follow up task-issue to finish this.TODO:
._ahab.py
supervisor:ctx.started()
call?mkts.yaml
config?pikerd
with the tsdb stuff spawned?--tsdb
or--data
or something?pikerd --tsdb
test list:pikerd --tsdb
should raiseDockerNotStarted
and appropriate perms error on nosudo
(for now)general
marketstore
config and operation:to be done as #313
follow up (to be written in new task-issues and implemented in coming PRs)
moved to #314
marketstore
frombrokerd
feeds and experiment withtechtonicdb
schema (some tinkering was already done in this patchset by @guilledk but is unfinished).1Sec
bucket in order for this to work looking at the code:aggregate()
calls intomodel.FromTrades()
andFromTrades()
only accepts a min step of1Sec
these moved to https://github.com/pikers/piker/issues/312
ipython
) that allows interaction, edit, and general management of the tsdb for both the purposes of research and just plain old data mgmt.