10 ms·
So glad to see PouchDB included. We use it and have generally had a great experience! We use it with CouchDB on the backend, and Couch seems like a fantastic wa
by karmelapple 5y ago
So glad to see PouchDB included. We use it and have generally had a great experience! We use it with CouchDB on the backend, and Couch seems like a fantastic way to go for use cases involving syncing data between devices with an offline mode and syncing between clients. It was built from the ground up with replication in mind.
Biggest bummer of CouchDB? If you’re not hosting it yourself, there’s only one major player in the market that I know of: IBM Cloudant. They contribute much to Apache CouchDB though, and hosting it yourself doesn’t seem too difficult, especially for small, simple use cases.
Anyone else using CouchDB?
- knubie 5y agoI use the PouchDB/CouchDB combo for exactly the use case your describing. The query language for CouchDB leaves a little to be desired, but ultimately it has worked well for me. I'm self hosting on a digital ocean droplet.
- tata71 5y agoIs DO offering anything close to enterprise grade?
- kbenson 5y ago"enterprise grade" covers a a much larger spectrum of uses and needs with regard to features and stability than non-enterprise grade, making it kinda hard to answer that generally. They offer VMs, containers, managed DB instance offerings, block storage, multiple regions and datacenters, load balancing, etc. They have an API to control all those things, and modules available in many popular languages. But that's basically what many people consider table stakes for a service like that, and indeed there are competitors like Vultr and Upcloud that offer the same. Will any of them have quite the same level of offerings that AWS or GCE or Azure offer? Probably not. But for a great many people what they have is all the enterpise level stuff they'll need or use, and it is decidedly easier to just start up a cheap linux VM and take care of it on one of these services compared to AWS or GCE or Azure, so if what you want are somewhat manually managed cloud VMs, I highly recommend one of these services over one of the big names. I've used all the services named, and I still prefer DO for just throwing up a cheap $5-$10 VM for personal stuff, or to spin up a temporary VM for testing something out. On DO that's a couple second process when you do it manually by clicking around.
- tata71 5y agoFive 9s, or nine 5s? Can one run a professional, mid-pack to top-tier SaaS on it, is it consistent, stable, etc
- lrem 5y agoOne can definitely run a top-tier service on nine fives metal. It's basics of SRE.
- chovybizzass 5y agoMine is gauranteed to be 3 59s uptime. 595959
- BackBlast 5y agoI've used AWS, Digital Ocean, and Vultr each for multiple years. I've had one major outage on AWS and another on Vultr. I'm currently feeling out Oracle cloud. I wouldn't hesitate to run significant sites on any of these providers. Problems and outages happen, I don't think anyone is really providing five 9s whatever they say.
- BackBlast 5y agoYou probably need to define your actual requirements rather than this nebulous term. The "DO offering" is a basic VPS and you host/manage the couchdb process yourself. DO does not offer a managed couchdb service. I've found couchdb to be reasonably stable and worry free. The nature of pouchdb/couchdb and the design philosophy behind it makes it relatively easy to scale to additional servers. Couchdb is master-master, which is a good eventually consistent model that should help in any horizontal scaling. The base process is erlang/elixir which should scale vertically well. I've been using it a couple of years, but not on any sites that have significant traffic.
- fulafel 5y agoNot really, at least in the negative sense of the term. Try talking to Oracle or SAP sales for that :)
- oblib 5y agoThere's IBM's Cloudant services if you need that. And you can build your own cluster and connect as many servers as you want. But DO doesn't have any pre-configured droplets to start off with. Be nice if they did.
- gdelfino01 5y agoI use CouchDB. I love its multi-master replication capability, HTTP API and its ability to monitor for changes easily.
- Omnipresent 5y ago> Couch seems like a fantastic way to go for use cases involving syncing data between devices with an offline mode and syncing between clients. It was built from the ground up with replication in mind. Have you come across any simple examples that show offline mode and syncing between clients with replication?
- janl 5y agosyncing between clients requires a network between clients and normally, clients only have connections to servers. But if you are in a situation where clients can open TCP connections to other clients, CouchDB can sync over that.
- xrd 5y agoI tried to use couchdb with pouchdb. It was a mess to add the proper authentication layer over it and the fact that even the couchdb team has changed their opinions on the right way to do it was not impressive. I love RxDB with Hasura behind it. It's incredible and you get a great postgres front end to boot.
- dynamite-ready 5y agoThat's interesting. What problems did you encounter?
- goohle 5y agoDo you use «one database per user» model or «all users data in one db» model?
- xrd 5y agoOne database per user. And even disregarding the obvious inability to natively join information across tables, it still was a mess to subscribe to changes across all of them and all the other things you take for granted with a relational database. And to me, it looks like couchdb is on life support as a technology. It's a great idea and revolutionary in it's time, putting everything as documents with views, etc. But, too many gaps and unclear direction.
- janl 5y agoCouchDB dev here, I can confirm that CouchDB is very much not on life support. Active work goes into PouchDB and CouchDB, some of which is addressing the issues brought up here. Nothing shipping yet (aside from maybe native jwt auth in this months 3.2.0 release), but definitely ongoing :)
- xrd 5y agoThat's great to hear. I love PouchDB for the record. It's amazing. That's really great to hear about native JWT auth support, that is a huge gap for me to not have a good story of how to do auth. I totally understand the reasons for moving it outside of the database, but it was too much work to create and manage my own proxy on top of couchdb. Thanks a lot for the clarification, and I'll be watching.
- dperalta 5y agoI use it every time I can and I freaking love it.
- gadders 5y ago>>It was built from the ground up with replication in mind. Because it was inspired by one of the first document-based, nosql, replicated databases - Lotus Notes. https://www.wired.com/2012/12/couchdb/ https://www.wired.com/2012/12/couchdb/
- shane_b 5y agoI use couch and pouch frequently. For replication mostly. I’ve copied airtable data to it in the past. Recently I implemented an event store CQRS system designed to be usable offline. I considered syncing events to the client via sockets but I needed to implement diffs. So I use couch and pouch as read only side of CQRS with an append only event CouchDB. The actual data is in Postgres. Authorization is tricky. I do not recommend trying to do document level access control. I simply added an express endpoint that allows only reads and checks the session user for which table they can access. Then pass the request to couch. Overall works really well. I recently turned off live sync for web and react native and loop over all of my databases on a set timeout interval. I had trouble with many connections at once.
- lytefm 5y ago> Authorization is tricky. I do not recommend trying to do document level access control. If you're trying to do that, true. But if you simply let the user sync his data as he pleases, auth is quite easy with the library I maintain (link in my profile). > I had trouble with many connections at once. Can you elaborate on how many? And Did you increase max_db_open and the necessary OS limits? I'm currently planning to go the other way, but also a bit worried that too many open connections can cause trouble.
- shane_b 5y agoNeat project. If the data belongs to only that user it works pretty well. I run into trouble with sharing across users on a team and individual user sharing. In that case, I see most solutions use express as middleware for the couchdb connection. > Can you elaborate on how many? For web, I can have as many as I want syncing. I haven’t stress tested it yet tho. I have a CouchDB in prod that throws an error message about connection limit a few times a day. This one writes and reads. It restarts the docker container to recover since I haven’t had time to investigate. You may have given me the answer :) On React Native, I’ve had odd behavior around 5 connections. That’s where I need to periodically poll for syncing. It works out best since the user is offline most of the time and downloads infrequently.
- WorldMaker 5y ago> Biggest bummer of CouchDB? If you’re not hosting it yourself, there’s only one major player in the market that I know of: IBM Cloudant. That's the biggest problem my projects using Pouch/Couch are facing. The tech choice was made when Cloudant still had Azure datacenter support and IBM's multiple confusing changes to their Cloud brands has put it in a situation we aren't entirely happy with and I keep getting asked/pressure if I can move things back to Azure datacenters. I don't know what I'm going to replace it with and I still wish Azure CosmosDB was more friendly to Couch replication. (It's so close, especially its Changes feed, I feel that the proxy I need probably doesn't need to do all that much I just don't think I have the budget/time to build and test such a proxy.)
- karmelapple 5y agoI didn't realize Azure and CouchDB/Cloudant got along together for awhile! No more though? > I just don't think I have the budget/time to build and test such a proxy Same here, including with the authentication shortcomings we hope get addressed, like per-document security or other improvements.
- WorldMaker 5y agoCloudant was a startup that targeted multi-cloud. At one point they supported cluster deployments to AWS and Azure. They were bought by IBM and dropped AWS support but kept Azure support for a bit longer as they built out more of "BlueMix" (early IBM Cloud brand name), and then IBM did its dance of Cloud brand names and datacenters supported and Cloudant dropped Azure support too.
- karmelapple 5y agoThanks for the info! I knew Cloudant only after the IBM purchase, so this is news to me.