thenativeweb / cqrs-sample

CQRS, EventSourcing, (DDDD) Sample in node.js
148 stars 50 forks source link

Messaging and Queuing between MongoDb and your Read/Query Model (Projection) #7

Open aadamsx opened 10 years ago

aadamsx commented 10 years ago

Do you use MongoDb as an Event Store (Db) and a Queue? In this case, between the Write and Read you don't need something like zmq or RabbitMQ for messaging correct? If you do use MongoDb as your Queue, where do you use RabbitMQ if anywhere?

Do you use messages between your Aggreate and your Event Store? If so do you use RabbitMQ for this? Do you use the Pipes and Filters pattern? Zmq? Or just Async callbacks?

adrai commented 10 years ago

my setup: example: browser sends command -> socket.io -> host -> send to domain -> via rabbitmq -> domain (makes its magic with the eventstore) generates event send to denormalizer(s) -> via rabbitmq -> denormalizer(s) extends the event with some receiver(user) information and sends them back to the host -> via rabbitmq -> host sends the event back to the browser (dependents if it's the right receiver) -> via socket.io.... I can't say more...

aadamsx commented 10 years ago

Thanks. Could I use the NodeJS library zmq or one of the many Promise libraries take the place of RabbitMQ on the server side? In other words, do I need RabbitMQ to send my events to the event store? What does RabbitMQ buy me over zmq or promises?

aadamsx commented 10 years ago

I don't get it, where does one go for help in this area (NodeJS+CQRS, ES, Commands/Events, Sockets, Queues, Projections, etc.)? If no can talk about this stuff, how can the community grow around these tools and techniques, why does it have to be so hard for a guy to get started?

How can I compensate you or others for your time on this? I have a small start-up (just me) and I would like very much to use this tech, but it's taking a while to sift through the internet for valuable nuggets.

What options do I have?

adrai commented 10 years ago

I can say you what others suggested me: make you own experience but it will be very hard... At the end... every system has its own problems to solve and as an engineer you can try to use some approaches where they fit (like cqrs)... CQRS is for complex systems and does not fit for everything...

PS. My experience said to use RabbitMQ, mongodb and redis... (not only) for scalability reasons... dor my projects so far... but always use the right tool for the right stuff...