FastDB software introduction
1 Completely load the data into the memory and manage the data in the memory;
2 Concurrent execution between read-only mode threads, single change mode threads and multiple read-only mode threads;
3 Minimum unit block: allocation quantum (16 bytes);
4 The transaction submission protocol is based on a shadow root page algorithm, which performs atomic update operations on the database and has high recovery efficiency;
Shadow root page algorithm: Each object in the database has a unique identifier used as a subscript of an array (object index), and the element value represents a handle to the object. (There are two indexes in FastDB: current index and shadow index)
5 Memory data structure organization: HASH, T-tree.
HASH: has the highest search efficiency (not suitable for scenarios where key-value conflicts occur more frequently during insertion operations);
T-tree: second only to HASH (not suitable for scenes with frequent additions and deletions);
In FastDB, KEY declared as HASH adopts HASH structure, and KEY declared as INDEXED adopts T-tree structure.
FastDB software features
1.FastDb is an efficient in-memory database system with real-time capabilities and a convenient C++ interface.
2.FastDB does not support client-server architecture, so all applications using FastDB must run on the same host.
3.FastDB is optimized for applications by controlling read access patterns.
4. Provides high-speed query by reducing data transmission overhead and very effective locking mechanism.
5. For each application that uses the database, the database file is mapped into the virtual memory space.
6. Therefore the query is executed in the context of the application without the need to switch contexts and transfer data.
7. The synchronization mechanism for concurrent access to the database in fastdb is implemented through atomic instructions, which hardly increases the query overhead.
8.fastdb assumes that the entire database exists in RAM, and optimizes the query algorithm and interface based on this assumption.
9.fastdb has no database buffer management overhead and does not need to transfer data between the database file and the buffer pool.
10. The reason why fastdb runs significantly faster than traditional databases that put data in the buffer pool.
11.Fastdb supports transactions, online backup and automatic recovery after system crash.
12. The transaction commit protocol automatically updates the database based on a shadow root page algorithm.
13. Recovery can be performed very quickly, providing high availability for critical applications.
14. In addition, eliminating transaction logging improves overall system performance and enables more efficient use of system resources.
15. Fastdb is an application-oriented database. The database table is constructed through the class information of the application.
16. Fastdb supports automatic schema evaluation, allowing you to make changes in only one place - your application's classes.
17.fastdb provides a flexible and convenient interface to obtain data from the database.
18. Use a SQL-like query language to perform the specified query.
19. Post-relational features such as non-atomic fields, nested arrays, user-defined types and methods, and direct references between objects simplify the design of database applications and make them more efficient.
FastDB usage instructions
1 Download the installation package and install it;
2 Install fastdb on the server
3. Write a test file, or directly find an example file in the downloaded fastdb installation package for testing;
4. Write the Makefile and add the following content: -I/usr/local/include/fastdb -L/usr/local/lib -lrt -lz -lfastdb (the above content is adjusted according to your actual installation path).
5 Compile and pass through, run code.
FastDB update log
Working day and night just so you can be happier
are all gone!
Huajun editor recommends:
FastDB is free software, download it if you need it! There are alsoOpenCart,Java2 Runtime Environment,Eclipse IDE for Java EE Developers For Linux(64-bit),GCC For Linux,Free Pascal, available for you to download!
it works
it works
it works