Customizable conflict resolution for offline-first apps with ObjectBox Sync

Customizable conflict resolution for offline-first apps with ObjectBox Sync

What happens when two offline devices edit the same thing?

ObjectBox Sync now gives developers more control over concurrent updates. With the latest Sync Server release and updated Dart/Flutter and Java clients, developers can choose how conflicting writes are resolved in offline-first and distributed applications. The feature is available with ObjectBox Dart/Flutter 5.3.1, ObjectBox Java/Kotlin/Android 5.4.1, and Sync Server 2026-03-26.

What is ObjectBox Sync?
ObjectBox Sync is an offline-first sync engine that keeps data consistent across devices and backend systems, even with unreliable connectivity. It supports user-specific sync for personalized data, customizable conflict resolution, and MongoDB integration for backend connectivity.

When multiple devices update the same object, ObjectBox Sync can now resolve conflicts using two new mechanisms: Sync Clock and Sync Precedence. Sync Clock is managed automatically by ObjectBox Sync and tracks the “time” for which write should win. Sync Precedence is controlled by the developer and lets business rules decide which write is more important. These options can be used independently or together. When both are present, precedence is evaluated first, and the sync clock acts as the tie-breaker.

The new ObjectBox Sync Clock was designed for offline-first systems. It is an advanced hybrid logical clock (HLC) that combines wall time with a logical counter. That means writes can still be ordered consistently even when devices are offline, reconnect at different times, or have some clock skew. The clock tracks real time as closely as possible, never goes backwards, and uses extra compensation for clocks set in the future, making it particularly robust for concurrent offline edits. This gives developers a sensible default for real-world sync scenarios. A write that was actually made later can win even if it reaches the server earlier or later than another update.

For teams that need more than time-based ordering, Sync Precedence adds another layer of control. Developers can assign a precedence value to an object and ensure that higher-precedence changes win in a conflict. That makes it possible to encode workflow and authority directly into synchronization behavior. A closed order can stay closed even if a newer edit arrives that was still based on the open state. An approval state can override a draft state. A manager’s correction can take precedence over a regular user update.

Sync Conflict Handling

The combination of both approaches is especially powerful. Developers can use precedence to represent business intent, and let the sync clock resolve ties fairly and automatically. The result is conflict resolution that is both application-aware and offline-friendly.

For developers building collaborative, field, retail, logistics, or other edge applications, this update removes a major source of friction in distributed data handling. You can now decide whether conflicts should be resolved by when a change happened, by how important that change is, or by a combination of both.

Availability

ObjectBox Sync customizable conflict resolution is available now with:

Other clients will follow soon.

User-specific Data Sync & MongoDB Connector: ObjectBox 5.0 is here

User-specific Data Sync & MongoDB Connector: ObjectBox 5.0 is here

ObjectBox 5.0 delivers the most requested updates across the board. If you are building an offline-first application and need a seamless Data Sync solution, we believe, this is the upgrade you have been waiting for:

  • New Sync Filters for true user-specific data sync (GA)
  • A new MongoDB Sync Connector (GA)
  • 5.0 database/client releases for Dart, Java/Kotlin, Swift, C, and C++
  • Better examples, stability improvements, and quality-of-life fixes

Smarter Sync: user-specific and with MongoDB

The big news is all around ObjectBox Sync and the two major new features: user-specific sync filters and connecting to MongoDB. After working closely with select customers for the last months, we are happy to announce the general availability for both features.

With 5.0, you can now define Sync Filters to control exactly which data each Sync user receives.

  • Define filter expressions on the server that run per user
  • Use auth/JWT and client-provided variables inside those filters
  • Enable “each user only sees their own data” without duplicating data or maintaining separate partitions

Check the Sync Filters docs for all details.

For the new MongoDB Sync Connector, we’ve partnered with MongoDB to create a tight integration:

  • Sync your data from and to MongoDB in “real time”
  • Edge setup for multiple locations: deploy one ObjectBox Sync Server per location, all syncing to one central MongoDB
  • Integrate ObjectBox-powered apps with an existing MongoDB database or analytics pipeline

This brings the best of both worlds: a fast, embedded offline-first database for your mobile, IoT, or embedded apps, and a central MongoDB store for backend integration, reporting, and other services. Best of all, you don’t need a custom application backend – the ObjectBox Sync Server handles the heavy lifting, keeping your app data in sync with MongoDB automatically.For more information, check our MongoDB page or the MongoDB Sync Connector documentation.

Migrating from Realm Device Sync?

If you are looking for an alternative to the deprecated MongoDB Realm Device Sync, ObjectBox is the natural choice. Like Realm, ObjectBox is object-oriented, making migrating from Realm to ObjectBox straightforward and fast. You get the same offline-first capabilities and out-of-the-box Data Sync you know plus: industry-leading speed and efficiency.

5.0 “Client” Database Releases

The ObjectBox database is known for its extremely high CRUD performance and vector search for AI use cases. It can be used as a standalone embedded database or in combination with ObjectBox Sync. As it is closely integrated into programming languages to offer native object persistence, the 5.0 release spans multiple releases:

All 5.0 Sync clients are compatible with the new Sync Filters and MongoDB Sync Connector. Check the release links above for language-specific improvements.

Further reading and links

There has never been a better time to build with ObjectBox. Here is how to get started:

 

Get started with Syncing Data in Java

Get started with Syncing Data in Java

ObjectBox Data Sync Setup Steps for Java (5 Minute tutorial)

Note: ObjectBox Data Sync always includes MongoDB Connector

1Register for Trial

2Pull Docker Image

docker pull objectboxio/sync-server-trial

3Update Build Configuration

Go to your gradle build file and make this change:

// Change from: apply plugin: 'io.objectbox' // To: apply plugin: 'io.objectbox.sync'

4Add @Sync to Entities

Add the import and annotation to each entity you want to sync:

import io.objectbox.annotation.Sync; // Add this import @Sync // Add this annotation @Entity public class YourEntity { // Your entity fields (no relationships to non-synced entities) }

5Generate Data Model

  • Build project → find gradle-support/objectbox-models/default.json
  • Copy to project root as objectbox-model.json

6Start Sync Server

Windows:
docker run --rm -it --volume "%cd%:/data" --publish 127.0.0.1:9999:9999 --publish 127.0.0.1:9980:9980 objectboxio/sync-server-trial --model /data/objectbox-model.json --unsecured-no-authentication --admin-bind 0.0.0.0:9980
Linux/Mac:
docker run --rm -it --volume "$(pwd):/data" --publish 127.0.0.1:9999:9999 --publish 127.0.0.1:9980:9980 objectboxio/sync-server-trial --model /data/objectbox-model.json --unsecured-no-authentication --admin-bind 0.0.0.0:9980

7Add Sync Client to App

Add these imports to your main application class:

import io.objectbox.sync.Sync; import io.objectbox.sync.SyncClient; import io.objectbox.sync.SyncCredentials;

Add this code after creating your ObjectBox store:

if (Sync.isAvailable()) { SyncClient syncClient = Sync.client(store, "ws://127.0.0.1:9999", SyncCredentials.none()).build(); syncClient.start(); logger.info("Sync client started"); }
Note:
  • Important: Never close ObjectBox store while sync is active (generally, there is rarely ever need to close the store, so if you feel you need to, be very careful with this)
  • Only sync entities that don't have relationships to non-synced entities
  • Vector embeddings are not yet syncable (reach out to us if you need this!)
  • Keep the store open throughout application lifecycle
  • To test, run app with different database paths and add data in one instance, verify it syncs to the other

ObjectBox Data Sync Server & MongoDB Connector Updates

ObjectBox Data Sync Server & MongoDB Connector Updates

We’re excited to announce the latest updates to ObjectBox Sync Server with our recent 2025-06-02 and 2025-05-27 releases. These updates bring significant improvements to data handling, authentication, and user interface, making your data synchronization experience even smoother.

Powering Up Your Data Flow

Exciting news for developers! Starting from late May 2025, ObjectBox Sync Server trials are publicly available as Docker images on Docker Hub. This means you can now effortlessly pull our Sync Server trial directly with a simple command:

This provides a straightforward, no-fuss way to start testing the Sync Server with your data. Each trial gives you 30 days per dataset to explore the full spectrum of ObjectBox Sync capabilities, allowing you to experience its power and ease of use firsthand.

New “JSON to Native” External Property Type

Managing complex, nested JSON structures and mapping them to native database objects can be cumbersome and lead to data integrity issues. One of the most powerful additions in the 2025-05-27 release is the new “JSON to native” property type mapping. This feature allows you to convert strings to nested documents in MongoDB, providing a more elegant way to handle complex data structures. Note: This feature requires client version 4.3 or newer to function correctly.

Here’s how you can implement it in your applications:

Key Advantages of “JSON to Native”

  • You can use your preferred JSON API to access the data
  • It supports nested documents and arrays
  • The order of keys is preserved, unlike with flex properties

Increased Maximum Sync Message Size

We’ve increased the maximum Sync message size to 32 MB, allowing for larger data transfers between clients and the server. This improvement is particularly useful for applications that need to synchronize larger chunks of data or complex documents. Clients version 4.3.0 and above are required.

Enhanced JWT Authentication

JWT authentication has been improved with more flexible options for public key configurations. Public key URLs can now refer directly to PEM public key or X509 certificate files, in addition to the previously supported JSON formats.

This means you can now use the following formats for your public key URL:

  1. Key-value JSON file
  2. JWKS (JSON Web Key Set)
  3. PEM public keyfile
  4. PEM certificate file

This enhancement provides more flexibility when integrating ObjectBox Sync Server with various authentication providers and existing security infrastructures..

Admin UI Improvements

The 2025-06-02 release includes several user experience improvements to the Admin UI:

  • Resolved issues on the GraphQL page for more reliable interactions
  • Enhanced menu UI with improved icons and optimized padding for better visual clarity and navigation

Getting Started with the ObjectBox Sync Server Trial (including the MongoDB Connector)

If you haven’t tried ObjectBox Sync Server yet, now is a great time to start! With our publicly available Docker images, you can quickly set up and start testing (just ensure Docker is installed on your system):

Or just go here to register and follow the step by step guide to get syncing now.
If you are using Java, you can also follow this 7 easy steps to sstart syncing your data in minutes.

What’s Next?

We’re continuously working to improve ObjectBox Sync to make your data synchronization experience seamless and robust. Stay tuned for more updates and improvements in the coming months!

For detailed information about these features, please refer to our documentation:

Why Edge AI is crucial for retail and POS systems in 2025

Why Edge AI is crucial for retail and POS systems in 2025

In recent years, the retail industry’s growth has been modest, with annual rates ranging from 1.5% to 3.5% depending on the sector. Competition and rising consumer expectations for seamless omnichannel experiences have squeezed profit margins. With AI advancing so rapidly, there’s a great opportunity to embrace innovative solutions that boost efficiency and help create new revenue streams. Accordingly, IDC (2025) expects that by 2026, 90% of retail tools will embed AI algorithms. Furthermore, by 2027, over 45% of major retailers will apply Edge AI for faster decision-making and store-specific assortment planning, selection, allocation, and replenishment. Let’s have a closer look at how retailers can leverage Edge AI no matter their size and budgets.

Defining Edge AI in Retail Contexts

Edge AI refers to decentralized artificial intelligence systems that process data locally on in-store devices, e.g. POS terminals, smart shelves, Raspberry Pis, mobile phones, or cameras, rather than relying on distant cloud servers. This architecture works independently from distant cloud servers or internet connectivity, and therefore offline with minimized latency. Both, offline-capability and speed, are critical for applications like fraud detection and checkout automation. Accordingly, IDC emphasizes that 45% of retailers now prioritize “near-the-network” edge deployments. There, AI models run locally on in-store servers or IoT devices, balancing cost and performance.

Key Components of Edge AI Systems

For Edge AI to deliver real-time, offline-capable intelligence, its architecture must integrate on-device databases, local processing, and efficient data synchronization. These three pillars ensure seamless AI-powered retail operations without dependence on the cloud, minimizing latency, costs, and privacy concerns.

Retail-EdgeAI-POS-Setup

Edge AI system architecture in retail, integrating local processing, real-time data sync, and various applications like POS or signage

1. Local Data Collection, Sync, and Storage

Retail generates vast real-time data from IoT sensors, POS transactions, smart cameras, and RFID tags. To ensure instant processing and uninterrupted availability you need:

  • On-device data storage: All kinds of devices from IoT sensors to cameras capture data. Depending on the device capabilities, with small on-device databases, data can be stored and used directly on the devices.
  • Local central server: A centralized on-premise device (e.g. a PC or Raspberry Pi, or more capable hw) ensures operations continue even if individual devices are resource-limited or offline.
  • Bi-directional on-premise data sync: Local syncing between devices and with a central on-site server ensures better decisions and fail-safe operations. It keeps all devices up-to-date without internet dependence.

2. Local Data Processing & Real-Time AI Decision-Making

Processing data where it is generated is critical for speed, privacy, and resilience:

  • On-device AI models: Small, quantized AI models (SLMs) like Microsoft’s Phi-3-mini (3.8B parameters, <2GB memory footprint) can run directly on many devices (e.g. tablets, and POS systems), enabling real-time fraud detection, checkout automation, and personalized recommendations.
  • Local on-premise AI models: Larger SLMs or LLMs run on the more capable in-store hardware for security, demand forecasting, or store optimization. 
  • On-device & on-premise vector databases: AI models leverage on-device vector databases to structure and index data for real-time AI-driven insights (e.g., fraud detection, smart inventory management), fast similarity searches, and real-time decision-making.

3. Hybrid Data Sync: Local First, Selective Cloud Sync

  • Selective Cloud Sync: Bi-directional cloud data sync extends the on-premise data sync. Select data, such as aggregated insights (e.g., sales trends, shrinkage patterns), payment processing, and select learnings are synced with the cloud to enable Enterprise-wide analytics & compliance, Remote monitoring & additional backup, and Optimized centralized decision-making.
  • Cloud Database & Backend Infrastructure: A cloud-based database acts as the global repository. It integrates data from multiple locations to store aggregated insights & long-term trends for AI model refinement and enterprise reporting, facilitating cross-location comparisons. 
  • Centralized cloud AI model: A centralized cloud AI model is optional for larger setups. It can be used to continuously learn from local insights, refining AI recommendations and operational efficiencies across all connected stores.

Use Cases of Edge AI for Retailers

Edge AI is unlocking new efficiencies for retailers by enabling real-time, offline-capable intelligence across customer engagement, marketing, in-store operations, and supply chains.

Key applications of Edge AI in retail, driving personalization, operational efficiency, and smarter decision-making.

Enhancing Customer Experiences in Retail Stores with Edge AI – Examples

Edge AI transforms the shopping experience, enabling retailers to offer more streamlined and more personalized services based on real-time data, thereby boosting customer satisfaction and sales. Key benefits include:

Retail operational excellence and cost optimization with Edge AI – Examples

Edge AI also significantly enhances operational efficiency, especially operational in-store efficiency, reduces losses, and helps lower costs (while at the same time enhancing sustainability):

Conclusion: Edge AI as Retail’s Strategic Imperative

Edge AI is a true game-changer for retailers in 2025. Faced with rising costs and fierce competition, stores need faster insights and better local experiences to stand out. Therefore, according to IDC, 90% of retail tools will embed AI by 2026, with edge solutions expected to help 45% of retailers optimize local assortments. Meanwhile, according to McKinsey, 44% of retailers that have implemented AI already reduced operational costs, while the majority have seen increases in revenue. 

Yet, Edge AI isn’t just about running AI models locally. It’s about creating an autonomous, resilient system where on-device vector databases, local processing, and hybrid data sync work together. This combination enables real-time retail intelligence while keeping costs low, data private, and operations uninterrupted. To stay ahead, businesses should invest in edge-ready infrastructure with on-device vector databases and data sync that works on-premise at their core. Those who hesitate risk losing ground to nimble competitors who have already tapped into real-time, in-store intelligence.

Hybrid systems, combining lightning-fast offline-first edge response times with the power of the cloud, are becoming the norm. IDC projects that 78% of retailers will adopt these setups by 2026, saving an average of $3.6 million per store annually. In an inflation-driven market, Edge AI isn’t just a perk – it’s a critical strategy for thriving in the future of retail. By leveraging Edge AI-powered on-device databases, retailers gain the speed, efficiency, and reliability needed to stay competitive in an AI-driven retail landscape.

Data Sync Alternatives: Offline vs. Online Solutions

Data Sync Alternatives: Offline vs. Online Solutions

Ever waited to order or pay with a waiter holding their ordering device in the air for a signal? These moments show why offline-first Data Sync is essential. With more and more services relying on the availability of on-device apps and the IoT market projected to hit $1.1 trillion by 2026, choosing the right solution – particularly online-only or offline-first data sync – is more crucial than ever. In this blog, we discuss their differences and highlight common Data Sync alternatives.

What is Data Sync?

Data synchronization (Sync) aligns data between two or more devices to maintain consistency over time. It is an essential component in applications ranging from IoT and mobile apps to cloud computing. Challenges in data synchronization include asynchrony, conflicts, and managing data across flaky networks.

Data Sync vs. Data Replication

Data Synchronization is often confused with Data Replication. Nevertheless, they serve different purposes:

  • Data Replication: A unidirectional process (works in one direction only) that duplicates data across storage locations to ensure availability and prevent loss. It is simple but limited in its application, and efficiency, and lacks conflict management.
  • Data Synchronization: A bidirectional process that harmonizes all or a subset of data between two or more devices. It ensures consistency across devices and entails conflict resolution. It is inherently more complex but also more flexible.

Online vs Offline Solutions: Why Offline Sync Matters

Online-only synchronization solutions rely entirely on cloud infrastructure, requiring a stable internet connection to function. While these tools offer simplicity and scalability, their dependency on constant cloud connectivity brings limitations: Online Data Sync solutions cannot guarantee response rates and their speed varies depending on the network. They do not work when offline or in on-premise settings. Using an Online Sync solution often entails sharing the data and might not comply with data privacy requirements. So, do read the terms and conditions.

Offline-first solutions (offline Sync) focus on local data storage and processing, ensuring the app remains fully functional even without an internet connection. When a network is available, the app synchronizes seamlessly with a server, the cloud, or other devices as needed. These solutions are ideal for on-premise scenarios with unreliable or no internet access, mission-critical applications that must always operate, real-time and high-performance use cases, as well as situations requiring high data privacy and data security compliance.

A less discussed, but in our view also relevant point, is sustainability. While there might be exceptions depending on the use case, for most applications offline-first solutions are more resourceful and therefore more sustainable. If CO2 footprint or battery usage is of concern to you, you might want to look into offline-first Data Sync alternatives.

Now, let’s have a look at current options:

Data Sync Alternatives

(If you are on mobile, click here for a view that’s optimized for mobile)

Solution Company Type Offline Support Self-hosted Sync Decentralized Sync Database Type of DB OS/Platforms Languages Open-Source Component License Other Considerations Country
Firebase Google
 (Firebase was acquired by Google in 2014)
Online Local cache only, no persistence, syncs when online Cloud: Firebase Realtime Database; Edge: Only caching, no DB (called Firestore) Document store iOS, Android, Web Java
JavaScript
Objective-C
Swift
Kotlin
C++
Dart
C#
Python, Go, Node.js
proprietory Tied to Google Cloud, requires internet connectivity 🇺🇸
Supabase Supabase Online Limited Cloud DB: PostgreSQL Relational document store Primarily a cloud solution JavaScript/TypeScript
Flutter/Dart
C#
Swift
Kotlin
Python
Apache License 2.0 Supabase is mainly designed as a SaaS, for use cases with constant connectivity 🇸🇬
ObjectBox Sync ObjectBox Offline-first In development ObjectBox Object-oriented embedded NoSQL DB Android, Linux, Ubuntu,
Windows,
macOS, iOS,
QNX, Raspbian,
any POSIX system really,
any cloud (e.g. AWS/Azure/Google Cloud),
bare metal
C
C++
Java
Kotlin
Swift
Go
Flutter / Dart
Python
DB: Open source bindings, Apache 2.0, closed core Highly efficient (saves CPU, Memory, battery, and bandwidth); fully offline-first, supports on-premise settings, 100% cloud optional 🇩🇪
Couchbase (Lite + Couchbase Sync Gateway) Couchbase (a merger of Couch One and Membase) Online The CE Sync is a bare minimum and typically not usable; Self-hosted Sync with Couchbase Servers is available as part of their Enterprise offering ✅ as part of the Enterprise offering; gets expensive quickly Edge: Couchbase Lite; Server: Couchbase Multi-model NoSQL document-oriented database Couchbase Lite: iOS, Android, macOS, Linux, Windows, Raspbian and Raspberry Pi OS

Couchbase Sync Gateway: Red Hat Enterprise Linux (RHEL) 9.x, Alma Linux 9.x, Rocky Linux 9.x, Ubuntu, Debian (11.x, 12.x), Windows Server 2022
.Net
C
Go
Java
JavaScript info
Kotlin
PHP
Python
Ruby
Scala
Couchbase Lite is available under different licenses; the open source Community Edition does not get regular updates and misses many features especially around Sync (e.g. it does not include Delta Sync making it slow and expensive) Typically requires Couchbase servers, quickly gets expensive 🇺🇸
MongoDB Realm + Atlas Device Sync MongoDB
 (Realm was acquired by MongoDB in 2019)
Offline-First Cloud-based sync only Cloud: MongoDB, Edge: Mongo Realm DB MongoDB: NoSQL document store; RealmDB: Embedded NoSQL DB MongoDB: Linux
OS X
Solaris
Windows
Mongo Realm DB:
Android, iOS
more than 20 languages, e.g. Java, C, C#, C++ MongoDB changed its license from open source (AGPL) to MongoDB Inc.’s Server Side Public License (SSPL) in 2018. RealmDB is open source under the Apache 2.0 License. The Data Sync was proprietary.  Deprecated (in Sep 2024); End-of-life in Sep 2025; ObjectBox offers a migration option 🇺🇸

While SQLite does not offer a sync solution out-of-the-box, various vendors have built something on top, or integrated with SQLite giving them offline persistence.

Key Considerations for Choosing a Data Sync Solution

When selecting a synchronization solution, consider:

  1. Connectivity Requirements: Will the application function in offline environments; how will it work with flaky network conditions; how is the user experience when there is intermittent connectivity?
  2. Data Privacy & Security: How critical is it to ensure sensitive data remains local? Data compliance? How important is it that data is not breached?
  3. Scalability and Performance: What are the expected data loads and network constraints? How important is speed for the users? Is there any need to guarantee QoS parameters? How much will the cloud and networking costs be?
  4. Conflict Resolution: How does the solution handle data conflicts?
  5. Delta Sync: Does the solution always synchronize all data or only changes (data delta)? Can a subset of data be synchronized? How efficient is the Sync protocol (affecting costs and speed)?

The Shift Towards Edge Computing

The trend toward Edge Computing highlights the growing preference for offline-first solutions. By processing and storing data closer to its source, Edge Computing reduces cloud dependency, enhances privacy, and improves efficiency. Data synchronization plays an important role in this shift, ensuring seamless operation across decentralized networks.

Offline and online synchronization solutions each have their merits, but the rise of edge computing and data privacy concerns has propelled offline Sync to the forefront. Developers must assess their application’s unique requirements to select the most appropriate synchronization method. As the industry evolves, hybrid and offline-first solutions are going to dominate, offering the best balance of functionality, privacy, and performance.