Top Takeaways From Devoxx Belgium 2024
Gain insight from these takeaways, taken from several highlighted sessions presented during the most recent edition of Devoxx Belgium.
Join the DZone community and get the full member experience.
Join For FreeIn October 2024, I visited Devoxx Belgium and again it was an awesome event! I learned a lot and received quite some information which I do not want to withhold from you. In this blog, you can find my takeaways from Devoxx Belgium 2024!
Introduction
Devoxx Belgium is the largest Java conference in Europe. This year, it was already the 21st edition. As always, Devoxx is being held in the fantastic theatres of Kinepolis Antwerp. Each year, there is a rush on the tickets. Tickets are released in several batches, so if you did not have a ticket during the first batch, you will get another chance.
The first two days of Devoxx are Deep Dive days where you can enjoy more in-depth talks (about 2-3 hours) and hands-on workshops. Days three up and including five are the Conference Days where talks are being held in a time frame of about 50 minutes. You receive a lot of information!
This edition was a special one for me because I got the opportunity to speak at Devoxx myself, which has been an awesome experience!
Enough for the introduction: the next paragraphs contain my takeaways from Devoxx. This only scratches the surface of a topic, but it should be enough in order to make you curious to dive a bit deeper into the topic yourself.
Do check out the Devoxx YouTube channel. All of the sessions are recorded and can be viewed there. If you intend to view them all: there are over 200 of them…
Testing
Spring Boot Testing: Zero to Hero
by Daniel Garnier-Moiroux
Spring offers @SpringBootTest
, but there is much more to it. This session explains the ins and outs of Spring testing. Some takeaways:
@ExtendWith
allows you to write extensions for JUnit. I use it, but did not think about this before :-).SpringExtension
is thus the Spring extension for JUnit which is automatically added when you add@SpringBootTest
.- The HtmlUnit WebClient offers limited functionality in order to test web pages.
- Spring caches the web environment when it is identical between tests. Up to 32 web environments can be cached. This means that you need to be careful with creating too many different web environments. This might increase your test execution time. So be careful when you create a tests using
@ActiveProfiles
,@MockitoBean
,@DirtiesContext
, etc. When you use@DirtiesContext
, you should always raise a red flag and you should investigate whether you really need this. - It is better to use AssertJ instead of Hamcrest for asserting. This way, you get much better error responses.
- With the help of
@OutputCaptureExtension
, you are able to capture everything from standard output and then you can assert it. - From Spring Boot 3.4 on, you can use
MockMvcTester
instead ofMockMvc
. It is simpler and you can use AssertJ. - And last, but not least: do not always use
@SpringBootTest
, but use test slices. A nice overview can be found here.
The Joy of Testing
by Victor Rentea
Talks from Victor Rentea are always attended massively. This talk was during the Deep Dive days (fewer attendees), so I was able to attend it (only the first part; have to watch the second part online). However, it was an interesting talk, confirming some best practices I already apply, like using mutation testing, AssertJ, and so on. Definitely worth watching.
Testing Done Right: From Bugs to Brilliance
by Wouter Bauweraerts
The most interesting part of this talk to me was about the Testing Trophy. We all know the testing pyramid: many unit tests; on top of that, fewer integration tests; and on the top, end-to-end tests. There are many variations upon that, but this is basically the idea. However, with unit tests, a lot of mocks are used and mocks are often tightly coupled to the implementation. So, whenever you want to refactor, you also need to change a lot of unit tests. In order not to break functionality, you will rely on your integration tests. Your integration tests also cover a large part of the unit tests. So, why not invest more in integration tests and write unit tests for these situations which are hard to test with integration tests (error cases for example)?
Artificial Intelligence
From Naive to Advanced RAG: The Complete Guide
by Cédrick Lunven, Guillaume Laforge
After visiting Devoxx Belgium in 2023, I got more and more interested in AI because the door was opened for using AI within the Java ecosystem. An interesting topic within this regard is Retrieval Augmented Generation (RAG). I also call it "chat with documents." This Deep Dive session covers every part of RAG and explains which options you can choose from and which problems you might encounter. Some takeaways:
- You can choose between several chunking methods, like:
- Text splitting: The problem with text splitting is that you do not know where the text is split, and this way, important information can get lost in a chunk. This can be solved by using some overlap between the chunks.
- Sentence chunking: You chunk every sentence, but this way the LLM might not have the proper context.
- Parent/child chunking: You can apply sentence chunking, but often context is missing. Consider the following text:
Berlin is the capital and largest city of Germany, both by area and by population. Its more than 3.85 million inhabitants make it the European Union’s most populous city, as measured by population within city limits.
If you apply sentence chunking, it would be difficult for an LLM to determine that "3.85 million inhabitants" applies to Berlin. In that case, you can include the paragraph in the chunk in order that the LLM has more context. - Hypothetic questions: Use an LLM to generate possible questions about the documents and create chunks for the questions.
- Contextual retrieval: Use an LLM to create a contextual chunk that can be added.
- Semantic chunking: Group sentences and compare the similarity between these groups. The groups that contain the largest differences are the best ones to create a chunk from.
- When using RAG, you will use a vector database. However, there are many. A vector database comparison table can be found here. This will help you choose the right vector database.
- After retrieval of chunks, you can apply reranking. With reranking a relevance score is added to all the responses, allowing you to re-order them based on relevance.
- When you want to ask about the weather for today, an LLM will not be able to return the correct answer because it does not have this knowledge. In this case, you can apply function calling. When someone asks for the weather of today, first a query is made to a weather service and based on this answer, the LLM will be able to return the correct answer.
- Evaluation tools — how to evaluate your RAG pipeline: Some tools are available for this purpose. These are mainly Python-based tooling at the moment. Examples are DeepEval and promptfoo. Promptfoo also offers security testing.
- Did you know there is an OWASP Top 10 for Large Language Model Applications?
Spring AI: Seamlessly Integrating AI Into Your Enterprise Java Applications
by Christian Tzolov
Spring AI is the answer to LangChain4j within the Spring ecosystem. This talk shows how it can be applied. As far as I can see, LangChain4j offers more functionality at the moment. But it is interesting to see how this will evolve. It is good to have more options available within the ecosystem.
LLM-AggreFact is an interesting website where models are compared and evaluated.
From ML to LLM: On-Device AI in the Browser
by Nico Martin
Running an LLM in your browser… Seems like a weird idea, right? This talk shows you how. I could not yet get the projects working on my machine but do watch this talk.
Java-Based Inference Engines
Up till now, LLM inference engines were not available in Java. However, two new Java projects have been introduced: Jlama and Llama3.java. No Python included. Exciting times lay in front of us!
- Jlama: A Native Java LLM inference engine by Jake Luciani
- Practical LLM Inference in Modern Java by Alfonso² Peterssen, Alina Yurenko
DevoxxGenie: Your AI Assistant for IDEA
by Gunter Rotsaert
I do need to mention my own talk. I demonstrate how you can use an AI coding assistant using the DevoxxGenie plugin within the IntelliJ IDE. The interesting part is that you do not need to use a cloud provider. The assistant also works using a local LLM. I have also written a post about this topic.
Other
Endpoint Versioning Made Simple
by Bouke Nijhuis
This talk shows you which problems you encounter when you need to support multiple versions of an API endpoint. The speaker has written an open-source library for this purpose. I am wondering how this can be applied when you use an API-first approach; e.g., you first create your OpenAPI specification and use a code generator to generate some code for it. It's something to investigate later, so I might write a blog about this one.
Open Sourcing a Library: How Hard Can That Be?
by Johan Hutting
A few weeks ago, some posts appeared on X about this topic. This is an interesting talk if you are wondering what you need to do when open-sourcing a library.
I somewhere missed that a new portal has been released for Maven Central. Besides that, using Markdown Architectural Decision Records was also something I will dive into.
The Current State of Apache Maven 4: Development
by Karl Heinz Marbaise
Being a Maven user, I have great interest in what Maven 4 will bring to us. This talk shows what is awaiting us:
- The
pom
has two functions: abuild pom
(items related to building a project) and aconsumer pom
(description of the project and its dependencies). Both are currently combined into onepom
. With Maven 4, these will be split up. This will make it easier to introduce new functionality related to thebuild pom
without affecting theconsumer pom
. This is extremely important because a lot of tooling relies on the consumer part. - XML will remain the language to use for writing a
pom
, but other languages (e.g., YAML) will be possible in the future. At least they are working to allow alternative syntaxes. - The naming of the Maven targets will be made more consistent by using
before
andafter
prefixes. - The multimodule concept will be renamed to multiproject. Modules will be renamed to subprojects. This should remove the confusion with Java modules for example.
So, when will we be able to use this new functionality? This is yet uncertain. First, Maven 4 features need to be completed, then the code needs to be refactored, and after that, performance issues need to be solved. There is still quite some work to do. However, it is advised to check whether your projects build with Maven 4. If you encounter issues, you can raise a ticket for that.
Programming’s Greatest Mistakes
by Mark Rendle
If you want to have a good laugh, then watch this closing keynote.
Conclusion
Devoxx 2024 was great and I am glad I was able to attend the event. As you can read in this blog, I learned a lot and I need to take a closer look at many topics. At least I do not need to search for inspiration for future blogs!
Published at DZone with permission of Gunter Rotsaert, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments