I’ve become a huge fan of CQRS-based codebases due to the fact that such codebases tend to scale really well and are more readable due to the clear boundaries and responsabilities of the components.
When you have a system that’s quite heavy on concurrency (a lot of concurrent system consumers), CQRS will only get you so far. A lot of times such issues can only be solved by either throwing more hardware at the problem or rethinking the way your application handles data. I’ll try to explain to you how you can use an event-based architecture to handle concurrent loads. Mind you, this is a very basic and naive implementation, but it should handle the most common concepts. The code is done in Groovy and Spring 3. It uses Guava’s EventBus to simulate a message bus, one for commands and one for events.