ObjectBox Sync
Sync HomeBlogTwitterGitHub
  • Data Synchronization
  • Sync Client
  • ObjectBox Sync Server
  • Sync Server Configuration
    • JWT Authentication
  • Data model evolution
  • Sync Cluster
  • MongoDB Sync Connector
    • MongoDB Configuration
    • ObjectBox Sync Connector Setup
    • MongoDB Data Mapping
  • Advanced Sync
    • Object IDs and Sync
    • Embedded Sync Server
  • Troubleshooting Sync
  • GraphQL
    • GraphQL Queries
    • GraphQL Mutations
    • GraphQL Python Client
  • ObjectBox Database Developer Docs
    • Java, Kotlin, Flutter/Dart
    • C, C++
    • Swift
    • Go
Powered by GitBook
On this page
  • Bi-directional Synchronization with MongoDB
  • Roadmap
  • Understanding ObjectBox and MongoDB
  • Next Steps

Was this helpful?

MongoDB Sync Connector

Bi-directional Data Sync with MongoDB - on-premise and to the cloud

PreviousSync ClusterNextMongoDB Configuration

Last updated 4 days ago

Was this helpful?

ObjectBox Data Sync syncs data with MongoDB using the integrated . Changes made on ObjectBox clients are synchronized in real-time to MongoDB and vice versa.

Bi-directional Synchronization with MongoDB

ObjectBox Sync brings your data in MongoDB to the edge (e.g. mobile and IoT devices, big and small servers) and synchronizes changes back to MongoDB. By using ObjectBox Sync, you can make your MongoDB data always available: continue to work offline and sync in real-time when online.

Roadmap

While ObjectBox Sync is an established product, the MongoDB Connector is in its early stages. You can still get started with POCs or integrations right away. The timeline below enables you to align your development with ours and pick up speed. Once new features are out, you profit immediately.

Planned Date
Released
Connector Version
Main features

Oktober 2024

Alpha 1

Two-way sync between MongoDB and ObjectBox for changes that are happening live.

January 2025

Alpha 2

JWT authentication, Mapping for all MongoDB data types

February 2025

Alpha 3

Relation mapping (to-one and many-to-many)

March 2025

Alpha 4

Support for additional MongoDB ID types

April 2025

Alpha 5 (2025-04-01)

Use MongoDB transactions, better change tracking, improved error handling, improved MongoDB Admin page

May 2025

Beta 1 (2025-05-05)

Import initial data from MongoDB, pick-up sync at any point. New admin page for full-syncs.

End of May 2025

Beta 2

Server-side rules to select data for sync per user

June 2025

1.0

Initial release incorporating most important user feedback

We'll update the plan regularly.

Understanding ObjectBox and MongoDB

ObjectBox and MongoDB have many similarities. Nevertheless, it's important to understand some differences in terminology and concepts between the two databases. The following table illustrates these differences. It serves as background information on how to map things between the two systems:

Concept
ObjectBox
MongoDB

Database containing the data

A store, grouped into types (data classes).

A database, grouped into collections.

What your application "opens"

Using a name or directory a single store (database) is opened locally on device. (In the case of Sync, this is the "client database".) Multiple stores can be opened, which are strictly separate.

A client is used to connect to a MongoDB server. All databases can be accessed on the server remotely.

Arranging data in a database (e.g. data sets)

A box holds all objects of the same type. A type typically matches a data class in programming languages. It's part of a strict schema (data model) that is enforced. The type definition consists of a fixed set of properties.

Collections are used to group documents together. By default, no strict rules are imposed (schema-less).

Data record

An object is an instance of a type. It can have data values for the properties defined in the type.

A document is a set of data values called fields. It's very similar to a JSON file.

Modelling related data

Objects can have to-one and to-many relationships to other objects. Relationships are bidirectional. Data is typically normalized.

Typically, a document embeds all "related data" into itself resulting in larger documents. Data is typically not normalized. Alternatively, one can also choose to use references, which is more similar to relationships.

Many-to-many relationships

Fully supported. Unlike to-one relationships, the data is stored outside the object. Updating relations is very efficient. There's no user-defined order and no duplicates.

Alternative modelling by embedding or referencing documents. Inside the document, you can have an array of IDs in a user-defined order allowing duplicates.

Nested data records

Nested data is supported by flex properties. E.g. these allow maps, which can contain nested data structures (JSON-like).

Documents contain nested data by default.

Identifiers (IDs)

IDs are 64-bit integers. They are unique within its box and database instance.

MongoDB uses Object ID (short: OID; 12 bytes) by default and supports other ID types. OIDs are unique within their collection and likely globally unique.

Next Steps

  • Setup a MongoDB instance, either locally or in the cloud.

  • Setup an ObjectBox Server instance and configure the MongoDB Sync Connector.

  • Import data from MongoDB to ObjectBox initially.

  • Now, two-way data synchronization between MongoDB and ObjectBox automatically happens.

If you are coming from Atlas Device Sync, you already now that it on September 30, 2025. Thus, it's a good idea to to get started with your migration.

reaches its end-of-life
contact ObjectBox asap
✅
✅
✅
✅
✅
✅
MongoDB Sync Connector
Get your MongoDB Sync Connector Alpha
ObjectBox Sync Connector for MongoDB: Architecture
Architecture: MongoDB <--> ObjectBox Sync Server <--> ObjectBox Sync Client