The Great Refactor
This is essentially a new Epic that describes a merging of Database, Store, and Client into a single, unified JS ThreadDB API.
Overview
The primary plan is to “shift” support for threads-database in favor of threads-client. This limits our API flexibility in some respects, but what we lose in control, we gain in accessibility and a more streamlined development focus. Additionally, we will deprecate threads-network-client and threads-network, which are low-level Threads protocol libraries. These were never really designed to be publicly consumed modules, so this isn’t likely to be a controversial move. Finally, threads-encoding will be moved to its own repo and maintained for demos and examples that want to build on Threads more directly. The primary change will be to marry threads-database and threads-store on top of threads-client, to provide an offline-first database with fast MongoDB style APIs and queries, and a Realm/MongoDB like local/remote sync interface.
Goals/Outcomes
The goals/outcomes of this refactor are to be able to provide a PouchDB + CouchDB style experience for developers that syncs data to remote peers that can then serve said data over decentralized protocols. Something like, “the dynamic database that syncs to IPFS”. Another analogy would be MongoDB + Realm, where you have a free, mobile/browser database that syncs with a remote MongoDB service. The resultant library be familiar to anyone who has built an application using something like Realm, Pouch, or Mongo. The difference here is everything is available over decentralized protocols such as PubSub/GossipPub, IPFS, IPNS, HTTP gateways, and more.
Roadmap
- Migration
- Local-first
- P2P
- DX
- Documentation - All of the above will require major documentation updates
The Great Refactor
This is essentially a new Epic that describes a merging of Database, Store, and Client into a single, unified JS ThreadDB API.
Overview
The primary plan is to “shift” support for
threads-databasein favor ofthreads-client. This limits our API flexibility in some respects, but what we lose in control, we gain in accessibility and a more streamlined development focus. Additionally, we will deprecatethreads-network-clientandthreads-network, which are low-level Threads protocol libraries. These were never really designed to be publicly consumed modules, so this isn’t likely to be a controversial move. Finally,threads-encodingwill be moved to its own repo and maintained for demos and examples that want to build on Threads more directly. The primary change will be to marrythreads-databaseandthreads-storeon top ofthreads-client, to provide an offline-first database with fast MongoDB style APIs and queries, and a Realm/MongoDB like local/remote sync interface.Goals/Outcomes
The goals/outcomes of this refactor are to be able to provide a PouchDB + CouchDB style experience for developers that syncs data to remote peers that can then serve said data over decentralized protocols. Something like, “the dynamic database that syncs to IPFS”. Another analogy would be MongoDB + Realm, where you have a free, mobile/browser database that syncs with a remote MongoDB service. The resultant library be familiar to anyone who has built an application using something like Realm, Pouch, or Mongo. The difference here is everything is available over decentralized protocols such as PubSub/GossipPub, IPFS, IPNS, HTTP gateways, and more.
Roadmap
threads-network-clientandthreads-networkthreads-encodingto its own repo (which already exists)threads-databasewiththreads-storethreads-clientintothreads-databaseas the primary networking/DB layerthreads-clientin favor of the newthreads-database(which is now a nicely wrapped threads-client)threads-clientupdatesgo-threadsto support faster local cachingjs-hub(this is mostly already done)js-threadsto clearly state primary goals/functionality of the updated library