⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bigpic.so

📁 berkeley db 4.6.21的源码。berkeley db是一个简单的数据库管理系统
💻 SO
字号:
m4_comment([$Id: bigpic.so,v 8.32 2003/11/27 18:25:57 bostic Exp $])m4_ref_title(Architecture, The big picture,, java/faq, arch/progmodel)m4_p([dnlThe previous chapters in this Reference Guide have describedapplications that use the m4_db access methods for fast data storageand retrieval.  The applications described in the following chaptersare similar in nature to the access method applications, but they arealso threaded and/or recoverable in the face of application or systemfailure.])m4_p([dnlApplication code that uses only the m4_db access methods might appearas follows:])include(ref/arch/bigpic1.cs)m4_p([dnlThe underlying m4_db architecture that supports this is])m4_picgif(center, smallpic, small)m4_p([dnlAs you can see from this diagram, the application makes calls into theaccess methods, and the access methods use the underlying shared memorybuffer cache to hold recently used file pages in main memory.])m4_p([dnlWhen applications require recoverability, their calls to the AccessMethods must be wrapped in calls to the transaction subsystem.  Theapplication must inform m4_db where to begin and end transactions, andmust be prepared for the possibility that an operation may fail at anyparticular time, causing the transaction to abort.])m4_p([dnlAn example of transaction-protected code might appear as follows:])include(ref/arch/bigpic2.cs)m4_p([dnlIn this example, the same operation is being done as before; however,it is wrapped in transaction calls.  The transaction is started withm4_ref(txn_begin) and finished with m4_ref(txn_commit).  If theoperation fails due to a deadlock, the transaction is aborted usingm4_ref(txn_abort), after which the operation may be retried.])m4_p([dnlThere are actually five major subsystems in m4_db, as follows:])m4_tagbeginm4_tag(Access Methods, [dnlThe access methods subsystem provides general-purpose support forcreating and accessing database files formatted as Btrees, Hashed files,and Fixed- and Variable-length records.  These modules are useful inthe absence of transactions for applications that need fast formattedfile support.  See m4_ref(dbh_open) and m4_ref(dbh_cursor) for moreinformation.  These functions were already discussed in detail in theprevious chapters.])m4_tag(Memory Pool, [dnlThe Memory Pool subsystem is the general-purpose shared memory buffer poolused by m4_db.  This is the shared memory cache that allows multipleprocesses and threads within processes to share access to databases.  Thismodule is useful outside of the m4_db package for processes that requireportable, page-oriented, cached, shared file access.])m4_tag(Transaction, [dnlThe Transaction subsystem allows a group of database changes to betreated as an atomic unit so that either all of the changes are done,or none of the changes are done.  The transaction subsystem implementsthe m4_db transaction model.  This module is useful outside of the m4_dbpackage for processes that want to transaction-protect their own datamodifications.])m4_tag(Locking, [dnlThe Locking subsystem is the general-purpose lock manager used by m4_db.This module is useful outside of the m4_db package for processes thatrequire a portable, fast, configurable lock manager.])m4_tag(Logging, [dnlThe Logging subsystem is the write-ahead logging used to support them4_db transaction model.  It is largely specific to the m4_db package,and unlikely to be useful elsewhere except as a supporting module forthe m4_db transaction subsystem.])m4_tagendm4_p([dnlHere is a more complete picture of the m4_db library:])m4_picgif(center, bigpic, large)m4_p([dnlIn this model, the application makes calls to the access methods and tothe Transaction subsystem.  The access methods and Transaction subsystemsin turn make calls into the Memory Pool, Locking and Logging subsystemson behalf of the application.])m4_p([dnlThe underlying subsystems can be used independently by applications.For example, the Memory Pool subsystem can be used apart from the restof m4_db by applications simply wanting a shared memory buffer pool, orthe Locking subsystem may be called directly by applications that aredoing their own locking outside of m4_db.  However, this usage is notcommon, and most applications will either use only the access methodssubsystem, or the access methods subsystem wrapped in calls to the m4_dbtransaction interfaces.])m4_page_footer

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -