Realtime web application using CQRS and websockets

I’ve started to put together a sample application having an architecture looking like this:

There’s an ASP.Net MVC application that only serves GET requests. Each rendered view then communicates to a web socket server using web sockets. The client issues commands and listens/reacts to business events triggered by the domain executed at the application server. The commands reaches the application server using a service bus (MassTransit). The events generated by the aggregate roots in the domain are alos put on the bus and thereby will be delivered back to the web socket server which notifies the correct sender. All events are stored in an event store. The events are also denormalized to customer read models (using SisoDb), which could be seen as a data model that is designed to target a specific scenario, with e.g precalculated aggregated values etc. The read models are written to one data base which then is replicated to one serving reads in the web application and one serving reads in the web socket server.

I’ll keep writing about this and when time comes, it will be open sourced at GitHub.

//Daniel

About these ads

2 thoughts on “Realtime web application using CQRS and websockets

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s