mycelial/mycelite
mycelial/mycelite has 1,093 GitHub stars and 17 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-09 10:27 UTC. Last push 2023-09-25.
Mycelite is a SQLite extension that allows you to synchronize changes from one instance of SQLite to another.
Measured star growth
- in 24h
- 0
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalMycelite
Mycelite implements physical, single-writer replication for SQLite.
Technical details
- Mycelite is a VFS extension, which acts as a proxy for the OS filesystem.
- Mycelite intercepts page writes and creates a binary diff with the old version.
- The binary diffs are then stored in the journal. They can also be sent over the network to another machine.
- The diffs in the journal can then be sequentially applied, thus achieving bit-perfect copy of the original database.
For more details on SQLite binary format see sqlite-parser-nom. In principle, it could be illustrated in the following way:
┌───────────┐ VFS write ┌────────────┐ apply ┌────────────────┐
│ db.sqlite ├──────────┐ │ db.journal ├───────► replica.sqlite │
├───────────┤ │ ├────────────┤ ├────────────────┤
│ header │ ┌──────▼─────┐ ┌─► diff 0 │ │ header │
├───────────┤ │ page 0 new ├─┐ │ ├────────────┤ ├────────────────┤
│ page 0 ├─┐ └────────────┘ │ ┌──────┐ │ │ ... │ │ page 0 │
├───────────┤ │ ├─► diff ├─┘ └────────────┘ ├────────────────┤
│ page 1 │ │ ┌────────────┐ │ └──────┘ │ ... │
└───────────┘ └─► page 0 old ├─┘ └────────────────┘
└────────────┘
This approach comes with both significant upsides and downsides:
- Replica will contain exactly the same object in exactly the same order as in original.
- Out-of-the-box non-deterministic DDLs (e.g., UPDATE with RANDOM() or CURRENT_TIMESTAMP).
- Physical replication is less resource-intensive than logical replication, resulting in higher throughput with no penalty as the number of replicas grows.
- Time travel by hydrating up to any previous timestamp.
- As there is no locking mechanism currently implemented, only a single writer is supported.
- Replica journal grows linearly, unless compacted.
- VACUUM operation might result in significantly sized journal entry without actual changes to accessible data.
- Currently, WAL-enabled databases are not supported.
Usage
Refer to the Quickstart Documentation.
A new type of application
There is a new type of application called local-first, which combines many of the best features from both local and client/server applications.
What does local-first offer?
With local-first applications, you get the speed and responsiveness of a local application, but at the same time, you get many of the desirable features from client/server systems.
What do local-first applications look like?
A good example of a local-first application is Actual Budget, an open-source personal finance application.
What makes Actual Budget different from its competitors?
First of all, it's very fast because all the application data is on the local device - in a SQLite database - but what's most interesting about this app is that it works on multiple devices. In other words, it has apps for iOS, Android, Windows, Mac and the Web and it allows you to make concurrent changes on multiple devices and synchronize those changes to all your devices.
Why aren't more developers creating local-first applications?
Actual Budget is a good example of a local-first application, but it wasn't very easy to build. The authors had to write a bunch of synchronization-related code, that implements and uses CRDTs, and this start-from-scratch approach just isn't practical for most situations. Building local-first applications today is too difficult, but we're going to change that.
Explore related projects
Asabeneh/30-Days-Of-Python
The 30 Days of Python programming challenge is a step-by-step guide to learn the Python programming language in 30 days. This challenge may take more than 100 days. Follow your own pace. These videos may help too: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,486 starsgrafana/grafana
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
77,790 starsredis/redis
For developers, who are building real-time data-driven applications, Redis is the preferred, fastest, and most feature-rich cache, data structure server, and document and vector query engine.
77,332 starsapache/superset
Apache Superset is a Data Visualization and Data Exploration Platform
75,455 stars