Posts tagged ‘nosql’

Memsql is lock free, but how?

Had memsql come by and give architecture presentation yesterday so i started reading http://blog.memsql.com/common-pitfalls-in-writing-lock-free-algorithms/ … complicated, and no detailed explanation of how it works anywhere! Kinda need to know your c/asm… and in the end, you get to things like “lock; cmpxchg16b” (mentioned in blog and here https://github.com/memsql/lockfree-bench/blob/0a82132d21d3779820720d5591f2b3bae9f6b65f/stack/boost/atomic/detail/gcc-x86.hpp#L1443 )

It’s a hardware assisted atomic operation (two of them – compare, and swap). Neat. There’s still cache sync overhead in hardware (actually pretty huge relatively speaking), but what can we do… I just wish this was explained better somewhere.

Also, as this article summarizes, http://moodycamel.com/blog/2013/a-fast-lock-free-queue-for-c++
“the cache coherence protocols and memory barrier instructions don’t seem to scale very well” – so shared-memory multi-CPU architectures will hit the wall too, and we’ll need new type of memory architecture to support in-memory databases. It will still lock, but better :)
In fact, the latest and greatest Intel CPU already got some instructions for this, http://en.wikipedia.org/wiki/Transactional_Synchronization_Extensions

MongoDB free training

I just got my second certificate for the two MongoDB courses I was interested in – Python and DBA.

I do highly suggest it to everybody – it’s relatively simple. I would say that DBA course is much simpler in the homework/exam. So the fact that I took time to study for Python course helped quite a bit with DBA course.

https://education.mongodb.com/

Keep in mind that as other courses I took ( https://www.coursera.org/ ) the courses with MongoDB are time-sensitive. You have to get some time to finish the assignments by 9PM EST on Monday. For most people this will mean spending 2-4 hours during the weekend. Also, since they are time-sensitive  the courses don’t run all the time – you have to start on certain date.

But on the plus side, the forum is very lively while the course is running – both students and MongoDB support are answering questions and giving suggestions. That was a big help.

Also, general exposure to NoSQL ideas would help – your head may spin a little less.  I really found it quite amusing that sharding was not major part of dev course – why else would you pick NoSQL?

Mongo DBA Certificate Mongo Developer Certificate Mongo Courses