Couchdb usage & hosting

With CouchDb getting mentioned a lot recently just wondering what managed database provider people will be using to host and auto backup their couch db?

Good question!

Just to give it a bit more context, it is good to understand the CouchDB positioning from Wappler perspective.

We plan to offer CouchDB as Docker Service, so you can choose to install it as additional database in your docker based projects. Much a bit like the Redis integration.

This implies also its usage CouchDB is more a public like database that can be easily synched with web clients with its PouchDB counterpart. But it is more the public site that you see. So the primary database will still remain your existing SQL based database, secured on your server and CouchDB will be more like an additional public database for easy real time synchronization.

Of course it all depends on your usage, like if you have mobile clients to sync, you can include credentials there and make it a private database and use it as primary database. But on the web with public web clients it is difficult to make private databases.

Database backups in CouchDB are also difficult and usually you just replicate to other CouchDB.

1 Like

Can I just check something? Will CouchDB and PouchDB be available for PHP sites? I have a sudden sinking feeling it might be only for NodeJS.

1 Like

Yes initially the CouchDB integration will be NodeJS only. After evaluation and finalizing of the features we will see if we can make a php version as well.

1 Like

Karma!

1 Like

I knew that was coming.

How will Couch sync with an existing relational DB? From everything I’ve read you typically choose to use one (NoSQL) or the other (Relational DB) for an application.

There is no automatic synching between CouchDB and other sql databases. You can just add data directly to the CouchDB in server actions when you need it. The data can be read from other sql databases if needed first. It is all up to you.

Sounds good. I just wanted to ensure others who read this do not think the two will work together out-of-the-box and, depending on what’s being built, it is usually a decision to go with one or the other. Otherwise you’ll have more development work to sync data between the two.

Will MongoDB or another NoSQL database be coming down the line I imagine it would be easier to sync two NoSQL over a Relational with a NoSQL as they could hold the data in the same structure or is it just as easy to use Postgres etc?

I could be wrong, but I think part of the challenge is Wappler uses Knex which is a SQL query builder and that doesn’t work in NoSQL databases. I think something like Sails.js or another ORM might be needed that can work across database types (document and relational database types).

1 Like

We are adding our own adapters so the CouchDB behaves a bit the same like it’s sql databases counterparts. So the usage should be pretty much the same.

If all goes well and there is still demand for other NoSQL databases we could add also mongodb the same way.

Although the hype for using pure NoSQL for everything is a bit over and people realized a good mixture of sql based databases with json extensions is actually the best solution to have best of both worlds.

4 Likes

I think the offline-first design and that it allows you to have distributed databases with bi-directional replication is what makes it a worthy DB to think about for certain applications.

3 Likes