It all started with an informal chat with my friend Anthony. We were talking about languages, and I said that I preferred compiled ones. He then went on to mention Rust. We admitted that we were too afraid to learn it because of its perceived complexity.

After the chat, I thought about it, and I wondered why I didn’t check by myself. I did. And I became interested.

There are tons of resources on the Web on how to learn Rust. This post is a memo of the steps I followed. …


The JVM ecosystem is mature and offers plenty of libraries, so you don’t need to reinvent the wheel. Basic — and not so basic — functionalities are just a dependency away. Sometimes, however, the dependency and your use-case are slightly misaligned.

The correct way to fix this would be to create a Pull Request. But your deadline is tomorrow: you need to make it work now! It’s time to hack the provided API.

In this post, we are going through some alternatives that allow you to make third-party APIs behave in a way that their designers didn’t intend to.

Reflection

Imagine…


One of the talks in my current portfolio is Migrating from Imperative to Reactive. The talk is based on a demo migrating from Spring WebMVC to Spring WebFlux in a step-by-step approach. One of the steps involves installing BlockHound: it allows to check whether a blocking call occurs in a thread it shouldn’t happen and throws an exception at runtime when it happens.

I’ve presented this talk several times in the previous week, both in its Java version and its Kotlin one. One such presentation was at Javaday Istanbul. After the talk, one of the questions I received was, “How…


To continue building my understanding of Rust, I searched for some simple Rust exercises. Hence, I dedicated my weekly personal work time to the Rustling exercises.

Greetings and welcome to rustlings. This project contains small exercises to get you used to reading and writing Rust code. This includes reading and responding to compiler messages!

https://github.com/rust-lang/rustlings

I believe that this workshop is pretty neat. Thanks to everybody who contributed to it! I’ll split my notes into two posts, as Rustlings contain many (many!) exercises. Besides that, I need to learn about the more advanced themes such as threading. In those…


Last week, I drank my first cup of Rust. I learned concepts that are foreign in the languages I know: ownership, borrowing and lifetimes. This week I want to drink the second cup and see where it leads me.

Self-referencing types

It’s time to implement another exercise from the initial exam:

Given a collection of Super, return the sub-collection of those who have a sidekick.

We need to change the model to add a sidekick attribute of type Super.


In my penultimate post, I described the use-case of an e-commerce shop.

In general, interactions in such a shop are the following:

  • You can browse a catalog of items
  • Each item has a price tag
  • You can put x items in your cart

It’s when the exciting part starts.

On most pages, you want to give users a condensed view of their cart’s state. Here are a couple of options for the state’s view:

  1. Empty/non-empty
  2. Number of cart lines
  3. Number of items
  4. Total cost. In demos, it’s as simple as the sum of each cart line which amounts to the…


An in-memory data grid (IMDG) is a set of networked/clustered computers that pool together their random access memory (RAM) to let applications share data with other applications running in the cluster. Though IMDGs are sometimes generically described as a distributed in-memory data store, IMDGs offer more than just storage. IMDGs are built for data processing at extremely high speeds. They are designed for building and running large-scale applications that need more RAM than is typically available in a single computer server. This enables the highest application performance by using RAM along with the processing power of multiple computers that run…


Last week, I described a use-case for a custom Stream Collector. I received a intriguing comment on Twitter:


Java Stream’s Collectors methods fit most use-cases. They allow returning either a Collection or a scalar. For the former, you use one of the toXXX() method, for the latter, one of the reducing() one.

Let’s imagine an e-commerce platform that implements a shopping cart. The cart is modeled as the following:


This week’s post is pretty short. I’ve already written about overengineering, but this adds a personal touch.

I had to rewrite my Jet Train demo to use another data provider, switching from a Swiss one to a Bay Area one. One of the main components of the demo is a streaming pipeline. The pipeline:

  1. Reads data from a web endpoint
  2. Transforms data through several steps
  3. Writes the final data into an in-memory data grid

Most of the transform steps in #2 enrich the data. Each of them requires an implementation of a BiFunction<T,U,T>.

These implementations all follow the same pattern:

Nicolas Fränkel

Dev Advocate @Hazelcast . Former developer and architect. Still teaching, learning and blogging.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store