1I8Berkeley DB Reference Guide: Architecture[P2

Berkeley DB Reference Guide: Architecture



'

Programming model



QThe Berkeley DB library is intended to support an embedded model of applications,Falthough it is relatively easy to create client-server applications aswell.

In the client-server model,La database server is created by writing an application that accepts requestsQvia some form of IPC and issues calls to the Berkeley DB functions based on thosequeries.In this model,Mapplications are client programs that attach to the server and issue queries.:The client-server model trades performance for protection,Kas it does not require that the applications share a protection domain with the server,5but IPC/RPC is generally slower than a function call. In addition,Ithis model simplifies the creation of network client-server applications.

In the embedded model,Man application links the Berkeley DB library directly into its address space.:This provides for faster access to database functionality,@but means that the applications sharing log files, lock manager,Dtransaction manager or memory pool manager have the ability to read,%write, and corrupt each other's data.

IIt is the application designer's responsibility to select the appropriatemodel for the application.

MAHÿÿ