Commit Graph

3384 Commits (deribit_updates)

Author SHA1 Message Date
Tyler Goodlet ffbfd187ad Raise cache miss on a disconnected ib client 2021-09-01 10:26:49 -04:00
Tyler Goodlet c6aa867c9b Add more futes, add in order status comments 2021-09-01 10:26:49 -04:00
goodboy 37d94fbb28
Merge pull request #212 from pikers/feed_caching
Feed caching
2021-09-01 10:25:49 -04:00
Tyler Goodlet 4527d4a677 Allocate an event per context 2021-09-01 10:17:03 -04:00
Tyler Goodlet 26cb7aa660 Drop tractor stream shielding use 2021-09-01 09:03:55 -04:00
Tyler Goodlet 2df16e11ed Re-implement client caching using `maybe_open_ctx` 2021-09-01 09:01:25 -04:00
Tyler Goodlet c3682348fe Use the actor's service nursery instead
In order to ensure the lifetime of the feed can in fact be kept open
until the last consumer task has completed we need to maintain
a lifetime which is hierarchically greater then all consumer tasks.

This solution is somewhat hacky but seems to work well: we just use the
`tractor` actor's "service nursery" (the one normally used to invoke rpc
tasks) to launch the task which will start and keep open the target
cached async context manager. To make this more "proper" we may want to
offer a "root nursery" in all piker actors that is exposed through some
singleton api or even introduce a public api for it into `tractor`
directly.
2021-08-31 12:46:47 -04:00
Tyler Goodlet 1184a4d88e Cache sample step streams per actor 2021-08-31 09:28:22 -04:00
Tyler Goodlet bbcce0cab6 Facepalm^2: pass through kwargs 2021-08-30 18:04:19 -04:00
Tyler Goodlet cae7f486e4 Revert "Lol, don't use `maybe_open_feed()` for now, it's totally borked..."
Think this was fixed by passing through `**kwargs` in
`maybe_open_feed()`, the shielding for fsp respawns wasn't being
properly passed through..

This reverts commit 2f1455d423.
2021-08-30 17:55:10 -04:00
Tyler Goodlet ff322ae7be Re-impl ctx-mng caching using `trio.Nursery.start()`
Maybe i've finally learned my lesson that exit stacks and per task ctx
manager caching is just not trionic.. Use the approach we've taken for
the daemon service manager as well: create a process global nursery for
each unique ctx manager we wish to cache and simply tear it down when
the number of consumers goes to zero.

This seems to resolve all prior issues and gets us error-free cached
feeds!
2021-08-30 17:54:43 -04:00
Tyler Goodlet 2f1455d423 Lol, don't use `maybe_open_feed()` for now, it's totally borked... 2021-08-26 17:04:59 -04:00
Tyler Goodlet 2a9d24ccac Remove dead OHLC index consumers from subs list on error 2021-08-26 17:04:59 -04:00
Tyler Goodlet fe0d66e847 Drop removed module import 2021-08-26 17:04:59 -04:00
Tyler Goodlet 1e42f58478 Add pause/resume feed api, delegate to msg stream for broadcast api 2021-08-26 17:04:59 -04:00
Tyler Goodlet 2f5abaa47a Add njs token bucket gist url 2021-08-26 17:04:59 -04:00
Tyler Goodlet c8e320849a Add super basic support for data feed "pausing" 2021-08-26 17:04:59 -04:00
Tyler Goodlet 0c9516051b TO SQUASH cached ctx. 2021-08-26 17:04:59 -04:00
Tyler Goodlet 71b50fdae8 Use broadcast chan for order client and avoid chan repacking 2021-08-26 17:04:59 -04:00
Tyler Goodlet 954dc6a8b0 Fix missing cache hit bool element of return 2021-08-26 17:04:59 -04:00
Tyler Goodlet 310d8f485e Add disclaimer to old data mod 2021-08-26 17:04:59 -04:00
Tyler Goodlet 2202abc9fb Add (lack of proper) ring buffer note 2021-08-26 17:04:59 -04:00
Tyler Goodlet 7d0f47364c Use `maybe_open_feed()` in ems and fsp daemons 2021-08-26 17:04:59 -04:00
Tyler Goodlet a7d3afc9b1 Add a `maybe_open_feed()` which uses new broadcast chans
Try out he new broadcast channels from `tractor` for data feeds
we already have cached. Any time there's a cache hit we load the
cached feed and just slap a broadcast receiver on it for the local
consumer task.
2021-08-26 17:04:59 -04:00
Tyler Goodlet 224dbbc4e3 Drop feed refs 2021-08-26 17:04:59 -04:00
Tyler Goodlet 7d5add1c3a Add an njs cache gist link 2021-08-26 17:04:59 -04:00
Tyler Goodlet 66f1d91541 Let's abstractify: -> 2021-08-26 17:04:59 -04:00
Tyler Goodlet 68ce5b3550 Add lifo cache to new module; drop "utils", bleh 2021-08-26 17:04:59 -04:00
Tyler Goodlet 0ce8057823 Move feed cacheing to cache mod; put entry retreival into ctx mng 2021-08-26 17:04:59 -04:00
Tyler Goodlet a0660e553f Start top level cacheing apis module 2021-08-26 17:04:59 -04:00
Tyler Goodlet 146c684f21 Cache `brokerd` feeds for reuse in clearing loop 2021-08-26 17:04:59 -04:00
goodboy f03f051e7f
Merge pull request #213 from pikers/brokers_config
Brokers config schema bump, ib patches
2021-08-24 10:37:44 -04:00
Tyler Goodlet c21d299193 Drop data/ version of config 2021-08-24 10:32:01 -04:00
Tyler Goodlet 89b2089562 Fixup missing ib section handling; drop `.api` subsection 2021-08-24 10:27:25 -04:00
Tyler Goodlet d5394ac677 Fix TWS triggered trades msg packing 2021-08-24 10:26:41 -04:00
Tyler Goodlet 12c8d26906 Update brokers.toml schema 2021-08-24 10:25:07 -04:00
Tyler Goodlet a10d20c041 Add ib config section support 2021-07-27 07:09:01 -04:00
goodboy 96b0102f04
Merge pull request #208 from hengestone/master
Fix a few QtGui -> QtWidget issues
2021-07-23 11:17:58 -04:00
goodboy 108f0da181
Merge pull request #210 from pikers/readme_bump_zone
Readme bump to include latest cli symbol syntax
2021-07-23 10:40:48 -04:00
Conrad Steenberg afafe56ec0 Remove List typing 2021-07-21 18:30:50 -07:00
Conrad Steenberg c830183073 More fixes, some reversions 2021-07-21 18:26:24 -07:00
Conrad Steenberg 3912b22b41 Fix a few QtGui -> QtWidget issues 2021-07-21 18:26:24 -07:00
Tyler Goodlet 1ef0725e74 Readme bump to include latest cli symbol syntax and add binance to provider list 2021-07-21 20:37:40 -04:00
goodboy 161089de87
Merge pull request #209 from pikers/ci_on_forks
Run CI on cross-fork PRs?
2021-07-21 20:24:01 -04:00
Tyler Goodlet cea8272a11 Run CI on cross-fork PRs? 2021-07-21 20:19:28 -04:00
goodboy 663373cb04
Merge pull request #207 from hengestone/master
Fix PyQt5 error
2021-07-21 14:16:29 -04:00
Conrad Steenberg 9d8d8fd1a2 Fix PyQt5 error 2021-07-21 10:53:40 -07:00
goodboy 8a6142632d
Merge pull request #200 from pikers/asyncify_input_modes
Asyncify input modes
2021-07-11 12:57:09 -04:00
Tyler Goodlet 83ad071cb4 Load provider search engines in tasks instead of exit stack 2021-07-11 11:13:35 -04:00
Tyler Goodlet 90588018a6 Label doc tweak 2021-07-11 11:13:35 -04:00