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 for asynchronous, incremental snapshot capturing #102

Open
volkerstampa opened this issue May 15, 2013 · 1 comment
Open

Support for asynchronous, incremental snapshot capturing #102

volkerstampa opened this issue May 15, 2013 · 1 comment
Assignees

Comments

@volkerstampa
Copy link
Contributor

Imagine the following scenario:

  • 2 actors: A, B
  • A is eventsourced and
    • gets message from "outside"
    • updates its internal state
    • computes new messages and sends them to B
  • B is not eventsourced
    • gets message only from A
    • updates its internal state

In this case taking snapshots in a straightforward manner does not lead to consistent recovery as message sent from A to B could be either applied twice or get lost. For consistent recovery the following trick can be applied:

  • Send SnapshotRequest to A
  • A creates A-snapshot and does not call SnapshotRequest.process, but forwards its snapshot in custom message to B
  • B creates B-snapshot and combines it with received A-snapshot to AB-snapshot
  • B calls SnapshotRequest.process(AB-snapshot)

Having library support for this kind of consistent snapshots could relieve a developer from implementing the described process and probably saves a couple of process related custom types.

@krasserm
Copy link
Contributor

Volker, thanks for bringing this up. This is definitely something the snapshotting API should support. I renamed the ticket title a bit because your issue is more related to asynchronous, incremental snapshot capturing. Whether the aggregated snapshot is a consistent snapshot depends on application logic.

@ghost ghost assigned krasserm May 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants