Closed avibrazil closed 4 years ago
+1 to making the storage implementation pluggable. In addition to the examples above: an in-memory implementation would be cool for (unit/integration-) tests or dev setups.
I have an intial prototype here for an in memory store to accelerate testing: https://github.com/rabbah/openwhisk/blob/object-access/tests/src/whisk/core/database/test/MockDocumentFactory.scala.
Replacing couchdb with another nosql db is likely easier than a sql db. You can see from the "mock" db, there is a generic interface to implement by other datastores.
In memory is cool and a good excuse to implement plugable storage, but real persistence will be required between starts and stops of Whisk server. And we only have Couch and Cloudant now. So it doesn't address my need.
What are the JSON/nosql database options available right now that are not servers (daemons) but a plain library that accesses its files? This would be the way to go. This is also the architecture for SQLite (which I find very elegant for small environments).
In my personal opinion, current architecture (obligation of a separate database just for configs) might find adoption resistance, specially for private deployments. Couch is not very popular amongst sysadmins (the guys that will handle the environment)
@chetanmeh implemented an in memory store. We'd love other implementations as the system is plugable and has several backends for storage already.
For small local installations (as a home server etc) CouchDB alone may be bigger than the code that I need to deploy. And I understand that Couch or Cloudant is required by Whisk for configuration and some content store only and not as a full blown database to store large amounts of data.
If a database is needed by my code, I'll take care of it separately.
To use Cloudant (SaaS) makes things too distributed and add a whole new dimension of dependency to the style of deployment some may require.
Please consider lighter options as SQLite or plain JSON files on the filesystem for self contained deployments, small or dev environments.