The way Libgda manages data sources

I’ve been busy lately reworking how libgda manages its data sources and how libgnomedb interracts with them (libgda and libgnomedb are part of the Gnome-Db project).

Libgda stores data sources (a data source tells how to access some data in a database: types of DBMS, database name, connection parameters, etc) in two XML files: a system wide file ($prefix/etc/libgda/config) and a per-user file (~/.libgda/config).

For a long time Libgnomedb did create a copy of all the data sources in GConf to get modifications notifications, but there were corner cases where problems would appear.

Now Libgda uses either Gamin or
FAM when available to monitor config file changes and notify applications directly. The benefits are:

  • less potential bugs
  • data sources management easier to understand
  • less code to maintain in Libgnomedb
  • don’t use GConf when not necessary