Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Searching for a stream in EventStore

Is it possible to search for a stream not by StreamId but by some another Stream attribute? For example, if every stream has CustomerId in the Headers and I would like to search for all the streams with the particular CustomerId.

like image 930
dimaKudr Avatar asked Jul 15 '12 16:07

dimaKudr


People also ask

What is stream in Event store?

In the Event Store streams are like documents in a document database. They are extremely cheap to create. The database assumes that you will have many many millions of streams. Also like in a document database streams are the parition point.

What is EventStoreDB?

EventStoreDB is an industrial-strength Event Sourcing database that stores your critical data in streams of immutable events. It was built from the ground up for Event Sourcing and offers an unrivaled solution for building event-sourced systems.


1 Answers

Event stores are designed to support retrieval exclusively by the key of the entity. To support retrieval by other attributes, data is indexed in an eventually consistent, de-normalized fashion specifically for each use case and in a separate place. So the event-store only stores events and to support querying of any sort indexed projections are utilized. These are sort of like persistent views in a relational database but they can be stored in a simple key-value store. Together, an event-store and a projection store constitute part of the infrastructure behind a CQRS + Event Sourcing architecture. Take a look here and the rest of that blog for more on this subject.

like image 140
eulerfx Avatar answered Sep 29 '22 09:09

eulerfx