Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Development for Cloudant using local CouchDB

I'm planing on having my database stored in Cloudant.
Is it safe to use local CouchDB during development, testing and staging of our application with knowledge that everything works locally should also work on Cloudant?

like image 575
Ido Ran Avatar asked Aug 08 '13 11:08

Ido Ran


People also ask

Which programming language is used for development of CouchDB?

CouchDB is written in Erlang. It is an open-source database that uses various different formats and protocols to store, transfer, and process its data. It uses JSON to store data, JavaScript as its query language using MapReduce, and HTTP for an API.

How do I create a Cloudant database?

If the database is not yet created, it will be automatically created when the project runtime is launched on the application server. In this case, the user name must be set to the administrator user name of the Cloudant account, because only the administrator has permission to create new databases.

What file format does Cloudant use?

JSON. IBM Cloudant stores documents that use JSON (JavaScript Object Notation) encoding, so anything encoded into JSON can be stored as a document.


2 Answers

Certainly. Cloudant is API compatible with the Apache CouchDB API with a few subtle distinctions, all of which are documented at http://docs.cloudant.com. Some highlights are:

  • we disable temporary views (they would be expensive for you at scale!)
  • for our distributed system, we have extend the update_seq from an integer to a string
  • your re-reduce code will nearly always be called, so we recommend using exclusively built-in reduce methods
  • we have fully integrated lucence indexing/search
  • we have multi-stage mapreduce processing via "dbcopy"
like image 188
Will Holley Avatar answered Oct 08 '22 21:10

Will Holley


I do a very similar process. You don't need the same versions, it will actually be very different no matter how you look at it. Cloudant is very cool, and have made a lot of alterations and additions to their system. So, if you are looking at developing views, attachments, etc, then you can develop those locally on your dev project. Once your dev project looks good, I would have those checked into the staging/qa server, which I like to use Cloudant for as well. Thats where you need to get everyones code working together. after that is done, you can fire off a replicator to replicate your staging to production.

No matter how you look at it though, or how you envision the process being, you are going to want to take a close look at the going from dev to QA. There are ways to go about it so that everyone can dev on their own, and merge up. I personally like to use github. I hope this helps you out in your tasks.

like image 31
AlienDev Avatar answered Oct 08 '22 22:10

AlienDev