Migrating multi-module project from Gradle to Maven
I just went through migrating a pretty large multi-module project from Gradle to Maven, where I could learn a lot about both Maven and Gradle. Let me share in this post some lessons learned.
Passionate Software Engineer
I just went through migrating a pretty large multi-module project from Gradle to Maven, where I could learn a lot about both Maven and Gradle. Let me share in this post some lessons learned.
In this post, we will explore how to propagate the MDC (Mapped Diagnostic Context) among REST endpoints using the JAX-RS API standard and Kafka consumers/producers in Quarkus and Spring Boot services.
Sometimes it’s good to see how things work or look like without using a framework that hide/ease these things. That’s why I wanted to write a simple REST service in Java following the next objectives:
One of the most important parts when implementing a microservice architecture is to think about resilience strategies in your applications. How will your service behave after failures? There are a few very well known patterns to ensure the resillience of your services like Circuit Breakers, Fallbacks, Timeouts and Retries. In this post, we’ll focus on the Exponential Backoff Retry pattern in Quarkus services.
I want to introduce YAMLPath, a Java DSL framework for reading and manipulating YAML documents fragments. I created this project from scratch and I’m proud of it because it brings a world of possibilities when you need to read fragments of YAML resources or/and manipulate a bunch of YAML files.
Quarkus is a super-performant and cloud-native framework. Nowadays, I’m part of the Quarkus development team and I’ve written a lot of posts here about Quarkus, so let’s go directly to the topic!
I’m pleased to announce my first GitHub action (https://github.com/marketplace/actions/setup-container-registry)[https://github.com/marketplace/actions/setup-container-registry]!
It’s the day you want to publish your framework/tool/API/library, to sum up, your artifacts, into Maven Central, so the community can start using it. So, how to do it? You’d need to follow the official instructions from here.
Nowadays, the Java Microbenchmark Harness (JMH) tool is a very popular and well-known tool to write benchmarks in Java. Also, this tool is maintained by OpenJDK and you can find thousands of guides on the web about how to write all kinds of benchmarks - from throughput to memory benchmarks. For example, a very simple benchmark would look like as:
Operators are a super useful tool in Kubernetes to manage and handle custom resources. But what is a custom resource? Anything! For example, a custom resource could be an object that contains information about how to connect to an API:
After looking into the new features in Java 15, let’s continue with my series of Java new features with Java 16.
After looking into the new features in Java 14, let’s continue with my series of Java new features with Java 15.
After looking into the new features in Java 13, let’s continue with my series of Java new features with Java 14.
After looking into the new features in Java 12, let’s continue with my series of Java new features with Java 13.
After looking into the new features in Java 11, let’s continue with my series of Java new features with Java 12.
As part of my position on the QE team in Quarkus, we need to play with a lot of integration tools and frameworks. Also, we need to use many cloud infrastructures like OpenShift and Kubernetes.
In my entire career, there is something I’ve always been very passionated about: frameworks. I think everything started the first time I met the Spring ecosystem or maybe when I was a .NET developer. Either way, I’ve always enjoyed really curated APIs and the usage of well known patterns to integrate different components. And that’s also why I was so excited when I joined in the Quarkus project as Quality Engineer.
As Spring developer, binding some properties into a Map in Java is something that I have eventually needed when coding. Basically, having these properties:
MicroProfile 4.0 was released on December 2020 and announced here.
There is a super useful tip in Maven to fully overwrite plugin configuration by Maven profiles using combine.self
. In the following example, we’ll see how we can exclude tests depending on the Maven profile we’re running:
Most of the times our services need to be integrated to other services or third party components like databases. For example, our service might need a database instance to store or read books. But how can we verify our services logic? In this post, we’ll see how we can use the Docker Maven plugin to start up third party services and how we can integrate it with our integration tests.
We can enable monitoring in our Quarkus applications by using the Micrometer extension. Micrometer acts like a facade between our application and third parties that consumes the metrics such as Prometheus.
Recently, I wanted to update some custom properties in order to dynamically change some inner behaviours in my application. As an example, let’s see a simple example:
I’ve enrolled in a full course learning path that requires certifications to achieve. The first one is about Programming in Java EE
. Moreover, sometimes, It’s good to recap with some basics concepts around something you’re already familiar with. In the end, you always will learn something you have missed or forgotten.
In my previous post, I covered how to test several Quarkus applications using internal Quarkus tooling. This approach works perfectly fine specially when we only want to cope with a single module. However, if we are working in a multi-modular project, there is an easier approach using Testcontainers and Docker. Let’s see how to do this!
Quarkus is the most recent popular framework for Java applications aimed to be the reference for cloud-native applications. Its competitor is none other than the all-powerful Spring Boot. So, Quarkus has a long path to engage users and for achieving this, the developer experience that needs to be rather than excellence and joyful. In this direction, this post is covering how we can test Quarkus apps as developers.
Security is an important topic when we want to have our business logic and services in the cloud. In this post, we’ll see how to enable the security in every single component within Kogito.
I remember those days when I was working as fully frontend developer, feeling really confident in CSS, JS, HTML, jQuery… I’m aware of that it sounds really old nowadays! As backend developer, I always kept an eye in how the frontend frameworks evolved: Angular, React, Vue.js… Also I played a bit with Angular 2.x and 4.x, and indeed I quite enjoy it a lot. Now, let’s do something with React!
In this post, we’re going to use Istio to enable security to our applications deployed in the cloud (using K8S or Openshift).
Cypress is a lightweight framework made by frontend developers to test UI applications. Cypress is gaining popularity in a world where Selenium is the master because it’s easy to use, it’s fast and really user friendly.
Following up this post where we extend an existing capability of a Kie Server image. We’re going to provide custom Prometheus metrics in Kie Server now.
We already introduced Blockchain and Ethereum in an earlier post and also introduced a simple Lottery example in Spring Boot.
As we introduced the jBPM architecture in [this post], it mainly consists in two components:
By default, Kie Server extensions are exposed through REST or JMS data transports. We can extend Kie Server to support a custom data transport adding a new capability.
The Kie Server REST API enables you to interact with our business assets (such as business rules, processes, and solvers). The available REST endpoints are determined by the capabilities enabled in our Kie Server. We can extend an existing Kie Server capability with a custom REST API endpoint to further adapt our business needs.
The Travel Agency application is becaming the most relevant and complete example in the Kogito workshops and tutorials so far. This is because it makes use of most of the component in the Kogito ecosystem from UI to Data Index.
Kogito is the natural evalution of Red Hat Automation Manager to the cloud using Quarkus under Graal VM.
The Automation Manager product from Red Hat consists of two versions:
This is a very basic post about some golang main concepts.
This talk has been presented by Sophie Watson and William Benton.
I wanted to write a quick tutorial about how to push a docker image into an insecure Docker repository. By insecure Docker repository, I mean a site with SSL with either an expired or invalid certificate. In summary, if you try to do the next:
Following the Decision Manager series on my blog site, in this post we introduce the basics for jBPM (Java Business Process Management). jBPM allows to write our business logic using flow charts on the latest BPMN 2.0 standard specification. We’ll be doing the same example as our previous post.
This post introduces a basic installation and example of Drools.
We’ll be starting a session walkthrough about the Red Hat Automation Manager solution. This product allows to automate decisions and process using the BPMN 2.0 standard through Drools and/or jBPM.
Recently, I found out RSocket messaging framework and what surprise me the most is that it was already being used by many many well known companies like Netflix, Facebook or Pivotal. Let’s explore what is RSocket and what problem is addressing.
This tutorial is an introduction to Spring Cloud Data Flow which allows us to orchestate streaming and/or batch data pipelines.
By default, the logging frameworks outputs the traces in plain text and tools like ELK can’t fully process these traces. We could workaround the issue by adapting the messages using Logstash, but if we are using another tool like Prometheus, we would need to workaround it there as well. Therefore, if we “structure” or send the traces in JSON format directly, all the tools can benefit of.
Observability is the ability to:
Let’s write a hands on tutorial about how to implement the request-response message pattern with Spring Cloud. In this tutorial, I’ve used RabbitMQ but Kafka is also supported.
After looking into the new features in Java 10, I wanted to continue my series of Java new features with Java 11.
At my previous post, I gave an introduction to some distributed architectures. Also, I confess that I’m not a big fan of ESB based architectures: these solutions only work fine in integrations with third parties and still I’m being generous. Let me explain why I dislike this kind of solutions.
I wrote my first tutorial for creating a Skill in Alexa almost a year ago. Recently, I wanted to create a skill that provide the conditions of the most closest beach according to your current location. How can we get the user location? I found many sources but all of them were written in node.js. Let’s use Java 8 here.
Performance considerations:
I’ve preparing the AWS Certified Solutions Architect exam running the Udemy course driven by Ryan Kroonenburg.
After looking into the new features in Java 9, I wanted to continue my series of Java new features with Java 10.
When thinking on distributed architecture solutions, we need to have many things in mind to choose the right one. Some of these are:
RabbitMQ uses queue data structures (FIFO). Data is transient and optimised for efficient write and read operations from either end of the sequence.
Sorry for another post about the new features of Java 9. There are already tons of sites talking about this. As usual, I like to create a post as a notebook for me with useful tips when working on something. Moreover, this is how I like to learn about something! No more time to excuses.
When building machine learning models to work over different areas, data scientists usually need to deal with these two situations:
We already introduced Blockchain and Ethereum in an earlier post. However, there were a couple of points we wanted to explore a bit further:
“The world is polyglot”. This is why GraalVM is here. There are many languages around. Many of these languages have a strong community behind. There is no a perfect language, but all of them have strengths and weaknesses. So, what about if we could run any language on the same machine without dealing to install anything else? This is GraalVM!
There are lot of tutorials about how to enable Cache in your Spring Boot application. These a couple of examples:
Angular is a Javascript framework which allows to build reactive single page applications. Angular is written in TypeScript which brings lot of new features to build more consistent and complex applications. However, this is not supported by browser, so we’ll compile from TypeScript to JavaScript.
We already introduced CQRS architectures a while ago here. The focus was to migrate a legacy monolith application into a CQRS architecture. However, we didn’t go in deep by actually coding it. Let’s do this using Axon Framework and Spring Boot. We’ll create a library application from scratch.
Let’s play with Alexa by adding a new simple skill to make notes. Though adding notes as skill is quite simple, it makes use of most of the features in Alexa.
Kotlin is created by Jetbrains and is designed to cover some of the more painful aspects in Java: verbose, more concise and safety on exceptions. Also, it’s intended to be simpler than Scala.
Ethereum networks are a set of nodes or machines mining transactions within blockchains. The purpose of each transaction is tied to a smart contract or business definition. Because the machines need power to work, this mining work has a cost or gast limit which is measured in ether (or units of ether like wei). This cost depends on the number of operations our smart contract has.
gRPC is a high performance RPC framework that works over HTTP/2. It’s designed to “refactor” the REST api to fix some of its pitfalls and bring very many interesting features.
GraphQL helps to define a structure or data model at server side and it brings by nature a set of features to query and modify this data (for clients).
This is a very simple introduction for Istio Service Mesh.
Credits to Udemy course. Github sources here. Cheat sheet by Kubernetes official.
Guice and Spring DI are by large the most used DI frameworks in Java world. I don’t pretend saying this is better than the other but, to be honest, I really like Spring frameworks ecosystem and all the benefits around.
This post introduces how to setup Spring Boot Admin 1.X according to my experience within a dockerized environment.
It cannot exist a start without an ending. A few months ago I stopped working at Baeldung and I wanted to thank Baeldung’s team all the help they gave me. I would say that learnt a lot of this experience but indeed I think I learnt more than just “a lot”.
In this guide we are going to map filters set via a REST API to Spring Data JPA repository. The filters via a REST API look like:
After playing with entity relationships in Hibernate, I wanted to write my notes about the Cascade options and some scenarios for each one. At the end of this post, find a table to match the Cascade Types in Hibernate to JPA and the link to the source code in github.
I was told to work on a legacy project, a mix between a management system and reporting tool. The high level picture of the architecture was: