Modules
The following diagram depicts the OpenCQRS framework modules, their categorization and interdependencies:
flowchart TD
subgraph Core
esdb_client["esdb-client"]
framework["framework"]
end
subgraph Test Support
framework_test["framework-test"]
end
subgraph Spring Boot Support
esdb_client_autoconfigure["esdb-client-spring-boot-autoconfigure"]
esdb_client_starter["esdb-client-spring-boot-starter"]
framework_autoconfigure["framework-spring-boot-autoconfigure"]
framework_starter["framework-spring-boot-starter"]
end
framework_test --> framework --> esdb_client
framework_starter --> esdb_client_starter --> esdb_client_autoconfigure --> esdb_client
framework_starter --> framework_autoconfigure --> framework
Core
OpenCQRS is made up of two core modules:
- The
esdb-clientmodule provides an SDK to communicate with the EventSourcingDB, hiding the REST API details from the user. Its main focus is on publishing, reading, and observing events. - The
frameworkmodule builds on top of theesdb-clientand provides extension points to implement OpenCQRS applications using the EventSourcingDB as event store. Its main focus is on enabling application-specific command and event handling.
Third-party dependencies
Both core modules are solely dependent on the JDK, so no further dependencies are required to use them.
However, for serialization to and from JSON both contain default marshaller implementations using Jackson.
It is therefore suggested to either include this library or to implement custom marshallers, by extending the appropriate
interfaces (Marshaller and EventDataMarshaller),
respectively.
Spring Boot Support
Additional Spring Boot modules are offered to simplify the configuration of the core components:
esdb-client-spring-boot-autoconfigureprovides the Spring Boot auto-configurations for theesdb-client.esdb-client-spring-boot-starteris the Spring Boot starter module for theesdb-client. Its main focus is on providing a preconfigured client for the EventSourcingDB.framework-spring-boot-autoconfigureprovides Spring Boot auto-configurations for theframework.framework-spring-boot-starteris the Spring Boot starter module for theframework. Its main focus is on providing preconfigured components for command and event handling.
Spring Module Separation
The separation of the modules esdb-client-spring-boot-autoconfigure and esdb-client-spring-boot-starter and the
modules framework-spring-boot-autoconfigure and framework-spring-boot-starter, respectively, follows best
practices for creating Spring Boot starters. For end users the starters should be used when building Spring Boot applications.
Test Support
framework-test provides test support for the framework. Its main purpose is to support the testing
of command and event handlers, e.g. within automated JUnit tests. The module can be used with or without Spring Boot,
depending on whether framework-spring-boot-starter is used or not.