How to easily run Kafka with Docker for Development

How to easily run Kafka with Docker for Development

Kafka is becoming a popular addition to microservice oriented architectures. Despite its popularity, it may be tricky to run it on your development machine- especially if you run Windows. In this short article, I will show you a simple way to run Kafka locally with Docker. In order to run Kafka, you need a Zookeeper instance and Kafka instance. You also need these two instances to be able to talk to each other. ...

May 20, 2018 · 2 min · Bartosz Jedrzejewski
The State of Spring in 2018 - Devoxx UK Impressions

The State of Spring in 2018 - Devoxx UK Impressions

Thanks to my company – Scott Logic – I recently had a pleasure of attending the Devoxx UK 2018 conference. Among many interesting talks and speakers, there were quite a few Spring celebrities present. Juergen Holler (Father of Spring), Josh Long and Mark Heckler were all there. Here are my impressions from the conference. Spring is hugely popular This is hardly news for anyone interested in microservices, but the popularity of Spring can’t be overstated. Every Spring talk was full and the audience was very engaged. Spring is very much the bread and butter of Server Side Java in 2018. ...

May 20, 2018 · 4 min · Bartosz Jedrzejewski
Effective Java Microservices require Effective Java

Effective Java Microservices require Effective Java

Writing good software requires using the right tools. Choosing the right frameworks, libraries and designing smart systems. With all that to learn and worry about, it is easy to forget about another very important thing: using your programming language wisely. In this article, I want to introduce you to *“Effective Java”*by Joshua Bloch. Effective Java– back to “basics” With the JVM ecosystem moving faster than ever, it is easy for us to forget that writing good software is more than using frameworks correctly. ...

May 9, 2018 · 4 min · Bartosz Jedrzejewski
Spring Data - Microservices Data Companion

Spring Data - Microservices Data Companion

Spring Data is one of the flagship projects of the Spring ecosystem. If you need to work with data- be it SQL, non-SQL, using map-reduce or other, Spring Data most likely has you covered. In this article, I will introduce the Spring Data project and explain how it makes writing microservices easier. Working with data is at the core of software development. This data can be in different forms: Relational / SQL Database NoSQL Database Graph Databases (like Neo4j) LDAP records Distributed cache technologies (Redis) Other technologies and variations of the above How great would it be to have a single technology that you could rely on when dealing with any of the above? Well, it is your lucky day- Spring Data can help you with all these and more! ...

May 5, 2018 · 6 min · Bartosz Jedrzejewski
Quick setup for Spring Cloud Data Flow with Docker Compose

Quick setup for Spring Cloud Data Flow with Docker Compose

Spring Cloud Data Flow requires quite a few dependencies in order to run it. In this blog post, I will show you Docker Compose tool and how it can be used to make that setup easy. I have written an introduction to Spring Cloud Data Flow where in order to run the Data Flow server, you need to have 3 other Docker containers running. This is not that bad, but imagine if you had to have more dependencies? Or if you want to have that process easily replicable? Sharing that setup with other developers on the team? You can see that it would be good to have a better way of doing this… ...

May 2, 2018 · 3 min · Bartosz Jedrzejewski
Spring’s WebFlux / Reactor Parallelism and Backpressure

Spring’s WebFlux / Reactor Parallelism and Backpressure

Spring Boot 2.0 (and Spring 5) introduced WebFlux as a way to build reactive Microservices. WebFlux is built using Reactor, which introduces completely new ideas to Spring Boot parallelism. Backpressure, Schedulers, and Parallel Flux are a few concepts that we will look at closer in order to understand how to make the most of our reactive services. I have recently written articles on Getting Started with WebFlux and Concurrency in Spring Boot. One thing that I did not explore enough in these articles were the concurrency implications of building a WebFlux based reactive microservice. ...

April 28, 2018 · 7 min · Bartosz Jedrzejewski
Java WebSockets made simple with Javalin

Java WebSockets made simple with Javalin

WebSockets is a technology that enables establishing an interactive connection between the front-end and the service. Being an advanced web technology, it may appear intimidating. In this blog post, I will show you how to easily build a WebSockets enabled service with Java and Javalin. A quick intro to WebSockets WebSockets are a relatively new (2011), but a well-supported communication protocol. At the time of writing every major browser supports them. ...

April 26, 2018 · 5 min · Bartosz Jedrzejewski
Microservices - the Architecture of Choices

Microservices - the Architecture of Choices

One thing that differentiates microservices architecture from more traditional, monolithic development styles is the number of choices that have to be made. Which frameworks (if any) are you going to use? How to deal with configuration, orchestration or choreography etc. It may feel overwhelming. In this article, I will give you some advice on how to approach this Architecture of Choices with confidence and success. I enjoy having multiple choices and making decisions about the architecture. For some people and projects, this is a scary thing. It does not have to be. With the advice presented here, you can take back control and feel positive about the choices that you get to make. ...

April 18, 2018 · 5 min · Bartosz Jedrzejewski
WebFlux and servicing client requests - how does it work?

WebFlux and servicing client requests - how does it work?

I have previously written about Getting Reactive with Spring Boot 2.0 and Reactor, where I have given an introduction to reactive programming in Spring Boot. In this article, I will further explore WebFlux and the ways it impacts servicing client requests- what happens when you return a Flux<>? Simple Flux When you write a Controller that returns a list of numbers from your function, you get a list of numbers when you call it. How does it work when you return a Flux like that?: ...

April 14, 2018 · 5 min · Bartosz Jedrzejewski
Introduction to Concurrency in Spring Boot

Introduction to Concurrency in Spring Boot

When building services with Spring Boot we have to deal with concurrency. There is this misconception that because of using Servlets and getting a new Thread allocated per request there is no need to think about concurrency. In this article, I will give some practical advice on dealing with multi-threading in Spring Boot and how to avoid problems it can create. Spring Boot Concurrency Basics The key areas worth considering when thinking about concurrency in Spring Boot applications are: ...

March 30, 2018 · 5 min · Bartosz Jedrzejewski