[reSIProcate] data access - abstraction layer?
repro currently includes three data access classes (BDB, MySQL and
PostgreSQL)
The MySQL and PostgreSQL support could potentially be combined into a
single class, also giving support for other SQL back-ends, by using this
library (Boost license):
http://soci.sourceforge.net/
It is also tempting to have support for tab-separated values, maybe
adapting this class to work with the AbstractDb API:
https://github.com/resiprocate/registration-agent/blob/master/KeyedFile.hxx
I can also imagine some people wanting to use Redis, MongoDB, Cassandra.
memcached or a similar NoSQL solution in future.
repro's registration database is currently kept in memory, but maybe
that is something that could also be persisted and/or shared using a
data access layer.
Another issue that comes to mind when looking at the current solution is
that the values stored in the 'value' column (all tables except the
users table) contain multiple values concatenated together and base64
encoded. This appears to be a strategy carried over from the original
BDB implementation but it would appear to make sense to split these
values into individual database columns.
It may also be useful to move the database access code up to rutil or
another library so it can be used by reTurn server or other components
in future, currently this code is only in the repro part of the tree.
Does anybody have any comments or ideas about any of these topics?
Has anybody seen any data access APIs or abstraction layers that would
be a good fit for the reSIProcate project?
Regards,
Daniel