Nice work. I love anything that makes local-first easier. I’ve been paying close attention to Dolt for this. In a perfect world I’d have the gut semantics from Dolt and EdgeQL from EdgeDB. This focuses on the reactive feature - the ability to set listeners and get alerts. There seem to be some nice React integration, but haven’t built with React enough to immediately see what that unlocks.
TinyBase v2.0: reactive data store for local-first apps
21–30 of 65 posts
Re: TinyBase v2.0: reactive data store for local-first apps
#22Author here, if anyone has any thoughts or feedback. Bring it on!
Congratulations on shipping! Can you explain your motive for focusing on the combination of reactive data and local deployment? My first thought is that local-first = one user = I know what’s changing because I’m the only one using it. Perhaps valuable for monitoring external data feeds?
A couple of great essays I've enjoyed in this space are https://www.inkandswitch.com/local-first & https://riffle.systems/essays/prelude/
I feel it should be possible to build certain types of apps that can view, query, and manipulate denormalized data without even being online. (Perhaps I shouldn't over-glamorize those days when one used to jam Access databases into Windows apps, but hopefully you get the point.) Reactivity just serves as a nice binding paradigm.
Re: TinyBase v2.0: reactive data store for local-first apps
#23Author here, if anyone has any thoughts or feedback. Bring it on!
The main limitation I see with tiny base is that it has to load all data in one batch and modifying any record results in the whole data store being persisted to disk. Surely this can’t scale well…
BUT of course, this is not a library to be used with data sets of billions of rows! I'd recommend a proper RDBMS for that ;)
Re: TinyBase v2.0: reactive data store for local-first apps
#24Re: TinyBase v2.0: reactive data store for local-first apps
#25Earlier quoted context omitted.
Wait so can you actually connect tiny base to SQLite?
No, there's no _actual_ RDBMS involved. The query engine uses a functional style of query that has similar concepts to SQL, but all the evaluation (and reactivity) is first party, in the library itself. Of course it would be pretty easy/fun to persist your TinyBase content into a SQLite database, or pull a dataset from it. The demos load up TSV but you could easily do something similar from an actual database somewhe…
Re: TinyBase v2.0: reactive data store for local-first apps
#26Earlier quoted context omitted.
The main limitation I see with tiny base is that it has to load all data in one batch and modifying any record results in the whole data store being persisted to disk. Surely this can’t scale well…
The data is in memory, and the persistence strategy is kind of up to you. So it would scale reasonably if you put the sync/persist on a different schedule to the UI - perhaps when the browser is idle. BUT of course, this is not a library to be used with data sets of billions of rows! I'd recommend a proper RDBMS for that ;)
Re: TinyBase v2.0: reactive data store for local-first apps
#27Earlier quoted context omitted.
No, there's no _actual_ RDBMS involved. The query engine uses a functional style of query that has similar concepts to SQL, but all the evaluation (and reactivity) is first party, in the library itself. Of course it would be pretty easy/fun to persist your TinyBase content into a SQLite database, or pull a dataset from it. The demos load up TSV but you could easily do something similar from an actual database somewhe…
If I understand correctly the issue with storing and retrieving from SQLite is that it won’t be incremental?
Re: TinyBase v2.0: reactive data store for local-first apps
#28Earlier quoted context omitted.
The data is in memory, and the persistence strategy is kind of up to you. So it would scale reasonably if you put the sync/persist on a different schedule to the UI - perhaps when the browser is idle. BUT of course, this is not a library to be used with data sets of billions of rows! I'd recommend a proper RDBMS for that ;)
Yeah but I feel like it could be used for that, if only retrieval and storage could be done incrementally…
Re: TinyBase v2.0: reactive data store for local-first apps
#29Earlier quoted context omitted.
The data is in memory, and the persistence strategy is kind of up to you. So it would scale reasonably if you put the sync/persist on a different schedule to the UI - perhaps when the browser is idle. BUT of course, this is not a library to be used with data sets of billions of rows! I'd recommend a proper RDBMS for that ;)
Yeah but I feel like it could be used for that, if only retrieval and storage could be done incrementally…
Re: TinyBase v2.0: reactive data store for local-first apps
#30Could you elaborate on your roadmap on CRDT / real time collaboration? If it’s in plan and will be executed correctly I’m completely sold.
Anyway, congrats, looks awesome.