|
摘要: |
变电站自动化系统需要使用内存数据库对实时数据进行存取。提出采用稳定、高性能的分布式内存数据库SH_MemDB,该数据库基于构造平衡二叉排序(AVL)树建立索引结构以加快各种操作的速度和确保紧密的数据结构。介绍了内存数据库记录分配所采用的动态、静态分配相结合的方法。对于每个二维表对象系统创建了内存缓冲池链表,每个缓冲池中含有2个队列,用于分配和回收内存数据。二维表对象通过提供的应用编程接口(API)创建,并可通过结构化查询语言(SQL)操作记录。为保证多个进程可以共享实时数据库的资源,系统中以二维表为单位进行加锁操作。SH_MemDB可以通过以服务方式或守护者进程方式单独运行,并给出了SQL方式和使用API对内存数据库操作的代码。介绍了SH_MemDB服务方式的应用实例。 |
关键词: 分布式内存数据库,二叉排序树,监控 |
DOI: |
分类号:TM76 TP311.133.1 |
基金项目: |
|
Distributed memory database in substation automation system |
ZHONG Yun ZHAN Cheng-guo
|
Abstract: |
Substation automation system uses memory database for real-time data access.SH_MemDB(Stabile and High-performance Memory DataBase) is presented.Based on AVL(Adelson-Velskii and Landis),it creates index to accelerate operational speed and ensure compact data structure.The record distribution of the memory database is designed combining dynamic and static distribution method.Memory buffer link-lists are created for every planar-table object,and each buffer has two queues for memory distribution and reclaiming.The planar-table object is created with API(Application Programming Interface) and records in the memory database are retrieved with SQL(Structured Query Language) operation.The planar-table object is locked as a unit by system to enable the source of real-time memory database shared by multi processes.SH_MenDB can run as a server or a watcher.Codes for accessing memory database data using SQL and API are offered.An application of SH_MemDB as a server is explained. |
Key words: distributed memory database,AVL tree,monitoring |