-
Notifications
You must be signed in to change notification settings - Fork 177
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
Conversation
96c58b8
to
ff2e1d8
Compare
7402785
to
266d6fa
Compare
ff2e1d8
to
32e1a6c
Compare
c7729ee
to
2a9424e
Compare
a8e222e
to
b51292b
Compare
Looks like the tests are failing? |
da45a60
to
e39d51e
Compare
e2fabc9
to
0cb3389
Compare
@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? |
0cb3389
to
22de99e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally I would like to see tests added to the Rust SDK test suite which exercise this new functionality. If time is a concern, these could be added in a follow-up. I am happy to assist in writing the tests, but I don't think I have a strong enough grasp of the intended semantics to actually write them myself.
I would very much like clarification on the ReducerContext.sender
passed to reducers whose callers requested no-notify.
I've also left many suggestions which are all: don't document the WS protocol on user-facing parts of the SDK. The WS protocol should be abstracted away to users of the SDK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(codeowner review) the crates/cli/src/subcommands/subscribe.rs
changes look benign to me 👍
c659ca4
to
7e91c80
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In principle, this looks good and correct to me. I just want to be cautious about merging, particularly if we have not yet tested this. Maybe we hold off on doing a basic CircleGame test tomorrow before merging.
b6689e9
to
33e815c
Compare
eafc64b
to
9c85842
Compare
… unless NoSuccessNotify
…n 1.0 would be breaking) Co-authored-by: Phoebe Goldman <[email protected]> Signed-off-by: Mazdak Farrokhzad <[email protected]>
Signed-off-by: Mazdak Farrokhzad <[email protected]>
9c85842
to
01d3cd9
Compare
## Description of Changes Adds C# sdk support for clockworklabs/SpacetimeDB#1812. ## Requires SpacetimeDB PRs - clockworklabs/SpacetimeDB#1812 ## Testsuite SpacetimeDB branch name: centril/websocket-light --------- Co-authored-by: Tyler Cloutier <[email protected]> Co-authored-by: John Detter <[email protected]>
Description of Changes
Does two things:
TransactionUpdateLight
that consists only of therequest_id
and theDatabaseUpdate<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).flags: enum CallReducerFlags { FullUpdate, NoSuccessNotify }
toClientMessage
. WhenNoSuccessNotify
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 viactx.set_reducer_flags.my_reducer(CallReducerFlags::NoSuccessNotify)
. When the defaultFullUpdate
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.