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

Support a user-defined private state for continuous service requests #26

Open
mxgrey opened this issue Sep 25, 2024 · 0 comments
Open
Assignees

Comments

@mxgrey
Copy link
Contributor

mxgrey commented Sep 25, 2024

Continuous services may fulfill requests over the course of multiple schedule cycles. To implement the service, users might want to store a state data structure that persists across the cycles. Each state instance should be associated with exactly one ongoing request.

We should add a fourth generic parameter called State to ContinuousServiceKey and ContinuousQuery. It would have a default argument of (), which should preserve backwards compatibility for the API.

To begin we will require the State to implement Default so we can default-initialize the value upon a new request coming in. We could consider requiring it to implement FromWorld instead, or come up with our own trait similar to FromWorld that also provides information about the source and provider entity as well as the initial request data, all alongside a &mut World.

@mxgrey mxgrey self-assigned this Sep 25, 2024
@mxgrey mxgrey added this to PMC Board Sep 25, 2024
@github-project-automation github-project-automation bot moved this to Inbox in PMC Board Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant