Skip to content
NoeticEcho
All projects

Open source

TypedbEx

An Elixir driver for TypeDB 3.x, in two packages, HTTP and gRPC, that decode into the same structs. We wrote it because we could not find one.

By The Editors @editors

TypedbEx is two Elixir drivers for TypeDB 3.12 and newer, in one repository, under Apache-2.0. typedb speaks the HTTP API and is at 0.11.0. typedb_grpc speaks gRPC and is at 0.5.0. Both decode into the same structs and fail with the same error, so switching transports means changing the module an application calls and not the code that reads the answers.

TypeDB Ltd. publishes no Elixir driver, and Reminisce and our knowledge base need one. These are community drivers, not official ones.

There are two because neither wins. On one machine against TypeDB 3.12.1, with driver and server on loopback:

  • 20,000 answers in one read: 1004 ms over HTTP, 248 ms over gRPC.
  • 1,000 writes in one transaction: 861 ms over HTTP, 622 ms over gRPC.
  • 200 independent point reads: 213 ms over HTTP, 249 ms over gRPC.

The last row is what a request-serving application does, and gRPC loses it, because its protocol has no one-shot query. typedb_grpc also streams 50,000 answers with no memory retained, pipelines reads inside a transaction, and exports and imports whole databases, which the HTTP API cannot do at all. Its dumps restore through TypeDB's own console, and the console's restore through the driver.

CI runs one shared behaviour suite against a server speaking both protocols. AUDIT.md keeps eight audits of the code, findings included. The repository also carries a Claude plugin that teaches TypeQL 3 and these two packages. It is documentation only: no server, no hooks, nothing that runs.

What it does not do

The HTTP driver delivers each answer whole, capped at 10,000 by default. TypeDB.stream/4 pages through more at a round trip per page, and that is paging, not streaming.

A connection points at one server. There is no failover, no read-replica routing and no reconnection to another node. That choice was made deliberately for 1.0, and neither package has reached 1.0.

Pipelining is for reads only. TypeDB aborts a write's answer stream when the next write starts.