Commit Graph

3070 Commits (6100bd19c738976728181da25aad8db74ec7e0d9)

Author SHA1 Message Date
Tyler Goodlet bcaef70612 Pack null results without raising 2018-05-09 18:09:04 -04:00
Tyler Goodlet fd1fe0816e Don't call formatting func on None values 2018-05-09 18:09:04 -04:00
Tyler Goodlet 3646fb4a23 Filter out bad symbols before adding client subscription
Event if a broker client is already spawned new clients should still
receive a detailed symbol data packet as the first response. Avoid
exposing the new client's queue to the broker (i.e. subscribing it for
quotes) until after first pushing this packet with all bad symbols
filtered out.
2018-05-09 18:09:04 -04:00
Tyler Goodlet 3a40c2f8fe Zero bad fields 2018-05-09 18:09:04 -04:00
Tyler Goodlet 995851360d Rx symbol data from daemon as first response 2018-05-09 18:09:04 -04:00
Tyler Goodlet fcaeeae618 Acquire symbol data with daemon; push as first response 2018-05-09 18:09:04 -04:00
Tyler Goodlet 5a9c079c10 Support specifying daemon host address 2018-05-09 18:09:00 -04:00
Tyler Goodlet 3d6b14ec3f Pass in the host addr 2018-05-08 15:07:13 -04:00
Tyler Goodlet 4e711395e0 Link to manifesto 2018-05-08 15:06:18 -04:00
goodboy 735fcb94c2
Merge pull request #42 from pikers/multi_ticker_add
Multi ticker add
2018-04-25 15:20:05 -04:00
Tyler Goodlet c8539b7373 Test adding multiple tickers on cli 2018-04-25 09:11:21 -04:00
Tyler Goodlet 7aa99019cb Allow adding multiple tickers via CLI 2018-04-25 09:10:57 -04:00
goodboy ec2884a556
Merge pull request #41 from pikers/env_update
Update pipenv files
2018-04-25 08:08:11 -04:00
Tyler Goodlet 91519bbb9e Update pipenv files 2018-04-24 15:48:31 -04:00
goodboy b00b872414
Merge pull request #36 from pikers/daemonize
Daemonize broker quote engine
2018-04-23 00:47:51 -04:00
Tyler Goodlet 482f9531ca Try to connect to daemon once on startup; don't poll 2018-04-22 13:27:41 -04:00
Tyler Goodlet a2c4f0c80b Don't recurse in Client.aiter_recv() 2018-04-22 12:48:35 -04:00
Tyler Goodlet 6a6f773477 Adjust some log levels 2018-04-20 13:18:35 -04:00
Tyler Goodlet 063dfad5b4 Make daemon registry cross-task 2018-04-20 13:18:35 -04:00
Tyler Goodlet 4f387ea2be Fix subscriptions and connection handling
Oh boy where to start.

- Handle broken streams in the `StreamQueue` gracefully; terminate the
  async generator.
- When a stream queue connection is unwritable discard its subscriptions
  inside the quoter task
- If all subscriptions are discarded for a broker then tear down its
  quoter task
- Use listener parent nursery for spawning quoter tasks
- Make broker subs data structures global/shared between conn
  handler tasks
- Register the `tickers2qs` entry *after* instantiating broker client(s)
  (avoids race condition when mulitple client connections are coming
  online simultaneously)
- Push smoke quotes to every client not just the first that connects
- Track quoter tasks in a cross-task set
- Handle unsubscriptions more correctly
2018-04-20 13:18:35 -04:00
Tyler Goodlet 0add443e8b Spawn broker-daemon without asking 2018-04-20 13:18:35 -04:00
Tyler Goodlet 2973b40946 Allow wl app to spawn a broker daemon in a subprocess 2018-04-20 13:18:35 -04:00
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