Ensuring their users can conveniently obtain a link to the currently open or selected resource via a user interface; and providing an application programming interface (API) to obtain or construct a link to that resource (i.e., to get its address and name).

In this lab we will introduce you to the Micronaut tooling available within VS Code. This tooling is very feature-rich and makes building and working with Micronaut applications easy.

A Java version of simdjson - a JSON parser using SIMD instructions, based on the paper Parsing Gigabytes of JSON per Second by Geoff Langdale and Daniel Lemire.

I have not tried it, but it looks like an interesting open-source library.

In this talk, Micronaut committer Sergio del Amo compares the feature set of Spring Boot and Micronaut. This talk introduces developers familiar with Spring Boot to the similarities and differences between the frameworks.

In addition, the talk covers the migration of existing applications and the tools available to simplify the migration to Micronaut.

Also, you will learn how to use Micronaut within a Spring Boot application.

In this talk, you will learn how Micronaut eases the development of a Software as a Service application (Saas) with the following capabilities:

  • Micronaut Data JDBC Multi-Tenancy with Column Discriminator.
  • GraalVM Native Image Deployment.
  • OpenAPI generation.
  • OpenID Connect-based single sign-on.
  • Turbo Integration - single-page web application without writing any JavaScript.
  • Multi-Language Front-end.

The talk is a mix of slides and code samples. You will see an open-source application and how seamlessly Micronaut integrates the above capabilities.

After this talk, you will understand what the Micronaut framework offers to simplify the development of your next Saas application.

Elevator Pitch

Build a Multi-Tenancy, OpenAPI, OpenID Connect-based single sign-on, Turbo Integrated application and deploy it as a GraalVM Native Image in no time.

Do you want to do Docker deployments, but Kubernetes looks like a beast and overkill to you? In this talk, you will discover a simpler but powerful alternative - Kamal.

Kamal offers zero-downtime deploys, rolling restarts, asset bridging, remote builds, accessory service management, and everything you need to deploy and manage your web application in production with Docker.

During this talk, I will show you how to deploy a Micronaut application programmed with Java and compiled into a GraalVM native image with Docker and Kamal. Kamal works with any type of web app that can be containerized. Attend the talk, even if your programming language or framework does not match mine, as you will discover Kamal and how to use it with your toolset.

If you attend this talk, you will discover what Kamal is, what it offers, and how to deploy fast into production with Docker.

¿Quieres hacer despliegues con Docker pero Kubernetes te parece una bestia y un overkill para tu aplicación?. En esta charla descubrirás una alternativa más sencilla pero poderosa - Kamal.

Kamal ofrece zero-downtime deploys, rolling restarts, asset bridging, remote builds, accessory service management, y todo lo que necesitas para desplegar y gestionar tu aplicación web en producción con Docker.

Durante la charla te mostraré como desplegar una aplicación Micronaut programada con Java y compilada como una imagen nativa con GraalVM con Docker y Kamal. Kamal funciona con todo tipo de aplicación web que pueda ser empaquetada en un contenedor. Es decir, si tu lenguaje de programación o framework no coinciden con el mio, esta charla te servirá igual para descubrir Kamal y como usarlo en tu entorno.

Si asistes a esta charla descubrirás que es Kamal, que te ofrece y como desplegar rápidamente producción con Docker.

On November 5th 2024, I will be talking at Xtremej.dev.

We are excited to welcome the entire Java community to join us in the coming XtremeJ online conference. We are going to have short sessions (30 minutes each), with speakers from all over the world, online interactive competitions, and experts panels with whome everyone will be able to interact. XtremeJ 2024

Getting Started with the Micronaut Framework

I will be delivering my talk about "Getting Started with the Micronaut Framework"

This session introduces the Micronaut framework and demonstrates how the Framework’s unique compile-time approach enables the development of ultra-lightweight Java applications. Compelling aspects of the Micronaut framework include: + Develop applications with Java, Kotlin, or Apache Groovy + Sub-second startup time + Small processes that can run in as little as 10 MB of JVM heap + No runtime reflection + Dependency injection and AOP + Reflection-free serialization + A database access toolkit that uses ahead-of-time (AoT) compilation to pre-compute queries for repository interfaces. + Cloud-native features. Sergio will also demonstrate how you can generate GraalVM native images of your Micronaut applications to achieve instant startup and ultra-low memory footprint.

Discount Codes

Limited to the first ten passes, they supplied me with two discount codes:

  • Use SERGIO40J to get a 40% discount.
  • Use SERGIOFREE to get a Free Pass

I have installed Writebook in an Oracle Cloud instance. Writebook uses Docker, and it gets installed by default in host port 5555. However, I want to run Writebook in port 80 of the host because it makes it easier to expose it to the Internet from an Oracle Cloud instance.

  • Stop Docker
  • Edit hostconfig.json for your container hash sudo vi /var/lib/docker/containers/CONTAINERHASH/hostconfig.json and replace "HostPort":"5555" with replace "HostPort":"80".
  • Start Docker.

Courtesy of this great Stackoverflow answer.

I have been trying to install Writebook in an Oracle Cloud instance with Oracle Linux 9. The installer could not install Docker.

To install it manually, I followed this step-by-step guide

Update System Packages

Open a terminal and update your system packages as you see below:

sudo yum update -y

Add Docker Repository

Add Docker’s official repository to your system’s yum sources list as you see in the image below:

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Install Docker Engine

Install Docker Engine, CLI, and contained:

sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io

Start Docker Service

Enable and start the Docker service:

sudo systemctl enable docker
sudo systemctl start docker

Testcontainers simplifies testing against third-party components such as databases. But sometimes, you want to run your Junit 5 tests and skip those requiring Docker.

To run Testcontainers-based tests, you need a Docker-API compatible container runtime, such as using Testcontainers Cloud or installing Docker locally.

Luckily, Testcontainers Junit5 integration allows you to toggle these tests by annotating them with @Testcontainers(disabledWithoutDocker = true).

See an example of a commit in Micronaut Test.

Today, I was fighting a flaky test in a Micronaut project. I used this simple bash script to run the test a hundred times.

#!/bin/bash

EXIT_STATUS=0

for ((i=1; i<=100; i++))
do
  ./gradlew :http-client:test --tests "io.micronaut.http.client.aop.NotFoundSpec.test 404 handling with Flowable" --rerun-tasks || EXIT_STATUS=$?
  if [ $EXIT_STATUS -ne 0 ]; then
    exit $EXIT_STATUS
  fi
done

exit $EXIT_STATUS

Sonatype offers plugins to check for vulnerabilities in your dependencies.

Web Search

You can search directly in the web interface for vulnerabilities in your dependencies.

For example, to search for org.json:json type: pkg:maven/org.json/json.

Scan Your dependencies

Sonatype OSS Index offers Maven and Gradle Plugins. I focus next on Gradle.

Registration

I signed up for Sonatype OSS Index.

I set the OSS Index username/password as global properties for all Gradle Builds. I added entries to USER_HOME/.gradle/gradle.properties.

ossIndexUsername=xxx@email.com
ossIndexPassword=yyyy

Setup Gradle Plugin

You can get the latest version of org.sonatype.gradle.plugins.scanin the Gradle Plugin Portal

Then, you can apply the plugin:

plugins {
...
id("org.sonatype.gradle.plugins.scan") version "2.8.2"
}

dependencies {
    ....
    ..
    .
}
ossIndexAudit {
    username = project.properties["ossIndexUsername"].toString()
    password = project.properties["ossIndexPassword"].toString()
}

If your project has a vulnerable dependency, when execute the gradle task ossIndexAudit will see something like this:

> Task :ossIndexAudit FAILED
  ________  ___   ___  __   ____  ____________   _  __
 / ___/ _ \/ _ | / _ \/ /  / __/ / __/ ___/ _ | / |/ /
/ (_ / , _/ __ |/ // / /__/ _/  _\ \/ /__/ __ |/    /
\___/_/|_/_/ |_/____/____/___/ /___/\___/_/ |_/_/|_/

  _      _                       _   _
 /_)    /_`_  _  _ _/_   _  _   (/  /_`_._  _   _/ _
/_)/_/ ._//_// //_|/ /_//_//_' (_X /  ///_'/ //_/_\
   _/                _//
Gradle Scan version: 2.8.2
------------------------------------------------------------------------------------------------------------------------------------------------------

Checking vulnerabilities in 52 dependencies
Found vulnerabilities in 1 dependencies
[1/1] - pkg:maven/org.json/json@20230618 - 1 vulnerability found!

   Vulnerability Title:  [CVE-2023-5072] CWE-770: Allocation of Resources Without Limits or Throttling
   ID:  CVE-2023-5072
   Description:  Denial of Service  in JSON-Java versions up to and including 20230618.  A bug in the parser means that an input string of modest size ca...
   CVSS Score:  (7.5/10, High)
   CVSS Vector:  CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
   CVE:  CVE-2023-5072
   Reference:  https://ossindex.sonatype.org/vulnerability/CVE-2023-5072?component-type=maven&component-name=org.json%2Fjson&utm_source=ossindex-client&utm_medium=integration&utm_content=1.8.2


Execution failed for task '::ossIndexAudit'.
> Vulnerabilities detected, check log output to review them

The plugin scans the whole dependency tree. It scans not just your project dependencies but the dependencies of those dependencies.

Last Thursday, August 1st, 2024, I started at Oracle as a Principal Member of Technical Staff. I joined the GDK/Micronaut Team at Oracle Labs.

I want to thank Graeme Rocher and Julia Kindelsberger for the opportunity to join the Oracle Labs GDK/Micronaut Team. This role will allow me to continue contributing to Micronaut. A passion, I have been dedicating myself to in the pasts years.

The new job is quite a change for me. I had a small business, worked as a contractor - later as CTO - in a Spanish startup, and worked as a contractor for a medium-sized US company. All, with a common denominator, I have been self-employed since 2008.

People start in big companies, then move on to create their own thing. I am doing my career in reverse order. :-]