There is this in LevelUP Documentation (https://github.com/rvagg/node-levelup#multi-process-access):
LevelDB is thread-safe but is not suitable for accessing with multiple processes. You should only ever have a LevelDB database open from a single Node.js process. Node.js clusters are made up of multiple processes so a LevelUP instance cannot be shared between them either.
So I could not use Node Cluster (http://nodejs.org/api/cluster.html)
Is there another option to make a multi-process (or multi-thread) Node.js Application accessing a LevelDB Database?
I'd say level-party is what you're looking for. Of course in terms of having multiple leveldb's for each child thread i'm not sure if know the answer to that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With