Akka is a free, open-source toolkit and runtime for building highly concurrent, distributed, and resilient message-driven applications on the JVM. Along with Akka you have akka-streams a module that makes the ingestion and processing of streams easy and Alpakka, a Reactive Enterprise Integration library for Java and Scala, based on Reactive Streams and Akka. On this blog I shall focus ...
Read More »Start a Java app without installing it
This article describes how you can use JShell to download and execute a Java application. It will eliminate the need for the installation of the application. Do not install, just run! The first obstacle that you have to overcome to make people use your app is the installation.You want people to use the app, try it out.To do that, they ...
Read More »Run method on Spring Boot startup
While developing a spring boot application, sometimes we need to run a method or a piece of code at startup. This code can be anything ranging from, logging certain information to setting up database, cron jobs etc. We cannot just put this code in constructor, because required variables or servies may not be initialized yet. This could lead to null pointers or some ...
Read More »AWS CodeBuild Error: Unable to access jarfile
Using AWS CodeBuild, I was using a buildspec that was to run an executable JAR file to execute JUnit tests. Here is my buildspec: 1 version: 0.2 env: secrets-manager: CLIENT_ID: AppSecrets/someapp:CLIENT_ID CLIENT_SECRET: AppSecrets/someapp:CLIENT_SECRET phases: install: runtime-versions: java: corretto11 build: commands: - echo $CLIENT_ID - echo $CLIENT_SECRET - java -jar -DclientId=$CLIENT_ID -DclientSecret=$CLIENT_SECRET junit-platform-console-standalone-1.7.0.jar -cp myapp.jar --select-package="com.wall.steve" As you can see, I ...
Read More »Processing real-time data with Storm, Kafka and ElasticSearch – Part 1
This is an article of processing real-time data with Storm, Kafka and ElasticSearch. 1. Introduction How would you process a stream of real or near-real time data? In the era of Big Data, there are a number of technologies available that can help you in this task. In this series of articles we shall see a real example scenario and ...
Read More »Java 15: Sealed Classes
Java 15 introduces Sealed Classes, a preview language feature, that allows classes/interfaces to restrict which other classes/interfaces may extend or implement them. Here is an example: 1 2 3 4 5 public sealed class Vehicle permits Car, Truck, Motorcycle { ... } final class Car extends Vehicle { ... } final class Truck extends Vehicle { ... } final ...
Read More »Locking for multiple nodes the easy way: GCS
It happens to all of us. We develop stateless applications that can scale horizontally without any effort.However sometimes cases arise where you need to achieve some type of coordination. You can go really advanced on this one. For example you can use a framework like Akka and it’s cluster capabilities. Or you can go really simple like rolling a mechanism ...
Read More »Apache Camel 3.6 – More camel-core optimizations coming (Part 4)
I have previously blogged about the optimziations we are doing in the Apache Camel core. The first 3 blogs (part1, part2, part3) were a while back leading up to the 3.4 LTS release. Now we have done some more work that is coming in Camel 3.6 leading up to the next 3.7 LTS release. To speedup startup we switched to ...
Read More »Java String to String Array Conversion Examples
A quick and practical guide on how to convert String to String Array in differnet ways in java. 1. Overview In this article, you’ll learn how to convert String to String Array in java with example programs. Let us learn the different ways to do the conversion into a string array. from a string value. 2. Using the split() method ...
Read More »