-
Notifications
You must be signed in to change notification settings - Fork 135
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
RDoc-2923 RavenDB plugin for Akka.NET Persistence #1889
Conversation
{NOTE: } | ||
|
||
* Akka.Persistence provides two primary methods to persist actor state: **Event sourcing** and **Snapshots**. | ||
Event sourcing stores state changes as a sequence of events, while snapshots capture the actor's state at specific points for quicker recovery. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rephrase this a bit and more at length? Took me a few tries to understand which word was the verb here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
* This collection is designated by the RavenDB plugin for Akka's stored events. | ||
Although it is technically possible to store documents from other sources in this collection, | ||
it is recommended to reserve the Events collection exclusively for Akka storage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is forbidden to store other documents in this collection. It is recommended that this collection (and snapshots) is in another designated database alltoghther.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
added 'storing guidelines' section
* Each snapshot is stored as a document in the `Snapshots` collection in append-only mode. | ||
|
||
* Similar to the Events collection, this collection is designated by the RavenDB plugin for Akka's snapshots, | ||
and it is recommended to reserve the Snapshots collection exclusively for Akka storage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
* Replaying snapshots significantly accelerates recovery, reduces network transmission, | ||
and lowers both actor event replay time and CPU usage. | ||
|
||
* After the snapshot is retrieved, events can be deleted from the events journal to free up space. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The events can be deleted after we create the snapshot successfuly (not replay it) because that guarantees we have all the previous events data in persistence. With the SaveSnapshotSuccess
command, like in your example code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
* RavenDB is a distributed database, allowing writes, reads, and queries to target different nodes across the cluster. | ||
|
||
* To prioritize consistency over availability, the RavenDB plugin uses a [cluster-wide transaction](../../server/clustering/cluster-transactions) for storing events and snapshot documents. | ||
This ensures that persisted data is consistently applied across all database instances in the cluster, fulfilling Akka's global consistency requirement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe clarify that this fullfils Akka's demand for no gap between events at any point in time, across all nodes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
{INFO: } | ||
When configuring the plugin using both Hosting and HOCON, if the same parameters are specified in both, | ||
the configuration provided via Hosting take precedence and will override the corresponding HOCON settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
takes*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
* Akka.Persistence.Query comes with several stream-based query interfaces for querying persisted data. | ||
This interface abstracts the underlying database, allowing your application to switch persistence providers without requiring changes to the query code. | ||
|
||
* The RavenDB persistence plugin fully supports all Akka's query interfaces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all of*?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
* The RavenDB persistence plugin fully supports all Akka's query interfaces. | ||
Just include `Akka.Persistence.RavenDb.Query` in your application. | ||
|
||
* view queries in traffic watch under 'streams' todo.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right - I'm on it now......
added this info within a new section: "Inner implementation details"
@karmeli87 |
Related issue:
https://issues.hibernatingrhinos.com/issue/RDoc-2923/Create-an-Akka.NET-with-RavenDB-plugin-documentation-link