Internal vs. External Database Drivers
Before developing a database driver, you need to decide whether the driver will be internal or external:
- Internal: An internal driver is tightly coupled with the AOLserver; the database client libraries are linked directly into the server.
- External: An external driver is loosely coupled; the nsext driver sends messages to an external database proxy daemon instead of calling the database client libraries directly. This database proxy daemon can be a local or remote process.
While an internal driver can be faster and can use less resources than an external driver, there are several reasons to develop an external driver:
- Many database client libraries are not thread-safe -- you'll need to be very careful about locking the libraries to use them in an internal driver, and this can unnecessarily slow down simultaneous queries.
- Many database client libraries make assumptions regarding per-process resources such as signals.
- An external driver can be used to access a database from a platform that may not be supported by the database client library.