Patrice Dumas wrote: >>The test I have just done show, unsuprisingly, that it doesn't work, >>since (I guess) the libtdl name mangling doesn't work with the default >>backend. Indeed if the libtdl namespace is used, filesys doesn't export >>kdbBackendFactory, but libelektra_filesys_LTX_kdbBackendFactory, while >>libelektra searches for libelektra_default_LTX_kdbBackendFactory and >>kdbBackendFactory. >> >> > > Yeah, you got the whole problem. And at this day i still not found a solution other than be able to know the true name of the default backend. I thought about resolving the libelektra-default symlink but that seems to be just a hack ...
So as i said, perhaps that's the time to have an /etc/elektra.conf file. Today the problem is to know the true backend's name, but tomorrow it could be to know the hostname, user, password and dbname to contact for an SQL backend. More over this problem is double : the same is existing for kdbd (which actually act like a wrapper, no more). So, the other possibility, wich is imho, less disappointing than using an old-school configuration file is to use a great library like libelektra ;-) The idea is to map specific keys to specific backends. The default, hardcoded behaviour is to map system/, system/elektra & user/ to the filesys backend. Providing filesys as default backend. Then, elektra (in kdbOpen()) open system/elektra and read its own configuration which could look like : Elektra backend mapping configuration : --------------------------------------- # Map system/sw to daemon backend. # options/ contain backend specific options. system/elektra/mapper/software/keydir = system/sw system/elektra/mapper/software/backend = daemon system/elektra/mapper/software/options/socket = /tmp/elektra.sock # Override default user/ mapping # Force usage of daemon system/elektra/mapper/user/keydir = user/ system/elektra/mapper/user/backend = daemon system/elektra/mapper/user/options/socket = /tmp/elektra.mysql.sock kdbd daemon configuration : --------------------------- # Default daemon configuration system/elektra/kdbd/default/backend = berkeleydb system/elektra/kdbd/default/socket = /tmp/elektra.sock system/elektra/kdbd/default/options/SystemPath = /etc/kdb-berkeleydb system/elektra/kdbd/default/options/UserPath = $HOME/.kdb-berkeleydb # SQL daemon configuration # This configuration is read when executing kdbd # using kdbd --config mysql system/elektra/kdbd/mysql/backend = mysql system/elektra/kdbd/mysql/socket = /tmp/elektra.mysql.sock system/elektra/kdbd/mysql/options/Host = your.server.lan system/elektra/kdbd/mysql/options/Login = configuser system/elektra/kdbd/mysql/options/Password = configpassword system/elektra/kdbd/mysql/options/Database = elektra system/elektra/kdbd/mysql/options/Table = config After that this is what we have after user app call kdbOpen() : system/ -> filesys system/sw -> berkeleydb throught daemon user/ -> MySQL database throught daemon Sure its a quite complex configuration scheme :-) . Another example: wan't all your stuff stored using berkeleydb without daemon ? system/elektra/mapper/everything/keydir = / system/elektra/mapper/everything/backend = berkeleydb This will override the default system/ & user/ mapping while let the system/elektra to filesys mapping (system/elektra is not overridable). There are probably fault in this scheme, but i think main concept should work. Using that allow backend to have a configuration. Moreover, that allow stuff happening at early boot-stage (like the "init" process) to work with the 0 dependency backend filesys, while still allowing more flexible & efficient backend for the big part like system/sw. That's just an idea for bring flexibility about backend while keeping the stuff as simple as possible. So thanks to comment & react ;-) Regards, Yannick. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Registry-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/registry-list
