I would like to use rocksdb for my php mysql based web app. I have built php extension for rocksdb and tries to use it in simple program. But what i see is when i access the php script from two computers some times it says lock:Temporary no resource available.
By searching for this error i found if i tries to open rocksdb on same directory from two separate process i ran in to this issue. But in typical web application this happens when same script is executed by multiple users at a same time
Can i use rocksdb like this?
Basically i want to use it as web application cache. So when data is available in cache app will return from cache and if not available in cache put in cache.
I finally figure out that if i use rocksdb using php extension it opens rocksdb on each php request. Instead should build some running service which keeps rocksdb open and give data when my php program need.
Thrift solves my problem.
This post and the comments helped me.
https://engineering.wingify.com/posts/fast-storage-with-rocksdb/