From one edge app to a fleet of AI agents, work starts with local data and continues offline.
SyncLite syncs changes from every app and agent into one shared data layer. See how agents share what they learn →
Each app or agent gets local memory. Every device keeps working offline. Local changes converge in one shared layer. Start with one. Scale to a fleet on the same sync layer.
Each device can stage and consolidate locally, or ship completed log segments to a standalone consolidator.
Every agent writes to its own embedded database with no network on the hot path. SyncLite streams that memory to shared storage, so the whole fleet learns from any agent’s discoveries.
One platform. Five problem domains. Start with one use case and expand without rebuilding your sync architecture.
Embed SQLite or DuckDB in desktop, mobile, or edge apps. SyncLite replicates every write automatically, so apps keep working offline and sync when connectivity returns.
Deploy hundreds of edge devices with local databases. SyncLite consolidates their changes into a shared cloud database in real time, without custom replication code.
Use SyncLiteStream or the Kafka Producer-compatible API for high-throughput, append-only ingestion. Land events in any data warehouse or lake with exactly-once semantics.
DBReader connects to PostgreSQL, MySQL, Oracle, SQL Server, and more. Replicate tables incrementally with watermarks or capture changes from binary logs for near-zero latency.
QReader subscribes to any MQTT v3.1 broker, including Mosquitto, EMQX, AWS IoT Core, and Azure IoT Hub. Parse CSV or JSON payloads and land sensor data in your analytics database in minutes.
Give agents durable, queryable SQLite memory. SyncLite automatically replicates state changes to a central database for observability, replay, and multi-agent coordination.
SDKs for Rust, Python, Node.js, C++, and Android, plus Java/JDBC and a language-agnostic HTTP API. Choose your stack; SyncLite handles capture and sync.
pip install synclite
pip install 'synclite[sqlalchemy]'
npm install synclite
cargo add synclite-rs
io.synclite:synclite:1.2.0
io.synclite:synclite-android:1.2.0
// Node.js via the synclite N-API package. Offline-first SQLite syncing to PostgreSQL. // The connection API mirrors the Rust and Python samples one-for-one. const { initialize, SqliteConnection, awaitSync } = require('synclite'); // Wire up logger + shipper + embedded consolidator in one call. initialize({ device_type: 'SQLITE', device_name: 'ordersdevice', // device name db_path: 'orders.db', // local SQLite path destination: { dst_type: 'POSTGRES', dst_connection_string: 'postgresql://postgres:postgres@localhost:5432/syncdb', dst_database: 'syncdb', dst_schema: 'syncschema', dst_sync_mode: 'REPLICATION', }, }); // From here on the app talks to a plain local SQLite database. const conn = SqliteConnection.open('orders.db'); conn.execute('CREATE TABLE IF NOT EXISTS orders(id INTEGER, item TEXT, qty INTEGER)'); conn.execute('INSERT INTO orders VALUES(?, ?, ?)', [1, 'widget', 100]); conn.commit(); // Roll the active log segment, then block until the apply lands in PostgreSQL. // NOTE: awaitSync is only used here to demonstrate SyncLite's background sync in action — // apps normally just keep writing; SyncLite ships changes asynchronously in the background. conn.flush(); awaitSync('orders.db', 30); conn.close(); // ↑ logged + shipped + consolidated into PostgreSQL.
// Pure-Rust SyncLite. Offline-first SQLite syncing to PostgreSQL. use synclite::{SyncLiteOptions, DestinationOptions, DstType, DstSyncMode, DeviceType, Value}; use synclite::rusqlite::Connection; fn main() -> Result<(), Box<dyn std::error::Error>> { // Wire up logger + shipper + embedded consolidator in one call. synclite::initialize( DeviceType::SQLITE, "ordersdevice", // device name "orders.db", // local SQLite path Some(DestinationOptions { dst_type: DstType::Postgres, dst_connection_string: "postgresql://postgres:postgres@localhost:5432/syncdb".into(), dst_database: Some("syncdb".into()), dst_schema: Some("syncschema".into()), dst_sync_mode: DstSyncMode::Replication, }), SyncLiteOptions::default(), )?; // From here on the app talks to a plain local SQLite database. let mut conn = Connection::open("orders.db")?; conn.execute("CREATE TABLE IF NOT EXISTS orders(id INTEGER, item TEXT, qty INTEGER)", &[])?; conn.execute("INSERT INTO orders VALUES(?, ?, ?)", &[Value::Int(1), Value::Text("widget".into()), Value::Int(100)])?; conn.commit()?; // Roll the active log segment, then block until the apply lands in PostgreSQL. // NOTE: await_sync is only used here to demonstrate SyncLite's background sync in action — // apps normally just keep writing; SyncLite ships changes asynchronously in the background. conn.flush()?; synclite::await_sync("orders.db", std::time::Duration::from_secs(30))?; conn.close()?; // ↑ logged + shipped + consolidated into PostgreSQL. Ok(()) }
// Standard JDBC — SyncLite captures every transaction transparently. // Offline-first SQLite syncing to PostgreSQL. Path dbPath = Path.of("orders.db"); // Wire up logger + shipper + embedded consolidator in one call. SQLite.initialize(dbPath, "ordersdevice", DestinationOptions.builder() .dstType(DstType.POSTGRES) .connectionString("jdbc:postgresql://localhost:5432/syncdb?user=postgres&password=postgres") .database("syncdb") .schema("syncschema") .syncMode(DstSyncMode.REPLICATION) .build()); // From here on the app talks to a plain local SQLite database via JDBC. try (Connection conn = DriverManager.getConnection("jdbc:synclite_sqlite:" + dbPath); Statement s = conn.createStatement()) { conn.setAutoCommit(false); s.execute("CREATE TABLE IF NOT EXISTS orders(id INT, item TEXT, qty INT)"); s.execute("INSERT INTO orders VALUES(1, 'widget', 100)"); conn.commit(); ResultSet rs = s.executeQuery("SELECT * FROM orders WHERE id = 1"); while (rs.next()) /* [READ FROM LOCAL DB] */ {} // Block until committed changes land in PostgreSQL. // NOTE: awaitSync is only used here to demonstrate SyncLite's background sync in action — // apps normally just keep writing; SyncLite ships changes asynchronously in the background. SyncLite.awaitSync(dbPath, Duration.ofSeconds(30)); try (Connection pg = DriverManager.getConnection( "jdbc:postgresql://localhost:5432/syncdb", "postgres", "postgres"); PreparedStatement ps = pg.prepareStatement( "SELECT id, item, qty FROM syncschema.orders WHERE id = ?")) { ps.setInt(1, 1); try (ResultSet pgrs = ps.executeQuery()) { while (pgrs.next()) /* [READ FROM POSTGRESQL POST SYNC] */ {} } } } SQLite.closeDevice(dbPath); // ↑ logged + shipped + consolidated into PostgreSQL.
// Copy lib/android/synclite-android-1.2.0.aar from the platform release to app/libs. // app/build.gradle.kts: implementation(files("libs/synclite-android-1.2.0.aar")) import android.content.Context import io.synclite.AndroidDestination import io.synclite.AndroidDeviceOptions import io.synclite.SyncLiteAndroid import io.synclite.SyncLiteConnection // Run on Dispatchers.IO or an executor, NOT the Android main thread. fun syncOrders(context: Context) { val dbPath = context.filesDir.resolve("orders.db").path SyncLiteAndroid.initialize( AndroidDeviceOptions( deviceName = "ordersdevice", databasePath = dbPath, destination = AndroidDestination( type = "POSTGRES", connectionString = "postgresql://postgres:postgres@10.0.2.2:5432/syncdb", database = "syncdb", schema = "syncschema", syncMode = "REPLICATION" ) ) ) val conn = SyncLiteConnection.open(dbPath) try { conn.execute("CREATE TABLE IF NOT EXISTS orders(id INTEGER PRIMARY KEY, item TEXT)") conn.execute("INSERT INTO orders(id, item) VALUES (?, ?)", listOf(1L, "widget")) conn.commit() // Publish the committed segment before this optional demonstration wait. // NOTE: awaitSync only demonstrates background sync; apps normally keep // writing offline while SyncLite ships changes asynchronously. conn.flush() SyncLiteAndroid.awaitSync(dbPath, 30_000) } finally { conn.close() } } // Replace 10.0.2.2 with your PostgreSQL hostname or IP address. Full Android setup and sample →
// Spring Boot 3 + Hibernate 6: local SQLite JPA, PostgreSQL destination. // Requires spring-boot-starter-data-jpa, synclite and hibernate-community-dialects. // Package the Boot-safe SyncLite logging filter shown in the full guide. // application.yml: spring.jpa.database-platform: org.hibernate.community.dialect.SQLiteDialect // app.synclite.* properties and imports are in the full guide below. @Configuration(proxyBeanMethods = false) public class SyncLiteConfiguration { @Bean(destroyMethod = "close") SyncLiteDevice syncLiteDevice( @Value("${app.synclite.sqlite-path}") String sqlitePath, @Value("${app.synclite.device-name}") String deviceName, @Value("${app.synclite.postgres-url}") String postgresUrl, @Value("${app.synclite.postgres-database}") String postgresDatabase, @Value("${app.synclite.postgres-schema}") String postgresSchema) throws IOException, SQLException { Path dbPath = Path.of(sqlitePath).toAbsolutePath().normalize(); Path parent = dbPath.getParent(); if (parent != null) Files.createDirectories(parent); DestinationOptions postgres = DestinationOptions.builder() .dstType(DstType.POSTGRES).connectionString(postgresUrl) .database(postgresDatabase).schema(postgresSchema) .syncMode(DstSyncMode.REPLICATION).build(); SQLite.initialize(dbPath, deviceName, postgres); return new SyncLiteDevice(dbPath); } @Bean(destroyMethod = "close") @Primary DataSource dataSource(SyncLiteDevice device) { HikariConfig config = new HikariConfig(); config.setDriverClassName(SQLite.class.getName()); config.setJdbcUrl("jdbc:synclite_sqlite:" + device.databasePath()); config.setMaximumPoolSize(1); config.setMinimumIdle(1); return new HikariDataSource(config); } static final class SyncLiteDevice implements AutoCloseable { private final Path databasePath; SyncLiteDevice(Path path) { databasePath = path; } Path databasePath() { return databasePath; } @Override public void close() throws SQLException { SQLite.closeDevice(databasePath); } } } // In PurchaseOrderController, inside a @PostMapping @Transactional method: return orders.save(new PurchaseOrder(request.item(), request.quantity())); // Hibernate commits to local SQLite; SyncLite delivers to PostgreSQL asynchronously. // Optional demo/verification step in a separate method with SyncLiteDevice device injected, // AFTER the @Transactional method has returned and committed: // NOTE: awaitSync only demonstrates background sync; apps normally keep writing // while SyncLite ships changes asynchronously. Do not call inside the transaction. SyncLite.awaitSync(device.databasePath(), Duration.ofSeconds(30)); // Complete imports, entity, repository, controller and application.yml: Full Spring Boot + Hibernate guide →
// SyncLiteStore — typed CRUD without raw SQL, schema evolution built-in Class.forName("io.synclite.SQLiteStore"); SQLiteStore.initialize(dbPath, conf); try (SyncLiteStore store = SQLiteStore.open(dbPath)) { store.createTable("players", new LinkedHashMap<>(Map.of( "id", "INTEGER PRIMARY KEY", "name", "TEXT", "score", "INTEGER" ))); store.insert("players", Map.of("id", 1, "name", "Alice", "score", 100)); store.update("players", Map.of("score", 250), Map.of("name", "Alice")); store.delete("players", Map.of("id", 1)); List<Map<String,Object>> rows = store.selectAll("players"); } SQLiteStore.closeDevice(dbPath);
// SyncLiteStream — fluent append-only event ingestion Class.forName("io.synclite.Streaming"); Streaming.initialize(dbPath, conf); try (SyncLiteStream stream = SyncLiteStream.open(dbPath)) { stream.createTable("events", new LinkedHashMap<>(Map.of( "ts", "BIGINT", "event_type", "TEXT", "user_id", "TEXT" ))); stream.insert("events", Map.of( "ts", System.currentTimeMillis(), "event_type", "SIGNUP", "user_id", "u1" )); // New columns added inline — schema evolves automatically stream.insertBatch("events", List.of( Map.of("ts", System.currentTimeMillis(), "event_type", "VIEW", "user_id", "u2", "source", "web"), Map.of("ts", System.currentTimeMillis(), "event_type", "PURCHASE", "user_id", "u3", "source", "app") )); }
# SyncLite DBReader — job configuration file (not application code) # Table/topic mappings are configured via the web UI at http://localhost:8080/synclite-dbreader synclite-device-dir = /opt/synclite/devices synclite-logger-configuration-file = /opt/synclite/synclite.conf src-type = POSTGRESQL src-database = sales src-schema = public src-connection-string = jdbc:postgresql://pg.internal:5432/sales src-user = reader src-password = secret src-connection-timeout-s = 30 src-dbreader-method = INCREMENTAL src-dbreader-interval-s = 10 src-dbreader-batch-size = 100000 src-object-type = TABLE src-default-unique-key-column-list = id src-default-incremental-key-column-list = updated_at src-infer-schema-changes = true # DBReader handles batching, retries, checkpoints, and restarts.
# SyncLite QReader — job configuration file (not application code) # Topic-to-table mappings are configured via the web UI at http://localhost:8080/synclite-qreader synclite-device-dir = /opt/synclite/devices synclite-logger-configuration-file = /opt/synclite/synclite.conf mqtt-broker-url = tcp://mqtt.example.com:1883 mqtt-qos-level = 1 mqtt-clean-session = true mqtt-broker-connection-timeout-s = 10 mqtt-broker-connection-retry-interval-s = 2 src-message-format = CSV src-message-field-delimiter = , qreader-synclite-device-type = SQLITE_APPENDER qreader-map-devices-to-single-synclite-device = true qreader-default-synclite-device-name = iotdevice qreader-default-synclite-table-name = iot_events # Works with Mosquitto, EMQX, AWS IoT Core, and Azure IoT Hub.
# Python via the synclite PyO3 wheel. Offline-first SQLite syncing to PostgreSQL. # The Connection / Statement objects match the Rust and C++ samples one-for-one. import synclite as sl # Wire up logger + shipper + embedded consolidator in one call. sl.initialize( device_type="SQLITE", device_name="ordersdevice", # device name db_path="orders.db", # local SQLite path destination=sl.DestinationOptions( dst_type="POSTGRES", dst_connection_string="postgresql://postgres:postgres@localhost:5432/syncdb", dst_database="syncdb", dst_schema="syncschema", dst_sync_mode="REPLICATION", ), ) # From here on the app talks to a plain local SQLite database. conn = sl.Connection.open("orders.db") conn.execute("CREATE TABLE IF NOT EXISTS orders(id INTEGER, item TEXT, qty INTEGER)") conn.execute("INSERT INTO orders VALUES(?, ?, ?)", [1, "widget", 100]) conn.commit() # Roll the active log segment, then block until the apply lands in PostgreSQL. # NOTE: await_sync is only used here to demonstrate SyncLite's background sync in action — # apps normally just keep writing; SyncLite ships changes asynchronously in the background. conn.flush() sl.await_sync("orders.db", 30.0) conn.close() # ↑ logged + shipped + consolidated into PostgreSQL.
# Standard PEP 249 connection/cursor API, backed by SyncLite's Rust runtime. import synclite as sl from synclite import dbapi2 sl.initialize( device_type="SQLITE", device_name="ordersdevice", db_path="orders.db", destination=sl.DestinationOptions( dst_type="POSTGRES", dst_connection_string="postgresql://postgres:postgres@localhost:5432/syncdb", dst_database="syncdb", dst_schema="syncschema", dst_sync_mode="REPLICATION", ), ) conn = dbapi2.connect("orders.db") try: with conn: # commit on success, rollback on error with conn.cursor() as cursor: cursor.execute("CREATE TABLE IF NOT EXISTS orders(id INTEGER, item TEXT, qty INTEGER)") cursor.execute("INSERT INTO orders VALUES(?, ?, ?)", (1, "widget", 100)) cursor.execute("SELECT id, item, qty FROM orders") print(cursor.fetchall()) # NOTE: await_sync only demonstrates background sync; apps normally keep # writing while SyncLite ships changes asynchronously. conn.flush() sl.await_sync("orders.db", 30.0) finally: conn.close() # DB-API docs + sample: View the full DB-API sample →
# pip install "synclite[sqlalchemy]" (SQLAlchemy 2.x) import synclite as sl from sqlalchemy import create_engine, text sl.initialize( device_type="SQLITE", device_name="ordersdevice", db_path="orders.db", destination=sl.DestinationOptions( dst_type="POSTGRES", dst_connection_string="postgresql://postgres:postgres@localhost:5432/syncdb", dst_database="syncdb", dst_schema="syncschema", dst_sync_mode="REPLICATION", ), ) # SQLite SQL dialect + SyncLite's logged DB-API driver (not a PostgreSQL connection). engine = create_engine("sqlite+synclite:///orders.db") try: with engine.begin() as connection: connection.execute(text("CREATE TABLE IF NOT EXISTS orders(id INTEGER, item TEXT, qty INTEGER)")) connection.execute(text("INSERT INTO orders VALUES(:id, :item, :qty)"), {"id": 1, "item": "widget", "qty": 100}) print(connection.execute(text("SELECT * FROM orders")).all()) finally: engine.dispose() from synclite import dbapi2 sync_conn = dbapi2.connect("orders.db") try: # NOTE: await_sync only demonstrates background sync; apps normally keep # writing while SyncLite ships changes asynchronously. sync_conn.flush() # roll the committed segment for this short-lived demo sl.await_sync("orders.db", 30.0) print("[SYNC] await_sync succeeded") finally: sync_conn.close() # ORM / SQLAlchemy sample: View the full SQLAlchemy sample →
// Header-only RAII wrapper over the synclite C ABI (synclite.hpp, C++17). // Offline-first SQLite syncing to PostgreSQL. #include "synclite.hpp" int main() { synclite::DestinationOptions dst; dst.dst_type = "POSTGRES"; dst.dst_connection_string = "postgresql://postgres:postgres@localhost:5432/syncdb"; dst.dst_database = "syncdb"; dst.dst_schema = "syncschema"; dst.dst_sync_mode = "REPLICATION"; synclite::initialize("SQLITE", "ordersdevice", "orders.db", dst); // From here on the app talks to a plain local SQLite database. auto conn = synclite::Connection::open("orders.db"); conn.execute("CREATE TABLE IF NOT EXISTS orders(id INTEGER, item TEXT, qty INTEGER)"); conn.execute("INSERT INTO orders VALUES(?, ?, ?)", { 1, "widget", 100 }); conn.commit(); // Roll the active log segment, then block until the apply lands in PostgreSQL. // NOTE: await_sync is only used here to demonstrate SyncLite's background sync in action — // apps normally just keep writing; SyncLite ships changes asynchronously in the background. conn.flush(); synclite::await_sync("orders.db", 30.0); // ↑ logged + shipped + consolidated into PostgreSQL. return 0; }
# Any language — plain HTTP/JSON via SyncLite DB server # Works with Python, Go, Rust, C#, C++, Ruby, Node.js… import requests BASE = "http://localhost:5555/synclite" # 1. Initialize requests.post(BASE, json={ "db-type": "SQLITE", "db-name": "myapp", "sql": "initialize" }) # 2. DDL requests.post(BASE, json={"db-name": "myapp", "sql": "CREATE TABLE IF NOT EXISTS orders(id INT, item TEXT)"}) # 3. Batched insert requests.post(BASE, json={"db-name": "myapp", "sql": "INSERT INTO orders VALUES(?, ?)", "arguments": [[1, "widget"], [2, "gadget"]]}) # 4. SELECT — local read from the embedded database resp = requests.post(BASE, json={"db-name": "myapp", "sql": "SELECT id, item FROM orders"}) print(resp.json())
import io.synclite.Jedis; // Managed mode: Jedis handles the SQLiteStore lifecycle. try (Jedis jedis = Jedis.builder(dbPath, conf, "cachedevice") .host("localhost").port(6379).build()) { jedis.set("user:1:name", "Alice"); jedis.hset("session:42", Map.of("token", "abc123", "status", "active")); jedis.rpush("queue", "job-1", "job-2"); jedis.sadd("tags", "etl", "cdc"); jedis.zadd("leaderboard", Map.of("Alice", 100.0, "Bob", 200.0)); jedis.del("tmp"); } // Writes are committed to SQLiteStore before being forwarded to Redis.
import io.synclite.KafkaProducer; import org.apache.kafka.clients.producer.ProducerRecord; Properties props = new Properties(); props.put("bootstrap.servers", "localhost:9092"); props.put("device-path", dbPath.toAbsolutePath().toString()); props.put("device-type", "STREAMING"); try (KafkaProducer producer = new KafkaProducer(props)) { producer.send(new ProducerRecord<>("events", "u1", "signup")); producer.send(new ProducerRecord<>("events", "u2", "purchase")); producer.flush(); } // Same producer workflow, with SyncLite handling local durability and downstream replication.
Minimal configuration. Reliable capture, delivery, and consolidation.
Transactional log capture ensures every committed write is delivered exactly once to the destination — no duplicates, no gaps.
Edge devices work fully offline. Log files accumulate locally and sync automatically when connectivity returns.
Thousands of edge devices consolidating into a single destination. One source fanning out to multiple destinations simultaneously.
Add a column on the edge and it appears in the destination automatically, without manual migration scripts.
Encrypt log files in transit with a public/private key pair. The destination only decrypts — the edge never holds the private key.
Track per-device replication lag, throughput, and errors in the Consolidator web UI, updated in real time.
Filter and rename tables or columns, map types (best-effort or exact) and values, install replication triggers, choose write modes, and tune batch sizes, with detailed throughput statistics.
Entirely open-source (Apache 2.0). Works with your existing stack. Swap staging or destination without touching application code.
SyncLite Consolidator delivers to the systems where your data needs to live.
Relational
Data Lakes & Analytics
NoSQL
Use only what you need. Deploy components independently or combine them in one workflow.
| Component | What It Does | Language |
|---|---|---|
| SyncLite Logger | Embeddable runtime that wraps SQLite, DuckDB, Derby, H2, or HyperSQL. It captures changes, writes and ships log segments, and can consolidate in-process. | Java · Rust · Python |
| SyncLite Consolidator | Accepts log segments from embedded devices and applies them to configured destinations. | Java WAR |
| SyncLite DBReader | Runs configured ETL, replication, and migration jobs from source databases into SyncLite devices. | Java WAR |
| SyncLite QReader | MQTT connector that writes broker traffic into SyncLite devices for downstream replication. | Java WAR |
| SyncLite Client | Interactive CLI for inspecting and querying SyncLite devices. Connect directly to an embedded device or through SyncLite DB over HTTP. | CLI |
| SyncLite Job Monitor | Web UI for scheduling and monitoring Consolidator, DBReader, and QReader jobs. | Java WAR |
| SyncLite DB | Exposes the local database runtime over HTTP/JSON for clients that cannot embed the native library or need to share a device across processes. | Any (HTTP) |
For setup questions, feedback, or contributions, contact us here.