summaryrefslogtreecommitdiff
path: root/bdb/docs/ref/arch/progmodel.html
blob: 04284f4f37efedf29e7da087aab1810498632401 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!--$Id: progmodel.so,v 10.25 2000/03/18 21:43:09 bostic Exp $-->
<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.-->
<!--All rights reserved.-->
<html>
<head>
<title>Berkeley DB Reference Guide: Programming model</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
</head>
<body bgcolor=white>
<table><tr valign=top>
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Architecture</dl></h3></td>
<td width="1%"><a href="../../ref/arch/bigpic.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/arch/apis.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p>
<h1 align=center>Programming model</h1>
<p>The Berkeley DB distribution is a database library, where the library is linked
into the address space of the code which uses it.  The code using Berkeley DB
may be an application or it may be a server providing functionality to a
number of clients via some form of inter-process or remote-process
communication (IPC/RPC).
<p>In the application model, one or more applications link the Berkeley DB library
directly into their address spaces.  There may be many threads of control
in this model, as Berkeley DB supports locking for both multiple processes and
for multiple threads within a process.  This model provides significantly
faster access to the database functionality, but implies trust among all
threads of control sharing the database environment as they will have the
ability to read, write and potentially corrupt each other's data.
<p>In the client-server model, developers write a database server application
that accepts requests via some form of IPC and issues calls to the Berkeley DB
interfaces based on those requests.  In this model, the database server
is the only application linking the Berkeley DB library into its address space.
The client-server model trades performance for protection, as it does not
require that the applications share a protection domain with the server,
but IPC/RPC is slower than a function call.  Of course, in addition, this
model greatly simplifies the creation of network client-server applications.
<table><tr><td><br></td><td width="1%"><a href="../../ref/arch/bigpic.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/arch/apis.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
</body>
</html>