summaryrefslogtreecommitdiff
path: root/bdb/docs/ref/rpc/server.html
blob: 64572a90d30b44f02238a1ee911171de14ba6caf (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
42
43
44
45
46
47
48
49
50
51
52
53
54
<!--$Id: server.so,v 1.6 2000/03/18 21:43:16 bostic Exp $-->
<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.-->
<!--All rights reserved.-->
<html>
<head>
<title>Berkeley DB Reference Guide: Server program</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>
        <a name="2"><!--meow--></a>    
<table><tr valign=top>
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>RPC Client/Server</dl></h3></td>
<td width="1%"><a href="../../ref/rpc/client.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/java/conf.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p>
<h1 align=center>Server program</h1>
<p>The Berkeley DB server utility, <a href="../../utility/berkeley_db_svc.html">berkeley_db_svc</a>, handles all of the
client application requests.
<p>Currently, the <a href="../../utility/berkeley_db_svc.html">berkeley_db_svc</a> utility is single-threaded,
limiting the number of requests that it can handle.  Modifying the server
implementation to run in multi-thread or multi-process mode will require
modification of the server code automatically generated by the rpcgen
program.
<p>There are two different types of timeouts used by <a href="../../utility/berkeley_db_svc.html">berkeley_db_svc</a>.
The first timeout (which can be modified within some constraints by the
client application), is the resource timeout.  When clients use
transactions or cursors, those resources hold locks in Berkeley DB across calls
to the server.  If a client application dies or loses its connection to
the server while holding those resources, it prevents any other client
from acquiring them.  Therefore, it is important to detect that a client
has not used a resource for some period of time and release them.  In the
case of transactions, the server aborts the transaction.  In the case of
cursors, the server closes the cursor.
<p>The second timeout is an idle timeout.  A client application may remain
idle with an open handle to an environment and a database.  Doing so
simply consumes some memory, it does not hold locks.  However, the Berkeley DB
server may want to eventually reclaim resources if a client dies or
remains disconnected for a long period of time, so there is a separate
idle timeout for open Berkeley DB handles.
<p>The list of home directories specified to <a href="../../utility/berkeley_db_svc.html">berkeley_db_svc</a> are the
only ones client applications are allowed to use.  When
<a href="../../utility/berkeley_db_svc.html">berkeley_db_svc</a> is started, it is given a list of pathnames.
Clients are expected to specify the name of the home directory (defined
as the last component in the directory pathname) as the database
environment they are opening.  In this manner, clients need only know the
name of their home environment, and not its full pathname on the server
machine.  This means, of course, that only one environment of a particular
name is allowed on the server at any given time.
<table><tr><td><br></td><td width="1%"><a href="../../ref/rpc/client.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/java/conf.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>