-
Notifications
You must be signed in to change notification settings - Fork 914
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
Add support for stateful clients #2341
Conversation
Let's first work on and merge #2389, where the definition of |
Hello there, and thanks for the work on supporting stateful clients. I see this PR is closed because the feature is supposed to be supported via the other mentioned issues. However, I'm not sure to understand how. Are those released in Flower 1.6? Is there any documentation on using stateful clients that I missed? Thanks again. |
This PR introduces simple (but sufficient for most cases) support for stateful clients. All clients are stateful now (with state being a simple dataclass with nothing but the client-id). The state is transparently injected each time a client is instantiated and the result is retrieved before the client object is destroyed (recall in simulation clients are ephemeral).
This PR assumes #2331 is merged. it is also compatible with the ideas in #2303.
This PR replaces the contents of #2148 and #2160 so they should be closed/deleted