DEV.co
Open-Source Databases · objectbox

objectbox-go

ObjectBox is an embedded NoSQL database for Go that emphasizes performance and resource efficiency on edge devices, IoT gateways, and embedded systems. It provides a simple CRUD API for persisting Go structs with built-in support for relations, queries, and automatic schema migrations.

Source: GitHub — github.com/objectbox/objectbox-go
1.3k
GitHub stars
50
Forks
Go
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositoryobjectbox/objectbox-go
Ownerobjectbox
Primary languageGo
LicenseApache-2.0 — OSI-approved
Stars1.3k
Forks50
Open issues19
Latest releasev1.9.0 (2025-03-12)
Last updated2025-03-12
Sourcehttps://github.com/objectbox/objectbox-go

What objectbox-go is

ObjectBox Go wraps a native C/C++ database engine with Go bindings, using FlatBuffers for serialization. It requires code generation via objectbox-gogen to create type-safe accessors and relies on native library distribution (libobjectbox.so/dylib/dll) across platforms.

Quickstart

Get the objectbox-go source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/objectbox/objectbox-go.gitcd objectbox-go# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

IoT and Edge Devices

Embedded databases on gateways, micro-controllers, and ECUs where CPU, memory, and power consumption are critical constraints.

Offline-First Mobile & Desktop Apps

Local persistence for Go-based mobile backends or cross-platform desktop applications requiring fast sync capabilities via ObjectBox Sync.

Time-Series Data Collection

Edge analytics and telemetry ingestion using ObjectBox TS extension for time-based data on resource-constrained devices.

Implementation considerations

  • Mandatory code generation step (objectbox-gogen) must run in your build pipeline; generated files must be version-controlled.
  • Installation requires bash script execution to download and link native libraries; coordinate across dev, CI/CD, and deployment environments.
  • Requires careful version alignment: Go package, FlatBuffers, native library (libobjectbox), and code generator must match or errors occur.
  • Schema changes trigger automatic migrations, but test these thoroughly as behavior differs from explicit SQL migration scripts.
  • Relations are built-in but require explicit object linking in code; no implicit lazy-loading—understand cardinality and N+1 patterns.

When to avoid it — and what to weigh

  • SQL Compliance Required — If your application requires standard SQL queries, joins, or compatibility with SQL tools, use SQLite or PostgreSQL instead.
  • Distributed Multi-Node Setup — ObjectBox is an embedded database; for server-side multi-node clusters, consider MongoDB, CockroachDB, or PostgreSQL.
  • Minimal C/C++ Runtime Dependency Unacceptable — The project requires shipping native libraries and careful version synchronization; pure-Go solutions like BoltDB or Badger avoid this complexity.
  • Large Team with SQL Expertise — If your team is heavily invested in SQL and GORM patterns, the learning curve and schema migration model differ significantly.

License & commercial use

Apache License 2.0 (Apache-2.0). This is a permissive OSI-approved license allowing use, modification, and distribution with minimal restrictions. Derivative works must include a copy of the license and notice of changes.

Apache-2.0 explicitly permits commercial use, including closed-source applications. No royalties or attribution required in binary form, though license text and change notices must be included. ObjectBox Ltd. offers optional commercial support and extensions (ObjectBox Sync, TS) under separate terms; review their website for commercial service offerings.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceHigh
Security considerations

No explicit security audit or threat model stated in available data. As an embedded database, physical security of the data file is user responsibility. Encryption at rest not mentioned; review official docs. No built-in authentication for multi-tenant scenarios. Assess threat model for your use case—edge/IoT deployments may have different risk profiles than server backends.

Alternatives to consider

SQLite + GORM

Mature, zero-dependency pure C embedded database with universal SQL support and extensive tooling. Simpler deployment but slower on highly constrained hardware.

BoltDB / BadgerDB

Pure Go key-value stores; no native library dependencies, simpler deployment, easier embedded use. Trade-off: less structured query support and no built-in relations.

MongoDB

Server-based NoSQL with flexible schema, scaling, and replica sets. Overkill for edge/embedded use but suitable for distributed architectures.

Software development agency

Build on objectbox-go with DEV.co software developers

Review installation, schema design, and performance benchmarks. Confirm native library compatibility for your deployment platform. Check ObjectBox Sync licensing if cross-device sync is required.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

objectbox-go FAQ

Do I need to re-run code generation after every schema change?
Yes. After modifying struct tags or adding/removing fields, re-run `go generate ./...` to regenerate accessors. ObjectBox applies migrations automatically, but code generation must track schema.
Can ObjectBox run on Windows and macOS servers?
Yes, native libraries are provided for Windows, macOS, Linux, and mobile platforms (Android, iOS). Verify binary availability for your target platform.
Is ObjectBox suitable for multi-process or concurrent access?
Not clearly stated in provided data. Review official docs for concurrency model and locking behavior. Embedded databases often serialize writer access; confirm your workload.
How does ObjectBox compare to GORM + SQLite for performance?
README cites performance benchmarks on the ObjectBox blog showing advantages vs. SQLite + GORM on constrained devices. Benchmark details not included; review the linked page for methodology and caveats.

Software developers & web developers for hire

From first prototype to production, DEV.co delivers software development services around tools like objectbox-go. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across open-source databases and beyond.

Evaluate ObjectBox for Your Go Project

Review installation, schema design, and performance benchmarks. Confirm native library compatibility for your deployment platform. Check ObjectBox Sync licensing if cross-device sync is required.