Technology Stack
LoomCache is built around Java virtual threads, a versioned binary protocol, and bounded backpressure. It relies on modern Java capabilities rather than large external frameworks. This page describes the core dependencies, the virtual-thread concurrency model, and the Java 25 features that support it.
Small Core Dependency Surface
Section titled “Small Core Dependency Surface”LoomCache core explicitly avoids external cache engines and broad application frameworks in the runtime data path. The core datastore and clustering engine are written in plain Java.
The following table lists the core dependencies:
| Component | Technology | Purpose |
|---|---|---|
| Serialization | Kryo 5.6.2 + LoomCache Compact | High-performance binary serialization with class-specific serializer precedence, schema-evolving Compact records, GenericRecord field access, and a global serializer SPI |
| Hashing | Stable 32-bit key hash | Consistent hashing for partition routing |
| Networking | Blocking ServerSocket + virtual thread per connection | Standard blocking I/O yielding on virtual threads |
| Consensus | Custom Raft | No external consensus dependency |
| Metrics | Micrometer | Prometheus-compatible observability |
No Netty in the core protocol runtime. No Spring (in core). No external cache libraries. The shipped socket transports use JSSE; Netty appears only when applications build their own native TLS contexts.
Virtual Threads (Project Loom)
Section titled “Virtual Threads (Project Loom)”LoomCache builds its concurrency model on Java 25 Virtual Threads.
Java Virtual Threads (Project Loom)
Many lightweight virtual threads multiplexed over a few OS carrier threads.
OS Thread 1
OS Thread 2
Traditional OS threads are heavy: each thread consumes memory and adds context-switching overhead. Thread-per-request scaling has historically stalled at a few thousand concurrent connections.
LoomCache uses a virtual-thread-per-task model (Thread.ofVirtual().start() per connection):
- Every incoming network connection gets its own extremely lightweight virtual thread.
- Blocking I/O operations (such as writing to the TCP socket or reading from the WAL) do not block OS threads. They yield the virtual thread instead.
- This keeps the networking model simple under high concurrency without requiring a reactive programming stack.
Why This Matters
Section titled “Why This Matters”| Model | Connections | Complexity | Memory per Connection |
|---|---|---|---|
| Platform thread per connection | ~10,000 | Moderate (blocking code, high thread cost) | ~1 MB |
| Reactive (WebFlux) | ~100,000 | Very High (reactive chains) | ~10 KB |
| Virtual Threads | High (platform dependent) | Low (blocking code) | ~1 KB |
LoomCache keeps the simplicity of traditional blocking code while benefiting from JVM virtual-thread scheduling. When a virtual thread blocks on socket.read() or fsync(), the carrier OS thread can run other work.
Java 25 Features
Section titled “Java 25 Features”LoomCache uses the following Java 25 LTS features:
- Virtual Threads — Per-connection lightweight threads; each accepted
Socketis handed off to its own virtual thread so blocking I/O code can scale without callback chains Executors.newVirtualThreadPerTaskExecutor()— Used for structured fan-out in graceful shutdown, cross-group scatter queries, and health probes- ScopedValues — Immutable request-context propagation across virtual threads
- Virtual-thread-friendly locking — Hot paths use
ReentrantLockwhere appropriate;synchronizedblocks remain in low-contention lifecycle and membership guards
Project Stats
Section titled “Project Stats”| Metric | Value |
|---|---|
| Maven modules | 6 (loom-common, loom-server, loom-client, loom-cli, loom-spring-boot, loom-integration-tests) |
| Production Java files in listed modules | 705 |
| Test Java files | 1,213 |
| Test method count | Varies with parameterized-test expansion; use the Maven reactor for current evidence |
| Protocol surface | Versioned binary client/server protocol |
| Server Java | 25 (--enable-preview) |
| Client Java | 17+ |
| Default binary port | 5701 for JVM/Spring Boot config; 7654 in Docker samples |
| Default metrics port | 9090 |
To see how these building blocks combine at runtime, read Raft Clustering and Networking Layer.
LoomCache is an independent open-source project. It is not affiliated with, endorsed by, or sponsored by Hazelcast, Inc. or by any other company whose products are named in this documentation. “Hazelcast” is a trademark of Hazelcast, Inc.; references to it are nominative and describe only migration and comparison. All other product and company names are trademarks of their respective owners and are used for identification purposes only.