Draft
Conversation
Incomplete. I've mostly rewritten `new_order`, which I think is the hard one. I haven't yet started rewriting `payment`. `new_order` is still incomplete in that I haven't wired up reporting of `s_quantity`. This is an isolation hazard, as discussed out-of-band.
JSON was getting wacky case-conversion errors I didn't feel like fixing, so I just modified the `database/call` route to accept `application/octet-stream` with BSATN.
Initial Codex-assissted prototype of reducer return values. Implemented only for Rust modules and the Rust client SDK, plus the HTTP API.
This reverts commit 84737a6. Was supposed to be on a different branch.
…com:clockworklabs/SpacetimeDB into phoebe/tpcc-distributed-naive-http-requests
…e/tpcc/reducer-return-value
…ebe/tpcc/reducer-return-value Resolved conflict in crates/client-api/src/routes/database.rs manually: Shub and I had both implemented accepting BSATN via `application/octet-stream`, with slightly different ways of checking the headers and returning errors.
This ditches our use of procedures for their return values and of the procedure HTTP interface.
…tp-requests' into phoebe/tpcc/reducer-return-value Manually resolved conflicts in the module and loader related to removing `spacetimedb_uri`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
Initial Codex-assissted prototype of reducer return values. Implemented only for Rust modules and the Rust client SDK, plus the HTTP API.
This is part of our weekend hackathon to implement distributed TPC-C.
Note that this PR is based on
phoebe/tpcc-distributed-naive-http-requests. Reviewers (or cherry-pickers) should start from 4781c22 .I asked Codex for some examples, and it spit out:
Reducer return value examples
1) cURL HTTP client calling a reducer
If the reducer returns
(), the response body is empty on success.2) Rust module defining a reducer
Reducers may return
()orResult<T, E>, whereT: SpacetimeTypeandE: Display.3) Rust client SDK calling a reducer
API and ABI breaking changes
Should be additive-only, but I don't trust that Codex did it write. This is marked draft for a reason.
Expected complexity level and risk
4: pretty deep changes, and it's all generated, so this will need thorough review.
Testing
/v1/database/:name/call/:reducer POSTbehavior.