Spring Tips #2: Layered JARs with Spring Boot 2.3

Sample code referred in this article is available on GitHub. Using Docker containers for deployment of Java applications becomes more and more popular these days. To ship a new version of application you just build a Docker image with new version of JAR file and push it to the repository, so the deployment team can … Continue reading "Spring Tips #2: Layered JARs with Spring Boot 2.3"

Read More

Scaling down microservices

Microservice architecture became very popular in the last years. This approach has a lot of benefits, which are widely praised at conferences. Unfortunately, it is very common to forget about the problems and difficulties we may encounter. Those who know me a little, know that I have always been skeptical of this approach. In this … Continue reading "Scaling down microservices"

Read More

Introduction to automated provisioning and deployment with Ansible

In this post, I am going to introduce one of the tools which we use here at Tratif for automating software installations. Most of our projects written in Java require a lot of third party services to function (e.g. MySQL, RabbitMQ, Redis). This imposes a mandatory installation step to be performed before we deploy our … Continue reading "Introduction to automated provisioning and deployment with Ansible"

Read More

Storytelling with tests #1: test names and granularity

Very often you can hear that automated tests provide a great documentation of the production code. Such documentation is more fun to write and is always up to date (of course as long as you actually run your tests). A new developer may take a look on the tests to get familiar with the project. … Continue reading "Storytelling with tests #1: test names and granularity"

Read More

When more is less: mind the cacheability

There are many guidelines and patterns for optimizing performance of web applications. I would like to address and confront one of them: minimizing the number of database queries (or web service calls) per request. It sounds like a good heuristic – each network round-trip (e.g. to and from the DB) takes several milliseconds and impacts the overall response time. So having fewer queries is indeed the right approach for many cases. However, I would like to highlight some situations, when better way is to do the opposite.

Read More