天天看點

fastdb簡介

Introduction

FastDB is a highly efficient main memory database system with realtime capabilities and convenient C++ interface. FastDB doesn't support a client-server architecture and all applications using a FastDB database should run at the same host. FastDB is optimized for applications with dominated read access pattern. High speed of query execution is provided by the elimination of data transfer overhead and a very effective locking implementation. The Database file is mapped to the virtual memory space of each application working with the database. So the query is executed in the context of the application, requiring no context switching and data transfer. Synchronization of concurrent database access is implemented in FastDB by means of atomic instructions, adding almost no overhead to query processing. FastDB assumes that the whole database is present in RAM and optimizes the search algorithms and structures according to this assumption. Moreover, FastDB has no overhead caused by database buffer management and needs no data transfer between a database file and buffer pool. That is why FastDB will work significantly faster than a traditional database with all data cached in buffers pool.

FastDB supports transactions, online backup and automatic recovery after system crash. The transaction commit protocol is based on a shadow root pages algorithm, performing atomic update of the database. Recovery can be done very fast, providing high availability for critical applications. Moreover, the elimination of transaction logs improves the total system performance and leads to a more effective usage of system resources.

FastDB is an application-oriented database. Database tables are constructed using information about application classes. FastDB supports automatic scheme evaluation, allowing you to do changes only in one place - in your application classes. FastDB provides a flexible and convenient interface for retrieving data from the database. A SQL-like query language is used to specify queries. Such post-relational capabilities as non-atomic fields, nested arrays, user-defined types and methods, direct interobject references simplifies the design of database applications and makes them more efficient.

Although FastDB is optimized in the assumption that database as a whole fits into the physical memory of the computer, it is also possible to use it with databases, the size of which exceeds the size of the physical memory in the system. In the last case, standard operating system swapping mechanisms will work. But all FastDB search algorithms and structures are optimized under the assumption of residence of all data in memory, so the efficiency for swapped out data will not be very high.

FastDb是高效的記憶體資料庫系統,具備實時能力及便利的C++接口。FastDB不支援client-server架構因而所有使用FastDB的應用程式必須運作在同一主機上。FastDB針對應用程式通過控制讀通路模式作了優化。通過降低資料傳輸的開銷和非常有效的鎖機制提供了高速的查詢。對每一個使用資料庫的應用資料庫檔案被影射到虛拟記憶體空間中。是以查詢在應用的上下文中執行而不需要切換上下文以及資料傳輸。fastdb中并發通路資料庫的同步機制通過原子指令實作,幾乎不增加查詢的開銷。fastdb假定整個資料庫存在于RAM中,并且依據這個假定優化了查詢算法和接口。此外,fastdb沒有資料庫緩沖管理開銷,不需要在資料庫檔案和緩沖池之間傳輸資料。這就是fastdb運作速度明顯快于把資料放在緩沖池中的傳統資料庫的原因。

fastdb支援事務、線上備份以及系統崩潰後的自動恢複。事務送出協定依據一個影子根頁面算法來自動更新資料庫。恢複可以執行得非常快,為臨界應用提供了高可用性。此外,取消事務日志改進了整個系統的性能,并且使得可以更有效的利用系統資源。

fastdb是一個面向應用的資料庫,資料庫表通過應用程式的類資訊來構造。fastdb支援自動的模式評估,使你可以隻需要在一個地方更改-你的應用程式的類。fastdb提供一個靈活友善的接口來從資料庫中擷取資料。使用一個類SQL的查詢語言進行指定的查詢。通過一些後關系特性如非原子字段,嵌套數組,使用者定義類型和方法,對象間直接引用簡化了資料庫應用程式的設計并使之更有效率。

盡管fastdb的優化是立足于假定整個資料庫配置在計算機的實體記憶體中,但是也有可能出現使用的資料庫的大小超過了系統實體記憶體的大小的情況,在這種情況下标準的作業系統交換機制就會工作。但是整個fastdb的搜尋算法和結構是建立在假定所有的資料都存在于記憶體中的,是以資料換出的效率不會很高。