News for hackers. Stuff that matters.
Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by bsg75 on Wednesday May 23, 2012 @01:47PM (#4014284)
I am a Real Database(tm) person, but I will give them some credit for:

"Nevertheless, a major focus for the upcoming 2.2 release has been removing the global lock and introducing database level locking as an initial step towards collection level locking and potentially even more granular concurrency in future releases."

This stuff is hard to get right, and why RDBMS' are simultaneously maligned as "old tech", yet are still the most dependable database mechanisms available.

It seems like the successful(popular) "NoSQL" engines will eventually reinvent many RDBMS wheels - at least in the cases where they are aiming to be replacements.

Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by shubber on Wednesday May 23, 2012 @02:16PM (#4014462)
It seems like Mongo in particular is reinventing the RDBMS wheel entirely, except with a frustrating JSON query language. The benchmark blog post a couple of days ago versus an out-of-the-box Postgres deploy (i.e. memory crippled) was not very impressive.

And look: they've implemented clusters - by pushing a Slony equivalent into the DB itself.

Please forgive my bile - I was a little nonplussed with Mongo, and now I have to use it for a client. Now I'm a lot nonplussed.

Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by bsg75 on Wednesday May 23, 2012 @03:39PM (#4014909)
MongoDB gets points for including a query language (vs CouchDB), but loses a few for it being JSON/JavaScript.

I understand the choice, JSON and JavaScript being so popular in current web platforms, but the SQL developer in me wishes for something more "readable" (see Lua in Redis).

Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by FooBarWidget on Wednesday May 23, 2012 @03:55PM (#4014996)
RDBMSes still do not provide easy support for sharding. That alone makes MongoDB different.
Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by defen on Wednesday May 23, 2012 @03:06PM (#4014739)
Just an FYI - you're using the word "nonplussed" incorrectly.
Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by inportb on Wednesday May 23, 2012 @03:34PM (#4014885)
Perhaps shubber is nonplussed after learning about MongoDB's query language design and the client's choice of database -- why would anyone actually want such a monstrosity?!
Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by taligent on Wednesday May 23, 2012 @04:14PM (#4015074)
Because MongoDB is a fantastic database for developers whilst RDBMS can suck big time.

In this age of agile development requirements and schemas change very, very rapidly and MongoDB excels at being able to support that.

Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by bsg75 on Wednesday May 23, 2012 @04:55PM (#4015244)
I am genuinely interested in why schema changes in RDBMS' are such a point of contention. Is it the addition of new columns that are problematic, or the modification of existing column datatypes?

Having written more than one mechanism to automate schema upgrades in remote deployments, and numerous migration scripts, I know it is an extra step in the development process, but I have not considered it an onerous one.

Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by gcarre on Wednesday May 23, 2012 @05:29PM (#4015408)
Try ALTER TABLE ADD COLUMN on a 100 million rows table :).

Jeremy Zawodny from Craigslist explained why it helped them a lot for Craigslist archives database, where an alter table could take up to 24 hours: http://www.10gen.com/presentations/mongosf2011/craigslist

Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by bsg75 on Wednesday May 23, 2012 @05:40PM (#4015451)
OK, a MySQL problem. Not so much with PostgreSQL, where adding new columns noes not need to touch every table row.

NoSQL ~= NoMySQL

Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by SystemOut on Wednesday May 23, 2012 @05:18PM (#4015353)
For me, the lack of schema also means that during an upgrade on a large database I can upgrade my app, start batch updating the data in the database and then also perform on-access upgrades and minimize my app downtime. Changing a schema in a large database can potentially require a lot of downtime or other interesting gymnastics to keep downtime to a minimum. I'm not completely sold on Mongo but this is one area where not having a schema can really help.
Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by jeltz on Wednesday May 23, 2012 @08:12PM (#4016029)
Would not any online schema update in a more complicated cases (not just simply adding or removing columns) require interesting gymnastics or downtime in MongoDB too? The application needs to support both the old and new (and possible an intermediate) schemas during the online upgrade.

PostgreSQL supports transactional schema modifications. fast adding and removing of columns, and lockless index creation. So in simple cases upgrading the schema is trivial. For complicated cases it can be a mess, but my guess is that that applies to any database.

Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by taligent on Wednesday May 23, 2012 @11:18PM (#4016601)
Schema changes are exclusively an application-layer change in MongoDB. So MongoDB can support as many schemas as you want at the same time whilst you are migrating.

Also don't forget that MongoDB can have arrays and sets as a "column" type. Which if you tried to replicate in RDBMS would mean a multi-table migration.

Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by jeltz on Thursday May 24, 2012 @07:43AM (#4017872)
> Schema changes are exclusively an application-layer change in MongoDB.

Which is not by itself an advantage. You still need to write the code which does the schema change if you for example rename a field.

> Also don't forget that MongoDB can have arrays and sets as a "column" type. Which if you tried to replicate in RDBMS would mean a multi-table migration.

So can PostgreSQL. The sets are not as general as in MongoDB though since they can only store strings.

Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by taligent on Wednesday May 23, 2012 @06:05PM (#4015566)
Simple. To add a new attribute with MongoDB I simply add a new variable in my Java model and that's it. Done.

With RDBMS. I have to write an update SQL script, rollback SQL script, run it against my dev environment, ensure it is applied through test environments and hope the DBA doesn't forgot to run it in production (it happens).

Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by wahnfrieden on Wednesday May 23, 2012 @08:35PM (#4016113)
I use an RDBMS with Django. When I want to add a new attribute to a schema, I just add the variable to my model, and South picks up on the change and writes the update script for me.
Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by mitchellh on Wednesday May 23, 2012 @02:00PM (#4014367)
I don't claim that it is easy, especially with an RDBMS. Actually, given the few courses I took in university on database design, I know its very non-trivial.

But MongoDB is not an RDBMS. There are no joins, so a query can only touch one collection (table) at a time anyways, so at least in that regards its much easier than an RDBMS.

Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by bsg75 on Wednesday May 23, 2012 @02:03PM (#4014384)
True - s/RDBMS/DBMS/g
Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by sausagefeet on Wednesday May 23, 2012 @04:38PM (#4015187)
AFAIK, the locking in Mongo has more to do with them using memory mapped files than anything else. Other DB's, like Riak, do not have this problem. But perhaps someone can prove me wrong.
Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by nknight on Wednesday May 23, 2012 @01:56PM (#4014336)
> It seems like the successful(popular) "NoSQL" engines will eventually reinvent many RDBMS wheels.

The wheels in question aren't RDBMS wheels, they're just generic database wheels. The backlash against RDBMSs wasn't because of implementation details like this, it was because of the baggage of relational structures in general, and SQL in particular.

The "reinvention" of these wheels is occurring now because non-relational databases are maturing now.

Re:Goodbye global lock – MongoDB 2.0 vs 2.2 by bsg75 on Wednesday May 23, 2012 @02:08PM (#4014409)
Point taken.

As I spend most of my time in SQL, and have come to find a comfortable language to use, I can still understand why fixed schemas give developers headaches - especially when schema migrations in MySQL can result in extra work to minimize downtime.

I mention MySQL specifically, because most of the RDBMS -> NoSQL cases I see came from MySQL users. Coming from MSSQL, and now PostreSQL, it seems as though NoSQL is partially a NoMySQL sentiment.