3 ms·
> In-Browser NoSQL db with syncing and persisting Is the syncing part as straightforward as Pouch[1]? I couldn't find anything about syncing on its docs. If a
by egeozcan 10y ago
> In-Browser NoSQL db with syncing and persisting
Is the syncing part as straightforward as Pouch[1]? I couldn't find anything about syncing on its docs. If a db comes with an easy offline-first and sync-when-possible model with granular permissions, it will be very interesting. Current solutions have (IMHO unacceptable) fixed dependencies on the backend or the architecture.
[1]: https://pouchdb.com/ https://pouchdb.com/
- k__ 10y agoI always wondered what the use-cases for PouchDB are. Who wants to replicate their "whole" database locally?
- c0brac0bra 10y agoThere are ways to filter the replication.
- diggan 10y agoThe Typeform LITE mobile application is built by using CouchDB and PouchDB which means when the application is online, it replicates the users db locally so the performance is great but the even bigger benefit is that when the application is offline, the user can still do the majority of the operations which would be synced once the application goes online again. So, probably no-one wants to replicate the whole database locally but there is a strong benefit to replicate parts of it for performance and offline-capabilities. Disclaimer: I was one of two developers on the mobile app mentioned above.
- egeozcan 10y agoYou can filter what you are syncing or create a db per user and declare interactions with foreign data in their own instance, which will be executed according to permissions in the backend. What I actually want is MeteorJS with neither MongoDB or the JavaScript backend, or PouchDB without Couch, or Jaydata + ASP.NET WebAPI with more open source compatibility...
- cwmma 10y agothere is a forthcoming couch plugin that does filtered replication by user
- k__ 10y agoAny more info? Is it meant for security related stuff? I read the filters aren't good for this ATM.
- marknadal 10y agoI too haven't seen anything on Loki's sync ability. Obviously would be a very nice feature but difficult to do right. Pouch, Firebase, and GUN[1] (disclaimer, I work there) are examples. If you bake permissions into the system itself, you get monoliths like Meteor. But you can still achieve granular permissions by rejecting/accepting network requests (like with ExpressJS or Hapi, etc.), which gives you the balance of using whatever backend you like. [1]: https://github.com/amark/gun https://github.com/amark/gun
- joeminichino 10y agosyncing isn't as straight forward mainly because not all DBs have replication protocols like CouchDB does. However, LokiJS provides a Changes API which serializes changes from a set point in time so you can easily process those.