You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-3Lines changed: 26 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,9 +50,7 @@ The resulting system is highly efficient, with the ability to quickly rebuild it
50
50
51
51
Moreover, providing the ability to **tag events** enables **read-side projections** to be easily implemented and maintained, improving the overall performance and scalability of the system.
52
52
53
-
### Event Sourcing with generic-persistence-api
54
-
55
-

53
+
### generic-persistence-api
56
54
57
55
#### Commands
58
56
@@ -145,3 +143,28 @@ akka {
145
143
146
144

147
145
146
+
##### Versioning
147
+
148
+
You may find it necessary to change the definition of a particular event type or aggregate at some point in the future.
149
+
You must consider how your system will be able to handle multiple versions of an event type and aggregates.
150
+
151
+
#### Entity Behavior
152
+
153
+

154
+
155
+
#### Entity Pattern
156
+
157
+
As we have seen, Cluster Sharding is a distributed system mechanism in Akka that allows you to partition actor entities across multiple nodes in a cluster. Each entity is uniquely identified by a shard identifier (EntityTypeKey) and an entity identifier.
158
+
159
+
The shard identifier represents a group of entities that share the same state, and the entity identifier identifies a specific entity within that shard.
160
+
161
+
When a command is sent to an entity, the "entity pattern" is used to locate the actor reference for that entity. The shard identifier is used to determine which node in the cluster is responsible for managing the shard, and the entity identifier is used to locate the specific actor entity within that shard on that node.
162
+
163
+
Once the actor reference for the entity has been located, the command is sent to the EntityBehavior, which processes it and updates its state. The state changes are then persisted using Akka Persistence, which ensures that the state changes are durable and can be recovered in the event of a node failure.
0 commit comments