Recent Posts

Structured Concurrency is More Than ShutdownOnFailure

Since Java 21, structured concurrency has been added as a preview feature. Structured concurrency is a way to manage sub-tasks that are run in parallel within a given scope. If you’ve ever seen a presentation about structured concurrency, you’ve probably seen the use of the ShutdownOnSuccess or ShutdownOnFailure classes.These classes will stop the scope and the still running sub-tasks within …

Read More »

Unsafe is Finally Going Away: Embracing Safer Memory Access with JEP 471

Java, being a safe language, doesn’t usually allow direct low-level access. Memory is primarily managed on the heap, so developers don’t typically deal with memory directly. However, library developers are occasionally required to manipulate memory outside the heap for performance or specific use cases. This is where the controversial sun.misc.Unsafe comes in.  While undeniably powerful, sun.misc.Unsafe is a double-edged sword. …

Read More »

Dynamic watermarking with imgproxy and Apache APISIX

I described how to add a dynamic watermark to your images on the JVM. I didn’t find any library, so I had to develop the feature, or, more precisely, an embryo of a feature, by myself. Depending on your tech stack, you must search for an existing library or roll up your sleeves. For example, Rust offers such an out-of-the-box …

Read More »