event-sourcing

How granular should a domain event be?

我怕爱的太早我们不能终老 提交于 2019-11-29 17:26:34
问题 I am wondering how granular should a domain event be? For example I have something simple, like changing the firstName, the secondName and the email address on a profile page. Should I have 3 different domain events or just a single one? By coarse grained domain events when I add a new feature, I have to create a new version of the event, so I have to add a new event type, or store event versions in the event storage. By fine grained domain events I don't have these problems, but I have too

Unknown discriminator value 'MyEvent'

心不动则不痛 提交于 2019-11-29 13:51:19
Using the MongoDB persistance engine in joliver/EventStore causing the error Unknown discriminator value 'MyEvent' . The issue is only caused when I try to load all events for replaying the events like this.storeEvent.Advanced.GetFrom(new DateTime(2010, 1,1)) The issues is caused in ExtensionsMethods.cs public class MyClassEvent : IDomainEvent { ... } public static Commit ToCommit(this BsonDocument doc, IDocumentSerializer serializer) { if (doc == null) return null; var id = doc["_id"].AsBsonDocument; var streamId = id["StreamId"].AsGuid; var commitSequence = id["CommitSequence"].AsInt32; var

Akka Persistence Query event stream and CQRS

匆匆过客 提交于 2019-11-29 09:46:38
问题 I'm trying to implement read side in my ES-CQRS architecture. Let's say I have a persistent actor like this: object UserWrite { sealed trait UserEvent sealed trait State case object Uninitialized extends State case class User(username: String, password: String) extends State case class AddUser(user: User) case class UserAdded(user: User) extends UserEvent case class UserEvents(userEvents: Source[(Long, UserEvent), NotUsed]) case class UsersStream(fromSeqNo: Long) case object GetCurrentUser

CQRS: Storing events and publishing them - how do I do this in a safe way?

僤鯓⒐⒋嵵緔 提交于 2019-11-28 16:52:54
As I've learned in Why is the CQRS repository publishing events, not the event store? it's the CQRS repository's task to publish events. So far, so good. Of course, storing the events and publishing them should be within one single transaction. Technically this means writing one (or more) records to the store, and publishing one (or more) events to a message bus. Hence, a simple database transaction is not enough, it should be a distributed one. Now, unfortunately, many NoSQL databases (such as MongoDB) do not support ACID-compliant transactions, not even to talk of the possibility of taking

Event Sourcing Resources [closed]

白昼怎懂夜的黑 提交于 2019-11-28 16:19:36
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Looking for some suggestions for useful discussion groups, articles, success stories, reference apps, and tooling (.Net) on the

Adjustable, versioned graph database

余生颓废 提交于 2019-11-28 12:32:16
I'm currently working on a project where I use natural language processing to extract emotions from text to correlate them with contextual information. Definition of contextual information: Every information that is relevant to describe an entity's situation in time an space. Description of the data structure I'm looking for: There is a arbitrary number of entities (an entity can either be a person or a group for example (twitter hash tags)) of which I want to track contextual information and their conversations with other entities. Conversations between entities are processed in order to

Using an RDBMS as event sourcing storage

泪湿孤枕 提交于 2019-11-28 02:37:41
If I were using an RDBMS (e.g. SQL Server) to store event sourcing data, what might the schema look like? I've seen a few variations talked about in an abstract sense, but nothing concrete. For example, say one has a "Product" entity, and changes to that product could come in the form of: Price, Cost and Description. I'm confused about whether I'd: Have a "ProductEvent" table, that has all the fields for a product, where each change means a new record in that table, plus "who, what, where, why, when and how" as appropriate. When cost, price or description are changed, a whole new row as added

CQRS: Storing events and publishing them - how do I do this in a safe way?

寵の児 提交于 2019-11-27 10:01:20
问题 As I've learned in Why is the CQRS repository publishing events, not the event store? it's the CQRS repository's task to publish events. So far, so good. Of course, storing the events and publishing them should be within one single transaction. Technically this means writing one (or more) records to the store, and publishing one (or more) events to a message bus. Hence, a simple database transaction is not enough, it should be a distributed one. Now, unfortunately, many NoSQL databases (such

Adjustable, versioned graph database

醉酒当歌 提交于 2019-11-27 07:10:16
问题 I'm currently working on a project where I use natural language processing to extract emotions from text to correlate them with contextual information. Definition of contextual information: Every information that is relevant to describe an entity's situation in time an space. Description of the data structure I'm looking for: There is a arbitrary number of entities (an entity can either be a person or a group for example (twitter hash tags)) of which I want to track contextual information and

Using an RDBMS as event sourcing storage

孤者浪人 提交于 2019-11-27 04:57:18
问题 If I were using an RDBMS (e.g. SQL Server) to store event sourcing data, what might the schema look like? I've seen a few variations talked about in an abstract sense, but nothing concrete. For example, say one has a "Product" entity, and changes to that product could come in the form of: Price, Cost and Description. I'm confused about whether I'd: Have a "ProductEvent" table, that has all the fields for a product, where each change means a new record in that table, plus "who, what, where,