Context
The Go client supports a local/embedded mode that runs Chroma in-process without requiring a separate server. The Java client has no equivalent.
Go client modes
| Mode |
Description |
| Embedded |
Runs Chroma in-process via a Rust shim (chroma-go-local). No network calls. |
| Server |
Starts a local HTTP server in-process and delegates to the HTTP client. |
Both modes support persistence to disk.
Suggested Java API
Client client = ChromaClient.local()
.persistDirectory(Path.of("/data/chroma"))
.build();
Implementation considerations
- Would require JNI/JNA bindings to the Chroma Rust core, or a shim similar to
chroma-go-local
- Alternative: bundle a Chroma server binary and manage its lifecycle
- This is likely a large effort — may be better suited for a separate library/module
- Could leverage TestContainers approach for dev/test scenarios as an interim
Reference
- Go client:
NewLocalClient(opts ...LocalClientOption) (*LocalClient, error)
- Go runtime modes:
LocalRuntimeModeEmbedded, LocalRuntimeModeServer
Context
The Go client supports a local/embedded mode that runs Chroma in-process without requiring a separate server. The Java client has no equivalent.
Go client modes
chroma-go-local). No network calls.Both modes support persistence to disk.
Suggested Java API
Implementation considerations
chroma-go-localReference
NewLocalClient(opts ...LocalClientOption) (*LocalClient, error)LocalRuntimeModeEmbedded,LocalRuntimeModeServer