-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpc: event subscription management for RPC client #516
Commits on Aug 10, 2020
-
Create basic request/response transport abstraction
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 9df13ed - Browse repository at this point
Copy the full SHA 9df13edView commit details -
Add fixture-based transport with failing test
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for a01883d - Browse repository at this point
Copy the full SHA a01883dView commit details
Commits on Aug 11, 2020
-
This version of the transport provides a request matching interface, along with an implementation of a request method-based matcher (produces specific fixed responses according to the request's method). Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for a03d0ab - Browse repository at this point
Copy the full SHA a03d0abView commit details -
Take client creation interface change into account
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 73c2626 - Browse repository at this point
Copy the full SHA 73c2626View commit details -
Reword docstring for Transport
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 8650db1 - Browse repository at this point
Copy the full SHA 8650db1View commit details
Commits on Aug 12, 2020
-
Add initial subscription management mechanism
This commit adds the bulk of the subscription management machinery as well as a rudimentary integration test (which should be marked as `#[ignore]` ASAP) just to demonstrate obtaining new block events from a Tendermint instance running locally with default settings. Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for cf67215 - Browse repository at this point
Copy the full SHA cf67215View commit details -
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 20cce0a - Browse repository at this point
Copy the full SHA 20cce0aView commit details -
Co-authored-by: Alexander Simmerl <a.simmerl@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 92cae5f - Browse repository at this point
Copy the full SHA 92cae5fView commit details -
Co-authored-by: Alexander Simmerl <a.simmerl@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 40e7de2 - Browse repository at this point
Copy the full SHA 40e7de2View commit details -
Update rpc/src/client/subscription.rs
Co-authored-by: Alexander Simmerl <a.simmerl@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4634e48 - Browse repository at this point
Copy the full SHA 4634e48View commit details -
Update rpc/src/client/subscription.rs
Co-authored-by: Alexander Simmerl <a.simmerl@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 82cf571 - Browse repository at this point
Copy the full SHA 82cf571View commit details -
Update rpc/src/client/subscription.rs
Co-authored-by: Alexander Simmerl <a.simmerl@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 52c36d0 - Browse repository at this point
Copy the full SHA 52c36d0View commit details -
Update rpc/src/client/transport.rs
Co-authored-by: Alexander Simmerl <a.simmerl@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 1089e8d - Browse repository at this point
Copy the full SHA 1089e8dView commit details -
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 5994999 - Browse repository at this point
Copy the full SHA 5994999View commit details -
Reorder optional dependencies alphabetically
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 1ef2305 - Browse repository at this point
Copy the full SHA 1ef2305View commit details -
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for a364187 - Browse repository at this point
Copy the full SHA a364187View commit details -
Destructure and reformat imports
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 15d5765 - Browse repository at this point
Copy the full SHA 15d5765View commit details
Commits on Aug 13, 2020
-
Refactor subscription mechanism to simplify
The previous iteration of the subscription mechanism relied on two asynchronous tasks to manage subscriptions and route events from the WebSockets connection to their relevant subscribers. This version only uses one async task (the WebSocket driver, which must interact asynchronously with the connection). In addition to this, I tried experimenting with using generics instead of trait objects for the transport layer for the `Client`. This works, but the downside of using generics is that, if you want generalizability at layers higher up, it comes at the cost of decreased readability of the code. Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 7e6d15d - Browse repository at this point
Copy the full SHA 7e6d15dView commit details -
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for da0247a - Browse repository at this point
Copy the full SHA da0247aView commit details -
Move mod declarations before use statements
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for cafa8d7 - Browse repository at this point
Copy the full SHA cafa8d7View commit details -
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 9ad109b - Browse repository at this point
Copy the full SHA 9ad109bView commit details
Commits on Aug 14, 2020
-
After much consideration, I decided to do away with the `Transport` and related traits entirely. It makes more sense, and results in better ability to test, if we abstract the `Client` interface instead. This also allows for greater flexibility when implementing different kinds of transports, while still allowing for lazy/optional instantiation of the subscription mechanism. Additional integration tests are included here, as well as additional documentation. Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for ecb099f - Browse repository at this point
Copy the full SHA ecb099fView commit details -
Reduce number of blocks grabbed to speed up test
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for cf56f7b - Browse repository at this point
Copy the full SHA cf56f7bView commit details -
Improve documentation for RPC client
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for ae66f90 - Browse repository at this point
Copy the full SHA ae66f90View commit details -
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for d3d2c32 - Browse repository at this point
Copy the full SHA d3d2c32View commit details -
Expose client docs in base RPC package
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for f01d13d - Browse repository at this point
Copy the full SHA f01d13dView commit details
Commits on Aug 16, 2020
-
Refactor to allow for remote errors
The code at the previous commit causes our current integration test on GitHub to hang because it doesn't know how to handle errors from the remote WebSocket endpoint, and also doesn't know how to handle deserialization failures (caused by protocol/serialization format changes). This commit introduces code that allows us to track pending subscribe/unsubscribe requests asynchronously, handling errors better at that stage of the process, as well as handle subscription format problems more effectively without hanging the client process. Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 279913b - Browse repository at this point
Copy the full SHA 279913bView commit details -
Correctly produce a subscription error for possible RPC protocol mism…
…atch Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 6d35180 - Browse repository at this point
Copy the full SHA 6d35180View commit details -
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 2228b71 - Browse repository at this point
Copy the full SHA 2228b71View commit details -
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 8bc9f7f - Browse repository at this point
Copy the full SHA 8bc9f7fView commit details -
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for f017d27 - Browse repository at this point
Copy the full SHA f017d27View commit details -
Allow for PartialEq comparisons (to aid in testing)
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 233fd62 - Browse repository at this point
Copy the full SHA 233fd62View commit details -
Add tests for SubscriptionRouter
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 36e2969 - Browse repository at this point
Copy the full SHA 36e2969View commit details -
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 83d4835 - Browse repository at this point
Copy the full SHA 83d4835View commit details
Commits on Aug 19, 2020
-
result module need not be public
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for ab4ba9b - Browse repository at this point
Copy the full SHA ab4ba9bView commit details -
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for b160e65 - Browse repository at this point
Copy the full SHA b160e65View commit details -
Rename
ClientError
toClientInternalError
and update docsSigned-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 86ed3d9 - Browse repository at this point
Copy the full SHA 86ed3d9View commit details -
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for fd01278 - Browse repository at this point
Copy the full SHA fd01278View commit details -
Not using nightly docsrs features yet
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 3eadccd - Browse repository at this point
Copy the full SHA 3eadccdView commit details
Commits on Aug 26, 2020
-
Refactor and restructure interface
As per the comments on #516, I've tried to restructure the public API for the client in a bit of a simpler way. I don't, unfortunately, think it's possible to simplify this API any further at this point in time. Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for a4c5a4d - Browse repository at this point
Copy the full SHA a4c5a4dView commit details -
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 1c82638 - Browse repository at this point
Copy the full SHA 1c82638View commit details -
Add newline at end of JSON fixtures
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 772bcd0 - Browse repository at this point
Copy the full SHA 772bcd0View commit details -
Remove request::Wrapper::new_with_id() method
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 1d08a7d - Browse repository at this point
Copy the full SHA 1d08a7dView commit details
Commits on Aug 27, 2020
-
Refactor interface for subscription client
The interface now no longer provides an option to subscribe using a specific buffer size and we assume unbounded buffers everywhere. This may or may not be a safe assumption going forward and we'll need to re-evaluate in future. As such, I could remove all code relating to bounded buffers. Additionally, this commit adds something of an integration test for the WebSocket-based subscription client (with a full WebSocket server, effectively). Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 3048155 - Browse repository at this point
Copy the full SHA 3048155View commit details -
Fix broken link in documentation
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 5e9e351 - Browse repository at this point
Copy the full SHA 5e9e351View commit details -
Rename all "JSONRPC" references to "JSON-RPC"
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 99dae2a - Browse repository at this point
Copy the full SHA 99dae2aView commit details -
Reword docs for SubscriptionClient
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for ba2ca31 - Browse repository at this point
Copy the full SHA ba2ca31View commit details -
TODO is no longer necessary since we are using unbounded channels
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for b4253c6 - Browse repository at this point
Copy the full SHA b4253c6View commit details -
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for b9e240e - Browse repository at this point
Copy the full SHA b9e240eView commit details -
Clarify docs for Subscription::terminate
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 99a321f - Browse repository at this point
Copy the full SHA 99a321fView commit details
Commits on Sep 14, 2020
-
Merge branch 'master' into rpc/subscription
Merges the latest changes from `master` while adjusting for Tendermint v0.34 compatibility. Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 3e38b0b - Browse repository at this point
Copy the full SHA 3e38b0bView commit details
Commits on Sep 15, 2020
-
Fix features for tendermint-rpc dependency in light client
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 58d52ef - Browse repository at this point
Copy the full SHA 58d52efView commit details -
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for e218dd6 - Browse repository at this point
Copy the full SHA e218dd6View commit details -
Configuration menu - View commit details
-
Copy full SHA for ee70331 - Browse repository at this point
Copy the full SHA ee70331View commit details -
Configuration menu - View commit details
-
Copy full SHA for e7bb6a1 - Browse repository at this point
Copy the full SHA e7bb6a1View commit details -
Refactor subscription state modelling
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for a891c21 - Browse repository at this point
Copy the full SHA a891c21View commit details -
Replace SubscriptionId AsRef implementation with as_str() method for …
…clarity Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for c22a5da - Browse repository at this point
Copy the full SHA c22a5daView commit details -
Rename TxResult and TxResultResult for clarity
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 1753566 - Browse repository at this point
Copy the full SHA 1753566View commit details -
Add explanation of SubscriptionRouter subscriptions field
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for 4db8d9e - Browse repository at this point
Copy the full SHA 4db8d9eView commit details -
Comment on assumption regarding handling of event publishing failure
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for e293693 - Browse repository at this point
Copy the full SHA e293693View commit details -
Add comment explaining redeclaration and obtaining of local var
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Configuration menu - View commit details
-
Copy full SHA for e7403a6 - Browse repository at this point
Copy the full SHA e7403a6View commit details