-
We already discussed about Queue management solutions in the past, and I am always happy to write about it. Queue managers are not easy to implement, and there is a reson if IBM MQ Series is still a successful product. Some month ago, a big bank customer asked me to provide a small queue implementation to increase asynchronous internal processing of our payment solution.
The project had very strong contraints: I could not use existing queue system because they were not yet available, and I need to be able to provide microservice parallelism in a cloud-environent.
I have very little time to provide a solid solution, and re-inventing the wheel was not an option. Performance was important, but we plan to have a managable numbers of transactions per seconds, far behind modern cloud database capacity.
Challenge accepted.
Read More -
Test driven development is a beast to tame. I like TDD but in the past it was quite difficult to achive, at least in a pure-consultant approach with a "turn key" framework behind.
There are two major concept often not grasped correctly.
Read More -
With new JDK, when you compile a spring-boot application you get a big jar which cannot be included as utility jar anymore.
The reason are a lot but, simply put, the new packaging system introduced with JDK9 require a strong separation.
Read More -
Today I have an hard time using the @Profile directive for enable feature toggle on Spring, so I decided to write a small guide on it.
Introduction
Feature toggle is a way to write your code to be able to 'turn' on/off specific modules of your (micro) service. Because Spring Autowiring can 'discover' the right service for the right need, you can easily introduce feature toggle in an Inversion of Control engine like Spring.
I am not a super fan of feature toggle, but it helped me on more than one project. Also sometimes on production delivery you have some legal constraints (like enable a service not before a specifica date) and so a dynamic, parametrized run become a must.
Read More -
Complice del passare degli anni, inizio a sviluppare una certa irritazione per alcune soluzioni architetturali chiaramente inutili. Scrivo quindi queste brevi righe a beneficio di qualsiasi giovane sviluppatore Java (o Python o JavaScript o….) affinché prima di “inventarsi” una nuova classe/framework/interfaccia inutile si faccia la triplice Domanda del Destino e cioé:
Read More -
Java 15 will remove Solaris Support. This with the removal of Java Applet in JDK 9 is the final end of another Java mutation process cycle.
I mean, Java 1.0 is dead as we know it. Vector, Applet and the Solaris-only version are all dead. Template was a “too complex feature”.
Read More -
JDK 1.11 is the next LTS (Long Term Support) Release.
A lot of Enterprise Customers are still with JDK 1.8, but nowadays you need to provide migration path to JDK 1.11 (or to JDK 1.14 LTS).
JDK11 will be supported by Amazon Corretto at least up to 2024, so it seems a good candidate for a migration target. Maven is highly recommended as build system, so we will focus on this use case.
Read More -
Some co-workers started using Apache Kafka con a bunch of our Customers.
Apache Kafka is a community distributed event streaming platform capable of handling trillions of events a day. Initially conceived as a messaging queue, Kafka is based on an abstraction of a distributed commit log[*].
To get this goal, Apache Kafka needs a complex servers setup, even more complex if you want the certification for the producing company (Confluent). Now, if you are planning to use Kafka like a simple JavaMessaeSystem (JMS) implementation, think twice before going on this route.PostgreSQL 12 offers a fair (and open source) partition implementation, whereas if money are not a problem, Oracle 12c can happy scale on billions of record before running into troubles (and ExaData can scale even more).
PostgreSQL and Oracle offer optimizations for partitioned data, called “Partition Pruning” in PostreSQL teminology:
With partition pruning enabled, the planner will examine the definition of each partition and prove that the partition need not be scanned because it could not contain any rows meeting the query's WHERE clause. When the planner can prove this, it excludes (prunes) the partition from the query plan.
This feature is quite brand new (popped in PostreSQL 11) but it is essential to a successful partition strategy. Before these feature, partitioning was a black magic art. Now it is simpler to manage.
Read More -
I think constants are evil (just joking but….I will explain why).
I am tired of seeing a lot of Java classes filled with the same constants repeated over and over again, instead of collecting them in a common file, which in C Language was called include files (ooooah!).
Read More -
In the 1980 comments were used to reduce the “gap” between unstructured code and “rationale” behind the code.
- C/64 Peek and poke where oscure.
- Gosub on function pointed by numbers was bad
- 8-bit systems was tight on command names and so on (think to write a python interpreter in Arduino/bbc:Micro, or look at the memory consumed by the COMMAND STRINGS on C/64 Basic v2)
- C code was not expressive, but good code required little comment, as you can see here
- Comment obscure code -> instead of writing it better
- Comment caching code you will end up to commit breaking production ->instead of having a cache config to disable cache on dev machines
- Comment not working code will end up in production, producing functional breaks -> because you will forget it and commit the bad version
@Comment("Documentation of this class/method/function/closure") @Fixme("Reason") @Todo("Why", deadline=20230423)
Read More -
I am studying Apache Kafka (a "distributed streaming platform") and I stumbled upon this conclusion: the "disk read fear" a lot of projects have in the past, is a fake.

A lot of distributed database started tutorial with the statement "disk read are slow, write are fast" which is true to some extent, and accounted for de-normalizing data and memory caches.
Read More -
Vjdbc is a remote access for JDBC-Datasources developed more then ten years ago (last news are from 2007, with last comit from 2013.
The project was migrated to Maven 3, but the code base is very old.
I decided to give it a try, spin a github repository and started working on it, because you know, is nice to have a database driver proxy-logger :)
Read More -
Language based on JVM are the new trend in Java World. It seems everyone dislike Oracle on these days.
Kotlin score some point on these days because it will be supported officially on Android (Mid-May announce):
Starting now, Android Studio 3.0 ships with Kotlin out of the box, meaning Android developers no longer need to install any extras or worry about compatibility. It also means that moving forward, you can rest assured that both JetBrains and Google will be supporting Android development in Kotlin.
It is a good news for an huble language with good IDE support like this.
Read More -
OOP is the your new legacy
Dec 19, 2016 · 2 min read ·
Today I took a light rail with my son, to bring him to school. That tram is 90 years old. It has been maintained for 90 years. Milan city sold some of them to San Francisco too.
Read More -
Sometimes in University I found bold young guy saying something like:
I will reimplement this in machine language because is faster
I will reimplement this xyz C function by my own
My program crash, I think there is a bug in HP UNIX socket implementation
I will ge rid of this Java Garbage Collector because it is too slow. I will reimplement all the code in my C++ routine.
Belive me: your code is doomed. A full list of guys have already done your same code, found a million bugs and corrected it in the tool you want to replace because they are shitty slow, to your eyes.
I feel your pain because I made your same mistake. Keep reading.
Read More