flodgatt/src
Daniel Sockwell 0acbde3eee
Reorganize code, pt1 (#110)
* Prevent Reciever from querying postgres

Before this commit, the Receiver would query Postgres for the name
associated with a hashtag when it encountered one not in its cache.
This ensured that the Receiver never encountered a (valid) hashtag id
that it couldn't handle, but caused a extra DB query and made
independent sections of the code more entangled than they need to be.

Now, we pass the relevant tag name to the Receiver when it first
starts managing a new subscription and it adds the tag name to its
cache then.

* Improve module boundary/privacy

* Reorganize Receiver to cut RedisStream

* Fix tests for code reorganization

Note that this change includes testing some private functionality by
exposing it publicly in tests via conditional compilation.  This
doesn't expose that functionality for the benchmarks, so the benchmark
tests do not currently pass without adding a few `pub use`
statements.  This might be worth changing later, but benchmark tests
aren't part of our CI and it's not hard to change when we want to test
performance.

This change also cuts the benchmark tests that were benchmarking old
ways Flodgatt functioned.  Those were useful for comparison purposes,
but have served their purpose – we've firmly moved away from the
older/slower approach.

* Fix Receiver for tests
2020-03-27 12:00:48 -04:00
..
config Reorganize code, pt1 (#110) 2020-03-27 12:00:48 -04:00
parse_client_request Reorganize code, pt1 (#110) 2020-03-27 12:00:48 -04:00
redis_to_client_stream Reorganize code, pt1 (#110) 2020-03-27 12:00:48 -04:00
err.rs Reorganize code, pt1 (#110) 2020-03-27 12:00:48 -04:00
lib.rs Performance tuning (#108) 2020-03-25 17:50:32 -04:00
main.rs Reorganize code, pt1 (#110) 2020-03-27 12:00:48 -04:00
messages.rs Reorganize code, pt1 (#110) 2020-03-27 12:00:48 -04:00
rustfmt.toml Config refactor (#57) 2019-10-03 00:34:41 -04:00