An open-source JSON database with SQL queries — fully replicated, sharded, and starting life as a single file so developers can innovate fast. Designed from the ground up with mainframe-inspired direct addressing, for airlines running pure Offer & Order Management.
Floor numbers from a benchmark you can run yourself in five minutes. Modern laptops comfortably push 20M+ documents per node — sharding extends linearly into the billions and beyond.
Modern airline retailing demands JSON-shaped offers and orders, sub-millisecond lookups, and a database the airline actually controls. DocumentForge is engineered for that exact workload — and the codebase is simple enough that an airline's own engineers can read every line.
Mainframe-inspired direct addressing means every document has a known physical address — the lookup is the read, not a journey through a B-tree on every hop. 210,000 indexed point lookups per second on a single laptop, sustained, while the dataset grows past 20 million documents per node. Pricing engines, shopping carts, and order retrievals stay sub-millisecond at airline scale, and sharding extends the same numbers linearly into the billions.
JSON is the native shape of every offer, order, service, and bundle in the IATA Offers & Orders programme. Embed the JSON exactly as the schema defines it, query nested arrays of pax × journey × cabin without an ORM in the middle, and let the data look the way the standard does.
It's a file on a disk you own, in a process you run, in a datacenter you control. No vendor cloud, no egress fees, no opaque licensing audit risk, no hostage data. Open the database file with our binary or any other tool you write — it's yours.
Write-ahead logging with CRC32 per record. Per-page checksums detect silent corruption on every read. Logical replication with monotonic sequence numbers and auto-failover. Planned handover for zero-data-loss datacenter moves — the kind of safety airline operations require.
A small team can read the whole codebase in an afternoon. No exotic dependencies, no plug-in zoo, no hidden services. Cross-compiles to a single 47 MB self-contained binary that runs on Windows, Linux, and macOS — no runtime install required.
Start with one .dfdb file beside your service. Add a follower for read scaling. Add consistent-hash shards for horizontal scale. Online rebalance moves data while clients keep reading and writing — no maintenance windows, no rip-and-replace.
Self-contained binary. No .NET install needed. Drop on a laptop, seed 10,000 orders, and see the numbers yourself in under five minutes.
DocumentForge is a .NET library at heart, but ships as a self-contained binary that exposes a REST API for any language. Pick the tab that matches your stack.
using DocumentForge.Engine; // Open or create a database file using var db = DocumentForgeDb.OpenOrCreate("airline.dfdb"); // Insert an Order document (IATA-shaped JSON) db.Insert("orders", @"{ ""orderId"": ""ABC123"", ""passenger"": { ""lastName"": ""Smith"" }, ""flights"": [{ ""flightNumber"": ""AA100"" }] }"); // Index the fields you query db.CreateIndex("orders", "orderId", "idx_oid", unique: true); // SQL over JSON var r = db.Execute("SELECT * FROM orders WHERE orderId = 'ABC123'"); Console.WriteLine(r.Documents[0].ToJson());
# Start the node (one binary, one command) ./dfdb serve --port 5000 --data-dir ./data # Insert curl -X POST http://localhost:5000/collections/orders/documents \ -H "Content-Type: application/json" \ -d '{ "orderId": "ABC123", "passenger": { "lastName": "Smith" }, "flights": [{ "flightNumber": "AA100" }] }' # Query with SQL curl -X POST http://localhost:5000/query \ -H "Content-Type: application/json" \ -d '{"sql": "SELECT * FROM orders WHERE orderId = '\''ABC123'\''"}'
// Any HTTP client works — here HttpClient (JDK 11+) var http = HttpClient.newHttpClient(); var body = """ { "sql": "SELECT * FROM orders WHERE orderId = 'ABC123'" } """; var req = HttpRequest.newBuilder() .uri(URI.create("http://localhost:5000/query")) .header("Content-Type", "application/json") .POST(BodyPublishers.ofString(body)) .build(); var resp = http.send(req, BodyHandlers.ofString()); System.out.println(resp.body());
import httpx # Insert httpx.post( "http://localhost:5000/collections/orders/documents", json={ "orderId": "ABC123", "passenger": {"lastName": "Smith"}, "flights": [{"flightNumber": "AA100"}], }, ) # Query r = httpx.post( "http://localhost:5000/query", json={"sql": "SELECT * FROM orders WHERE orderId = 'ABC123'"}, ) print(r.json())
// Node 20+ — global fetch, no dependencies await fetch("http://localhost:5000/collections/orders/documents", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ orderId: "ABC123", passenger: { lastName: "Smith" }, flights: [{ flightNumber: "AA100" }], }), }); const r = await fetch("http://localhost:5000/query", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ sql: "SELECT * FROM orders WHERE orderId = 'ABC123'" }), }); console.log(await r.json());
Why DocumentForge for airline Offer & Order Management. The IATA MAR alignment, the safety story, the “your-data-your-control” case.
Download the binary, seed 10K orders, run the benchmark. From zero to your first SQL query in under five minutes.
Tech specs for engineers: query language, data modeling, replication, sharding, deployment, security, CLI.
dfdb binary, a Next.js admin UI, and full reference documentation. Use it for embedded scenarios, prototypes, small-to-medium production workloads, and understanding how databases actually work.