Notes on DDD Europe conference I – 2018 edition
Tags: softwarearchitectur, ddd, domaindrivendesign
Published: 2018-02-22 11:00:22

---
title: "Notes on DDD Europe conference I – 2018 edition"
published: true
tags: Software architectur,DDD,DOMAIN DRIVEN DESIGN,Software Architectur
canonical_url: https://apiumhub.com/tech-blog-barcelona/ddd-europe-conference/
---

Just like last year, this February I have had the opportunity to attend a very important event in the world of Domain Driven Design –&nbsp; **DDD Europe conference 2018** , which took place in the city of Amsterdam.

I have to say that the level of both the speakers and the audience in the DDD Europe conference was very high, especially if we compare it with the level of meetups in Spain, organized for software developers and software architects.

However, they were some presentations that seemed very unproductive to me. These were, in my opinion, the ones that went too far away from the world of development and the technical world in general.

An example of what I have just described, from my perspective, was a speech: “ **from legacy chaos to the promised land of DDD** “. I expected to dive into strategic patterns to evolve a monolithic system towards a correct application of the logic of Domain Driven Design.  
Unfortunately, after the presentations of the two speakers, the session focused a lot on the history and experience of the team led by one of the speakers.  
I don’t want to say that the speaker was wrong, I believe in the importance of the culture of the team in a situation of an evolution of a critical system like the one carried by the speaker. But I also strongly believe that issues that each team has are unique, so it is extremely difficult (if not impossible) to find universal “recipes”, except the most obvious ones. So the presentation itself was useless for me.

I divided my notes into two articles. In each one, I listed down the presentations from the DDD Europe conference, which I found the most interesting.&nbsp;  
In the first article, I will talk about “The Systems of the Liskov Substitution Principle” and about the “Autonomy & Asynchrony: the key to designing reliable systems”.

## Most interesting presentations from the DDD Europe conference in 2018

**1** ) . **The systematic of the Liskov Substitution Principle**  
_By&nbsp;[Romeu Moura](https://www.linkedin.com/in/romeu/)_

The presentation was focused on the use of the word&nbsp;_sistemics_.

Let’s start by considering the purposes of the Object-Oriented paradigm:

– encapsulation  
– decoupling  
– coherence (a type of SRP?)  
– cohesion

The audience asked an intelligent question about the reason to leave out concepts like inheritance ( talking about the list mentioned above ). The answer of Romeu was the following: this is the only way to meet the goals. He compared it to the relationship between&nbsp;**law (way) and ethical society (goal ).&nbsp;**

Let’s continue with the interpretation of the semantics of the Liskov principle: it is a&nbsp; **system** &nbsp;that has to be allowed to replace some of its parts,&nbsp; **thus changing its behavior** , but&nbsp; **without breaking its operation**.

Also, he shared several significant and interesting examples, beginning with mathematical operations (a division between integers&nbsp; **is not isomorphic** &nbsp;to a sum of them since it is not a mathematical closure), and ending with the classic examples of&nbsp;[covariance and contravariance](https://dev.to/apium_hub/scala-generics-ii-covariance-and-contravariance-in-generics-5dib)&nbsp;with lists of animals, which we also have&nbsp;[in our blog](https://apiumhub.com/tech-blog-barcelona/).

Highlight:

- The relationship between Liskov and the principle of&nbsp; **Interface Segregation** :  

  - A large interface is more subjective to possible ruptures of the pre and post conditions established by the Liskov principle
  - If the interface suggests a rupture of the principle of&nbsp; **temporal cohesion** , each implementer is&nbsp; **bound to contravene Liskov**
- The examples are all developed in Java using the Type-Driven Development&nbsp;methodology, defining the contract types of each method prior to its implementation, to guide it.&nbsp;  
We fully support the use of this methodology.

In my opinion, the most valuable part of the presentation was about the use of the word&nbsp; **systemics**.  
Advising the book “Thinking in systems”, by Donella, Romeu introduced the elements of&nbsp; **systems theory** &nbsp;to try come up with the&nbsp; **system definition**.

What we know about a system:

- is more than a simple sum of the parts that compose it (holistic principle)
- it must allow the evolution of its behavior by replacing one or more of its parts, without breaking its functioning

What I found very valuable and very profound is the consideration that what we discussed above can be&nbsp; **negative** &nbsp;as well: a bad system can’t be improved by simply replacing its parts.

So, here goes the key phrase, that I personally love:

_ **“If you remake awful software from scratch without changing the culture that created it: you’ll remake awful software.”** _

Small comment: we fully support the exposed phrase.

Who knows&nbsp;[Apiumhub](/), knows that we are very skeptical of just rewriting software from scratch,&nbsp;  
because when we work on&nbsp;[software projects](/software-projects-barcelona/), we are oriented towards gradual changes in the culture of software. And it is not only about our internal team, we do it with our clients, partners, and other collaborators.

And let me give you the final example, taken by Romeu, which was related to history: the French Revolution ended up abolishing the monarchy, passing through despotism, despite having removed the King, the symptom stayed the same.

**2** ).&nbsp; **Autonomy & Asynchrony: the key to design reliable systems**  
_by&nbsp;[Indu Alagarsamy](https://www.linkedin.com/in/indualagarsamy/)_

This presentation was given by a Particular Software worker.  
For those who do not know Particular Software, it is the company behind NServiceBus, an excellent service bus for .NET technology.The company was founded by Udi Dahan.  
For this reason, the expectations were very high, since for those who write code there is no better architectural culture today than the one proposed by Udi Dahan.

The speaker gave a structured explanation of the patterns to achieve reliable systems, without having the prohibitive costs of using&nbsp; **distributed transactions** :

- **Asynchrony**
  - At the very beginning, we refer to detailing the anti-pattern “ **the knot** “.  
Using the slogan “remove temporary coupling”, the concept focuses on the way that each time a component depends synchronously on other components, an important brake is placed on (among others):  

    - scalability and quality of service leveraging (to scale 1 component I have to scale all of them)
    - reliability (reaction to chain of failures)
    - efficiency (whole system slowdowns due to 1 component overload)
    - decoupling and&nbsp; **functional scalability** &nbsp;(changing a component or adding a new one affects all the components)
    - traceability (difficult to understand the reason for failure)
- **EDA / Coreography**
  - using an architectural style based on Pub / Sub events allows complete decoupling between components, and enables functional scalability.
- **Message synchronization**
  - In an asynchronous system, the correct order of the messages can not be assured.  
The proposed pattern is the&nbsp; **saga pattern**. There are two forms:
    - orchestration
    - choreography  
  
We indicate two alternative or complementary solutions to saga to solve the problem of synchronization:
    - choreography
    - **message sequence number** , sent by the message producer, and controlled by the consumer
- **Dead letter queue**
  - In the case of a failure, the queue systems have to deal with the retry logic.  
To avoid the problem of&nbsp; **poison messages** , at a certain number of retries, the message is placed in a&nbsp; **dead letter queue** , monitored continuously, for root cause analysis.
- **The duplicity of messages (idempotence, idempotence, idempotence!)**
  - Just like with the order, asynchronous systems cannot ensure the uniqueness of the message. The system has to provide, in all its parts,&nbsp; **idempotence** &nbsp;of processing.  
There are two cases:
    - when the business logic allows idempotence using upserts. For example, a logic of updates.
    - when logic does not allow it, as in the case of&nbsp; **CreateOrder**. In these cases the producer has to assign a unique&nbsp; **messageId** , and the consumer does not have to process messages already processed.  
  
This pattern has the name of **&nbsp;idempotent consumer**.
- **Message traceability (“where is my message?”)**
  - To be always aware of where the message is, or where a processing has failed, it is necessary to accumulate all the services that have processed it&nbsp; **in the headers** &nbsp;of the message, starting from the very first message.
- **Deployments**
  - Actually, before starting with asynchronous systems, it is necessary to start automatic, traceable and reliable deployments systems. It is an essential precondition for everything.
- **Side by side**
  - Asynchronous systems, event-driven, supported by messaging bus, have the ability to deploy new versions of components next to the previous ones, with the purpose of testing in production, without&nbsp; **interrupting the service**.  
To be able to do this, we must to respect the existing compatibility, be it with the tolerant&nbsp; **reader pattern** , or by use of schema versioning.
- **Resilience**
  - Finally, it is recommended to use (in test environment) the&nbsp; **chaos monkey pattern** : randomly restart components and services to&nbsp; **measure** &nbsp;how this affects the operation (and performance) of the system. It is also known as a&nbsp; **resilience test** , and there are corporations that do it systematically also in the production environments (Netflix).

These are the most critical points that I highlighted from the&nbsp;presentations of DDD Europe conference. Now I would like to read your opinion about them before sharing my next article with other presentations that deserved to be discussed.

_And if you want to receive the second part of DDD Europe conference with other interesting presentations and notes, subscribe to our&nbsp;[monthly newsletter](http://eepurl.com/cC96MY)._

## If you found this article about&nbsp;DDD Europe conference interesting, you might like…

[Scala generics I: Scala type bounds](https://dev.to/apium_hub/scala-generics-i--scala-type-bounds-38)

[BDD: user interface testing](https://apiumhub.com/tech-blog-barcelona/user-interface-testing/)

[F-bound over a generic type in Scala](https://apiumhub.com/tech-blog-barcelona/f-bound-scala-generics/)

[Microservices vs Monolithic architecture](https://apiumhub.com/tech-blog-barcelona/microservices-vs-monolithic-architecture/)

[“Almost-infinit” scalability](https://apiumhub.com/tech-blog-barcelona/almost-infinite-scalability/)

The post [Notes on DDD Europe conference I – 2018 edition](https://apiumhub.com/tech-blog-barcelona/ddd-europe-conference/) appeared first on [Apiumhub](https://apiumhub.com).