Each different data source type is handled by a specialized server, called a provider. This concept is weaened by the use of the ODBC server. The ODBC provider can serve different databases (Solid, Postgres) using their ODBC emulation. This is a quick way to use a database without a provider. The drawback is the extra complexity and an extra indirection which needs to be configured and which uses extra memory and CPU cycles.
GDA providers are CORBA servers which are activated using GOAD. GOAD gets it's configuration information from a set of files which are located in the etc/CORBA/servers directory underneath the gnome installation directory, or from the ~/.gnome/CORBA/servers. The user directory entries are prefered over the system wide directory. The name of the configuration file is not significant, but the gnome-db packages used gnome_db.gnorba as the filename of the standard configuration file.
Each provider is defined with one section in the file. The current default file has an entry for the ODBC provider and the MySQL provider. A section in the file contains entries which define the CORBA type of the provider, the CORBA interface the provider implements and the executable or shared library which implements the provider. For example the [gda-odbc] section the CORBA type of the provider is exe which means the provider is implemented as a standalone program. Tthe name of the program is defined with the entry location_info. The executable is then searched using the PATH variable of the user which is the first who requests some service from this provider. For shared library providers the location_info is the name of the shared library which implements the server.
Executable providers offer some advantages. They may be hosted on a different machine [1] and the startuptime of the provider is only needed once. The drawback is that if such a provider crashes all the clients are disconnected from the database. To overcome this problem it is possible for each client a request a new copy of the provider (although the client API doesn't yet provide this flag).
The other type of providers are shared library providers. This providers are linked to the client when the client requests something from the provider. The disadvantage is that the server is hosted on the same machine as the client. But a server crash only affects one client. The startup cost is comparable to an executable provider. The big advantage of this sort of providers is that debugging the provider code is simpler, since you must not attach gda to a running provider and you also can catch errors during server initialization.
Per default every GDA provider is availble as an executable and as a shared library. The build process and the conventions used to implement the provider make sure that the executable and the shared library are made and installed.
One of the problem GDA solves is the naming of data sources. Every database system has it's own way of defining names for it's databases. For example MySQL uses the hostname, port number, and the name of the database. Other databases, like Solid, the hostname and port number define the database. Because the client does not need all these details, there is a configuratin files named gdarc which names the available data sources and defines all the properties of such a data source, so that the correct data base server can be contacted. The information in this configuration file is accessed by the client library and sent to the provider. The file isn't read by the provider because there may be one provider handling multiple clients from different workstations and the configuration files may differ from workstation to workstation.
The same mechanism os used by ODBC. ODBC use such configuration files, usually called odbc.ini to define properties of ODBC servers and initial configuration items. GDA uses the same mechanism bu won't use the odbc.ini because the effect of unknown entries in such a file on the differnt ODBC implementations is not knonw.
In order not to duplicate configuration items, which may lead to a inconsistencies, the gda configuration file is able to include other configuration files, as long as these files conform to the gnome configuration syntax.
[1] | i don't know ywet how to do this. I think the GIOP_FORWARD messages are used in such a situation. I have not yet found out how to do this. i'll do this later |