I’m still fairly new with the topic, so please pardon my ignorance.
I have got something going with EventStore and I think I basically got the hang of things.
I have more of a best-practice question now: are projections any good for serious usage, or should I start doing things right away in my code outside ES, by just subscribing to streams, and essentially building out projections myself?
The pros of projections:
works out of the box, easy to get started
monolithic with ES, no need to worry about maintaining a persistent connection between ES and my own code
nice GUI to quickly test and debug projections
The cons of projections:
once the grow and start to contain more and more business logic, they become less DRY and in general hard to version, maintain and deploy
impossible to use some more advanced logic in them. E.g. if I would need to calculate an md5 hash or something of the sort.
First, is my evaluation above correct?
If so, then I would think it’s better for most usecases to do away with built-in projections, and take care of building them out in user code.
But then I’d love to hear your experience how you would actually do that…
My preferred languages of choice would be nodejs.
I can see that there are 3 competing libraries available for nodejs. Any tips which one is more mature?
Would I just use a catch-up subscription and project needed state into memory? Then on every start-up I’d essentially rebuild all projections. Shouldn’t be too slow since I only have thousands of events, but still doesn’t feel too reliable, right?
Or should I build-out a persistent projection into something like redis? But in this case how will I make sure that I didn’t miss any events? Is that something I would use persistent subscriptions for?
If you got examples how you deal with projections I’d really appreciate, especially in nodejs.