5 ms·
Why not CouchDB + PouchDB? It's offline first and replicates over HTTP. For more fine-grained permissions and other features I'm also developing a small Go dat
by fiatjaf 11y ago
Why not CouchDB + PouchDB? It's offline first and replicates over HTTP.
For more fine-grained permissions and other features I'm also developing a small Go database compatible with PouchDB at https://github.com/fiatjaf/summadb https://github.com/fiatjaf/summadb
I hope it will be able to sync through websockets soon.
- jchrisa 11y agoYou might be interested in https://github.com/couchbase/sync_gateway https://github.com/couchbase/sync_gateway which is the Couchbase Mobile access control and sync layer (compatible with PouchDB etc). It has fine grained access control based on a channel metaphor. And it's also written in Go, so you might be interested in using parts of it. Specifically if you wrap your storage layer in a facade that looks like https://github.com/couchbaselabs/walrus https://github.com/couchbaselabs/walrus you'll be able to use our suite of storage layers, and we'll be able to use yours. That means it'd be trivial to swap out your storage for something scalable like Couchbase Server, or something tiny and embedded like ForestDB or RocksDB.
- fiatjaf 11y agoThank you, jchris. As far as I could understand, basically I must implement the Bucket interface[1]? I don't if that will work, since I'm storing things in a somewhat different manner, but it's definitely worth examining. [1]: https://github.com/couchbase/sg-bucket/blob/master/bucket.go https://github.com/couchbase/sg-bucket/blob/master/bucket.go
- jchrisa 11y agoThat's right. If you find you enjoy that code... Couchbase is always looking for great engineers!
- MCRed 11y agoOr Couchbase + Sync_Gateway + PouchDB / CouchbaseLite? This is a very full featured combination, basically a PaaS/BaaS with sync, and user accounts, out of the box. http://www.couchbase.com/nosql-databases/couchbase-mobile http://www.couchbase.com/nosql-databases/couchbase-mobile Note, while that website is very corporate, the software is open source and the company is very supportive of developers.
- Lazare 11y agoI find it an ongoing mystery how many of these tools and services pop up that aren't based on Couch/PouchDB, don't reference Couch/PouchDB, aren't compatible with the Couch sync protocol, and don't even seem aware the Couch/PouchDB exist. I'm 100% waiting to be sold on "here's a new tool that does what CouchDB does, but is better in these specific ways", but if your sales pitch is just "we're working on writing an exact clone of CouchDB because we didn't realise CouchDB existed" it doesn't really sell me. (Nothing wrong with a dose of Not Invented Here Syndrome; a lot of progress comes from reinventing the wheel. What gets me is the No Idea What's Been Invented Syndrome.)
- daleharvey 11y agoI am a little confused at why PouchDB isnt listed on the comparisons page, I am fairly certain they sent a comparison listing and asked me to review it at some point but in all fairness they did investigate and give reasons to not use PouchDB, this post is linked http://www.servicedenuages.fr/en/generic-storage-ecosystem http://www.servicedenuages.fr/en/generic-storage-ecosystem In my extremely biased position (as the maintainer of PouchDB) I would really have liked to still see this based on the CouchDB protocol / PouchDB codebase, it is true that neither Couch or PouchDB have particularly expressive and powerful permission systems (which is what the main downside looks to be) however I have been very aware of that building PouchDB and have made a lot of effort to ensure a powerful and flexible permissions system can be built on top of it (for example https://github.com/thaliproject/node_acl_pouchdb https://github.com/thaliproject/node_acl_pouchdb) I do think that when you are tasked with providing cloud services for existing Mozilla products that there is a lot more risk involved in leveraging an existing established ecosystem like Couch / PouchDB however so its fairly likely that for Mozilla services this was the best choice (the same in reverse is true however also when looking at this as a generic library). As for a disclaimer, I am a maintainer of PouchDB and a Mozilla developer. I have worked / talked to this team about Kinto, work on some features that use it and they are doing awesome stuff, some of which Pouch may possibly look to do as well.
- tarekmoz 11y agoYeah our doc is incomplete, I did add a bug about this the other day. We should compare products (pouchdb vs kinto.js) and separately deployments (kinto server vs couchdb)
- cquillen 11y agoSpeaking of finer-grained permissions in CouchDB/PouchDB. I'm working on implementing that now in my application. Can filtered replication (server-side) solve this problem? For an application targeting small-businesses, I'm considering the following setup on the server. Has anyone done this or something similar? One DB per user and a Company DB. Filtered replication from Company DB to User DBs. Full replication from User DBs to Company DB. All reads/writes/deletes from client (or PouchDB sync) to User DB only