JorenSix/Olaf

Question: is possible use external database?

Closed this issue · 1 comments

From doc say:

On traditional computers fingerprints are stored in a high-performance key-value-store: LMDB. LMDB offers an a B+-tree based persistent storage ideal for small keys and values with low storage overhead.

Is possible hosting the DB into remote server and connect Olaf to them?

I saw into LMDB doc the warning:

Do not use LMDB databases on remote filesystems, even between processes on the same host. This breaks flock() on some OSes, possibly memory map sync, and certainly sync between programs on different hosts.

There is currently no support for a client/server architecture built into Olaf. The details also very much depend on the use case.

There are certainly ways to put an API in front of Olaf to allow a server/client model. The client would then extract prints and send them via an API call to a server waiting for incoming data. The most simple implementation would send the result of an 'olaf print' command to a server (e.g. via a REST call) and respond with a recognition result.

I see a client server infrastructure as something that can be built around Olaf components and I do not see this not as a part of the core of Olaf. Especially since each use case will have different trade-offs, a one-size-fits-all solution seems also rather difficult.