-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Brain Dump] Event-As-Destination-State #66
Comments
Yes, something similar occurred to me some months ago: we could keep all state payload processing out of the machine description if we give the information to the consumer of the current state. I think this means including all previous event payloads, not only the latest one; or it means adding an event selection language to say “I want the very first event, all |
This would also make it trivial to keep snapshots of old states around, limiting the effort of timetravel replays. |
It did not occur to me. My initial intuition is that this sounds like a good idea.
One thing I always feel a bit off about this is that we often treat (and suggest people, or almost encourage even) a swarm protocol as a linear process whereas it might be non-linear, and some events might be ignored due to a loop (in the graph). I just feel that this might be one of the future pitfalls that we can't yet identify because of the lack of data. Not a crucial point as of right now though. |
Regarding linearity: our current swarm protocols permit linear sequences, choices (i.e. branches), and cycles. They currently do not permit any form of parallelism, though, which means that the resulting event log always is linear in nature. Events from invalid branches are ignored. So with this theory, I think it makes sense to view the current state and the history of getting there as a linear sequence of events. In the future, we may extend the theory to explicitly model (and regulate) parallelism. At that point the history of a state after joining two parallel parts of the workflow is more complex; it would take more thought to figure out how to present this to the programmer. But since we don’t have such a theory yet, it would be premature to take guesses about its constraints. |
Something similar to multi-events reactions, but unordered, unique, and has a triggering/opening-event (but not a closing one as the closing can be indicated by having the multi-events criteria fulfilled)? |
As I said: there’s no point trying to figure this out yet because the underlying theory doesn’t yet exist. |
I see, shelving this for now |
In a swarm protocol:
With those properties (and hopefully no need for another compiliation step) swarm protocol and role protocol can be defined this way:
The text was updated successfully, but these errors were encountered: