thenativeweb / node-cqrs-domain

Node-cqrs-domain is a node.js module based on nodeEventStore that. It can be very useful as domain component if you work with (d)ddd, cqrs, eventdenormalizer, host, etc.
http://cqrs.js.org/pages/domain.html
MIT License
269 stars 57 forks source link

Add externallyLoaded option to context, and load those separately #121

Closed nanov closed 6 years ago

nanov commented 6 years ago

This update adds an externallyLoaded option to the context definition. Basically, this means that the user ( or more likely a library ) provides the structureLoader with an already defined context object which can be used directly ( a context object to which aggregates are added, to which commands are added and so on ).

This allows writing alternative/additional loaders, who can output the result in ready to use for this library. This will allow requests like this one and this one achieved fairly easy according to other logic/structure without breaking the existing logic/definitions.

This whole is done as are in a process of writing an on-top addition/library allowing a one-file aggregate definitions similar to other CQRS implementations.

nanov commented 6 years ago

Hmm, this is strnage, and has nothing to do with my changes, any ideas?

nanov commented 6 years ago

This seems to "solve" the problem, which apparently happens only on node 10 because it's faster :)

As i am no redis expert by any means, does those changes make sense?

nanov commented 6 years ago

Now i really don't get it...

@adrai any ideas?

adrai commented 6 years ago

Can you revert the redis changes (must be a node 10 problem, will look at it later) Can you add something in the readme?