-
Notifications
You must be signed in to change notification settings - Fork 34
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
Start / Stop Projection API #25
Comments
One thing that we should consider when implementing this is to support starting a Projection in paused mode, so that it doesn't process anything until actually started. The need for this came up in #494 |
for the record, Lagom Projection Start/Stop API allows to start the system in paused mode. |
I'll start working on the basic functionality for this:
|
I understand this as, if nothing is on DB, we fallback to the property. So, only useful for the first time we bootstrap it. On the other hand, a probable use case is to deploy a new version that has it set to Alternatively, we can have a few states:
Another expansion is to allow properties per projection id. Maybe not something to add right away, but we can consider for the future. We may want add something that is forward compatible, for instance: akka.propjection.{projection-name}.all = pause and then later: akka.propjection.{projection-name}.{projection-id} = pause |
I didn't think much about the config property. Might not be a config. Might be something in the API instead. "start in paused mode", which also updates the db. |
If we make the requested status persistent as a new column on the offset store, then the new config setting is probably unnecessary. There are two fields to add to each projection indicating: requested status and observed state.
The most common case is when a user changes their mind: the user decides a projection should now be started and uses some programmatic API or a direct DB For example:
Finally, there could be a central coordinator in charge of persisting and reading the requested status values from the DB and making sure the system reacts accordingly and converges the observed status to the requested status. This central coordinator is more efficient than each projection polling the offset store to see if they should start/stop. ☝️ this is a summary (with small changes) of what lagom does. Note, Lagom had a Summing up, +1 to |
When updating to version 1.2.0 you have to create a new |
Similar to current Lagom Projection API. Allows to inspect and manage projections.
The text was updated successfully, but these errors were encountered: