Apache Camel + Spring Boot: Different components to expose HTTP endpoints

| Dec 23, 2019

Apache Camel is an open source integration framework that allows you to integrate technologically diverse systems using a large library of components. A common use-case is to service HTTP based endpoints. Those of course come in several flavors and there is quite a choice in components to use.

In this blog post I’ll take a look at what is available and how they differ with respect to flexibility to define multiple hosts, ports and URLs (more...)

Java Microservices: What do you need to tweak to optimize throughput and response times?

| Dec 14, 2019

Performance tuning usually goes something like followed:

  • a performance problem occurs
  • an experienced person knows what is probably the cause and suggests a specific change
  • baseline performance is determined, the change is applied, and performance is measured again
  • if the performance has improved compared to the baseline, keep the change, else revert the change
  • if the performance is now considered sufficient, you’re done. If not, return to the experienced person to ask what to change (more...)

Linux ser2net: no connection to /dev/ttyUSB0

| Dec 1, 2019
If you are running some java application on a Linux box (especially ARM architecture) and this application accesses the serial interface (/dev/ttyUSB0, /dev/ttyUSB1 or just /dev/ttyX), then a easy way to do this, is running ser2net.

For all who are not familiar with the serial port:

But there is one tricky thing, you have to consider when using ser2net:

Inside ser2net.conf you will find some lines like this here:

15000:raw:0:/dev/ttyUSB0:9600 8DATABITS (more...)

How to run a java software which needs RXTX on a raspberry pi

| Nov 23, 2019
In my last posting i wrote about migrating my aircraft noise measurement station to alpine linux. There i had some problems with getting the RXTX library for Java running on a linux, which uses musl and not GNU libc6.

Why does my java application require RXTX? As stated on the RXTX page:
RXTX is a Java library, using a native implementation (via JNI), providing serial and parallel communication for the Java Development Toolkit (JDK).
Now (more...)

Alpine Linux, Oracle Java JDK and musl?! – why it does not work…

| Nov 17, 2019
Sometime ago i did some work with Alpine Linux (s. here) and i was impressed how tiny this Linux distro was and how fast it was running.

So i decided after nearly 6 years of running an aircraft noise measuring station (for dfld.de) with Ubuntu to change to Alpine Linux.

This station runs a software on Java and needs RXTX, because the microphone is connected via USB and is read over (more...)

DBeaver for PostgreSQL

| Nov 3, 2019

I’m migrating my database classes from the Oracle database to the PostgreSQL database. Using the Oracle Express Edition has always required a virtualized image because students use Windows and Mac OS. Also, the university doesn’t like my use of a virtualized image. Virtualization imposes incremental cost on students to have high end laptops.

The available Docker images don’t typically support the Oracle Express Edition. That means there are licensing implications tied to Oracle.

As a (more...)

Java and Postgres

| Nov 2, 2019

I wanted to get Java working with PostgreSQL to test some GUI interfaces on Linux. Figuring out the necessary JAR file for the JDBC was my first hurdle. I found it was postgreSQL-42-2.5.jar file.

You can download it with the following command line:

wget https://jdbc.postgresql.org/download/postgresql-42.2.5.jar

I downloaded it to a Java directory off the home/student directory. Then, I added the following CLASSPATH to local java.env environment file.


Lambda Function to Resize EBS Volumes of EMR Nodes

| Oct 30, 2019

I have to start by saying that you should not use EMR as a persistent Hadoop cluster. The power of EMR lies in its elasticity. You should launch an EMR cluster, process the data, write the data to S3 buckets, and terminate the cluster. However, we see lot of AWS customers use the EMR as a persistent cluster. So I was not surprised when a customer told that they need to resize EBS volume automatically (more...)

Amazon QLDB and the Missing Command Line Client

| Sep 10, 2019

Amazon Quantum Ledger Database is is a fully managed ledger database which tracks all changes of user data and maintains a verifiable history of changes over time. It was announced at AWS re:Invent 2018 and now available in five AWS regions: US East (N. Virginia), US East (Ohio), US West (Oregon), Europe (Ireland), and Asia Pacific (Tokyo).

You may ask why you would like to use QLDB (a ledger database) instead of using your traditional (more...)

Sample AWS Lambda Function to Monitor Oracle Database

| Sep 4, 2019

I wrote a very simple AWS Lambda function to demonstrate how to connect an Oracle database, gather the tablespace usage information, and send these metrics to CloudWatch. First, I wrote this lambda function in Python and then I had to re-write it in Java. As you may know, you need to use cx_oracle module to connect Oracle Databases with Python. This extension module requires some libraries which are shipped by Oracle Database Client (oh God! (more...)

Getting Started With Redis Streams & Java

| Sep 3, 2019
Read this article on my new blog As you may have seen, I have joined Redis Labs a month ago; one of the first task as a new hire is to learn more about Redis. So I learned, and I am still learning. This is when I discovered Redis Streams. I am a big fan of streaming-based applications so it is natural that I start with a small blog post explaining how to use Redis Streams and Java. (more...)

First episode of the bol.com TechLab podcast

| May 2, 2019

First episode of the bol.com TechLab podcast

Today we released the first episode of the bol.com TechLab podcast. The subject of this first episode is our Kotlin adoption journey.

In this podcast, we share our experience with you to learn and entertain. Peeking behind the screens of IT and Tech in general at bol.com. Showing you our approach to IT, e-commerce and retail platforms. We have a lot of fun creating the (more...)

Lies, darn lies and sampling bias

| Mar 11, 2019

Sampling profiling is very powerful technique widely used across various platforms for identifying hot code (execution bottlenecks).

In Java world sampling profiling (thread stack sampling to be precise) is supported by every serious profiler.

While being powerful and very handy in practice, sampling has well known weakness – sampling bias. It is real and well-known problem, though its practical impact is often being over exaggerated.

A picture is worth a thousand of words, so let (more...)

Intercepting ADF Table Column Show/Hide Event with Custom Change Manager Class

| Feb 20, 2019
Ever wondered how to intercept ADF table column show/hide event from ADF Panel Collection component? Yes, you could use ADF MDS functionality to store user preference for table visible columns. But what if you would want to implement it yourself without using MDS? Actually, this is possible through custom persistence manager class. I will show you how.

If you don't know what I'm talking about. Check below screenshot, this popup comes out of the box (more...)

Java 11: JEP 333 ZGC A Scalable Low-Latency Garbage Collector

| Feb 2, 2019
After i found this strange "No-Op Garbage Collector", i was keen, if there are some other new GC features with Java 11.

There is another JEP with the number 333:
 If you look here, the goals are:

  • GC pause times should not exceed 10ms
  • Handle heaps ranging from relatively small (a few hundreds of megabytes) to very large (many terabytes) in size
  • No more than 15% application throughput reduction compared to using G1
  • (more...)

Java 11: JEP 318 Eplison / A No-Op Garbage Collector

| Jan 19, 2019
This week i read about the new JDK Enhancement Proposal (JEP) of Java 11.
One of my favourites is JEP 318:

The summary of this JEP says:
Develop a GC that handles memory allocation but does not implement any actual memory reclamation mechanism. Once the available Java heap is exhausted, the JVM will shut down.
For which scenario could this garbage collector be useful?

If you skip to the "motivations" at the JEP, i (more...)

Oracle ADF BC Reusing SQL from Statement Cache

| Jan 19, 2019
Oracle ADF BC by default is trying to reuse prepared SQL query from statement cache. It works this way when ADF BC runs with DB pooling off (jbo.doconnectionpooling=false). Normally we tune ADF application to run with DB pooling on (jbo.doconnectionpooling=true), this allows to release unused DB connection back to the pool when a request is completed (and in this case, statement cache will not be used anyway). If View Object is re-executed multiple (more...)

In JDK 9 (and well 8) and above everything can be a stream.

| Nov 30, 2018
In JDK 8 we finally got to use streams and everything was good apart from the times when the API you used couldn't produce a stream. Then you ended up writing a wrapper class method that allowed you to convert an iterator into a Stream, because you missed streams.

public static <T> Stream<T> asStream(Iterator<T> it) {
    return StreamSupport.stream(Spliterators.spliteratorUnknownSize(it,
        Spliterator.IMMUTABLE | Spliterator.ORDERED),false);

Now there are methods to programmatically generate stream in (more...)

jconsole/visualvm/java applications without fonts over ssh forwarding (characters displayed as boxes)

| Oct 27, 2018
On servers which run java applications sometimes you need to run jconsole or jvisualvm.
This is typically no problem - ssh -X and you are done.

But in some rare circumstances you will get something like this:


Following some other sources, you end up with tweaking xorg parameter without any success. The solution is very easy:
apt-get install ttf-dejavu
And then:

Java: Slow java with server.policy enabled – how to fix this issue

| Oct 6, 2018
If you use Java security manager for hardening your java processes, you have to add the following JVM options:
Create a server.policy file (you can use jdkXXX/jre/lib/security/java.policy as a tamplate) and add the following line:
permission java.net.SocketPermission "localhost:*", "listen, accept, connect, resolve"; 
Now create a small java program, which listens on a port (like this example).

If you send a message with netcat