Bug/low level mongo semaphores

### Description
Low level and first approximation of high level semaphores for mongo backend