Vaughn Vernon on Advanced Architecture Styles with DDD

by Jan Stenberg on Apr 18, 2013 |

Using the Hexagonal architecture style allows for delaying architectural mechanism decisions and promotes using the same internal API irrespective of type of client, Vaughn Vernon explained last week when talking about architecture styles from a Domain-Driven Design, DDD, perspective; the classical Layered Architecture and the more advanced Hexagonal and Actor Model styles.

Vaughn Vernon, author of Implementing Domain Driven Design, after a short talk about how architecture emerges as a result of proper domain modeling, started by analysing the classical standard layer architecture from Eric Evans' DDD book, with a user interface layer at the top and an infrastructure layer at the bottom. An undesirable effect of this layering is that the implementation of e.g. domain repositories in the infrastructure layer breaks the architecture since repositories depends on the domain model. Moving the infrastructure to the top and using the Dependency Inversion Principle to inject dependencies prevents breaking the architecture and also makes it more flexible by allowing for different implementations to be injected.

Hexagonal architecture style
Vaughn continued with the Hexagonal, or Ports and Adapters, architecture style created by Alistair Cockburn. Vaughn sees this style as an evolvement of the layered style with two main advantages. It allows for delaying decisions for certain architectural mechanisms, e.g. what kind of persistence to use without impeding the progress of building functionality. Main point though is that thinking in terms of ports and adapters make it easier to use the same internal API for different kinds of clients.
An Event-Driven Architecture can be derived from this style with each bounded context as a hexagon, publishing and subscribing to events.

Actor Model
In the actor model, each object is an actor with a mailbox and behaviour, with messages exchanged between actors through the mailboxes. All communication is performed asynchronously and without shared state between the actors. Vaughn finds this model most interesting and is now experimenting with applying the actor model in a DDD style by implementing aggregates as actors, inherently getting self-contained state, no shared state and asynchronous messaging, to greatly simplify the use of concurrency in highly scalable systems.

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

General Feedback
Marketing and all content copyright © 2006-2016 C4Media Inc. hosted at Contegix, the best ISP we've ever worked with.
Privacy policy

We notice you're using an ad blocker

We understand why you use ad blockers. However to keep InfoQ free we need your support. InfoQ will not provide your data to third parties without individual opt-in consent. We only work with advertisers relevant to our readers. Please consider whitelisting us.