Lots of interesting writeups on Java 9 this week.
Here we go…
1. Spring and Java
It turns out that the Java 8 Streams API is not as lazy as you might think – the flatmap() operation evaluates the inner Stream eagerly – which is not the case when working with Scala or Vavr.
The cool Spring Boot Admin dashboard setup can be slightly unintuitive – here a good overview of how to set it up.
The new addition to JPA 2.2 – returning Query results as Stream – is an interesting addition but still not as efficient as a paginated ResultSet.
Using CascadeType.REMOVE can be quite dangerous – besides generating way too many queries, it can also remove more than expected.
Also worth reading:
Webinars and presentations:
Time to upgrade:
2. Technical
In order to leverage the laziness of the Stream API and keep the complexity of the operations down, it’s important to rely on well-placed limits as much as possible – although even this might not enforce laziness in all scenarios.
Many ORMs update values that were “touched” but not necessarily changed – which is not ideal. Read the whole article to dive deeper into the problem and a few possible solutions.
3. Musings
A quick and practical introduction to NoSQL and the most popular solutions.
Errors/mistakes happen and we need to learn how to embrace them in order to improve and innovate because they are the part of the process.
Also worth reading:
4. Comics
And my favorite Dilberts of the week:
5. Pick of the Week