Commit Graph

112 Commits

Author SHA1 Message Date
Daniel Sockwell 23eaa4a270 Implement basic Server Sent Events with Warp
This commit rolls up several days of work that took place in a side repo
which was originally intended to be a test/proof-of-concept repo but
that grew into a full implementation.

This implementation switches to Warp as the framework for the primary
web server (in large part because Warp offers built-in support for
SSE and several other advantages).  This implementation relies on
a custom Redis interface built on Tokio (because the current Redis
Rust crate does not support asnyc PubSub).  Using a custom interface
should also be faster, since it does not contain logic for anything
other than pubsub—which is all we need.

Finally, I note that the SSE support is currently as feature-complete
as it is possible to be without having yet added the Postgress interface
this means that all of the endpoints are present and are accessible
on localhost.  However, none of the endpoints have authentication yet,
and the endpoints that should provide user-specific data (e.g.,
`/api/v1/streaming/user`) are currently hard-coded to provide data for
user 1 (the admin).  Other than those limitations, however, the SSE
implementation is feature complete.
2019-04-15 14:22:44 -04:00
Daniel Sockwell 4842475b18 Rustfmt all code
Revise all code to comply with rustfmt
2019-03-05 09:23:44 -05:00
Daniel Sockwell fffd3b6b4d Improve logging
Add more descriptive messages for the logging triggered by the
websocket server.
2019-03-05 09:19:38 -05:00
Daniel Sockwell 7a0b11e240 Add descriptive success messages
Improves the success messages from "OMG! It worked!" to a descriptive
string identifying which function was invoked.
2019-03-05 08:49:35 -05:00
Julian Laubstein bfec0327d6 Use redis environment for connection 2019-02-19 22:57:01 +01:00
Julian Laubstein dfafec963b Added structures for env variables 2019-02-19 20:29:32 +01:00
Julian Laubstein dcc0283078 Fixed cors and added health endpoint 2019-02-15 22:59:21 +01:00
Julian Laubstein 88492aac36 Lots of basic stuff 2019-02-15 10:22:35 +01:00
Julian Laubstein cd30353b30 Removed unused import 2019-02-11 21:02:22 +01:00
Julian Laubstein 524935c441 Added all routes as mock 2019-02-11 21:00:07 +01:00
Julian Laubstein 1339784112 Added all endpoints 2019-02-11 18:58:51 +01:00
Julian Laubstein 7caa714891 Initial project files 2019-02-11 09:45:14 +01:00