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 changes on a map #4233

Closed
jeffa5 opened this issue Sep 14, 2022 · 2 comments
Closed

Watch changes on a map #4233

jeffa5 opened this issue Sep 14, 2022 · 2 comments

Comments

@jeffa5
Copy link
Contributor

jeffa5 commented Sep 14, 2022

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

With http2 (and gRPC) streams it is possible to have longer lived connections from clients. Some endpoints need to be able to watch changes on the maps and report these changes back to the client through the stream. Currently the transaction (and derived maps) are static and do not support getting updates).

This should be ok to be a read-only endpoint so that it can't mutate anything.

Describe the solution you'd like

An API on the CCF map that enables updates to be obtained. Potentially registering a callback asking for a channel that events will be sent down. This should be given updates when they are committed.

Initially this could be registering for every change on a given map (and allow multiple registrations on different maps) but it may be useful to support registration for sub-parts of maps.

Describe alternatives you've considered

A separate component in the enclave that handles the client request and internally polls the CCF app but this is far from ideal.

@achamayou
Copy link
Member

@jeffa5 there isn't exactly something like this now, but the closest thing we have, and what we've discussed extending in that direction in the past is the indexing API: https://microsoft.github.io/CCF/main/architecture/indexing.html

This isn't under active investigation right now, instead the user API focus is currently on containerization of business logic, but it will very likely be the focus of our attention once we have made progress there.

@jumaffre
Copy link
Contributor

jumaffre commented Mar 9, 2023

This can be done entirely in application space now that CCF supports gRPC server-side streaming. See WIP example here: microsoft/LSKV#186

@jumaffre jumaffre closed this as completed Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants