This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
Which xtdb storage options allow connections from multiple processes?
Hey, any tx log + document store combo that isn't backed by an embedded KV store will do the job https://docs.xtdb.com/administration/configuring/#_storage (which is something worth clarifying in this part of the docs next week...thanks for the inspiration!)
Thanks for the quick response. I meant multiple processes on the same machine.
Basically, I want to share a db across multiple processes on the same machine. I started with rocksdb which gives:
Execution error (RocksDBException) at org.rocksdb.RocksDB/open (RocksDB.java:-2).
While lock file: dev/index-store/LOCK: Resource temporarily unavailable
Not sure which storage option might be the best fit for this setup.My use case is pretty low volume, but ideally, it would be great to have an option where I can use the same db across multiple processes without having to run an additional db process (like postgres).
It's possible that I missed it, but a feature matrix for the different storage solution would be really helpful.
wouldn't that require running a separate process for the db?
nope, you can still embed the node (with embedded HTTP server) in one of your app processes
The existing KV stores aren't equipped for multi-process usage, although RocksDB does have an "open as secondary" API which might work okay but I've not attempted to use it before
you could also have multiple KV index-stores, one per process, but that would be pretty an inefficient use of resources also (more so than HTTP overheads, I expect)
Just a little more background. I'm working on some dev tooling that has some state it would like to store. The goal is to use the same dev tooling across multiple projects which each have their own repl. There's not really a master process.
I know sqlite has a multi-process mode, https://www.sqlite.org/faq.html#q5
I wasn't sure if any of the kv-stores did
Thanks, that is useful to know. If the state isn't huge then SQLite might actually be a good option for the tx-log + doc-store in that case - have each node, in each project, maintain its own KV store
Would that allow data to be shared across projects?
yep, all nodes pointing at a shared SQLite file in a common directory containing the tx-log + doc-store
So if I wanted to share the data, I would just use a single KV store for all projects? > have each node, in each project, maintain its own KV store Is this for a per-project setup or still connected to a shared setup?
Yea, I realize this is an odd use case.
The idea is like having a .emacs
file that is shared for all development, but using a database rather than a text file.