4 ms·
These videos are certainly funny, particularly the iPhone vs HTC one that was popular a few months ago. But as cscotta pointed out there's an interesting trend
by dmytton 16y ago
These videos are certainly funny, particularly the iPhone vs HTC one that was popular a few months ago. But as cscotta pointed out there's an interesting trend of picking certain flaws in particular databases and highlighting them without telling the whole story.
Anyone watching this might believe that MongoDB has a major flaw where data isn't written immediately and you have no idea if it has successfully been stored to disk. Whilst it's true that inserts are not immediately written by default, you can a) change the startup config to set the delay time b) force a write of all pending changes from the command line c) force the write from your call to the insert/update/remove/etc method in all the libraries and most importantly, d) request the library method wait and return the response from MongoDB so you can determine if the write was successful or not.
This means you have complete control over when you need fast inserts at the expense of potential data loss, or when you need to be certain the data has been written.
- woogley 16y agoWhile you're correct, I don't believe the point was that you had no control over it. The point was that their benchmarks came from using delayed-write setting and compared it against databases that ARE writing to disk. He's saying that mongo is cheating the benchmark by doing work after the timer has stopped.
- binspace 16y agoMaybe cheating is ok. Sure, there is a reason why it's faster. Maybe the guarantee of the write to disk is not as necessary as some people would believe. It's certainly not the same as writing to /dev/null. Maybe the developer can have other ways of guaranteeing consistency.