Implementing Reactive Client-Server Communication over TCP or Websockets with RSocket and Java

Reactive design or reactive architecture has an impact on how modern software systems are implemented. RSocket is a project that aims to adapt the benefits of the patterns described in the Reactive Manifesto and resulting tools like Reactive Streams or Reactive Extensions to a formal new communication protocol. RSocket works with TCP, WebSockets and Aeron transport layers and offers additional features like session resumption. In the following tutorial I’m going to demonstrate how to implement simple client-server communication over TCP and Websockets for different interaction models like request-response, request-stream, fire-and-forget and event subscription. ...

November 25, 2018 · 8 min · 1558 words · Micha Kops

Snippet: Java Mission Control (JMC) and Flight Recorder (JFR)

The Java Mission Control and the Java Flight Recorder allow us to capture run-time information from our Java applications without much overhead and aggregate profiling information. I have written down the commands that I’m using the most when profiling a Java application with this tool chain in the following article. Figure 1. Java Mission Control - Report Running Java Mission Control (JMC) We may start the JMC user interface shown above using the jmc command that is shipped with Oracle’s JRockit or Java (since Java 7 update 40). ...

October 11, 2017 · 4 min · 748 words · Micha Kops

Testing Asynchronous Applications with Java and Awaitility

Writing tests for asynchronous applications has never been much fun as we’re always struggling with the problem how to determine state changes, handle process terminations, dealing with timeouts or failures and stuff like this. Awaitility eases this process for us offering a nice DSL, rich support for languages like Scala or Groovy and an easy-to-use syntax that’s even more fun when using it with Java 8′s lambda expressions. In the following short introduction I’d like to demonstrate writing some tests different scenarios. ...

August 23, 2015 · 6 min · 1143 words · Micha Kops