event-sourcing

CQRS Event Sourcing check username is unique or not from EventStore while sending command

左心房为你撑大大i 提交于 2019-12-29 18:38:11
问题 EventSourcing works perfectly when we have particular unique EntityID but when I am trying to get information from eventStore other than particular EntityId i am having tough time. I am using CQRS with EventSourcing. As part of event-sourcing we are storing the events in SQL table as columns(EntityID (uniqueKey),EventType,EventObject(eg. UserAdded)). So while storing EventObject we are just serializing the DotNet object and storing it in SQL, So, All the details related to UserAdded event

Unknown discriminator value 'MyEvent'

吃可爱长大的小学妹 提交于 2019-12-29 08:32:39
问题 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"]

What is an Aggregate Function?

萝らか妹 提交于 2019-12-24 10:30:25
问题 I am trying to learn Event Sourcing (using Greg Youngs Event Store) in my spare time. I have setup a simple stream and I can read from it and write to it. Please see this link: https://eventstore.org/docs/getting-started/?tabs=tabid-1%2Ctabid-dotnet-client%2Ctabid-dotnet-client-connect%2Ctabid-4. It says: "If you are Event Sourcing a domain model, a stream equates to an aggregate function." I don't believe I have ever come across the term Aggregate Function before - I know aggregate root and

Event sourcing: avoid projects duplicated events while replaying events and listen new incoming events

时光怂恿深爱的人放手 提交于 2019-12-24 09:48:50
问题 In the scenario where it needs to build a new view, we could replay all the events from the EventStore . As a result we'll have the new view projected. So, the idea is deploy a new projection that projects all old events (by replaying) and also listen new incoming events and project them. I think that races conditions can occur while reading olds events and listen new incoming events. As a result we could project the same event more than once and then corrupt the new view. So, what is good

CQRS,ES: How to know if we have to reorder/ignore events on read side?

六月ゝ 毕业季﹏ 提交于 2019-12-24 06:47:31
问题 Me and my team currently work on the read side of a CQRS and event-sourcing system. We want our projectors to be able to listen to only a subset of all events and we want our projectors to be idempotent since an event can be published many times. Here is our current architecture: Since a projectionist doesn't handle all events how it can know if an event hasn't been received in the correct order or if an event has already been received? We can't use the sequence number because the sequence

Recovering state consistency in Flink when using Kafka as EventStore

夙愿已清 提交于 2019-12-24 00:43:28
问题 The problem I am implementing a microservice as an event-sourcing aggregate which, in turn, is implemented as a Flink FlatMapFunction. In the basic setup, the aggregate reads events and commands from two kafka topics. Then, it writes new events to that first topic and processing results in a third topic. Therefore, Kafka acts as the event store. Hope this drawing helps: RPC Request RPC Result | | ~~~~> Commands-| |---> Results ~~~~~~| |-->Aggregate--| ~> Input evs. -| |---> output evs. ~~~ |

Is it ok to use Apache Kafka “infinite retention policy” as a base for an Event sourced system with CQRS?

倾然丶 夕夏残阳落幕 提交于 2019-12-22 11:37:33
问题 I'm currently evaluating options for designing/implementing Event Sourcing + CQRS architectutral approach to system design. Since we want to use Apache Kafka for other aspects (normal pubsub messaging + stream processing), the next logical question would be, "Can we use the Apache Kafka store as event store for CQRS"?, or more importantly would that be a smart desition? Right now I'm unsure about this. This source seems to support it: https://www.confluent.io/blog/okay-store-data-apache-kafka

Replay events for adjustments

房东的猫 提交于 2019-12-22 10:48:44
问题 Hypothetically I'm working on a system that uses "Event Sourcing" (storing the business events) that has purchase and selling of materials; at some point a report, with prices and costs information is generated. Imagine that one of my clients call me and says, "The costs are wrong, for me, the rules from profit are this way". I could add more handlers or change the rules to adjust to this particular case, and replay the events. But my question is, this is the correct approach (or at least the

CQRS Read Model Design when Event Sourcing with a Parent-Child-GrandChild… relationship

家住魔仙堡 提交于 2019-12-21 07:56:03
问题 I'm in the process of writing my first CQRS application, let's say my system dispatches the following commands: CreateContingent (Id, Name) CreateTeam (Id, Name) AssignTeamToContingent (TeamId, ContingentId) CreateParticipant (Id, Name) AssignParticipantToTeam (ParticipantId, TeamId) Currently, these result in identical events, just worded in the past tense (ContingentCreated, TeamCreated, etc) but they contain the same properties. (I'm not so sure that is correct and is one of my questions)

Read side implementation approaches using CQRS

不打扰是莪最后的温柔 提交于 2019-12-20 09:00:09
问题 I've moved to the project which is actively using CQRS + event sourcing. From the first glance it's implemented in accordance with all those books and blogs, but finally I realized what exactly is peevish in the implementation. Here is CQRS architecture: Originally I took this picture from here. As we can see in the picture, the read side receives events from the queue and passes it one by one into different sets of projections(denormalizers) and then resulting ViewModels are saved through