EmbedJNoSQL is a document and key-value database — plus Redis-style structures, wide-column families, and experimental vector search — in a single pure-Java JAR. No Docker. No daemon. No infrastructure.
// One line. Zero infrastructure.
try (var db = EmbedJNoSQL.inMemory()) {
// ── Documents with nested field queries ─────────────────────
db.documentCollection("users")
.insert(Document.of("name", "Alice").add("city", "Nairobi"));
List<Document> users = db.documentCollection("users")
.find(Query.eq("city", "Nairobi").and(Query.gte("age", 18)));
// ── Redis-style structures ───────────────────────────────────
db.listBucket("job-queue").rpush("tasks", "send-email", "resize-image");
db.hashBucket("profiles").hset("u1", "tier", "GOLD");
// ── Key-Value with TTL ───────────────────────────────────────
db.keyValueBucket("sessions").put("tok-abc", "user-1");
db.keyValueBucket("sessions").expire("tok-abc", Duration.ofMinutes(30));
}
EmbedJNoSQL has exactly one execution engine. Documents, Key-Value, Redis-style structures, and Wide-Column families are data models on top of the same storage substrate — no second engine to configure.
// Fluent document query — dotted paths, multi-operator
List<Document> orders = db
.documentCollection("orders")
.find(Query.eq("customer.tier", "GOLD")
.and(Query.gte("total", 150.0))
.sortBy("createdAt", Query.SortOrder.DESC)
.limit(10));
// Entity-mapped fluent query
List<Product> cheap = db
.from(Product.class)
.where("category = ? AND price <= ?", "Peripherals", 100.0)
.orderBy("price ASC")
.limit(20)
.list();
// Key-value with per-key TTL
db.keyValueBucket("sessions").put("tok-abc", "user-1");
db.keyValueBucket("sessions").expire("tok-abc", Duration.ofMinutes(30));
// Lists (queues)
db.listBucket("job-queue").rpush("tasks", "send-email", "resize-img");
String next = db.listBucket("job-queue").lpop("tasks");
// Sets (memberships)
db.setBucket("permissions").sadd("admin", "write", "delete", "export");
boolean can = db.setBucket("permissions").sismember("admin", "delete");
// Hashes (entity fields)
db.hashBucket("profiles").hset("u1", "tier", "GOLD");
// In-memory — tests, ephemeral state, microservices
EmbedJNoSQL db = EmbedJNoSQL.inMemory();
// File + WAL — simple local persistence (one-liner)
EmbedJNoSQL db = EmbedJNoSQL.open("./data/myapp");
// Temporary file DB — auto-cleanup on JVM exit
EmbedJNoSQL db = EmbedJNoSQL.openTemp();
// Advanced: B-Tree or LSM-Tree engine
EmbedJNoSQL db = EmbedJNoSQL.create(EmbedJNoSQL.embed()
.storageEngine(StorageEngineType.LSM_TREE)
.persistTo("data/myapp")
.autoFlush(true)
.buildConfig());
// MVCC transactions — atomic across collections
try (var tx = db.beginTransaction()) {
tx.documentCollection("accounts")
.update("acc-1", "balance", 4750.0);
tx.documentCollection("accounts")
.update("acc-2", "balance", 5250.0);
tx.commit(); // both commit, or both roll back
}
// WAL-backed persistence — open the same path after a crash
try (var db = EmbedJNoSQL.open("./data")) {
// WAL replayed automatically — all prior commits recovered
}
Experience embedded multi-model queries in action. Choose a preset or edit the query below, then execute against the simulated JVM in-memory engine.
Zero external servers. A rich, responsive developer console embedded directly into your application process. Inspect collections, execute queries, view WAL telemetry, and monitor health at http://localhost:8080/console.
{
"id": "ord-98241",
"customer": {
"name": "Alice Walker",
"tier": "GOLD"
},
"items": [
{ "sku": "KB-RGB-01", "qty": 1, "price": 89.99 },
{ "sku": "MS-PRO-02", "qty": 1, "price": 65.00 }
],
"total": 154.99,
"status": "CONFIRMED"
}
Switch between ephemeral in-memory tests and durable production storage with a single configuration parameter. The query and collection API remains 100% identical.
Auto-configuration, health indicators, and Repository support — drop one dependency, get a fully wired database bean. Existing entities annotated with Jakarta Persistence or Hibernate annotations are read as mapping hints: no JPA runtime, no JDBC driver, no rewrite.
No framework at all? One line of code is all it takes. Vert.x, Javalin, Helidon, Dropwizard — any JVM runtime works out of the box. See integration patterns ↓
EmbedJNoSQL was engineered with a zero-daemon, in-process architecture. That gives it a distinct advantage across modern Java web frameworks:
| Framework | Integration Style | Maturity in EmbedJNoSQL | Code Pattern |
|---|---|---|---|
| Spring Boot 4 / 3.4+ | @AutoConfiguration, Spring Data Repositories, @Transactional |
First-Class Starter (embed-jnosql-spring-boot-starter) |
@Autowired EmbedJNoSQL db; |
| Quarkus 3.x | CDI Extension (@ApplicationScoped), DevServices |
Dedicated Extension (quarkus-extension/) |
@Inject EmbedJNoSQL db; |
| Micronaut 4.x | Compile-Time DI (@Factory, @Singleton) |
Dedicated Integration (micronaut-integration/) |
@Inject EmbedJNoSQL db; |
| Eclipse Vert.x 4.x | Non-blocking / Worker dispatch (executeBlocking) |
Validated Pattern (demo/vertx-demo/) |
vertx.executeBlocking(...) |
| Javalin / Ktor / Helidon | Lightweight programmatic injection | Native (Zero Glue Code) | EmbedJNoSQL.inMemory() |
@Autowired EmbedJNoSQL db bean, health indicator, property binding via embedjnosql.*, and full EmbedRepository support.DocumentTemplate, Jakarta NoSQL entities, and EmbedNoSQLRepository with CrudRepository semantics.embed-jnosql-core directly. Dispatch blocking DB calls via vertx.executeBlocking() or deploy a Worker Verticle to protect the event loop. ACID transactions work inside executeBlocking closures.EmbedJNoSQL.inMemory(). No framework required. Works in any JVM application.EmbedJNoSQL is a plain Java library — no bytecode agent, no annotation processor, no CDI container needed. Every framework integration follows the same lifecycle contract.
EmbedJNoSQL is synchronous and in-process. The single rule for Vert.x: never call it directly from the event loop. Wrap with executeBlocking() in route handlers, or deploy as a Worker Verticle for batch/event-bus workloads.
public class ProductVerticle extends AbstractVerticle {
private EmbedJNoSQL db;
private DocumentCollection products;
@Override
public void start(Promise<Void> startPromise) {
// ✅ Safe — called once at startup, not on the hot event loop
db = EmbedJNoSQL.create(EmbedJNoSQLConfig.builder()
.storageEngine(IN_MEMORY).buildConfig());
products = db.documentCollection("products");
Router router = Router.router(vertx);
router.get("/api/products").handler(this::getAll);
vertx.createHttpServer().requestHandler(router).listen(8080)
.onSuccess(s -> startPromise.complete());
}
private void getAll(RoutingContext ctx) {
// ⚠️ executeBlocking keeps the event loop free
vertx.<List<Product>>executeBlocking(() ->
products.findAll().stream().map(Product::fromDocument).toList()
).onSuccess(list -> ctx.response()
.putHeader("content-type", "application/json")
.end(Json.encode(list)))
.onFailure(ctx::fail);
}
}
public class DbWorkerVerticle extends AbstractVerticle {
private EmbedJNoSQL db;
@Override
public void start() {
db = EmbedJNoSQL.open("./data/myapp");
vertx.eventBus().<JsonObject>consumer("db.products.upsert", msg -> {
try {
Product p = msg.body().mapTo(Product.class);
db.documentCollection("products").insert(p.toDocument());
msg.reply(new JsonObject().put("status", "ok"));
} catch (Exception e) { msg.fail(500, e.getMessage()); }
});
}
@Override
public void stop() { if (db != null) db.close(); }
}
// Deploy as a worker (thread-pool isolated)
vertx.deployVerticle(new DbWorkerVerticle(),
new DeploymentOptions().setWorker(true));
executeBlocking() inside route handlers, or use a Worker Verticle for event-bus consumers.
For two decades, Java developers had two choices: embed H2 or SQLite (relational only), or spin up heavy external containers (MongoDB, Redis, Cassandra).
EmbedJNoSQL fills the missing quadrant: pure embedded, zero-infrastructure convenience with modern multi-model NoSQL flexibility.
EmbedJNoSQL is opinionated about what it refuses to be. Every decision follows from the same constraint: it must run inside your JVM with nothing else running.
Clone, install, then add a single dependency to your build file.
v1.0.2 artifacts and
their required signatures are published and verified. Hosted validation gates passed. See the
release notes.
Demo applications are validation consumers, not release artifacts.
<dependency>
<groupId>io.github.kael-tombo</groupId>
<artifactId>embed-jnosql-core</artifactId>
<version>1.0.2</version>
</dependency>
implementation('io.github.kael-tombo:embed-jnosql-core:1.0.2')
<dependency>
<groupId>io.github.kael-tombo</groupId>
<artifactId>embed-jnosql-spring-boot-starter</artifactId>
<version>1.0.2</version>
</dependency>
// Eclipse JNoSQL / Jakarta NoSQL DocumentTemplate
EmbedJNoSQL db = EmbedJNoSQL.inMemory();
DocumentTemplate template = new EclipseDocumentTemplate(db);
// Persist Jakarta NoSQL entities directly
User saved = template.insert(new User("u1", "Alice"));
Optional<User> found = template.find(User.class, "u1");
<dependency>
<groupId>io.github.kael-tombo</groupId>
<artifactId>embed-jnosql-quarkus-extension-runtime</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>io.github.kael-tombo</groupId>
<artifactId>embedjnosql-micronaut-integration</artifactId>
<version>1.0.2</version>
</dependency>
Every demo is a standalone Maven project with a runnable main class and a JUnit suite — clone the repo, run mvn test, and the feature is proven against a live engine.
EmbedJNoSQL embeds everything. You focus purely on your domain logic — documents, keys, and data structures available in one line of Java.
This is a NoSQL database: no SQL engine, no JDBC driver, no relational schema. Documents are schemaless unless you register validation rules. A stored reference is an id you resolve yourself — never an enforced foreign key. Vector search and Kafka CDC are experimental. We say so plainly, in the README and in every release note.