Questions tagged [neventstore]

NEventStore (aka JOliver EventStore to disambiguate it from github.com/EventStore) is a persistence library used to abstract different storage implementations when using event sourcing as a storage mechanism.

The purpose of NEventStore is to represent a series of events as a stream. Furthermore, it provides hooks whereby any events committed to the stream can be dispatched to interested parties.

Guided by a number of strategic design decisions based upon the needs of applications using event sourcing, NEventStore is able to liberate applications from the stringent requirements often imposed by infrastructure components. Specifically, most CQRS-style applications read from a message queue and perform some processing. When processing is complete, the application then commits the work to storage and publishes the completed work. In almost all cases, this requires a two-phase commit managed by a distributed transaction coordinator (MSDTC in .NET) along with various security settings and firewall ports opened and available whereby such components can communicate, not to mention a ubiquitous requirement for Microsoft Windows on all machines in .NET environments.

When using two-phase commit in .NET, there are very few database drivers that support this scenario and even fewer message queues that support it. In essence, if you want to implement a typical CQRS-style application, you're stuck with MSMQ and SQL Server using MSDTC. Granted, there are other choices, but the constraints imposed by a two-phase commit are burdensome. This also creates additional issues when utilizing shared hosting or running on Mono as support in frameworks and drivers is either poor, buggy, or unavailable.

NEventStore liberates application developers from this level of infrastructure awareness and concern by committing all work within a separate isolated atomic unit--all without using transactions. Furthermore, it does this outside of any ambient transaction from a message queue or other persistence mechanisms. In other words, application developers are free to use virtually any messaging queuing infrastructure, message bus (if at all), and storage engine. Each will perform its own specific task in an isolated manner with full transactional integrity all without enlisting any resources (other than a message queue) in some form of transaction.

Interestingly enough, even without the presence of distributed transactions across the various resources involved, such as a message queue and persistent storage, NEventStore is able to ensure a fully transactional experience. This is achieved by breaking apart a distributed transaction into smaller pieces and performing each one individually. This is one of the primary goals and motivations in the underlying model found in the EventStore. Thus each message delivered by the queuing infrastructure is made to be idempotent, even though the message may be delivered multiple times, as per message queue "at-least-once" guarantees. Following this, NEventStore is able to ensure that all events committed are always dispatched to the relevant messaging infrastructure.

https://github.com/NEventStore/NEventStore

116 questions
32
votes
2 answers

What difference between NEventStore and EventStoreDB

Recently I'm learning CQRS and want to change my system to use event-sourcing patterns. But I found that on .Net platform, there is two Event Store implementations. NEventStore(formerly JOliver EventStore) EventStoreDB(from EventStore.com) The two…
JasonMing
  • 561
  • 8
  • 16
27
votes
1 answer

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

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.…
Golo Roden
  • 140,679
  • 96
  • 298
  • 425
10
votes
3 answers

NEventStore 3.0 - Throughput / Performance

I have been experimenting with JOliver's Event Store 3.0 as a potential component in a project and have been trying to measure the throughput of events through the Event Store. I started using a simple harness which essentially iterated through a…
MattC
  • 103
  • 1
  • 4
8
votes
1 answer

EventStore example applications with source?

can anyone point me to any EventStore sample application with source code? I'm learning event storing and want to view a reference implementation.
CodingHero
  • 2,865
  • 6
  • 29
  • 42
8
votes
2 answers

Unknown discriminator value 'MyEvent'

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…
Jacee
  • 186
  • 2
  • 7
8
votes
1 answer

J Oliver EventStore - Saga Examples

I was wondering if there is any documentation/guidance on using Saga's and the EventStore. Part of my confusion is that when you look at using a Service Bus like NServiceBus or MassTransit the too have the concept of a Saga. I know the EventStore…
Michael
  • 83
  • 1
  • 3
8
votes
2 answers

EventStore without CQRS

I have seen a lot about EventStores but all articles are coupled with talk about CQRS. We want to use EventStores to integrate bounded contexts, but want to stick with traditional ORM for reading/writing aggregates, to avoid the command/query and…
morleyc
  • 2,169
  • 10
  • 48
  • 108
7
votes
4 answers

examples of testing the domain using joliver commondomain/eventstore

I'm looking for good examples of testing the domain using JOlivers CommonDomain and EventStore I have been watching greg youngs videos and he has a nice simple abstract aggregate root test fixture. is there anything like that which can be used with…
user156888
6
votes
1 answer

Is there any way to compress the data while using mongo persistence with NEventStore?

I'm working with C#, Dotnet core, and NeventStore( version- 9.0.1), trying to evaluate various persistence options that it supports out of the box. More specifically, when trying to use the mongo persistence, the payload is getting stored without…
6
votes
1 answer

Objects composition of NEventStore components for DI

I'm adding NEventStore to my existing project and I'm using DI. I'd like to have an instance of CommonDomain.Persistence.EventStore.IRepository injected into my MVC controller. The only implementation of this interface is EventStoreRepository. This…
trailmax
  • 34,305
  • 22
  • 140
  • 234
6
votes
3 answers

NEventStore issue with replaying events

We are using CQRS + ES. The ES is NEventStore (folrmerly JOliver EventStore). We have 2 aggregates in different commands. The projections of the second AR depends on the data written by the first AR projections in the read model. The problem is that…
mynkow
  • 4,408
  • 4
  • 38
  • 65
5
votes
4 answers

Is there a Java port or equivalent of the NEventStore library?

I've read up on Jonathan Oliver's .NET EventStore library, and I must say the concept appeals to me a lot: having just a simple no-dependencies library which is non-intrusive and just focuses on event sourcing, leaving a lot of freedom when choosing…
5
votes
1 answer

How should I be using the streamId in the EventStore?

In J Oliver's EventStore how should i be using the streamId when opening a stream? Should I have a new stream/streamid for each object/aggregate root object? So should my order state objects which i think should be ar objects each have a streamid?
CodingHero
  • 2,865
  • 6
  • 29
  • 42
5
votes
2 answers

EventStore partial ordering of events and other features

I'm trying to evaluate EventStore as in reliable queuing mechanism internal to a server software. MSMQ fails as an alternative because it cannot support partial ordering, ordered messages within "conversations" of messages. And because of its 4MB…
Jason Kleban
  • 20,024
  • 18
  • 75
  • 125
5
votes
3 answers

Updating multiple aggregates using JOliver EventStore

I'm having a question regarding updates to multiple aggregates in a single transaction using JOliver's Event Store. As I understand, every aggregate should have its own event stream. Now, while many command handlers will only load a single aggregate…
Jochen
  • 95
  • 9
1
2 3 4 5 6 7 8