Structured concurrency: will Java Loom beat Kotlin’s coroutines?

Kotlin and Java Loom: structured concurrency for the masses

Java, as slow adopter of new concepts is getting structured concurrency as part of the Loom project. This addition enables native support for coroutines (termed virtual threads) in Java. What does that mean for Java & Kotlin developers? Should we now all transform our existing code bases to support virtual threads? Or even jump back to Java?  We compare two approaches to do structured concurrency on the JVM: Java Loom’s virtual threads and Kotlin’s coroutines. As it turns out, Kotlin coroutines show to be more developer friendly, while Java Loom might have its sweet spot as part of Java libraries and frameworks. Want to know why? Buckle up, as we have a lot to talk about!

Read more →

Exploring Akka Stream’s TCP Back Pressure

Some years ago, when Reactive Streams lived in utopia we got the assignment to build a high-volume message broker. A considerable amount of code of the solution we delivered back then was dedicated to prevent this broker being flooded with messages in case an endpoint became slow.

How would we have solved this problem today with the shiny new Akka Reactive Stream (experimental) implementation just within reach?

In this blog we explore Akka Streams in general and TCP Streams in particular. Moreover, we show how much easier we can solve the challenge we faced backed then using Streams.

Read more →

State of the union of html5 in the mobile revolution

Being relatively new to html5 and mobile development I spotted an excellent opportunity to catch up with the latest trends during the QCon conference in San Fransisco where they offered a wide variety of html5 and mobile tracks.

In this blog I’ll share the insights I gained during the conference. After reading it you should have an overview of the following:

  • where html5 is right now and where it is heading to with regard to mobile development
  • the benefits and drawbacks of html5 for web-apps compared to native apps
  • how to bridge some of the shortcomings of html5 with regard to native apps
  • valuable pointers to resources helping you to get started with html5 mobile development

Read more →

Easy breezy restful service testing with Dispatch in Scala

For testing a restful service API I was looking for a lean library, which would allow me to test CRUD operations of rest services with as little code as possible.

My search led me to Dispatch, which is a highly compact Scala DSL wrapper around Apache’s reliable HttpClient. This DSL, however, is not very well documented and rather hard to decipher due to it’s heavy usage of symbolic method names but nevertheless highly appealing when understood.

In this blog I’ll decipher it for you and show how easy it is to test restful services with mere oneliners.

Read more →

Scala Options the slick way

The Scala Option type is key for dealing with variables that can have values or not. Most libraries and applications make use of this handy type. However, it’s usage in certain cases can lead to rather verbose code. This blog explains how to deal with this particular case in an elegant way using implicits. Read on to see how easy it is to tailor any kind of existing Scala type to perfectly fit your needs based on an example with Options.
Read more →

Configuration-hell remedy with Singleton injection

One of the most heard complaints about Spring projects is the seemingly unavoidable configuration-hell that silently creeps in every bigger project after some time.

Singleton injection is a simple practice that can significantly reduce configuration and corresponding injection code. Besides that, it provides possibilities you might not have been aware of enabling you to get most out of Spring. In this blog you will learn which advantages Singleton injection provides. It illustrates how to implement it and specifies clear guidelines in which circumstances it is applied best.

Where applicable, Singleton injection can be an elegant solution that provides significant code and configuration simplification.

Read more →