News for hackers. Stuff that matters.
Re:Why MongoDB is a bad choice for storing our scraped data by AlisdairO on Tuesday May 14, 2013 @04:22PM (#5707781)
Postgres has hot standby built in nowadays, and it works well.

Sharding certainly isn't as easy - the technical compromises that mongo makes make it pretty trivial to implement, whereas it's relatively hard to make it work in an RDBMS while maintaining all the expected capabilities. It generally requires some application-level work on open source dbs.

With that said, I really think many people grossly underestimate the effectiveness of scale-up. It's worth remembering that Stack Overflow (for example) is still running on a single pair of master/hot standby database machines.

Re:Why MongoDB is a bad choice for storing our scraped data by threeseed on Tuesday May 14, 2013 @05:01PM (#5708110)
Standby is a pretty poor solution compared to replica set let alone what Cassandra has to offer. Sharding is trivial on MongoDB/Cassandra and it is open source. So let's be accurate here. It is a problem inherent with the SQL databases.

And I think you underestimate the benefits of scaling out. If I want to ensure close to 100% uptime or have a server closer to my users than Cassandra or even MongoDB would be infinitely easier to setup and manage than Postgres. These are "very nice to haves" for even the tiniest startup.

Re:Why MongoDB is a bad choice for storing our scraped data by AlisdairO on Tuesday May 14, 2013 @05:53PM (#5708567)
Sharding is, of course, trivial on those systems - after all, they're extremely feature-poor, and have given up those features specifically to support trivial sharding.

You can replicate much of this behaviour using open source RDBMSs, but yeah, it's not what they're designed for and it's harder. If you want quality replication/clustering you're currently looking at paid-for DBs.

Being able to scale out is absolutely a nice-to-have. I'm not sure it's a nice-to-have on the scale of giving up all of the features an RDBMS provides for most people's use-cases. Further, you might find that the relative lack of data headaches you get with an RDBMS more than makes up for a little extra time setting up hot standby.

Finally, if 100% uptime is that important you're probably not relying on a relatively niche NoSQL database. If uptime on the level of Stack Overflow is good enough (which for most people it probably is, let's face it), then you'll probably find replicated postgres good enough.

Re:Why MongoDB is a bad choice for storing our scraped data by craigching on Tuesday May 14, 2013 @05:39PM (#5708444)
Thanks, that's very much what I'm talking about. Cassandra would be my ideal store, I absolutely love it except for the ability to index across nodes. My understanding, when last I looked at it, was that indexes were only local and didn't span Cassandra nodes. Does Cassandra now have properly distributed indexes?

When I was looking at implementing Cassandra instead of Mongo DB, it seemed like we had to create reverse column family (IIRC, been away from Cassandra for a bit now). Is that still the case?

Re:Why MongoDB is a bad choice for storing our scraped data by crypto5 on Wednesday May 15, 2013 @02:09AM (#5710459)
Just curious: did you get any real problem with local indexes? For me it works just fine.
Re:Why MongoDB is a bad choice for storing our scraped data by craigching on Wednesday May 15, 2013 @07:49AM (#5711335)
How do you use a local index when your data is distributed across numerous nodes? Maybe I'm missing something fundamental, so I'd definitely like to understand.
Re:Why MongoDB is a bad choice for storing our scraped data by crypto5 on Wednesday May 15, 2013 @02:45PM (#5713938)
It's hidden from me behind client library API(astyanax in my case), I shouldn't know anything about index locality. I just send request(give me records for this index value), and get response and don't care if it's local index or distributed index. Astyanax takes care about everything, it queries all nodes.
Re:Why MongoDB is a bad choice for storing our scraped data by craigching on Thursday May 16, 2013 @08:45AM (#5718298)
Just refreshing my memory here, but this blog post [1] is what kept me away from secondary indexes and explains why I need something more from Cassandra. Especially the section on "The Good: Secondary Indexes", I actually have some data that is stored by timestamp, that was, as I recall, the biggest turn-off on them.

Has the state of affairs advanced since a year ago? Would love to hear it has!

[1] http://brianoneill.blogspot.com/2012/03/cassandra-indexing-g...

Re:Why MongoDB is a bad choice for storing our scraped data by craigching on Thursday May 16, 2013 @08:30AM (#5718243)
I will check that out, thanks! I was looking at Hector and Pelops at the time and I don't believe they provided anything like that. But now that you mention it, I bet Hive could do what you describe as well. Need to dig a bit deeper now!
Re:Why MongoDB is a bad choice for storing our scraped data by hderms on Tuesday May 14, 2013 @05:52PM (#5708564)
ask yourself how facebook does it