Tag: architecture

Developing microservices with #DDD aggregates (SpringOne platform, #s1p)

Last week at Spring One Platform, our founder Chris Richardson gave a talk on developing microservices with Domain-Driven Design aggregates.



Here are the slides:

Example code

Here is the code for the Orders and Customers example.

Learn more about Eventuate

To find out more about Eventuate:

Successful software development = organization + process + architecture #gluecon

Successful software development requires the right organizational structure, development processes, and software architecture.


Fred Brooks in his book the Mythical Man Month describes how the communication overhead for a team of size n is n(n – 1)/2. Consequently, a software development organization should either be a small team, or  a collection of small, autonomous teams. Amazon, for example,  famously organize around two pizza teams. Pizzas are an ambiguous unit of measurement but probably each team should be 6-10 people.

Despite rumors of the death of agile,  it almost always makes sense to use an agile development process.  Teams should do continuous delivery or, ideally, continuous deployment. Small, agile and autonomous teams can move fast (without breaking things) and keep up with the needs of the business. But what about the software architecture?

For small, simple applications the monolithic architecture often the best choice.  Development is simple, testing is easier and the application is easier to deploy and manage. However, successful application have a habit of growing and your monolithic application will become  large and complex. It will become extremely difficult to develop and deploy in an agile fashion. Teams are no longer autonomous. Delivering software will require lengthy merges and excessive amounts of communication and coordination. You will likely end up in monolithic hell.

Once your application becomes large you will need to adopt the microservices architecture. You functionally decompose what would otherwise be a monolith into a set of small applications or services. Each team owns one or more services. Each service has its own private data in order to ensure loose coupling. This architecture enables the teams to be agile and autonomous.

To learn more about microservices

Take a look at our founder, Chris Richardson’s recent talk at Gluecon on a microservices pattern language.

Learn more about Eventuate

To find out more about Eventuate:

Microservices – more than just infrastructure

Matt Miller of Sequoia recently published a map of the microservices ecosystem.


The ecosystem map is very focussed on infrastructure. It lists many of the usual suspects including Docker, Kafka, Cloud Foundry, Azure, and Chef. It includes some developer frameworks such as Hystrix but unfortunately, the focus on infrastructure means there are some surprising omissions.

Microservices need a chassis

James Watters from Pivotal, for instance, points out that Spring Boot and Spring Cloud are nowhere to be seen:

That is a shame because if you are building microservices you need a microservice chassis, such as Spring Cloud + Spring Boot. A microservice chassis is a framework that enables you to quickly create a new service. It handles cross-cutting concerns such as logging, service discovery, service registration, externalized configuration, etc.

Microservices and distributed data management problems

Also absent from the microservices ecosystem map are technologies that make it easier for application developers to write the business logic, the raison d’être for the microservices. This is unfortunate since microservice patterns such as Database per Service have a profound impact on how business logic is written. It is often impossible to use the familiar ACID transaction model and instead developers must use BASE transactions.

The goal of the Eventuate platform is to to help application developers address these issues.

It provides a simple yet powerful event-driven, programming model that, among other benefits, solves the distributed data management problems inherent in a microservice architecture. The platform consists of a scalable, distributed event store server and client libraries for various languages and frameworks including Java, Scala, and the Spring framework. Eventuate makes it easy for application developers to implement eventually consistent transactions that span multiple microservices.

Towards a more comprehensive map of the microservices ecosystem

Microservices are more than than just infrastructure. You need a microservices chassis so that you can quickly create new services. Many microservice-based applications will benefit from using a platform such as Eventuate to solve distributed data management problems. Hopefully, the microservices ecosystem map will be expanded to reflect this reality.

Learn more about Eventuate

To find out more about Eventuate: