From e99429729f850e3a7e7ae9c2d2cc72f2b4f49317 Mon Sep 17 00:00:00 2001 From: Omar Yasin Date: Sun, 5 Mar 2017 15:26:17 -0800 Subject: [PATCH] Problem: Unknown how to tackle multiple writers Solution: Start a document to gather requirements and potential solutions to solve for multiple writers. --- 10/multiple_writers.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 10/multiple_writers.md diff --git a/10/multiple_writers.md b/10/multiple_writers.md new file mode 100644 index 0000000..e8bd18c --- /dev/null +++ b/10/multiple_writers.md @@ -0,0 +1,22 @@ +# Goal + +LMDB allows a single writer, which mean concurrent writes are not possible. The +goal of this document is to come up with a way to have multiple writers operate +on a subset of the PumpkinDB database using multiple LMDB volumes. + +# Backstory and Reasoning + +As things stand, PumpkinDB is backed by a single LMDB volume. This approach is +understandably to optimize for the development of PumpkinScript and other +important features such as locking, support for multiple writers etc. We +anticipate a time when a single writer will be a bottleneck to the throughput +of a PumpkinDB installation, hence the importance of coming up with approaches +to support multiple writers. + +# Architecture + +Instead of a single LMDB volume, a PumpkinDB installation can be configured to +be backed by multiple volumes, and writes sharded between them using a consistent +hash function (where keys are consistently hashed to the same volume). This would +make it known where a key should be looked up and where a key should be written, +the two most common operations in PumpkinDB. \ No newline at end of file