Parallell issues with Java software : useful links to troubleshoot

Java 8 Threads/Promises/CompletableFuture/ForkNodePool

I am writing a new release of my Spring CQRS Module(link1, link2), including a parallel execution feature.

However I am encountering several issues with the Java 8 promises aka CompletableFutures.

My issues are :

  • I am using a dedicated ForkNodePool but some promises are stilled created outside my pool
  • Some threads are slow to die (WAITING state is too long)
  • Completable.allOf is creating promises in the common ForkNodePool
  • I had an exceeded waiting thread exception

Here is two links that are helping me a lot to solve these problems :

  • Java Parallel Calamity : link
  • The Java Fork/Join Framework : link2

These two articles are well documented and explain into the details how Java/Threads/Java/JVM/Promises and parallel streams works.


CompletableFuture and Java 8 Reactive

java completablefuture

I have bene using recently Java 8 new features CompletableFuture.

It works the same way as javascript promises but with a crazy hard to remember syntax and plethora of methods.

I found this great webpage to guide me through the API :

Guide To CompletableFuture

The result is this new version of the CQRS Module :


Fore more informations about that module, check there :


An example of code is here.


How to implement CQRS with Spring : new framework

This article is a presentation of a new little framework, I have developed and used on several projects.

The framework is for Spring Framework and requires Java 8.0. The code is on GitHub and downloadable from Bintray or JCenter.

Continue Reading