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

Watch stream for committed requests #208

Open
jeffa5 opened this issue Jan 8, 2023 · 1 comment
Open

Watch stream for committed requests #208

jeffa5 opened this issue Jan 8, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@jeffa5
Copy link
Collaborator

jeffa5 commented Jan 8, 2023

Is your feature request related to a problem? Please describe.

Currently there are a few ways of waiting for things to commit, either revolving around polling the servers, or when making lots of requests using the returned headers to check it (along with view history).

Describe the solution you'd like

When we get support for bidirectional streaming in CCF I think another, maybe more useful, method would be an endpoint such as

service Commits {
  rpc Watch(stream WatchRequest) returns (stream WatchResponse) {}
}
message WatchRequest {
  int64 revision = 1;
  uint64 raft_term = 2;
  // but more of an enum like the actual Watch service uses
}
message WatchResponse {
  int64 revision = 1;
  uint64 raft_term = 2;
  enum Status {
    Committed = 1;
    Invalid = 2;
    // maybe more states too, e.g. getting progress
  }
}

This would enable clients to efficiently wait for transactions to be committed, especially those processing lots of transactions or offering a wrapper service that is more consistent.

@jeffa5 jeffa5 added the enhancement New feature or request label Jan 8, 2023
@heidihoward
Copy link
Member

+1 - I love this idea!

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

No branches or pull requests

2 participants