For the Open Day we organize shortly for our family, friends, neighbours and other interested parties, my colleagues create a custom web application to support our QR Scavenger Hunt through the offices and surrounding premises. This (progressive) web application is created using JHipster – leveraging Java, Angular, Spring, PostgreSQL and […]
Java
Everthing related to the Java programming language
Merge AVRO schema and generate random data or Java classes
Previously I wrote about generating random data which conforms to an AVRO schema (here). In a recent use-case, I encountered the situation where there were several separate schema files containing different AVRO types. The message used types from those different files. For the generation of random data, I first needed […]
Java: How to validate JSON against an AVRO schema
AVRO schema are often used to serialize JSON data into a compact binary format in order to for example transport it efficiently over Kafka. When you want to validate your JSON against an AVRO schema in Java, you will encounter some challenges. The JSON which is required to allow validation […]
Generate random JSON data from an AVRO schema using Java
Recently I was designing an AVRO schema and wanted to test how data would look like which conformed to this schema. I developed some Java code to generate sample data. This of course also has uses in more elaborate tests which require generation of random events. Because AVRO is not […]
SonarCloud: OWASP Dependency-Check reports
SonarCloud is a hosted SonarQube SaaS solution which helps you with code quality management. It is free to use for open source projects. You cannot install 3rd party plugins in SonarCloud however. This puts some limitations on the kind of data you can put in SonarCloud. For Java this is […]
GitHub Actions and SonarCloud
GitHub Actions allow you to do most CI/CD tasks for free, directly from your GitHub repository. One of the challenges however is that there is no build-in facility like for example SonarQube to manage code quality. Luckily, SonarSource provides SonarCloud; a SonarQube SaaS offering which is free for public projects! […]
Java Security: Open Source tools for use in CI/CD pipelines
It is often expected of a DevOps team to also take security into consideration when delivering software. Often however, this does not get the attention it deserves. In this blog post I’ll describe some easy to use, CI/CD pipeline friendly, open source tools you can use to perform several checks […]
Java Agent: Rewrite Java code at runtime using Javassist
You might want to change the behavior of a Java application at runtime without having to alter the original sources and recompile them. This can be done by using a Java Agent. Java Agents are used by several products. Dynatrace uses for example a Java Agent to collect data from inside […]
Jenkins Pipeline: SonarQube and the OWASP Dependency-Check
The OWASP Foundation plays an important role in helping to improve security of software worldwide. They have created a popular and well-known awareness document called the ‘OWASP Top 10‘. This document lists the following risk: using components with known vulnerabilities. Software nowadays can be quite complex consisting of many direct and […]
Quarkus – Supersonic Subatomic Java, trying out Quarkus guide “Quarkus – Kubernetes extension” (part 3)
In this article, you can read more about the Quarkus code guide I tried out, related to the following topic: The ability to automatically generate Kubernetes resources by Quarkus The guide covers generating and deploying Kubernetes resources based on sane defaults and user supplied configuration. In this article, I will […]
Quarkus – Supersonic Subatomic Java, trying out Quarkus guide “Quarkus – Kubernetes extension” (part 2)
In this article, you can read more about the Quarkus code guide I tried out, related to the following topic: The ability to automatically generate Kubernetes resources by Quarkus The guide covers generating and deploying Kubernetes resources based on sane defaults and user supplied configuration. In this article, I will […]
Quarkus – Supersonic Subatomic Java, trying out Quarkus guide “Quarkus – Kubernetes extension” (part 1)
In this article, you can read more about the Quarkus code guide I tried out, related to the following topic: The ability to automatically generate Kubernetes resources by Quarkus The guide covers generating and deploying Kubernetes resources based on sane defaults and user supplied configuration. In this article, I will […]
Jenkins: Building Java and deploying to Kubernetes
Kubernetes is a popular platform to run and manage containerized applications. A CI/CD solution is often needed but not always provided. You might need to set this up for yourself. In this blog post I’ll provide a minimal end-to-end solution for Java applications. This starts with a commit in source […]
My Steps for Getting Started with Java Development on Windows
In this article a brief overview of my steps to set up an environment on my Windows 10 laptop for doing Java programming. If you follow these steps, you should be up and running with coding, building, testing and packaging Java applications on your laptop in some 20 minutes. The […]
Quarkus – Supersonic Subatomic Java, trying out some Quarkus code guides (part2)
In this article, you can read more about a Quarkus code guide I tried out, related to the following topic: Packaging the native executable in a container In a next article, you can read more about another Quarkus code guide I tried out, related to the following topic: The ability […]
Quarkus – Supersonic Subatomic Java, trying out some Quarkus code guides (part1)
In my previous article, I already shared with you the Quarkus code guide “Quarkus – Creating Your First Application”, I tried out, including the hot deployment with background compilation. [ https://technology.amis.nl/2020/08/21/using-vagrant-and-shell-scripts-to-further-automate-setting-up-my-quarkus-demo-environment-from-scratch-and-trying-out-a-quarkus-code-guide/] In this article, you can read more about other Quarkus code guides I tried out, related to the following […]
Using Vagrant and shell scripts to further automate setting up my Quarkus demo environment from scratch and trying out a Quarkus code guide
In my previous article, I shared with you the steps I took, to set up a demo environment, so I could get started with Quarkus. [https://technology.amis.nl/2020/08/17/quarkus-supersonic-subatomic-java-setting-up-a-demo-environment-using-vagrant-and-oracle-virtualbox] In this article, you can read more about the steps I took to further automate setting up my demo environment and the Quarkus code […]
Quarkus – Supersonic Subatomic Java, setting up a demo environment using Vagrant and Oracle VirtualBox
In November 2019, I attended Devoxx Belgium together with other AMIS colleagues. The yearly gathering of over 3000 Java developers (numbers provided by Devoxx website) were Java and software development are the core themes. At Devoxx, among other things, I learned about Quarkus and wanted to know more about it. […]
Connect Azure Pipelines with sonarcloud through maven (YAML)
Introduction Sonarcloud is a static code analysis tool. This means that it checks out the code at your repository, does an analysis and shows you the results. It may look something like this: It gives detailed information about your code and you can for example let it scan if you […]
Spring: Blocking vs non-blocking: R2DBC vs JDBC and WebFlux vs Web MVC
Spring Framework version 5, released in Sept 2017, introduced Spring WebFlux. A fully reactive stack. In Dec 2019 Spring Data R2DBC was released, an incubator to integrate relational databases using a reactive driver. In this blog post I’ll show that at high concurrency, WebFlux and R2DBC perform better. They have […]
The size of Docker images containing OpenJDK 11.0.6
When running Java applications in containers, you need to be careful with your resources. If you’re not careful with layering your images (for example using Google’s Jib), you can quickly get into disk-space issues, especially when your base image and/or application gets updated regularly. One of the ways you can save […]
Performance of relational database drivers. R2DBC vs JDBC
R2DBC provides non-blocking reactive APIs to relational database programmers in Java. It is an open specification, similar to JDBC. JDBC however uses a thread per connection while R2DBC can handle more connections using less threads (and thus potentially use less memory). This could also mean threads are available to do other […]
Apache Camel + Spring Boot: Different components to expose HTTP endpoints
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 […]
Java Microservices: What do you need to tweak to optimize throughput and response times?
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, […]
The state of Java [developers] – reflections on Devoxx 2019
I attended Devoxx Belgium – November 2019. The yearly gathering of over 3000 Java developers (numbers provided by Devoxx website). Maybe not all of them Java and perhaps some not even developers. But by and large … Java and software development are the core themes. This conference has taken the […]
Oracle Database: Write arbitrary log messages to the syslog from PL/SQL
Syslog is a standard for message logging, often employed in *NIX environments. It allows separation of the software that generates messages, the system that stores them, and the software that reports and analyzes them. Each message is labeled with a facility code, indicating the software type generating the message, and assigned […]
Calling out from Java to JavaScript (with call back) – leveraging interoperability support of GraalVM
Interoperability from Java to JavaScript has been an objective for the Java community for quite a while. With Rhino and later Nashorn, two valiant attempts were made to add scripting interaction to the JDK and JVM. Now, with GraalVM, there is a better alternative for running JavaScript code from within […]
Calling an Oracle DB stored procedure from Spring Boot using Apache Camel
There are different ways to create data services. The choice for a specific technology to use, depends on several factors inside the organisation which wishes to realize these services. In this blog post I’ll provide a minimal example of how you can use Spring Boot with Apache Camel to call […]
Microservice framework startup time on different JVMs (AOT and JIT)
When developing microservices, a fast startup time is useful. It can for example reduce the amount of time a rolling upgrade of instances takes and reduce build time thus shortening development cycles. When running your code using a ‘serverless’ framework such as for example Knative or FnProject, scaling and getting […]
Apache Camel and Spring Boot: Calling multiple services in parallel and merging results
Sometimes you have multiple services you want to call at the same time and merge their results when they’re all in (or after a timeout). In Enterprise Integration Patterns (EIP) this is a Splitter followed by an Aggregator. I wanted to try and implement this in Spring Boot using Apache Camel so I […]
A transparent Spring Boot REST service to expose Oracle Database logic
Sometimes you have an Oracle database which contains a lot of logic and you want to expose specific logic as REST services. There are a variety of ways to do this. The most obvious one to consider might be Oracle REST Data Services. ORDS is quite powerful and for example supports […]
Performance! 3 reasons to stick to Java 8 for the moment
It is a smart thing to move to newer versions of Java! Support such as security updates and new features are just two of them but there are many more. Performance might be a reason to stick to Java 8 though. In this blog post I’ll show some results of […]
Building a RESTful Web Service with Spring Boot using an H2 in-memory database and also an external MySQL database
In a previous article, I talked about an environment, I prepared on my Windows laptop, with a guest Operating System, Docker and Minikube available within an Oracle VirtualBox appliance. In this article, I will create two versions of a RESTful Web Service Spring Boot application that, later on (in another […]
Devoxx Belgium 2018, From Developers For Developers
Last November, I attended the Devoxx Belgium 2018 event. In this article I gathered some practical information about the event, and the sessions that were held. Perhaps this gives you more insight in what you can expect from such an event and it may help you in deciding if, as […]
JVM performance: OpenJ9 uses least memory. GraalVM most. OpenJDK distributions differ
In a previous blog post I created a setup to compare JVM performance of several JVMs. I received some valuable feedback on the measures I conducted and requests to add additional JVMs. In this second post I’ll look at some more JVMs and I’ve added some measures like process memory […]
Comparing JVM performance; Zulu OpenJDK, OpenJDK, Oracle JDK, GraalVM CE
There are many different choices for a JVM for your Java application. Which would be the best to use? This depends on various factors. Performance being an important one. Solid performance research however is difficult. In this blog I’ll describe a setup I created to perform tests on different JVMs […]
Monitoring Spring Boot applications with Prometheus and Grafana
In order to compare the performance of different JDKs for reactive Spring Boot services, I made a setup in which a Spring Boot application is wrapped in a Docker container. This makes it easy to create different containers for different JDKs with the same Spring Boot application running in it. […]
Running Reactive Spring Boot on GraalVM in Docker
GraalVM is an open source polyglot VM which makes it easy to mix and match different languages such as Java, Javascript and R. It has the ability (with some restrictions) to compile code to native executables. This of course offers great performance benefits. Recently, GraalVM Docker files and images have […]
Java programs as native executables: GraalVM is the answer!
TL;DR: • Using GraalVM Java applications can be compiled into native standalone executables (will be demonstrated). • Native executables of small Java programs startup blazingly fast, use considerably less resources compared to running on JVM and do not even require the JRE or any other kind of runtime apart from […]
Running Spring Tool Suite and other GUI applications from a Docker container
Running an application within a Docker container helps in isolating the application from the host OS. Running GUI applications like for example an IDE from a Docker container, can be challenging. I’ll explain several of the issues you might encounter and how to solve them. For this I will use […]