r/foojay • • 11h ago

An Introduction to JSR 381, the Java Visual Recognition API

4 Upvotes

We just published an article by Geertjan Wielenga on JSR 381, the Visual Recognition API (VisRec). It is the Java Community Process standard for image classification and related machine-learning tasks in Java, and it reached Final status in February 2022.

The article explains what the API standardizes. Your code calls the javax.visrec interfaces, such as ImageClassifier, and the library that does the recognition is an implementation found on the classpath at runtime. It also shows how to use the official reference implementation built on Deep Netts, and then writes a new implementation backed by DuckDB to show how small the contract is.

Link: https://foojay.io/today/jsr-381-java-visual-recognition-api/


r/foojay • • 11h ago

Spring Boot JPA vs JDBC: about 90 MiB less RSS in a small app

2 Upvotes

On Foojay, we published an article by Ted Kupolov comparing two versions of a small Spring Boot app that tracks GitHub stars. One uses Spring Data JPA with Hibernate, the other uses JdbcTemplate. Both run Spring Boot 4.1.1 on JDK 25 with H2 and Thymeleaf.

Across two runs in reverse order, the JDBC version used about 90 to 91 MiB less RSS, roughly 38% less. It reached its first successful dashboard response in about 3.9 to 4.2 seconds, versus 8.1 to 8.8 seconds for JPA.

The article is clear about its limits. It covers two runs on one macOS host and compares two complete application variants, not Hibernate in isolation. The takeaway is to measure before reaching for Hibernate by default on small services with simple persistence needs.

Read the full article:
https://foojay.io/today/spring-boot-jpa-vs-jdbc/