node-event-storage
node-event-storage copied to clipboard
Use async/await for proper async code
Since support for node 6.0 has been ruled out, this is doable without manual promisifying.
Benchmarks with both promisified and fs.promise suggest being an order of magnitude slower than current sync calls. Of course those benchmarks are synthetic and in an actual application with a bit of CPU bound logic this will turn around. Still, the synchronous model has some benefits in this specific use case, where guarantees about order of writes and consistency are important.
Needs further investigation and playing around with use-cases.