Allard has been working on a new framework to make it easier to create a CQRS application. CQRS is short for Command Query Responsibility Segregation. An architecture that separates data sources for storing state and querying data. The query datasource should be easy to use when creating screens. The framework Allard created is the Axon Framework. This framework makes it a lot easier to use commands, events, event sourcing. If these terms are not known to you, I suggest you start reading the reference manual that comes with axon.
What does grails do in this picture. Isn’t grails about rapid application creation? Well, yes. It is a good platform to rapidly create web applications using the groovy language and still be able to use existing libraries. Personally I really like the Gorm library of grails. I think that gorm would be an excellent choice to wrap the query datasource. Of course the gsp technology and the groovy language are nice to have when working with the web applications as well.
In this blog post I’ll discuss the integration between grails and axon. How can we create an application with grails that makes use of Axon to implement CQRS. I’ll discuss the way to create commands and send these to axon. I’ll also discuss responding to events coming from axon. First I have to show some aspects of a grails project that you need to know before you can use Axon. I’ll try to take you with me when I take the steps to create a good integration between Axon and Grails.
Continue reading Use Grails and Axon to create a CQRS application (part I)