1. Apr 17, 2023
  2. Apr 14, 2023
  3. Apr 13, 2023
  4. Apr 11, 2023
  5. Mar 30, 2023
    • Niklas Adolfsson's avatar
      fix: tokio v1.27 (#1062) · 118acc39
      Niklas Adolfsson authored
      * fix: tokio v1.27
      
      * Update server/src/transport/ws.rs
      
      * fix rustdoc
      
      * Update server/src/transport/ws.rs
      
      * Update server/src/transport/ws.rs
      
      * no more futuredriver for incoming conns
      
      * add comment for unclear code
      118acc39
  6. Mar 24, 2023
  7. Mar 23, 2023
    • Niklas Adolfsson's avatar
      rpc module: refactor subscriptions to return `impl IntoSubscriptionResponse` (#1034) · 7144be54
      Niklas Adolfsson authored
      
      
      * refactor subscription to return `Option<Result<>>`
      
      * address grumbles: change to Result<(), Option<M>>
      
      This changes the subscription API again to return `Result<(), Option<SubscriptionMessage>>`
      to work a little smoother with the combinators and it introduces an extention trait
      to make convert it `Result<T, Error>` to `Result<T, Option<SubscriptionMessage>>`
      
      This trait is implemented for types where it is possible and for custom types and tricky situations the
      user has to implement themselves.
      
      For instance it's not possible to implement on `TrySendError` because that depends on the use-case
      i.e. whether the channel is full should be regarded as an error or not.
      
      * remove weird default errors
      
      * fix tests
      
      * revert weird trait
      
      * introduce `IntoSubscriptionResult`
      
      * refactor: introduce subscription mod
      
      * impl StdError for subscription error types
      
      * fix nits + tests
      
      * fix doc tests
      
      * remove deadcode
      
      * Update server/src/tests/ws.rs
      
      * cleanup to make review easier
      
      * SubscriptionAcceptError -> PendingSubscriptionAcceptError
      
      * make it clear that SubscriptionPermit is mocked
      
      * remove deadcode
      
      * fix doc links
      
      * make register_subscription more readable
      
      * remove Option impl for IntoSubscriptionCloseResponse
      
      * fix tests
      
      * add test for subscription return type
      
      * fix nits
      
      * impl `IntoSubscriptionCloseResponse` for ()
      
      * remove useless ui test
      
      * Update core/src/server/error.rs
      
      * register_subscription: change order of parameters
      
      * Update core/src/server/error.rs
      
      * Update proc-macros/src/lib.rs
      
      * fix doc link
      
      * proc macro: compile test for !Result
      
      * hacky solution
      
      * add niklas ugly hack for providing default value
      
      * fix hacks
      
      * cargo fmt
      
      * Update core/src/server/subscription.rs
      
      Co-authored-by: default avatarJames Wilson <[email protected]>
      
      * fix grumbles
      
      * fix tests
      
      * add test for null notification
      
      * impl IntoSubscriptionResponse for Result<(), E>
      
      * more descriptive error impls
      
      * Update core/src/server/subscription.rs
      
      Co-authored-by: default avatarJames Wilson <[email protected]>
      
      * update docs: Subscription::next
      
      * revert UI tests
      
      * proc macro tests: add subscription -> ()
      
      * remove unused tokio feature
      
      * show failing test
      
      * fix tests
      
      * revert JSON str parsing
      
      * add `SerializeAsStr` error
      
      * show James
      
      * push hack to show James what I mean
      
      * SubscriptionResult = Result<(), StringError>
      
      * fix tests
      
      * address grumbles
      
      * Update core/src/server/subscription.rs
      
      * Update proc-macros/src/lib.rs
      
      * Update proc-macros/src/lib.rs
      
      * remove unused error variant SubscriptionCallbackError
      
      ---------
      
      Co-authored-by: default avatarJames Wilson <[email protected]>
      7144be54
  8. Mar 21, 2023
  9. Mar 16, 2023
  10. Mar 14, 2023
  11. Mar 06, 2023
  12. Mar 01, 2023
  13. Feb 27, 2023
  14. Feb 24, 2023
  15. Feb 23, 2023
  16. Feb 22, 2023
  17. Feb 21, 2023
  18. Feb 20, 2023
  19. Feb 18, 2023
  20. Feb 17, 2023
  21. Feb 16, 2023
  22. Feb 15, 2023
  23. Feb 13, 2023
  24. Feb 09, 2023
    • bear's avatar
      Update error codes (#1004) · f542a005
      bear authored
      * chore: update error code
      
      * chore: format
      
      * chore: try fix ci
      
      * chore: fix ci
      f542a005
  25. Feb 08, 2023
    • Niklas Adolfsson's avatar
      server: bounded channels and backpressure (#962) · 5faac4f1
      Niklas Adolfsson authored
      
      
      * bounded channels
      
      * remove bounded subscriptions
      
      * remove resource limiting
      
      * kill connection once message tx fails
      
      * switch to tokio::mpsc
      
      * fix nits
      
      * make futures_channel hard dependency
      
      * add real backpressure to rx
      
      * PoC with crossbeam queue
      
      * remove pipe_from_stream
      
      * bring back Pending and SubscriptionSink again
      
      * more refactoring
      
      * add example of old APIs
      
      * introduce opaque SubscriptionMessage
      
      * feat: make subscription callbacks async
      
      * fix tests
      
      * move non-jsonrpc spec types from types
      
      * fix nits
      
      * improve docs
      
      * add pipe_from_stream APIs back
      
      * cleanup
      
      * Update core/src/server/helpers.rs
      
      * Update server/src/server.rs
      
      * more cleanup
      
      * Update core/src/server/helpers.rs
      
      * small fixes
      
      * rpc module: add unit test for backpressure
      
      * doc fixes
      
      * fix more nits
      
      * refactor: pipe_from_stream
      
      * fix examples: revert unintentional change
      
      * address grumbles
      
      * revert: don't require subscriptions to return Result
      
      * Update core/src/server/helpers.rs
      
      Co-authored-by: default avatarAlexandru Vasile <[email protected]>
      
      * grumbles: simplify PendingSubscription
      
      * grumbles: fix doc nits
      
      * remove pipe_from_stream APIs again
      
      * add backpressure test for ws server
      
      * rpc module: add `send_timeout` APIs
      
      * rpc module: add tokio/time
      
      * cleanup
      
      * Update examples/Cargo.toml
      
      * Update server/src/server.rs
      
      * Update server/src/server.rs
      
      * Update server/src/server.rs
      
      * extract `build_message` to `SubscriptionMessage`
      
      * remove resource limiting leftover
      
      * Update core/src/server/rpc_module.rs
      
      * Update examples/examples/ws_pubsub_broadcast.rs
      
      * Update examples/examples/ws_pubsub_broadcast.rs
      
      * revert unintentional change
      
      * Update examples/examples/ws_pubsub_with_params.rs
      
      * fix more nits
      
      * improve SubscriptionEmptyErr
      
      * clippy --fix
      
      * bring back subscription limit
      
      * server: `set_message_buffer_capacity`
      
      * rpc module: revert raw_json_request API
      
      * subscribe_bounded -> subscribe
      
      * CallResponse -> CallOrSubscription
      
      ---------
      
      Co-authored-by: default avatarAlexandru Vasile <[email protected]>
      5faac4f1
  26. Feb 02, 2023