- 论坛徽章:
- 0
|
dali 内存数据库系统结构
Principles
This remainder of this page presents principles which have guided Dali's development.
这篇论文讨论了指导MMDB开发的定理。
Main Memory Assumption 内存假设
While Dali can handle databases larger than main memory, it is designed and optimized for the case where all data fits in RAM. Compared to a disk-based database which has sufficient main memory for all its data, Dali uses less space to store the data and provides faster access .
DALI可以处理比主存大的数据库,然而它是为所有数据保存在RAM中设计和优化的。与有足够内存保存所有数据到内存的磁盘数据库相比,DALI使用更少的内存和更快的数据访问。
Transactional Model 事务模型
Much of Dali is based on a transaction model, with the normal ACID properties (Atomicity, Consistency一, Isolation独立性, Durability持久性). Disk storage is used to ensure Durability through logging and checkpointing. (However, normal data access need not access the disk.) DALI的许多方面基于ACID[原子性,一致性,独立性,持久性]事务模型,磁盘存储器通过日志和检查点保证数据的持久性(然而,通常的数据访问不需要访问磁盘)
No Inter-Process Communication 没有内部通信
Modern relational databases provide data to the application only through an SQL interface. This interface typically uses some form of remote procedure call to an SQL server process, which returns the data or performs the update. While efficient for bulk[大小, 体积, 大批, 大多数, 散装] activities, small transactions doing point-lookups and updates pay an enormous[巨大] cost for each access due to this IPC. In Dali, a user process contacts the server only twice: once at startup and again when it stops using the database. To avoid the IPC, data is stored in shared memory , and most Dali code is directly linked with the application.
现代的关系型数据库仅通过SQL接口向应用程序提供数据,这些接口通常使用一些形式的远程过程调用调用SQL服务器进程,从而查询数据或是进行更新。在大的活动有效的执行时,小事务却因为进行指针查找和更新访问会花费巨大的开支。在DALI,一个用户进程仅与服务器连接两次:一次在开始,另一次是在它停止使用数据库时。多类DALI代码是直接与用户程序相连接LINK
Direct Access To Data 直接访问数据
In most databases, one or more data copies are required before a user can directly access the data. Dali always allows the option of direct access to data, avoiding the cost of the copy.
在多数数据库中,在用户可以直接访问数据前需要一个或多个数据复本。DALI总是允许直接访问数据,避免复制的代价。
Fault Tolerance 容错性
While access to data via shared memory is inherently risky[危险], Dali provides many features to mitigate[.减轻] his risk. Different features are specifically designed to protect against System Faliure, Process Death, and Application Errors.
访问共享内存中的数据有因有的危险性,DALI提供许多特征来减轻这种危险性。不同的特征为阻止系统失败、进程死亡、应用程序错误而设计。
Real Time Performance 实时性能
Dali's maintenance[维护, 保持, 生活费用, 扶养] activities have little or no interference [.冲突, 干涉]with on-going transaction processing. Coupled with the lack of disk activity, this provides high performance with tight bounds.
DALI保持活动与正在进行的事务进程没有冲突。加上没有磁盘活动,可以提供更严格的性能上升。
Toolkit Approach 工具箱
Dali is designed to allow the application to turn off features that it doesn't need, and avoid paying the performance penalty those features entail. For example, one application may need to access data concurrently in shared memory, but have no need to recover in case of a system crash. This application should not pay the cost of logging for recovery. Another application may need recovery, but be single threaded. This application should not pay the cost of locking.
在DALI设计中,允许应用程序关闭它不需要的特征,避免在这些方面浪费性能。例如,一个应用程序可能要一致的访问共享内存中的数据,但在系统崩溃时不需要恢复它。这个应用程序不用在日志和恢复中浪费性能。另一个应用程序可能要恢复,但是是单线程的,这个程序也不用为锁浪费性能。
Multiple Interface Levels 多接口层
Dali provides different interface levels which trade off simplicity for flexibility[弹性, 适应性, 机动性, 挠性] and performance. At the lowest level, memory is allocated directly by the application and it is responsible[有责任的, 可靠的, 可依赖的, 负责的] for designing a locking strategy[策略] and making calls to Dali to perform all logging. At higher levels, the interface becomes more powerful, providing abstractions of collections and indices. The newest and highest level of these interfaces is the Dali Relational Manager.
DALI提供不同接口层,可交替使用简单的有弹性的,或是性能好的。在低层中,内在直接被应用程序分配,对设计一个锁策略和调用DALI接口执行所有日志时,它是可靠的。在高层,接口变得更强大,提供收集和索引的接口。最新的和最高的接口是DALI的关系管理器。
Build A Database Manager 创建一个数据库管理器
If a database management system is drawn showing layers of functionality, the center is typically memory management, transaction processing and indexing. These are exactly the features provided by Dali. By using these features, a main memory database can be built far more quickly and easily than starting from scratch. An object-oriented database system, which is built on top of Dali is MM-Ode<Dali>;.
如果一个计划中的数据管理系统显示功能层,中心仍是典型的内存管理系统,事务处理和索引。这正是DALI提供的特征。通过使用这些特征,一个内存数据库可以被更快创建并比开始乱写更容易。一个面向对象系统,在DALI上的是MM-Ode<Dali>;.
Build A High-Perfomance Application 创建一个高性能应用
For applications which absolutely require high performance, Dali's lower level interfaces allow custom data structures and concurrency control to be crafted by the application developer. While these interfaces are more complex than the higher levels, they compare very well with creating an application-specific concurrency control and recovery system.
对那些完全需要高性能的应用,DALI的低层接口允许程序开发者开发通用的数据结构和并发控制。虽然这些接口比高层接口更复杂,他们在创建特殊应用的并发控制的恢复系统时仍然表现得很好。 |
|