A distributed semaphore based on memcached