Version 0.3.0 on Maven Central

Embedded Java record store

The map you know.
Persistence that keeps up.

NitroMap combines fast in-memory access with asynchronous persistence, SQL-like querying, REST, and shared-nothing clustering.

Java 17+ No runtime dependencies Apache 2.0
Application.java running
NitroMap<String, String> customers =
    NitroMap.strings("data/customers");

customers.put("customer-1", "Ada");

String customer =
    customers.get("customer-1");
Memoryhot path
→
Writerasynchronous
→
Logrecoverable
SQL queryable
0 dependencies
240correctness tests
0runtime dependencies
69.0Mpersistent put enqueues/s1
17+Java compatibility

One small library

More than an in-memory map.

NitroMap keeps the common path direct while adding the storage and query capabilities that embedded applications usually have to assemble themselves.

01 Persistence

Writes stay fast. Disk work moves aside.

Mutations update memory first. A background writer coalesces changed keys, serializes the latest state, and forces each batch once.

put → dirty key → batched log
02 Familiar API

ConcurrentMap on the surface.

A composed ConcurrentHashMap keeps reads direct while every supported mutation passes through persistence and index hooks.

03 Query engine

Ask more of your map.

Filter, join, group, aggregate, order, and limit records with a focused SQL-like language.

SELECT city, SUM(total)
FROM orders
GROUP BY city
04 Shared nothing

Scale memory and compute across processes.

Stable logical partitions route each key to exactly one owner. No replica, quorum, or hidden fallback copy.

ABC
05 Built-in REST

Integration without a framework.

Expose one or many named maps using Java's built-in networking, with authorization and filter hooks.

PUT/maps/customers/entries/{key}
06 Bounded memory

Stay in control under pressure.

Opt into background eviction, bounded query operators, and disk spill for larger joins, groups, and sorts.

Designed around the hot path

The application thread does less.

A persistent mutation changes the map, marks the key, and returns. Serialization and file I/O happen on the background writer.

  • ✓Repeated changes coalesce before disk
  • ✓One force-to-disk operation per batch
  • ✓Torn final records are discarded safely
  • ✓Atomic manual log compaction
Read the persistence model →
Mutation pathapplication thread
1
Update memoryConcurrentHashMap
nanoseconds
mark key
2
Coalesce driftlatest key state wins
in memory
background worker
3
Append batchsequential file I/O
off path

SQL-like querying

A compact engine with serious range.

Compose multiple joins, nested conditions, parameters, grouping, common aggregates, ordering, and limits in one cached query plan.

SELECT c.city, c.name,
       COUNT(*) AS order_count,
       SUM(o.total) AS total_sales,
       AVG(o.total) AS average_order,
       MIN(o.total) AS smallest_order,
       MAX(o.total) AS largest_order
FROM customers c
JOIN orders o ON c._key = o.customerId
WHERE (c.city = :primaryCity
       OR c.city = :secondaryCity)
  AND c.score >= :minimumScore
  AND o.total >= :minimumOrder
GROUP BY c.city, c.name
ORDER BY total_sales DESC, average_order DESC
LIMIT 20
SELECTINNER JOINWHEREAND / ORGROUP BYCOUNTSUMAVGMIN / MAXORDER BYLIMIT
1,024 logical
partitions
Node Alocal map + log
Node Blocal map + log
Node Clocal map + log

Shared-nothing clustering

Distribute the data, not copies of it.

Stable FNV-1a hashing maps every key to a logical partition and one configured owner. Each node remains an ordinary local NitroMap with its own persistence.

01

Zero replicationNo quorum, replica, or fallback read.

02

Bounded distributed SQLStreamed scans, hash shuffles, partial aggregation, and disk spill.

03

Explicit failureIf an owner is unavailable, its partitions fail instead of returning stale data.

Explore clustering →

Measured, not imagined

A fast path you can inspect.

Reference results from the project harness on Apple silicon. They are directional, transparent, and intentionally free of speed assertions.

In-memory get 277.7M ops/s
3.6 ns/op median reference cost
In-memory put131.7M ops/s
Persistent put enqueue69.0M ops/s
Direct key query1.08M queries/s
Secondary-index query966.3K queries/s

1 Reference run: macOS on ARM, 10 available processors, Java 25 runtime, compiled for Java 17. Workload, hardware, filesystem, thermals, and contention will change results. Run the bundled benchmark profile on your target system.

Start in one minute

One dependency.
No server to operate.

Add NitroMap from Maven Central, choose persistent or memory-only storage, and keep using normal map operations.

pom.xml
<dependency>
  <groupId>io.github.kirstenali</groupId>
  <artifactId>nitromap</artifactId>
  <version>0.3.0</version>
</dependency>
Customers.java
NitroMap<String, String> customers =
    NitroMap.strings("data/customers");

customers.put("customer-1", "Ada");

Clear tradeoffs

Small enough to understand.
Honest enough to trust.

01Asynchronous by designRecent writes can be lost on hard termination before the next disk batch.

02No hidden availability storyCluster owners hold the only copy. Losing a node loses access to its partitions.

03Focused SQL, not a database disguiseNo transactions, outer joins, subqueries, or cluster-wide snapshots.

Open source · Apache 2.0

Put your hot data
on a shorter path.

Fast local state, practical persistence, and query power in one compact Java library.