Java Microservices with Spring

Java | Microservices | Spring Boot | Spring Cloud | Spring Integration | Google Cloud

Let’s make software development in Java enjoyable again with Microservices and Spring

Like the dinosaur, monolith had had its time too. Altought object-oriented programming was supposed to promote the component-based reusability and agile methodologies was supposed to facilitate fast development, that rarely works in practice. What happens (more often than not) within large, long-lived monoliths due to changing existing code constantly to keep the business doing, it that the business logic creeps into every layer, encapsulation looses its purpose and complex dependencies are being format between classes. That leads to three severe consequences.

icon1b

Slow development

With only one code base, development need to be carefully coordinated otherwise teams will block each other. Myriad of methodologies are out there to mitigate the bottleneck of having to work with a one code base, but in reality it does happen often that a single developer breaks the build and it then it breaks for everyone else.

icon2b

Increasing technical debt

Development always goes against the least resistance when a product needs to shipped on time in order to serve the business. What used to be well-designed and clean at the beginning, that becomes a mess quickly.

icon3b

All-or-nothing deployment

It doesn’t matter if only a single bug fix or an entire array of new features need to be shipped. That triggers a full deployment cycle. It either works or it has to be rolled back. But what about changes which cannot be rolled back than easily? Just think about database migrations.

Granted, the Microservices Architecture isn’t a silver bullet either and there are situations where going with a Monolith is better. Nevertheless, it’s worthwhile to weight the possible benefits against the possible challenges to solve.

Blog

Using Java Flight Recorder with OpenJDK 11

Java Flight Recorder (JFR) used to be a commercial add-on of the Oracle JDK. As it's been open sourced recently along with Java Mission Control, everyone using OpenJDK 11 can now troubleshoot their Java apps with this excellent tool for free of charge. JFR, being a proprietary solution formerly, might be lesser known for those relying on previous versions of OpenJDK. Therefore, [...]

Continue reading»

Consuming Twitter Streaming API with Spring Integration

1. Overview Spring Integration has been known to have a myriad of connectors for interacting with external systems. Twitter was no exception and for a long time, as Spring Social had been an out-of-the-box solution which Spring Integration leveraged in order to connect to social networks. 1.1 Spring Social EOL Unfortunately, Spring Social has reached its end of life, the pro [...]

Continue reading»

Installing OpenJDK 11 on Ubuntu 18.04 for real

OpenJDK 11 was released on the 25th of September, 1018. As this is the first LTS release after version 8, it's been awaited for long. After having it installed on Ubuntu 18.04 (Bionic Beaver), which comes with a package named openjdk-11-jdk, to my surprise that was still an earlier version (Java 10). [...]

Continue reading»

Bootiful GCP: Spring Cloud Stream with Google Cloud Pub/Sub

I've recently read Josh Long's Bootiful GCP series on Sprint Central's engineering blog and especially liked the 4th part about using Google Cloud's Pub/Sub. I felt inspired by the series and as I'm also evaluating Spring Cloud Stream for a new project of mine. I thought, I would expand on that article where Josh left off. This article describes how to use Spring Cloud Stream w [...]

Continue reading»

Are you frustrated with coding challenges?

Chances are that you’re not the first person who is frustrated by those interviewing processes used to screen Software Engineers nowadays. My experience is that being able to demonstrate open source contributions and/or a publicly available portfolio on GitHub helped me skip coding challenges and allowed me to have a more meaningful conversation about the job I applied for. [...]

Continue reading»

GDPR compliant forget-me app with Spring Integration (Part 3): Conditional configuration with Spring Boot 2

In the previous part I explained one of the messages flows in detail from the point of view of implementing in- and outbound messaging with Spring Integration's AMQP support. I briefly mentioned that data handler adapters are loaded dynamically and they're plugged into the message flow. In this third part, we’ll explore one of those technical challenges in detail that the ap [...]

Continue reading»

GDPR compliant forget-me app with Spring Integration (Part 2): In and outbound messaging

This second part focuses on how to use Java DSL for defining in- and outbound messaging with Spring Integration’s AMQP support. Java DSL is now (as of version 5) part of Spring Integration's core project and doesn’t have be included as a separate dependency. Altought sending and receiving messages to RabbitMQ doesn't necessarily appear to be complicated at a first glance [...]

Continue reading»

GDPR compliant forget-me app with Spring Integration (Part 1): Requirements

In preparation for the enforcement of GDPR which becomes final on the 25th of May 2018, I'm creating a simple, open source forget-me app for springuni.com in compliance with Art. 17 GDPR (‘right to be forgotten’). In the first phrase I'd like to support a simple forget-me process driven by the Scatter-Gather messaging pattern using Spring Integration and RabbitMQ, althoug [...]

Continue reading»

Spring Boot 2.0 New Features: Infrastructure Changes

In my previous post, Spring Boot 2.0 New Features: The 3 Most Important Changes You Must Know About, I pointed out the one of the notable changes coming with Spring Boot 2 will be infrastructure updates. This post enumerates these updates so that you can see their impact once before you would upgrade. [...]

Continue reading»

Spring Boot 2.0 New Features: The 3 Most Important Changes You Must Know About

As a Java Developer, you know that a lot had happened last fall: Java 9 got released, Spring 5 went GA, Spring Boot saw another four milestone releases. As a Software Engineer using Java for more then 12 years and a focus area on Spring Platform, I have found two presentations highlighting the most important aspects of the upcoming Spring Boot 2 release. [...]

Continue reading»

How to prevent OutOfMemoryError when you use @Async

Do you use @Async? You'd better watch out, because you might run into OutOfMemoryError: unable to create new native thread error just as I did. After reading this article you'll learn how to prevent it from happening. [...]

Continue reading»

This is how you can consume large SQS messages with JMS and Spring Boot

Spring Boot became ubiquitous in recent years and provided an opinionated way of integrating various pieces of technology. Working with JMS is no exception to that. Altought Amazon has got it own Java API for interacting with SQS, using it through JMS ensures that we'll be able to use the same piece of code with another messaging infrastructure. After taking a look at a basic [...]

Continue reading»

Don’t want to miss a thing?

If you like Java and Spring as much as I do, you might consider signing up for my newsletters.