Commit Graph

348 Commits (3ab9e28ddb89312a9f320a09c4e1f8ef1f3b3e06)

Author SHA1 Message Date
Tyler Goodlet 90e8dd911c Daemon main doesn't require brokermod anymore 2018-04-20 13:18:35 -04:00
Tyler Goodlet 4123139750 Use `Client` in watchlist app 2018-04-20 13:18:35 -04:00
Tyler Goodlet 17feb17535 Add a reliable `Client` API
In order to start working toward a HA distributed
architecture make apps use a `Client` type to talk to daemons.
The `Client` provides fault-tolerance for connection failures such
that the app will continue running until a connection to the original
service can be made or the process is killed. This will make it easier
to simply spawn up new daemon child processes when faults are detected.
2018-04-20 13:18:35 -04:00
Tyler Goodlet 4d4c04cd11 Document daemon usage 2018-04-20 13:18:35 -04:00
Tyler Goodlet 51b44cf236 Use msgpack for quote-packet serialization 2018-04-20 11:43:14 -04:00
Tyler Goodlet dd5e1e7ea7 Doh, set sleeptime after adjusting the rate limit 2018-04-20 11:43:14 -04:00
Tyler Goodlet 030ecdcce8 Filter symbols and push initial quote in stream handler
Filter out bad symbols by processing an initial batch quote and
pushing to the subscribing client before spawning a quoter task.
This also avoids exposing the quoter task to anything but the
broker module and a `get_quotes()` routine.
2018-04-20 11:43:14 -04:00
Tyler Goodlet 02a71c51ba Make <brokermod>.quoter() a simple factory func 2018-04-20 11:43:14 -04:00
Tyler Goodlet a6dc697327 Move watchlist app to new daemon-socket api 2018-04-20 11:43:14 -04:00
Tyler Goodlet 0c7ecd383b Monkey patch broker mods with a name attr 2018-04-20 11:43:14 -04:00
Tyler Goodlet 6359623019 Allow broker specific subscriptions
Allow client connections to subscribe for quote streams from specific
brokers and spawn broker-client quoter tasks on-demand according
to client connection demands. Support multiple subscribers to a
single daemon process.
2018-04-20 11:43:14 -04:00
Tyler Goodlet f80735121c Use an async generator inside `StreamQueue`
Async generators are faster and less code. Handle segmented packets
which can happen during periods of high quote volume. Move per-broker
rate limit logic into daemon task.
2018-04-20 11:43:14 -04:00
Tyler Goodlet 4898459bcd Make watchlist app retrieve quotes from the broker daemon 2018-04-20 11:43:14 -04:00
Tyler Goodlet 73ef95f42a Add `pikerd` entry point 2018-04-20 11:43:14 -04:00
Tyler Goodlet 23ae71089f Handle dynamic symbol subscriptions in QT backend 2018-04-20 11:42:59 -04:00
Tyler Goodlet d65bd78f5d Add a quote stream server task
Add a daemon-server task for delivering subscription based
quote streams via json serialized packets wrapped in a queue
interface.
2018-04-16 02:03:22 -04:00
goodboy 07c95e4f3f
Merge pull request #34 from pikers/travis_ci
Travis CI
2018-04-11 14:27:16 -04:00
Tyler Goodlet 1c7db834b7 Add CI badge 2018-04-11 13:46:24 -04:00
Tyler Goodlet a414cbb0c4 Initial travisCI file 2018-04-11 13:46:21 -04:00
Tyler Goodlet 89a151a39c Update lock file 2018-04-11 00:04:34 -04:00
goodboy d4eb5ffb59
Merge pull request #33 from pikers/wl_builtins
Watchlist builtins
2018-04-10 22:31:50 -04:00
Tyler Goodlet 2070f292b1 Update tests 2018-04-10 21:57:28 -04:00
Tyler Goodlet 577ca43c02 Include built-in lists in show, log errors from remove 2018-04-10 14:13:00 -04:00
Tyler Goodlet 381df2815d Expose remove errors to caller 2018-04-10 14:12:06 -04:00
Tyler Goodlet 6b72d04427 Change watchlist write function name 2018-04-06 15:07:47 -04:00
Tyler Goodlet 7e92df4352 Move built-in lists to respective module 2018-04-06 15:00:11 -04:00
Tyler Goodlet 0cccdd01b5 Only log when the network first goes down 2018-04-05 23:15:24 -04:00
goodboy bb44b9854b
Merge pull request #30 from Konstantine00/watchlist_management
Watchlist Management API and Tests
2018-04-04 01:06:58 -04:00
K0nstantine 918133f265 Finalize WL Management and fix merge func 2018-04-04 00:35:12 -04:00
K0nstantine 49b760673e Remove write to file from API and move to CLI 2018-04-04 00:35:12 -04:00
K0nstantine cd69c30143 CLI tests for watchlist commands 2018-04-04 00:35:12 -04:00
K0nstantine 11f25958ba Move watchlist api tests to seperate module 2018-04-04 00:34:42 -04:00
K0nstantine e859222df4 Add initial API test, need relocation 2018-04-04 00:25:34 -04:00
K0nstantine d28a3dc461 Add initial config dir test 2018-04-04 00:25:34 -04:00
K0nstantine ce75bd8f6f Update CLI and create watchlists module
Moved the watchlists management implementation to a seperate module
wrapped in an api.

Resolves: #5
2018-04-04 00:25:34 -04:00
K0nstantine 43fbea5722 Sorted values and keys in watchlist dictionary and added a purge function 2018-04-04 00:25:34 -04:00
K0nstantine 7ada8a291e Initial watchlist management cli 2018-04-04 00:25:34 -04:00
goodboy 397c27e05a
Merge pull request #31 from pikers/tolerate_the_network
Tolerate the network
2018-04-02 16:48:49 -04:00
Tyler Goodlet e246823f2d Add timeout handling to network poll loop 2018-04-02 14:51:38 -04:00
Tyler Goodlet 01cfbbdd64 Handle network outages
Quote queries will hang indefinitely when the network goes down.
Instead poll for network reestablishment such that roaming on
wifi is supported and real-time feeds will resume once the network is
back.
2018-03-31 12:02:22 -04:00
goodboy d527f3383c
Merge pull request #29 from pikers/pipenv
Pipenv!
2018-03-30 16:56:24 -04:00
Tyler Goodlet 2b51e84a3c Expect quotes dict in watchlist update loop 2018-03-29 13:02:03 -04:00
Tyler Goodlet 164d636c67 Handle defunct QT tickers and delays 2018-03-29 13:01:13 -04:00
Tyler Goodlet 823bd2ea29 Make payload a ticker dict 2018-03-29 13:00:48 -04:00
Tyler Goodlet 74f0700690 Update dev deps 2018-03-29 12:50:53 -04:00
Tyler Goodlet f9e9c07823 Update readme 2018-03-29 12:50:53 -04:00
Tyler Goodlet 2ddedf92f6 Add pipenv files 2018-03-29 12:50:53 -04:00
Tyler Goodlet 2d36b9372f Drop requirements.txt 2018-03-29 12:50:53 -04:00
goodboy 6b38f25430
Merge pull request #23 from pikers/initial_tests
Initial CLI tests
2018-03-28 15:34:40 -04:00
Tyler Goodlet 9667042fe2 Drop NUU it's now just APH 2018-03-28 14:00:17 -04:00