A Java Geek weekly 63

Back to basics: Dependency Injection

After years of near-ubiquitous usage of Dependency Injection, I see more and more posts and talks questioning its value. Some even go to the point where they argue against it. Most of it however is based on a whole lot of misconceptions, half-truths and blatant lies.

In this post, I’d like to go back to the roots of DI, describe some related features and lists available frameworks.

State of the Crates 2025

TL;DR

Connectivity

  • axum: HTTP(S) servers with flexible routing and integration
  • reqwest (with rustls): Modern HTTP client with configuration options
  • prost / tonic: Protobuf and gRPC ecosystem support
  • lapin: AMQP (RabbitMQ) client

Error Handling

  • thiserror: Errors for libraries
  • anyhow: Errors for applications

Testing

  • rstest: Parametric tests and fixtures (familiar if you know pytest)

Serialization & Data

  • serde / serde_json: General-purpose serialization and JSON handling
  • bincode: Compact binary format when JSON is too large
  • humantime-serde: Human-readable durations

Utilities

  • rustc-hash / sha1_smol: Faster and predictable non-crypto hashing
  • tikv-jemallocator: Improved memory allocation performance
  • uuid: UUID creation and parsing
  • chrono: UTC-based time handling
  • derivative: Customize derived trait implementations
  • image: Working with images

CLI & Logging

  • argh / clap: Lightweight vs. feature-rich CLI parsing
  • tracing: Structured logging and tracing
  • prometheus: Metrics

SQL & ORMs

  • sea-orm / sea-query / sqlx: Async-friendly ORM and query building

ML & Advanced

  • half: Half-sized float types
  • approx: Approximate comparisons for floats
  • ndarray / nalgebra: Arrays and linear algebra ops
  • ort: ONNX runtime for local model inference
The Depths of Wikipedians

A conversation about yogurt wars, German hymns, tropical cyclones, and the people who make Wikipedia function.

Distroless Images in Docker: Minimalism, Security, and Debugging in Kubernetes

In this article, we will cover:

  • What are Distroless images?
  • What variations of Distroless images are available and what are they used for?
  • Comparing Distroless with other popular Docker base images
  • Using Distroless images with multistage builds based on a non-root image
  • Limitations of Distroless images
  • Security scanning of images using Grype
  • How to debug Distroless images in Kubernetes?
Cognitive load is what matters

A strong opinion that needs to be nuanced by your own context, but not without its merits.

Model Context Protocol

MCP is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications. Just as USB-C provides a standardized way to connect your devices to various peripherals and accessories, MCP provides a standardized way to connect AI models to different data sources and tools.

Git Trailers

After a decade of using Git, I discovered this feature I never heard about.

Ucacher: Speeding up GitHub Actions via syscall instrumentation

A great idea, which might save you time and money.

How to Handle Backlogs in Queues?
  • Separate Queues for each Workload
  • Separate Queue for Backlog
  • Dropping Expired Messages
  • Sending Backpressure Upstream
  • Using Dead Letter Queues
MarkItDown

The MarkItDown library is a utility tool for converting various files to Markdown (e.g., for indexing, text analysis, etc.)

It presently supports:

  • PDF (.pdf)
  • PowerPoint (.pptx)
  • Word (.docx)
  • Excel (.xlsx)
  • Images (EXIF metadata, and OCR)
  • Audio (EXIF metadata, and speech transcription)
  • HTML (special handling of Wikipedia, etc.)
  • Various other text-based formats (csv, json, xml, etc.)
  • ZIP (Iterates over contents and converts each file)
Cyphernetes, a Kubernetes Query Language

Cyphernetes (Cypher for Kubernetes) is a new language and your next superpower.

Express CRUD operations spanning multiple kinds with a compact syntax that is easy to read and a joy to write.

An interactive visualization of your resources will have you thinking in graphs in no time.

How Nightshade Works

The recent emergence of Nightshade, an algorithm that allows to create poisoned data for confusing image-generating AI models, has given new life to the discussion on adversarial attacks on such models. This discussion is also influenced by ethical and social considerations, as such attacks may provide a way for artists, content creators, and others to fight back if they feel treated unjustly by the fact that AI models use their content without permission, but could also be used with bad intentions.

In this article, I want to explain the core concepts of Nightshade. To this end, I will first explain the general idea of data poisoning and highlight its shortcomings. Then I will introduce you to Nightshade, an algorithm that overcomes some of the disadvantages of the naive approach. In the end, I will briefly discuss some ethical considerations that come from its use.

Nicolas Fränkel

Nicolas Fränkel

Developer Advocate with 15+ years experience consulting for many different customers, in a wide range of contexts (such as telecoms, banking, insurances, large retail and public sector). Usually working on Java/Java EE and Spring technologies, but with focused interests like Rich Internet Applications, Testing, CI/CD and DevOps. Also double as a trainer and triples as a book author.

Read More
A Java Geek weekly 63
Share this