📄 intro.so
字号:
m4_comment([$Id: intro.so,v 1.18 2006/11/13 18:05:03 bostic Exp $])m4_ref_title(RPC Client/Server, Introduction to the RPC client/server, introduction to @rpc client/server, sequence/intro, rpc/client)m4_p([dnlm4_db includes an implementation of a client-server protocol using SunMicrosystem's Remote Procedure Call Protocol. RPC support isavailable only for UNIX systems, and is not included in the m4_db library bydefault, but must be enabled during configuration. Seem4_link(M4RELDIR/ref/build_unix/conf, Configuring m4_db) for moreinformation. For more information on RPC itself, see your UNIX systemdocumentation or m4_italic([RPC: Remote Procedure Call ProtocolSpecification, RFC1831, Sun Microsystems, Inc., USC-ISI]).])m4_p([dnlOnly some of the complete m4_db functionality is available when using RPC.The following functionality is available:])m4_nlistbeginm4_nlistns([dnlThe m4_ref(dbenv_create) function and the m4_ref(DbEnv) handlemethods.])m4_nlistns([dnlThe m4_ref(dbh_create) function and the m4_ref(Db) handle methods.])m4_nlistns([dnlThe m4_ref(txn_begin), m4_ref(txn_commit), and m4_refT(txn_abort)s.])m4_nlistendm4_p([dnlThe m4_ref(DB_THREAD) flag to the m4_ref(dbenv_open) and m4_refT(dbh_open)smay not be specified, that is, m4_ref(DbEnv) and m4_ref(Db) handles usedin RPC clients are not free-threaded.])m4_p([dnlThe RPC client/server code does not support any of the user-definedcomparison or allocation functions; for example, an application usingthe RPC support may not specify its own Btree comparison function. Ifyour application requires only those portions of m4_db, then using RPCis fairly simple. If your application requires other m4_dbfunctionality, such as direct access to locking, logging or sharedmemory buffer memory pools, then your application cannot use the RPCsupport.])m4_p([dnlAlthough a client cannot specify a callback, m4_db does support them4_ref(dbh_associate) call in a limited manner. A client programwanting to use a secondary index may do so only in a read-only fashion.The primary and secondary databases must have been created locally onthe server machine. Client programs must then open both the primaryand secondary databases with the m4_ref(DB_RDONLY) flag set. The clientmust also specify a NULL callback for the m4_ref(dbh_associate) call.])m4_p([dnlThe m4_db RPC code requires that the client and server programs berunning the exact same version numbers.The m4_db RPC protocol version number is tied to the m4_db majorand minor release numbers.As such, the server program will reject requests from clientsusing a different version number.])m4_p([m4_bold([dnlThe m4_db RPC support does not provide any security or authentication ofany kind.]) Sites needing any kind of data security measures must modifythe client and server code to provide whatever level of security theyrequire.])m4_p([dnlOne particularly interesting use of the RPC support is for debugging m4_dbapplications. The seamless nature of the interface means that with veryminor application code changes, an application can run outside of them4_db address space, making it far easier to track down many types oferrors -- such as memory misuse.])m4_p([dnlUsing the RPC mechanisms in m4_db involves two basic steps:])m4_nlistbeginm4_nlist([dnlModify your m4_db application to act as a client and call the RPCserver.])m4_nlistns([dnlRun the m4_ref(berkeley_db_svc) server program on the system where thedatabase resides.])m4_nlistendm4_page_footer
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -