Hey
I would like to store documents (saga state) in ES and have indices on various properties of them (in order to look up a saga instance). I’d like to validate with you my approach as I am a bit concerned by the number of streams it will generate.
For each Saga type I would have a projection like this one:
fromCategory(‘SomeSaga’)
.when({
SagaSaved : function(s,e) {
linkTo(‘SomeSaga_ByOrderNumber-’+e.data.orderNumber,e);
return s;
}
})
For each property I’d like to index, for each active saga instance, it would create a stream with name containing the value of the property. So let’s say I have 1M active sagas (I guess this is a very high limit) and 5 index properties, I would end up with 5M streams only for indexing sagas. Wouldn’t that kill ES performance?
Szymon