Devoxx France is a yearly conference in Paris, France. Three colleagues of Ordina JWorks: Yannick De Turck, Tim Ysewyn and Tom Van den Bulck attended the conference in April 2019, where all of them were welcomed as speaker. In this blog post we share our impressions and experiences.

Table of contents

The Speakers dinner

The evening of the workshop day, we had the speakers dinner where we were provided with lots yummy snacks to feast upon while enjoying a nice glass wine. It was a great opportunity to both network with the other speakers and connect with other experienced developers, gaining extra valuable insights.

Being a speaker and meeting other speakers also gives you a nice icebreaker: “What talk are you giving?”. Very handy to get the conversation going.

That is the power of a conference. To speak with other attendees and speakers, gaining valuable knowledge. Most of that knowledge is not presented in the talks but will only bubble up if you speak face to face.

Speaker dinner

Applying (D)DDD and CQ(R)S to Cloud Architectures with Java, Spring Boot, Kafka and Docker by Benjamin Nothdurft

Benjamin Nothdurft Benjamin started off by giving a brief introduction on Domain-Driven Design explaining the different building blocks such as domains, domain events, ubiquitous language and Event Storming.
He also mentioned the famous two books: Domain-Driven Design by Eric Evans and Implementing Domain-Driven Design by Vaugn Vernon.

Benjamin went through all the different steps of Event Storming. The goal is to bring people of different silos together, such as developers, analysts, architects and business experts. Together you want to create a logically ordered sequence of events to document a system using an ubiquitous language i.e. everybody using the same vocabulary and terms. Events describe things that have happened and are thus always in the past tense e.g. product added to cart. In a next step you want to identify commands, which are the triggers of events e.g. add product to cart. There are also aggregates which represent the data that is interacted with. And finally you want to identify the bounded contexts grouping relevant parts together.

Benjamin then explained how this all gets translated to your system architecture. Each bounded context can be mapped to a single microservice. He covered different context map patterns such as event publisher, shared kernel, customer/supplier and anti-corruption layer together with detailed code samples. Afterwards he went through a CQRS example with many code samples and the questions you should be asking yourself when determining the right architecture. We really liked how in-depth everything was as many presentations about Domain-Driven Design usually remain rather abstract and high-level.

You can check out Benjamin’s slides on slides.com.


Modern Java: Change is the Only Constant by Mark Reinhold

Mark Reinhold Mark described how they took the massive monolithic platform, the JDK, and transformed it in three ways:

  • First, they sliced it up into 26 modules
  • Second, they removed the Java EE and CORBA modules, together with some other APIs resulting in 19 modules
  • And third, the grand majestic release model where a new version was shipped every 2, 3 or 5 years was left behind in favour of one where there is a release every 6 months

Just packaging the modules you need, will make the footprint of your application smaller. The stronger encapsulation also makes Java more secure. A couple of the Zero Day exploits could have been avoided with stronger encapsulation. Three out of six since JDK7.

Modules allow you to restrict access to internal packages, making it no longer compile and possibly generating warnings at runtime. Run the following command line: $ jdeps --jdk-internals app.jar to check if internal APIs are used.

In theory, if your code only uses standard Java SE APIs then it will most likely work without changes. For more info, see: JEP 291.

Lots of methods and APIs have been (and will be) removed but there are four reasons not to worry about it:

  • There is an advanced notice before removing anything (@Deprecated)
  • Make the choice yourself between LTS or feature releases
  • Java is still free
  • Some things might break but it shouldn’t take much work to fix them

At first there was the fear that with the six month release cadence there would be some releases which would only contains bugfixes. But it has shown that all releases provided new features, see the JEPs for more info.

  • JDK 9: 90 JEPs, 6 JEPs came from outside Oracle
  • JDK 10: 12 JEPs, 2 JEPs from other contributors (304, 316)
  • JDK 11: 17 JEPs, 3 JEPs from others (315, 318, 331), with 2458 issues resolved (1963 solved by Oracle, 169 by SAP and others), this is the latest LTS edition (next one will be JDK 17)
  • JDK 12: 8 JEPs, 1 JEPs from another contributor (189)

Every one of these releases is PRD ready, with the only difference being support time.

Java is still free.

Modern Java

Finally, please let me assure you of one thing: whether by Oracle or Red Hat or someone else, JDK LTS releases will continue to be supported We all have a lot invested in Java, and we won’t let it fall - Andrew Haley.

Source: http://mail.openjdk.java.net/pipermail/jdk-dev/2018-August/001826.html.

Oracle JDK vs OpenJDK: Choose between LTS version and big upgrade migrations or latest release with small migrations every 6 months. Feature release: Make sure your tools and dependencies can keep up!

Library maintainers were asked on Twitter if their libraries worked fine on JDK9 and the same question was asked when JDK 11 got released. The result showed that a lot of libraries were already upgraded and functional for JDK 11.

If you’re using Java 9 or later, you should upgrade to the latest version of your tools and other dependencies as some libraries might have one thing or another broken.

Everything changes and nothing stands still - Heraclitus.

The most important goals when working on a new version are:

  • Developer productivity, not for one-off scripts but when building and maintaining large reliable programs
  • Program performance including and not limited to: startup time, memory consumption, …

He also touched upon some of the major active projects of the Open JDK community.

Amber which is about right-sizing languages ceremony, reducing boilerplate.

  • Better and improved type inference with a smarter compiler
  • Less keyboard typing for you
  • Fix error prone things such as switch case on enums with pattern matching where the compiler detects whether a default is actually needed or not
  • Multi-line strings (Java 13 JEP although still to be decided)
  • Value classes for data containers: record Point(double x, double y)

Loom brings fibers to the Java platform.

  • Similar to threads but slightly different
    • Fibers are simpler than threads
    • Fibers work well with CompletableFutures
  • Marc gave a small demo on the performance

Valhalla: Value types & specialized generics

  • Unfortunately, Mark ran a bit out of time so he wasn’t able to cover this topic


Meet Micronaut: a reactive microservices framework for the JVM by Álvaro Sánchez-Mariscal

Álvaro Sánchez-Mariscal

The reality of existing frameworks: Frameworks based on reflection and annotations tend to become fat. But we love the programming model and productivity model so we live with it. So, why should we be more efficient?

Spring is an amazing technical achievement but many things are done at runtime:

  • Reading the byte code of every bean it finds
  • Synthesizing new annotations on each bean method, constructor,… to support annotation metadata. This leads to high startup time and memory consumption.

Jakarta EE also does this.

Micronaut is a new framework created by the creators of Grails for which the goal is to have the productivity of either Spring Boot or Grails with the performance of a compile-time, non-blocking framework. It is designed from the ground up with microservices and cloud in mind. Ultra lightweight and reactive, based on Metty instead of Tomcat, its internals are reactive.

Provided with:

  • Integrated AOP and compile-time DI for Java, Groovy and Kotlin
  • Annotation processors for Java and Jotlin
  • AST transformations for Groovy

Micronaut is fully open source and you can find the source code on GitHub. It was actually announced one year ago, in May 2018 after two years of development behind the scenes.

It can be used to build:

  • Microservices
  • Serverless applications
  • Message-driven applications with Kafka/RabbitMQ
  • CLI applications
  • Android applications
  • Simple static void main(String.. args) applications

Micronaut can be even faster with GraalVM, but this still is experimental.

Next, Alvaro showed use a coding demo: A Micronaut project with Consul for service discovery. To give you an example about the performance, the demo greeting application with automated tests took 52ms to start with Consul registration. A second application was created for the gateway. Micronaut has reactive types such as Single, which is non-blocking and similar to a Future. Alvaro wrote a non-blocking API in the gateway which merges two calls to the greeting application.

He ended with a demo of an application on Google Cloud Run (serverless based on containers). Google Cloud run was considered to be much easier for you as a developer than AWS Lamba according to Alvaro.

The material of the 3 hour long workshop can be found on GitHub.


Full-Text Search Tips & Tricks by Denis Rosa

Denis Rosa Denis Rosa is a developer advocate at Couchbase.

The scenario where you have multiple nodes and many clients who want to do full-text search is still pretty hard to do with the JVM. Which is one of the reasons why it was decided to start with Bleve: a framework for full-text search and indexing written in Go.

It is important to realize that searching is not only about matching text as it can also be more sales-oriented.

For example:

  • Netflix wants to convince you to watch a movie.
  • Google want to answer your questions.

When building out a search functionality it is important to know how your users are searching. Do they use one word, two words, three words, … User queries should be saved, don’t forget to do so. So that you can learn more about your users and improve your search model.

Some quick core concepts:

  • TD/IDF: aka “Term Frequency–Inverse Document Frequency”, having rare words score higher
  • Edit distance: minimum number of operations required to transform one string into another: for example, star -> start
  • Pivoted length norm: matches in small texts will rank higher than in long ones

Denis showed an example with Bleve underneath.

He made an application called Couchflix allowing you to specify text to search on movies. He showed how “good” his initial search was, when searching on star war vs star wars the first one just showed some zombie movies but nothing about star wars.

During the live coding session several search implementations were made to see the difference: match on title alone, match on title and description, …

Even after some modifications we still had the situation that when searching on star war, both star and war were matched separately.

Something useful for that is a Shingle. A shingle will break your search term in a combination of two, three, four words, … For example: Star wars daisy Ridley gets split out in the following search terms:

  • Star Wars
  • Wars Daisy
  • Daisy Ridley

Instead of shingles you can also use Stemming to avoid conjugations. For example, the search terms Fishing, fished and fisher would all be transformed to fish.

Another thing is Boosting which allows you to boost up the ranking factors of your search results. Most people tend to first focus on these when searches do not return the results they want but you first need to make sure that everything has been indexed properly. Only after does it make sense that you start thinking about boosting.

We also have Decay Functions which allow you to decay your research results.
For example: leave out older movies that are less relevant.

Things also get more complicated when we want to search on an actor name compared to the movie name for which we now have done all those optimizations. Searches are always biased, so the one we had for titles is less ideal for searching on actors and vice versa.

Some other recommendations:

  • For tests, the Cranfield Evaluation Method is a good strategy to implement tests: for every change you do in your model you need to verify if your query still returns a good result. It is more complicated than the average JUnit test though.
  • Use Precision and Recall as a metric.
  • There is a very nice Coursera course available: Text Retrieval and Search Engines, which is really worth checking out.
  • Be careful with features that are directly influenced by users to avoid being tricked!

The Source demo can be found on GitHub.


MockK, the idiomatic mocking framework for Kotlin by Yannick De Turck

Yannick De Turck

Our colleague, Yannick, gave a talk about MockK. MockK is a mocking framework specifically made for Kotlin. As a Java developer, he is a huge fan of Mockito for using mocks in his unit tests. When he picked up Kotlin, Mockito was also his first choice to try out.

He explained however that using Mockito in a Kotlin project doesn’t go all that well due to how Mockito creates its mocks, which is by overriding classes and functions. And because Kotlin’s classes and functions are final by default, you can see that this poses some challenges. Yannick shared his experiences and mentioned that even though there is an incubating, opt-in feature to allow Mockito to mock final classes and functions, the user experience isn’t all that nice.

He looked for other frameworks and stumbled upon MockK, a mocking framework created for Kotlin by Oleksiy Pylypenko. MockK’s main philosophy is offering first-class support for Kotlin features and being able to write idiomatic Kotlin code when using it. He was pretty enthusiastic about MockK and went over all its features and its ease of use.

On our tech blog there is also a blog post written by Yannick specifically about his experiences with Mockito and MockK in Kotlin projects.



Real Quantum Computing by James Birnie

James Birnie Using many worlds to solve the unsolvable.

Why quantum computing? James didn’t knew anything about it until he followed a talk of Alasdair Collinson at Voxxed Days Vienna at which point he still found it hard to comprehend. So he decided to make a talk of his exploration of quantum computing in such a way that it would become easier to comprehend for the uninitiated.

The last version of the Thoughtworks tech radar has Q# in Assess on the recommendation of James.

To understand, first go back to the classical bit: A bit is a unit of binary information, which can hold two states: 0 or 1. This is stored as one of two voltages, logic gates compose this into arithmetic.

In quantum computing we have the qubit. This also has a value of either 0 or 1. However, observing the value “collapses” the state to a single value. Any quantum thing can be a qubit, such as an electron, a photon or an ion.

The quantum state is somewhat represented by the bloch sphere, a complex values probability amplitude. Probabilities of measuring the different values are derived from the quantum state. This maps to a point on the bloch sphere for a single qubit in a pure state. Quantum logic gates are similar to classical logic gates.

IBM Q allows you to make a free account to play with quantum computers. Make circuits by drag and dropping gates and operations.

Next, James demonstrated the Schrodingers cat thought experiment. When executed on a real quantum computer there were a lot of error states, showing that quantum computers are not yet production ready. In a simulation the result was balanced in the 00000 and 01111 state.

There are problems that classical computing cannot solve but quantum computers can and this is what makes them interesting. Quantum computers cannot meaningfully persist state though. Hardware is not ready yet for quantum computers and they are hard to program.

James did an experiment on his own cat and the different states of a cat, culminating in a quantum program on the behaviour of cats. The C# program CatMoodExperiment with multiple outcomes: x people feeding the cat. Four qubits representing four persons, that may feed the cat. Another test represents how the cat is feeling. The program is available on his GitHub for you to try out.

What do we need to build a commercial quantum solution?

  • Algorithms and applications (will happen)
  • Integration with cloud provider (will happen)
  • Error correction (hard!)
  • Quantum classic interface (hard!)
  • Cryogenic systems (expensive!!)
  • Scalable qubit foundations (hard!)

Two well-known quantum algorithms to look into are:

The most interesting application for James is quantum chemistry because it should allow us to fully understand complex molecules like iron molybdenum, which exists within beans which fix atmospheric nitrogen. While we humans need 5% of the natural gas supply to make fertilizer with the Haber Bosch process, beans do that with no energy. So if we understand that iron molybdenum complexity, we can potentially do away with this massive energy inefficient process.

Then you also have Shor’s algorithm to factorise n, which should make it possible to break RSA encryption. Although this won’t happen for now as quantum computers are still not stable enough.

All in all a very interesting talk to give you a heads-up on the current state of affairs around quantum computing, but it also makes it quite clear that we still need to go a long way in order to have practical, production-ready, quantum computing.


Agile is a Dirty Word by James Birnie

James Birnie In this talk, James explores in which organizations agile became a dirty word. Often it starts with companies who are doing real agile. You can compare the organizations with real democratic countries like the Democratic Republic of Congo and Democratic People’s Republic of Korea.

Doing agile does not make you agile, you don’t do agile, you have to be it. Often it is like a cargo cult, just doing the rituals of scrum but loosing the goal and the context out of sight.

Combine this with risk management theater, also known as lots of processes and checkboxes to tick off in order to avoid risk taking making it easy for agile to become a dirty word.

SAFE is the perfect example of agile gone wrong, too much convention and control.

Agile also tends to collide with the current issues with budgeting, which tend to emphasize on short-term goals preventing organizations from doing some real investments.

A good paper to read is: How to detect agile bullshit from the US Department of Defence.

In order to bring the organization back to track, avoid dirty words which have become contaminated by bad experiences. Read the agile manifesto and talk about the values and principles mentioned.

Note, waste is not always obvious. Like code reviews which are often seen als helpful and agile, but too often are just waste.

Only work on your biggest problem and only when that has been tackled move over to the next.

The goal of agile should be to get autonomous cross functional teams who can deliver themselves and are decoupled as much as possible from the rest of the organization. Also, there does not exist failure within agile, it is better to call it experimenting.


Conclusion

Devoxx FR was an amazing experience for us where we got to see some of our friends again and meet and befriend others.

Sharing your experiences should always be the main goal when you attend a conference. It is true that as a speaker, it does is easier to share your experiences and to get in contact with other people. But as an attendee you should never hesitate to go up to a speaker or another attendee and ask a question, to come in contact. Most people happily and willingly share their knowledge.

Give it a try. Next time you are at a conference, ask that question that came up in your mind or join an interesting conversation instead of just listening and who knows what interesting discussions will unfold.

The date for next year’s edition has already been announced and will happen on 15th until the 17th of April 2020. Be sure to mark it in your agenda so you can enjoy the great atmosphere!


Moulin Rouge

Tom is a Senior Developer at Ordina Belgium, passionate about all software related to data. As competence leader Big & Fast Data he guides his fellow developers through dark data swamps by giving workshops and presentations. Tom is passionate about learning new technologies and frameworks.

Yannick is a senior Java consultant and practice manager at Ordina Belgium. He’s passionate about everything Java and Spring related as well as reactive programming, Kotlin, Lightbend technologies, software architectures, and coaching and enabling other colleagues.