Membase can someone explain the idea behind their technology - couchdb

It is fourth day already since I've started diving into CouchDB specifically Membase (Couchbase), Membase seems really interesting technology for me due to simplicity of administration, their interface is as magical as informal and simple. The way you add/remove buckets is just fun.
Unfortunately I didn't managed to launch their .NET client on Mac OS X (on Windows it worked fine) and also couldn't find out the way to perform Map/Reduce queries so it seemed that Membase Server technology is little simpler then pure CouchDB. Anyway everything changed until recently I've stumbled upon the diagram that describes their technology:
The Image is explained here
It seems that "Couchbase server (Currently Membase Server)" plays role of some sort of Master database which isn't accessed directly, and also there is "Couchbase Single Server" which plays the role of client database which has all the features of CouchDB (such as Map/Reduce queries)
If so then how is "CouchSync" is performed? Is it possible to perform this "CouchSync" from code?

Before I describe to you how CouchSync works I think it would be beneficial for me to describe how the Couchbase product history evolved. This will make things more clear. About a year ago, Membase Server was first released. The idea behind Membase Server was to provide memcached with persistence (the persistence layer was sqlite) and simple to use clustering technology. Then about 6 months ago the companies Membase and CouchOne merged to form Couchbase. Directly after the merger Couchbase continued to provide Membase Server, but now also provided Couchbase Single Server. Couchbase Single Server is essentially CouchDB with GeoCouch packaged in by default along with many major performance improvements. On July 29th, 2011 Couchbase announced a developer preview of the first version of Couchbase Server. Couchbase Server is the combination of Couchbase Single Server and Membase. Basically what Couchbase did was replace sqlite with CouchDB as the persistence engine. So this basically caused the product to go from being a key-value store to a document store database.
So what is CouchSync?
CouchSync is basically what Couchbase is calling CouchDB replication. It is very simple to setup in both Couchbase Server, Couchbase Single Server and in CouchDB. All it is is a changes feed that is streamed from one server to another.
A note on using Membase. Since Membase doesn't provide any of the CouchDB support it doesn't actually fit into this diagram and therfore doesn't support CouchSync. You will actually want to look at the developer preview of Couchbase Server since this product has both Membase and CouchDB features. In the meantime if you are looking for something more stable to test then take a look at Couchbase Single Server as it will be able to give you a feel for some of the features (like CouchSync) that are in Couchbase Server
Also, the point of this diagram is to show that you can do CouchSync across the entire Couchbase product line. You don't need to go through Couchbase Single Server to do CouchSync to Couchbase Mobile. You can do CouchSync directly from Couchbase Server.
Is it possible to perform CouchSync from code?
No. It's easier than that. You set it up in the web ui.
Hope that helps.
[EDIT]:
This diagram is now outdated. Couchbase the company no longer supports Couchbase Single Server (which is it's version of CouchDB). The CouchSync feature will now sync directly with Couchbase server.

Related

Electron Desktop Application communicating with remote NoSql server

I've begun to dive into developing a desktop application with electron. I have been interested in pairing this application with a NoSQL database to create users, display data, and do CRUD operations. I've considered databases such as MongoDB and CouchDB, and I'm curious if creating a desktop application that communicates with a database hosted elsewhere is a feasible goal.
I'm hoping that someone here can help direct me to great resources on creating a desktop application that works with a remote NoSQL database. Any advice here would be greatly appreciated!
I recommend the use of CouchDB, which uses a JSON based document format. CouchDB bundles the server and data storage functionality in a single product, providing a REST-like HTTP interface for document insertion, updates, retrieval and deletion.
Therefore, you'll be able to interact with CouchDB directly from within the Electron desktop application. Apache CouchDB Nano is the official Node.js library for accessing CouchDB.
The following additional factors speach for CouchDB:
It is open source.
It has comprehensive documentation.
It is available for Linux, macOS and Windows.
It's easily installed and quickly set up.
It can be installed on your local computer (for development), on your own servers, or in the cloud.
It supports Mango querying language (inspired from MongoDB).
It is highly scalable.
It is shipped with Fauxton web interface that lets you create, update, delete, view and query documents on the fly.
etc.

Do DynamoDB and Cloudant store data at edge locations?

Trying to decide between DynamoDB and CouchDB for my website. It's a static site (built with a static site generator) and I'm planning on using a JavaScript module to build a comment system.
I'm toying with using PouchDB and CouchDB so that synchronizing is easy. I'm also considering DynamoDB.
I have a performance question. From these databases, do any of them push data out to edge locations so that latency is reduced? Or is my Database essentially sitting on one virtual server somewhere?
From what I know, neither of these solutions utilise edge locations ootb.
Since you're mentioning PouchDB, I assume you want to use a client-side database in your app?
If that's the case you should keep in mind that, in order to sync, a client-side DB needs to have access to your cloud db. So it's not really suitable for a comment system since all client could just drop comments of others, edit them, etc.

Request for feedback: Couchdb setup with client replication (pouchdb) for multiple users/accounts

Before jumping into development, I'd like to get feedback on a change I'm thinking of making, moving from mongo to couch.
Basically I've got a webapp which is used to help organize users activities (todolist, calendar, notes, journal). It currently uses mongodb, but i'm thinking to move it to couch, mainly due to couches replication ability, and clientdb interaction (pouchdb). I have a similar homegrown setup on the browser using localstorage, backed by mongo, but am looking for a more mature solution.
Due to how couchdb differs from mongodb, I'm thinking that each user should have their own couch db, and their documents being each of my app components. Basically I have to move everything up a level with couch due to local db replication, and due to security.
I have 3 questions.
1) I assume that couch does not have document level security/authentication, correct? (Hence me moving each user assets to their own database, good idea?)
2) My plan is have users login to the website, then my backend nodejs code authenticates them, and sends them down some auth/session token. The javascript on the client then uses its local pouchdb data to set itself up, and also sends the replication request directly to the couchdb server (using the auth token it got from my server-side process). They should only have access to their database, since I can do per database auth access (correct?)
What do you think of that setup? It should work?
3) Regarding couchdb service providers, why do they vary so much on their couch version? IE, happycouch, 1.6.1, iris 1.5, cloudant, 1.0.2? And I also hear about couchdb 2.0 coming out soon... I'd like to use cloudant, but 1.0.2 is so many versions back from a 1.6 or 1.5, if I'm not doing anything exotic, does it matter?
Bonus question :p Continuing from the last question, do you know of any services that host node.js and have local instances of couchdb available? I'd like to use my backend server code as a proxy, but not at the expense of another network hop.
Thank you very much for your feedback,
Paul
Due to how couchdb differs from mongodb, I'm thinking that each user should have their own couch db
This is a CouchDB best practice. Good choice.
I assume that couch does not have document level security/authentication, correct? (Hence me moving each user assets to their own database, good idea?)
You are correct: https://github.com/nolanlawson/pouchdb-authentication
My plan is have users login to the website...
Yep. You can just pass the cookie headers straight through from Node.js to CouchDB, and it'll work fine. nano has some docs on how to do that: https://github.com/dscape/nano#using-cookie-authentication
Regarding couchdb service providers, why do they vary so much on their couch version
The Couch community is one big happy fragmented family. :)
I'd like to use cloudant, but 1.0.2 is so many versions back from a 1.6 or 1.5, if I'm not doing anything exotic, does it matter?
1.0.2 refers to when Cloudant forked CouchDB. They've added so many of their own features since then, that they're pretty much feature-equivalent by now.
The biggest difference between the various Couch implementation is in authentication. Everybody (Cloudant, CouchDB, Couchbase) does it differently.

POS Application Couchbase vs CouchDB

I need to design a cloud based POS application, but the customer is demanding that the app should also have some offline facilities and work offline on Mobile platforms and Desktop Platforms too. (Sales should not stop even if there is no internet connection)
At first sight I chose Couchbase as the database, JAVA EE + Spring for the back-end + JSF for the frontend.
For the mobile I was thinking about Xamarin + Couchbase Lite which should sync with the Couchbase on the cloud.
My main problem is when Desktop is offline. From what I understood since I read about these databases, Couchbase Lite is just for the mobile.
What configuration do you suggest for this situation? so even when the desktop goes offline, it still has some data available, and it will sync with the cloud when it's back online.
Maybe I should change my mind to CouchDB ? Which one is better ?
I am a bit noob in this area, it's my first cloud based project, I am reading a lot in the last few days, and I really want to do it because I want to learn these things as this part is growing a lot in the last years.
Thanks
couchbase lite can run on desktops. the list here gives you the option to run on windows or in JVM capable desktop: http://developer.couchbase.com/mobile/#couchbase-lite. I'd recommend mobile for the desktop side.

Difference between Cloudant and CouchOne?

I wonder what the difference is between Cloudant and CouchOne.
Good question. My quick answer:
CouchOne is lead by Damien Katz, the originator of the CouchDB Apache project. CouchOne is now focused squarely on scaling couchdb down to run efficiently on mobile devices. The goal is to leverage the p2p replication model of CouchDB to solve the sync problem on mobile.
Cloudant is founded by 3 PhD's from MIT with big-data backgrounds. Cloudant is focused squarely on scaling CouchDB up (see the open-source bigcouch project) to power data-intensive applications in the cloud. Cloudant provides scalable data as a service for high-rate, large volume online transaction processing, search and analytics.
Thus there is a real opportunity to see the CouchDB API flourish at two tremendously different scales to provide the application developer a single platform that runs on the mobile and in the cloud, with seamless data (and CouchApp!) migration between the two.
Update (2015)
Currently, according to Professional Services on CouchDB Wiki, there are 3 CouchDB hosting services:
Smileupps
Cloudant
Iris Couch
Since this question is specifically about Cloudant and CouchOne, here's more info:
Cloudant was bought by IBM in March 2014 - see IBM Completes Acquisition of Cloudant - and continues to operate.
According to Wikipedia: "Cloudant is an IBM software product, which is primarily delivered as a cloud-based service. Cloudant is an open source non-relational, distributed database service of the same name that requires zero-configuration. Cloudant is based on the Apache-backed CouchDB project and the open source BigCouch project." (source)
CouchOne is not available any more. As of June 2015 http://www.couchone.com/ gives 404 Not Found (since at least March 2013), #couchone on Twitter had last tweets in May 2011 and says that "CouchOne is now Couchbase, Inc." - but please note that contrary to some marketing material the Couchbase Server is not a continuation of CouchDB - it has a different code base, licensing, philosophy, features, data and protocols.
For more info on this and an explanation of differences between things like CouchDB, CouchIO, CouchOne, Couchbase, Couchbase Server, Couchbase Mobile, Couchbase Lite, CouchApps, BigCouch, Touchbase, Membase, Memcached, MemcacheDB etc.- see the answer that I wrote to: Difference between CouchDB and Couchbase in March 2013.
Original answer (2011)
It's a late answer to a somewhat dated thread but it's a number one Google hit for "couchone and cloudant" so here's a little update.
Few days ago CouchOne announced a merge with Membase to form a new company called Couchbase. Membase is known eg. for the database behind FarmVille by Zynga so it's a mature large scale NoSQL solution and Couchbase is planned to be a technology scaling from smartphones to large data center clusters.
Cloudand on the other hand started from large scale (see Mike's comments) and while you can get a large scale solutions for more than $1000/mo, you can also get a 2GB database for $15/mo and even a smaller one for free.
There is a difference in managing the databases, CouchOne uses just Futon right now and Cloudant has a custom web interface where you can set up shared databases, virtual hosts, custom domains etc.
All in all Cloudant seems to be more mature right now and we have to see how the Couchbase develops.
The bottom line is that both CouchOne and Cloudant can be tried for free so it's probably best to try out both and see what best suits your needs.
I would also note that CouchOne/CouchBase supports the GeoCouch extensions, while Cloudant does not. Important if you want to do bounding box queries.

Resources