Problems from backend and infrastructure work, and the fixes that held up.

An engineering notebook by Valerio Mario Casale on Kubernetes, the JVM, Python services, observability and local AI tooling.

009 latest entry, July 2026
009

MLX Studio: a macOS app to download, run and serve MLX models on Apple Silicon

Problem. To run a local model on a Mac you usually need three command-line tools: one to download the weights, one to serve them and one to chat. You find out that a model does not fit in memory at a given context length only when loading fails. Connecting your own code to the model is one more integration.

Fix. Search, download, size and serve a model from one app.

008

Native image vs JVM on Spring Boot 4.1: 4.3x less memory, 18x faster startup

Problem. Most native image vs JVM numbers come from benchmarks of other applications. Here one service is built both ways from the same source code and measured on the same dashboard, so the numbers describe this code on this cluster.

Fix. Build the native image when memory and startup time matter, and keep the JVM jar otherwise.

007

Java, Python, Node and Rust on the same REST service: 7 MB to 191 MB at idle

Problem. Moving a service to another language was expensive because of the integration work. The language itself was easy to learn. You had to choose a framework, an ORM, migrations and metrics, make them work together and connect them to the production tooling. AI coding tools now do much of that work, so the runtime choice is worth measuring again.

Fix. Run the four services on one cluster and compare their memory in Grafana.

006

InvestigatorAI: a multi-agent investigation system with LangChain4j, Neo4j and Qdrant

Problem. An investigation question can need a graph query, a document search and a check of the sources. One model call cannot do all of this well. When the work is split into separate tasks, each one using real data, the answers are more accurate and you can see which step produced a wrong finding.

Fix. Give each task to its own agent and trace every step in Langfuse.

005

Remote debugging a Spring Boot service on Kubernetes with JDWP

Problem. When a bug appears only inside the cluster, debugging with logs means adding a log line, rebuilding the image, redeploying and reproducing the bug again. Each attempt takes minutes, and the new log line may still not show the value you need.

Fix. Add the JDWP flag in a dev overlay and attach through kubectl port-forward.

003

Centralized exception handling in REST APIs with Spring and FastAPI

Problem. An API often handles exceptions in one of two bad ways. It catches them and logs nothing, so nobody can find the error later. Or it lets them reach the client, and the response shows class names, table names and SQL.

Fix. Log the stack trace in one global handler and return a small JSON error.

002

Local Kubernetes on a Mac: Minikube profiles, kubectl contexts and k9s

Problem. Testing a change on a remote Kubernetes cluster means building an image, pushing it to a registry, deploying it and waiting, which takes minutes for every change. A local cluster removes the remote deploy from that loop.

Fix. Keep one Minikube profile per project and switch with kubectl contexts.

001

Java, Python and Node versions on a Mac with SDKMAN, pyenv and nvm

Problem. Different projects need different Java, Python and Node versions. Without a version manager you have one version per language, and you reinstall runtimes by hand every time you change project.

Fix. Install SDKMAN, pyenv and nvm, and pin the version in each project folder.

Reading paths

All paths
PathWhat you buildEntries
A local platform from zero An observable Kubernetes cluster on an empty Mac. 001, 002, 005, 004
Measuring runtimes Benchmarks of Java, Python, Node and Rust that you can run again. 007, 008
Agentic AI on the JVM Traced services, then a multi-agent investigation system. 003, 004, 006

Apps

  • Rekall

    Write a task once, run it with Claude Code, Codex, or Antigravity

  • MLX Studio

    Download, run and serve MLX models on Apple Silicon

  • PSI Fatture

    Invoices, patients and calendar for psychologists, on Mac and Windows

  • StoreForge

    Desktop workspace for S3-compatible storage and Ceph RGW

  • Penna

    Select text in any Mac app and replace it with a corrected version