4 ms·
This is still extremely inferior to modern RDBMSs which usually support row level looking. I suppose row-level locking is a necessity when you want to be able
by aidanhs 13y ago
This is still extremely inferior to modern RDBMSs which usually support row level looking.
I suppose row-level locking is a necessity when you want to be able to scale vertically. By comparison, I understand that MongoDB doesn't even try to support vertical scaling so it makes sense to not bother with complex locking systems.
Personally, I'd prefer to have to option of scaling without being forced to increase the number of moving parts in my single most important system (the database)...but the MongoDB docs make the fair point that there's a ceiling to vertical scaling. It's probably higher than most people think though.
As an aside, I discovered recently that Informix supports byte-level locks for 'smart large objects' (namely CLOBs and BLOBs). Makes me wonder whether field level locking will appear some day.
- AlisdairO 13y agoThe ceiling to vertical scaling is pretty damn high. Last I checked, Stack Overflow still ran on a master-slave pair of SQL Server boxes with 64 gigs of RAM each. That's not exactly big iron these days. Locking has a degree of complexity to it, but implementing page locking (for example) is not that hard. The fact that the Mongo guys haven't is probably symptomatic of the fact that they're still relying on the OS to cache data, rather than implementing their own page manager like most other DBMSs. That said, given the short duration of Mongo locks, lock granularity isn't as big a deal with Mongo as some make it out to be.