Slashdot Mirror


CouchDB: Roll Your Own, Or Go With a Service?

Nerval's Lobster writes "Developer and editor Jeff Cogswell asks: When it comes to implementing a CouchDB installation, do you roll your own, or go with a service that provides a hosted version of the database? He takes a look at some of the technologies present in CouchDB that can greatly influence that decision. His conclusion? Like all things, it's a little complicated. 'If you're going to be self-hosting—unless you're working on a really small system—don't use the basic CouchDB for anything,' he writes. 'If you want scalability, either go with Couchbase or BigCouch, or wait until Cloudant's BigCouch merger into CouchDB is officially available.' But going with a host also creates its own things to watch for, including potential issues with replication and eventual consistency."

54 comments

  1. People need to use txt files more by Anonymous Coward · · Score: 4, Funny

    And maybe a handful of Excel sheets, but only if you have lots of data.

    1. Re:People need to use txt files more by Mitchell314 · · Score: 1

      noob, real pros use access!

      --
      I read TFA and all I got was this lousy cookie
    2. Re:People need to use txt files more by Anonymous Coward · · Score: 0

      I wish I could log in here so I could see how that was moderated. I hope that +1 was "funny."

      I've been doing databases for 20 years or longer so I was intrigued by CouchDB... at least until I googled and discovered that it's not a relational database. I miss real programming languages like NOMAD and dBase, and one reason I'm glad I retire next year is because I hate Access so much.

      The idea of a database without tables or relationships between tables is really puzzling to me.

    3. Re:People need to use txt files more by Mitchell314 · · Score: 1

      I first learned about databases when I was taking a class on set theory (bio/math major); relational databases were casually mentioned in the relational algebra topic. Up till that point, I had just thought of databases as dumbed-down versions of spreadsheets. After messing around with sqlite and python for a couple afternoons, I fell in love with SQL.

      --
      I read TFA and all I got was this lousy cookie
    4. Re:People need to use txt files more by cheater512 · · Score: 1

      You fell in love with SQL? Most people just grudgingly cringe at it and get on with the job.

    5. Re:People need to use txt files more by Mitchell314 · · Score: 1

      Most of my work and studies were in scientific computing, and from my experiences the overall attitude and workflow is different than usual business software development.

      --
      I read TFA and all I got was this lousy cookie
    6. Re:People need to use txt files more by sirlark · · Score: 1

      I don't see what's so bad about SQL. I am forever hearing from business types who want their reporting to be more flexible, and complaining that there must already be some tool for the job. My answer is invariably, there is a tool for the job. It's called SQL. Your data is already in a relational database, so learn how to use it. But that's too hard. And SAP, and Oracle Forms, and web front ends etc. are just plaster over the crumbling wall that is the fact that people who don't know how to use the right tools for their job and refuse to learn to do so are always being hired.

    7. Re:People need to use txt files more by sirlark · · Score: 1

      If there is one field/sector that REALLY needs to learn how to use a database, it's the sciences. Keeping experimental data from anything but the simplest of experiments in spreadsheets is just ridiculous.

    8. Re:People need to use txt files more by cheater512 · · Score: 1

      Its not bad for complicated single run things like reports, but for something like a web app, squeezing data in to a string and then the DB server pulling the data back out of the string just seems convoluted.

  2. couches by Anonymous Coward · · Score: 0

    How many couches do you people own that you need to create a database for them?

    1. Re:couches by Anonymous Coward · · Score: 0

      Six and a half.

    2. Re:couches by cayenne8 · · Score: 1
      Yeah, the questions raging in my mind was not so much how to use CouchDB...but more along the lines of what the fuck is CouchDB...?

      Man, who's writing the article synopsises (sp?) these days?

      Lately they're assuming some fairly arcane things are common knowledge....

      --
      Light travels faster than sound. This is why some people appear bright until you hear them speak.........
    3. Re:couches by alta · · Score: 3, Funny

      You my friend have reached the "golden age" in IT. I can tell so by your sub 1m UID. CouchDB is only arcane to old farts who no longer understand the things the younger crowd finds as "in"

      We're from the days when MySQL was getting stored procedures, UDFs and views. That's all old hat. Now databases have Couches, and probably ottomans and coffee tables as well.

      Embrace your golden years and die out quietly like the rest of us.... :)

      --
      Do not meddle in the affairs of sysadmins, for they are subtle, and quick to anger.
    4. Re:couches by OakDragon · · Score: 1

      CouchDB was named after a real-world analog. When you buy things, you might bring them home and store them away in logical places, so you can find them again. Or, you might just throw it on the couch. The name stuck.

    5. Re:couches by RMingin · · Score: 1

      I must be extra old today, because I was thinking the same thing. This seems like the summary is being needlessly obtuse, a single short introductory line would have completely sufficed.

      --
      The preceding comment is my own, and in no way construes an opinon of the Emperor of Mankind.
    6. Re:couches by Anonymous Coward · · Score: 1

      Or you could see that it's an acronym for cluster of unreliable commodity hardware

    7. Re:couches by cayenne8 · · Score: 1

      Embrace your golden years and die out quietly like the rest of us.... :)

      Does this now call for the perfunctory "Get Off My Lawn" statement?

      :)

      --
      Light travels faster than sound. This is why some people appear bright until you hear them speak.........
    8. Re:couches by alta · · Score: 1

      And Get Off My Lawn!

      --
      Do not meddle in the affairs of sysadmins, for they are subtle, and quick to anger.
  3. In b4 webscale! by Anonymous Coward · · Score: 0

    But is it webscale like MongoDB?

  4. Whatever he does by korbulon · · Score: 2

    Make sure Cosmo Spacely doesn't find out.

    1. Re:Whatever he does by jeffcogswell · · Score: 1

      :-D Cogswell Cogs will win!

  5. Hosted is usually a bad idea by Anonymous Coward · · Score: 2

    Unless the host you choose is within 5-10ms of your server network-wise you should always self-host.

    An average site makes many queries per page to the database. The latency adds up fast. People often fail to understand this and end up with very slow sites and/or very frustrated developers.

    1. Re:Hosted is usually a bad idea by Mitchell314 · · Score: 1

      The best way to get around that is to cache every possible permutation of the webpage . . .

      --
      I read TFA and all I got was this lousy cookie
  6. Particularly bad case of Slashdotting by vikingpower · · Score: 1

    TFA being hosted on slashdot.org en being unreachable, we are led to the conclusion that /. /.-ed itself. Hooray !

    --
    Religous speak to God. Insane are spoken to by God. When all shut up, one can finally hear Shostakovich in peace
    1. Re:Particularly bad case of Slashdotting by Lunix+Nutcase · · Score: 1

      Maybe their using a hosted CouchDB? *ducks*

    2. Re:Particularly bad case of Slashdotting by Lunix+Nutcase · · Score: 2

      They're, obviously...

    3. Re:Particularly bad case of Slashdotting by Anonymous Coward · · Score: 0

      You're right they must have accidentally the internet

  7. What? by Kadagan+AU · · Score: 2

    What's a CouchDB? This seems like a niche subject without any description..

    --
    This space for rent, inquire within.
    1. Re:What? by Anonymous Coward · · Score: 0

      It's a webscale, NoSQL database that is used for storing info about all the couches you own.

    2. Re:What? by Anonymous Coward · · Score: 0

      It's a tool used by the NSA to gather and catalog butt print metadata.

    3. Re:What? by Anonymous Coward · · Score: 2, Funny

      It's a lot like /dev/null except that sometimes you might be able to get out from it some data that you put in.

    4. Re:What? by Anonymous Coward · · Score: 0
    5. Re:What? by Anonymous Coward · · Score: 0

      Cluster of unreliable commodity hardware Database. Seriously. And "CouchDB is a database that completely embraces the web."

    6. Re:What? by Anonymous Coward · · Score: 0

      /dev/null with a weak event horizon

    7. Re:What? by Anonymous Coward · · Score: 0

      It's a NoSQL database designed to store objects. For example, my previous employer used it to store data from RSS feeds.

      It is written in a terrible language and it doesn't scale well when mixing insert and reads.

      Use almost any other NoSQL database first. For the first several versions, they didn't even secure admin function.

      THere's an orielly book on it if you care.

    8. Re:What? by Anonymous Coward · · Score: 1

      Like /dev/null, it's web scale.

  8. Who really uses CouchDB? by Anonymous Coward · · Score: 0

    I have a serious question: who really uses CouchDB? From everything I've read and experienced, it's a horribly slow database that can't scale worth a damn (much like most databases today--seriously, it's 2013, why hasn't anyone figured out how to easily scale/shard) and then layered on top of a clunky map/reduce query interface.

    The only interesting thing about CouchDB is the ability to easily write APIs thanks to its HTTP interface.

    1. Re:Who really uses CouchDB? by Anonymous Coward · · Score: 0

      I heard that one hipster's friend whose third cousin twice removed uses it.

    2. Re: Who really uses CouchDB? by Anonymous Coward · · Score: 0

      never heard of it before now... and most of my friends the hipster/startupper type.

    3. Re: Who really uses CouchDB? by Anonymous Coward · · Score: 0

      It's too hipster even for the average hipster. It's DB of choice for the hipster's hipster.

    4. Re:Who really uses CouchDB? by Anonymous Coward · · Score: 0

      seriously, it's 2013, why hasn't anyone figured out how to easily scale/shard

      Much the same reason why MySQL still rules the world.

      People latch on to the easiest thing to use and run with it straight off a cliff.

    5. Re:Who really uses CouchDB? by Anonymous Coward · · Score: 0

      People latch on to the easiest thing to use and run with it straight off a cliff.

      Don't forget about PHP

    6. Re: Who really uses CouchDB? by Anonymous Coward · · Score: 0

      It's for the hipsters who were into being hip before it was hip.

  9. Couch as a service? by WaffleMonster · · Score: 1

    This could be a very compelling business model. Instead of producing physical goods like sofas and counches one could project them virtually using holograms and force fields. Couch service providers would be able to offer a wide array of couches virtually as a service. However I suspect if you fail to pay your bill on time your couch may become incresingly uncomfortable to sit in.

    1. Re:Couch as a service? by Lunix+Nutcase · · Score: 1

      CaaS?

    2. Re:Couch as a service? by module0000 · · Score: 1

      Seems like a product you'd expect from the Serius Cybernetics Corporation - maybe they'll ship them with Genuine People Personalities?

      spoiler: https://en.wikipedia.org/wiki/Technology_in_The_Hitchhiker's_Guide_to_the_Galaxy

      --
      Trackball users will be first against the wall.
    3. Re:Couch as a service? by Anonymous Coward · · Score: 0

      "Serius"?

      R U Sirius?

  10. Betteridge's law of headlines by Anonymous Coward · · Score: 1

    No.

  11. Couchbase!=Couchdb by Maudib · · Score: 1

    Aside from the name and the founder, there is very little in common between CouchDB and Couchbase.

    I'm pretty sure that Couchbase is initially being built around memcache.

    1. Re:Couchbase!=Couchdb by rwa2 · · Score: 1

      It's getting there...

      The people who made CouchDB bought NorthScale, the people who made Membase, which was an attempt to get memcached to automagically store all of its data in a backend database, so the lazy front-end devs would no longer have to worry about doing the whole "is it in memcache? get it from memcache : get it from DB and put it in memcache" logic.

      Couchbase 1.8 was still using SQLite as its backend database. But starting from Couchbase 2.0 they managed to start using CouchDB as the backend, which added a bunch of query stuff which wasn't practical with the old way. But yeah, it's still primarily memcached in a big way... except that you have to worry about disk write performance.

  12. The only reason to use CouchDB by Anonymous Coward · · Score: 0

    Is if you want a database that handles syncing back up after being offline for a while. Has some use for embedded and syncing in that regard with a minimal resource footprint. Outside of that particular use case, its not a good choice for much of anything.

  13. Isn't CouchDB supposed to be in your living room? by Mozai · · Score: 1

    If whatever you're building is large enough that you think you're unable to host your own small NoSQL database, is it time to reconsider using a small NoSQL database?