Skip to content
mattiasholmqvist edited this page Oct 14, 2014 · 4 revisions

Contexts as modules

Each context (order, shopping and product catalog) is implemented as a Dropwizard service. These services are integrated using HTTP calls.

The Order context is implemented with CQRS/Event sourcing. The Product Catalog Context and the Shopping Context are implemented as simple REST (CRUD) services.

Order context

The Order context is the only context that is implemented using CQRS/Event Sourcing. Below is a summary of the sub-modules in this context.

Command

This is where the most interesting (and also complicated) part of the application resides. This is the home of the Domain model.

CQRS-lib

The application and command module share some interfaces and base classes for the plumbing and infrastructure used in the event store implementation. We also keep some helper classes and interfaces for building blocks from Domain-Driven Design such as Repository, Domain Event etc.

Query

This module contains all the denormalizers and aggregators. It exposes data through the QueryService.

Eventbus-contract

Currently the command- and query modules share some Java classes that are representations of Domain Events and related Value Objects. This is mainly a simplification and code-reduction technique used in this example and in a bigger system with many teams sharing this kind of code may or may not be suitable.

Clone this wiki locally