This is a dead simple local first database built on top of CRDTs currently written in typescript.
I'm doing this as a fun hobby project - a beachhead for how I want my personal computing to work. This project may grow into something bigger & for more people over time, but I'm not making any promises.
Why typescript? Because I can personally prototype faster in TS than any other language. If imsyncing survives long enough, I'll end up rewriting it in rust or zig or something fun. But for now, this is it.
I dream of a "cloud of personal computing". I have a whole lot of devices, but I'm furious how difficult it is to move data from one computer (or phone) to another. Nothing is made to work together!
Imsyncing is part of my answer to this problem. The idea is that a lot of personal data / information can live in little documents in imsyncing and get synced to all the devices on the network which care about that particular data.
This is a local first database. When you are online, data is synced in realtime. When you go offline, you can still read / modify any local data but you don't get or propagate changes to other peers. When you come online again, everything syncs up.
My plan is to prototype out some fun apps on top of this like:
And whatever other dumb things I get up to.
This would be better described with a picture but -
The basic idea is that each device can run an imsyncing node which syncs with other devices on the network / internet.
Then specific applications running locally can sync with that, and use it to store their application specific data.
I'm not sure how I'll get that to work on an iphone yet. Haven't figured that out.
The database stores a flat set of documents. Each document is named with a random globally unique name, and has:
post
, midiDeviceStatus
, imageGallery
, etc). This is sort of like a mime-type.Because the database is built first and foremost for my own personal data, its not built super efficiently. It works fine for a modest collection of documents, but it is not optimized for a giant data set.
Everything gets persisted locally to disk. There are no smarts about how I'm doing that. Just, when changes happen, we rate limit saves to disk every 200ms or so.
I'm using this project to exercise my own serialization library schemaboi. Schemaboi (SB) is built around the dream that we can have a serialization format that has a very efficient binary representation while also being able to evolve over time in more complex ways than protobuf. Time will tell if that works out in practice. But for now, both the net protocol and the on-disk file format use SB for serialization.
Here's a rough list of what works and doesn't work. I make no promises that this list is kept up to date:
Works:
To do: