Skip to content
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

Websocket API: Light transaction updates & NoSuccessNotify #1812

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Oct 9, 2024

Description of Changes

Does two things:

  1. Adds TransactionUpdateLight that consists only of the request_id and the DatabaseUpdate<F>. This is emitted when the query param &light=true is set (unless the update is sent to the caller in which case a full update is sent).
  2. Adds flags: enum CallReducerFlags { FullUpdate, NoSuccessNotify } to ClientMessage. When NoSuccessNotify is set, the host will not send back an empty update to the caller on success without the caller having subscribed to any affected queries. This is exposed in the SDK via ctx.set_reducer_flags.my_reducer(CallReducerFlags::NoSuccessNotify). When the default FullUpdate is used, full updates are sent, whether the caller was subscribed to the relevant queries or not.

TODO:

API and ABI breaking changes

This breaks the websocket API/protocol.

@bfops
Copy link
Collaborator

bfops commented Oct 15, 2024

Looks like the tests are failing?

@Centril Centril force-pushed the centril/websocket-light branch 4 times, most recently from d09d4b6 to da45a60 Compare October 15, 2024 21:57
@bfops
Copy link
Collaborator

bfops commented Oct 18, 2024

@Centril I'm happy to review the CLI changes - Do you have recommendations on how to test this? Should I just regenerate bindings for an example client for each language?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants