Mixpanel went down, so we're open sourcing a better pure Python memcache client
code.mixpanel.com
code.mixpanel.com
Not true. ultramemcache (https://github.com/esnme/ultramemcache) is an example of a c++ memcached client that is friendly to gevent's monkeypatching. It does this by importing the socket library via the python runtime (https://github.com/esnme/ultramemcache/blob/master/python/um...), rather than using a native construct.
My experience is with gevent, but I suspect that eventlet's monkeypatching is similar to gevent.
...Whats surprising is that this went untested for so long.
When we said "it turns out", we didn't mean that we had suddenly learned that after failure. It's just something we meant to note that we decided to fix.
Companies open sourcing code is always good. But, I would be surprised if there wasn't already a python memcached client that would suit your needs.
if not isinstance(val, str): raise ValidationException('value must be str', val)
I love Python, but the more I used it the more I come to see dynamic typing as a mistake. On large projects with shared library code and deeply nested calls, one of the most pervasive problems seems to be wrongly typed data. And building validation exceptions into all of your code seems like a poor solution.
Obviously you still pay the cost at run-time but at least the actual source looks more sensible that way.
Two months is also not battle tested, perhaps the terminology used here needs to be adjusted...
I suppose they were doing a .get() to check if the server was still up, and assuming None meant "there are no values to get, but the server is up". If .set() works in the same way (silently failing) they were essentially using /dev/null as their task queue. :)