Distributed read/write locking based on MongoDB, primarily designed to make GridFS safe for concurrent access