mirror of
https://github.com/MariaDB/server.git
synced 2025-11-09 11:41:36 +03:00
55 lines
3.6 KiB
HTML
55 lines
3.6 KiB
HTML
<!--$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>
|