CN102129459A - Omnibearing enterprise data exchange high-speed engine - Google Patents
Omnibearing enterprise data exchange high-speed engine Download PDFInfo
- Publication number
- CN102129459A CN102129459A CN 201110056858 CN201110056858A CN102129459A CN 102129459 A CN102129459 A CN 102129459A CN 201110056858 CN201110056858 CN 201110056858 CN 201110056858 A CN201110056858 A CN 201110056858A CN 102129459 A CN102129459 A CN 102129459A
- Authority
- CN
- China
- Prior art keywords
- data
- engine
- file
- enterprise
- data exchange
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域technical field
本发明涉及一种全栖企业数据交换高速引擎。The invention relates to a high-speed engine for all-inhabitant enterprise data exchange.
背景技术Background technique
数据交换是任何计算机应用、服务、系统必不可少的机制,小到一个Hello world程序,大到操作系统,数据交换无处不在。企业级应用更是需要频繁、大量的数据交换来对整个系统作支撑,本方案就是针对企业级数据交换特点提出的全新解决方案,下文简称“引擎”。Data exchange is an essential mechanism for any computer application, service, or system. From a small Hello world program to a large operating system, data exchange is ubiquitous. Enterprise-level applications require frequent and large amounts of data exchange to support the entire system. This solution is a new solution for the characteristics of enterprise-level data exchange, hereinafter referred to as "engine".
目前,企业级数据交换应用的手段有内存交换、文件交换、数据库等方式。然而这些数据交换方式都存在弊端。首先,内存交换是企业级小数据量交换的首选,优势于速度快,缺点其一在于管理困难,不同水平的开发者开发出的交换算法千差万别,开发者的经验决定了系统整体的稳定性和处理效率,这也是系统在生产线上出现事故最频繁的地方;其二、内存中的数据在主机掉电后将灰飞烟灭,虽然这样的事不常发生,但一旦出现一次就会给企业带来无法估量的损失。文件交换也是常用的方法之一,优点在于数据的稳定性得到了保障,主机在掉电后数据一样在文件中,但效率受到了磁盘IO的限制,而管理的难度与内存方式不相上下,因此只能在对效率要求很低的情况下使用。目前数据库在中型系统中是使用最多的交换方式,数据相对稳定,有完善的维护机制,但正是因为数据库对数据的稳定性考虑非常多,使用时效率往往和机器的硬件成正比,面对每秒数万的访问量时常常要使用专业的数据库服务器才能满足,对于中小型项目,这部分费用将直接从项目的利润中扣除。At present, the means of enterprise-level data exchange applications include memory exchange, file exchange, and databases. However, these data exchange methods have disadvantages. First of all, memory exchange is the first choice for enterprise-level small data exchange. It has the advantage of fast speed, but its disadvantage is that it is difficult to manage. The exchange algorithms developed by developers of different levels vary widely. The experience of developers determines the stability and stability of the overall system. Processing efficiency, this is also the place where the system has the most frequent accidents on the production line; second, the data in the memory will be wiped out after the host computer is powered off. estimated loss. File exchange is also one of the commonly used methods. The advantage is that the stability of the data is guaranteed. After the host is powered off, the data is still in the file, but the efficiency is limited by the disk IO, and the difficulty of management is comparable to that of the memory method. Therefore, it can only be used when the efficiency requirement is very low. At present, the database is the most widely used exchange method in medium-sized systems. The data is relatively stable and has a complete maintenance mechanism. However, it is precisely because the database has a lot of considerations for the stability of the data, and the efficiency of use is often proportional to the hardware of the machine. In the face of Tens of thousands of visits per second often need to use a professional database server to meet. For small and medium-sized projects, this part of the cost will be directly deducted from the project's profit.
综上所述不难看出目前在企业级交换解决方案中还没有一种兼并廉价、安全并高效的手段,因此“全栖企业数据交换高速引擎”出现了,该方案取众家之长完美弥补了中、小型应用系统的真空。To sum up, it is not difficult to see that there is currently no cheap, safe and efficient means of mergers and acquisitions in enterprise-level switching solutions. Therefore, the "All-in-One Enterprise Data Exchange High-speed Engine" has emerged, which perfectly complements the strengths of all companies. It is suitable for the vacuum of medium and small application systems.
发明内容Contents of the invention
本发明的目的是提供一全栖企业数据交换高速引擎,引擎基于文件映射机制对地址和资源进行了封装,对使用该引擎的模块提供了非常简洁的增、删、查、改方法。寻址算法采用Linux操作系统内核管理内存的红黑树,借阅、归还式资源分配器避免了做到了直接分配资源而不需要查找。为了方便使用,访问引擎的方式为键值对应式,简单的说就是用户输入一个指定的键后能得到一个预期的值,键可以是多种条件的组合,值可以是一个数据结构或数据对象,因此键与值的搭配可以表达任意复杂度的查找。The purpose of the present invention is to provide a high-speed data exchange engine for all-environmental enterprises. The engine encapsulates addresses and resources based on the file mapping mechanism, and provides very simple methods for adding, deleting, checking, and modifying modules using the engine. The addressing algorithm adopts the red-black tree of the Linux operating system kernel to manage the memory, and the borrow and return resource allocator avoids directly allocating resources without searching. For ease of use, the way to access the engine is key-value correspondence. Simply put, the user can get an expected value after entering a specified key. The key can be a combination of various conditions, and the value can be a data structure or data object. , so the combination of keys and values can express searches of arbitrary complexity.
首先需要介绍虚拟内存,虚拟内存是指使用磁盘当作RAM的扩展,这样可用的内存的大小就相应地增大了。内核会将暂时不用的内存块的内容写到硬盘上,这样一来,这块内存就可用于其它目的。当需要用到原始的内容时,它们被重新读入内存。这些操作对用户来说是完全透明的;操作系统下运行的程序只是看到有大量的内存可供使用而并没有注意到时不时它们的一部分是驻留在硬盘上的。文件映射是虚拟内存的中心概念,文件映射一方面给用户提供了一组措施,用户将文件映射到自己地址空间的某个部分,使用简单的内存访问指令读写文件;另一方面,它也可以用于内核的基本组织模式,在这种模式中,内核将整个地址空间视为诸如文件之类的一组不同对象的映射。First of all, we need to introduce virtual memory. Virtual memory refers to the use of disk as an extension of RAM, so that the size of available memory increases accordingly. The kernel will write the contents of the temporarily unused block of memory to the hard disk, so that the memory can be used for other purposes. When the original content is needed, they are read back into memory. These operations are completely transparent to the user; programs running under the operating system just see that there is a large amount of memory available and do not notice that some of them reside on the hard disk from time to time. File mapping is the central concept of virtual memory. On the one hand, file mapping provides users with a set of measures. Users map files to a certain part of their own address space and use simple memory access instructions to read and write files; on the other hand, it also Can be used for the basic organizational mode of the kernel, in which the kernel sees the entire address space as a mapping of a set of distinct objects such as files.
如图2中所示,插入数据时应用系统把指定的数据对象准备好后,把查询该数据的条件拼装成Key插入引擎,数据通过资源分配器取得存储资源后把数据存放在红黑树上,树节点通过部寻址机制指向数据存储空间,把数据对象存在真实的数据存储空间中,整个插入数据的动作就完成了.As shown in Figure 2, after the application system prepares the specified data object when inserting data, it assembles the conditions for querying the data into a Key insertion engine, and the data is stored in the red-black tree after obtaining storage resources through the resource allocator. , the tree node points to the data storage space through the internal addressing mechanism, and the data object is stored in the real data storage space, and the entire action of inserting data is completed.
这整个过程都是在虚拟内存中完成的,该引擎在2CPU、16G内存下经测试, 800万条记录数据量插入数据每条1K达到每秒处理521580.388条,查找每秒2790373.212条,删除数据每秒2764340.013条。在插入的过程中强行关闭服务器电源,在服务器重新启动后可继续处理。The whole process is completed in the virtual memory. The engine has been tested under 2CPU and 16G memory. 8 million records are inserted, each 1K of data reaches 521,580.388 records per second, 2790,373.212 records per second for search, and every 2764340.013 seconds. Forcibly power off the server during insertion, and continue processing after the server restarts.
当服务器因异常而断电时,索引中的数据已通过文件映射机制保存到文件中,从而在服务器硬盘保存完好的情况下不会丢失数据,因此本引擎做到了高效、又安全。When the server is powered off due to an abnormality, the data in the index has been saved to the file through the file mapping mechanism, so that the data will not be lost when the server hard disk is kept intact, so this engine is efficient and safe.
综上所述,由于采用了上述技术方案,本发明的有益效果是:In summary, owing to adopting above-mentioned technical scheme, the beneficial effect of the present invention is:
虚拟内存与真实内存在使用的效率上相差无几,但整个过程都会被完整的放入交换文件中,而交换文件通过内存映射成为了可以控制的部分,引擎的关键部分也在于此,由于控制了交换文件但交换数据的时机和效率同样交由系统保障(可手动控制),数据在交换的时候享受了内存的效率而保存了文件的可靠性,这就是引擎的核心优势。修改、删除、查询数据也与上图访问过程一致,此处不再赘述。The efficiency of virtual memory and real memory is almost the same, but the whole process will be completely put into the swap file, and the swap file becomes a controllable part through memory mapping, and the key part of the engine is also here. When exchanging files, the timing and efficiency of exchanging data are also guaranteed by the system (can be controlled manually). When data is exchanged, it enjoys the efficiency of memory and preserves the reliability of files. This is the core advantage of the engine. Modifying, deleting, and querying data are also consistent with the access process in the above figure, and will not be repeated here.
附图说明Description of drawings
本发明将通过例子并参照附图的方式说明,其中:The invention will be illustrated by way of example with reference to the accompanying drawings, in which:
图1是本发明技术方案原理图。Fig. 1 is a schematic diagram of the technical solution of the present invention.
图2是本发明插入数据时应用系统动作示意图。Fig. 2 is a schematic diagram of the action of the application system when data is inserted in the present invention.
具体实施方式Detailed ways
本说明书中公开的所有特征,或公开的所有方法或过程中的步骤,除了互相排斥的特征和/或步骤以外,均可以以任何方式组合。All features disclosed in this specification, or steps in all methods or processes disclosed, may be combined in any manner, except for mutually exclusive features and/or steps.
本说明书(包括任何附加权利要求、摘要和附图)中公开的任一特征,除非特别叙述,均可被其他等效或具有类似目的的替代特征加以替换。即,除非特别叙述,每个特征只是一系列等效或类似特征中的一个例子而已。Any feature disclosed in this specification (including any appended claims, abstract and drawings), unless expressly stated otherwise, may be replaced by alternative features which are equivalent or serve a similar purpose. That is, unless expressly stated otherwise, each feature is one example only of a series of equivalent or similar features.
如图2中所示,插入数据时应用系统把指定的数据对象准备好后,把查询该数据的条件拼装成Key插入引擎,数据通过资源分配器取得存储资源后把数据存放在红黑树上,树节点通过部寻址机制指向数据存储空间,把数据对象存在真实的数据存储空间中,整个插入数据的动作就完成了As shown in Figure 2, after the application system prepares the specified data object when inserting data, it assembles the conditions for querying the data into a Key insertion engine, and the data is stored in the red-black tree after obtaining storage resources through the resource allocator. , the tree node points to the data storage space through the internal addressing mechanism, and the data object is stored in the real data storage space, and the entire action of inserting data is completed
当服务器因异常而断电时,索引中的数据已通过文件映射机制保存到文件中,从而在服务器硬盘保存完好的情况下不会丢失数据,因此本引擎做到了高效、又安全。When the server is powered off due to an abnormality, the data in the index has been saved to the file through the file mapping mechanism, so that the data will not be lost when the server hard disk is kept intact, so this engine is efficient and safe.
本发明并不局限于前述的具体实施方式。本发明扩展到任何在本说明书中披露的新特征或任何新的组合,以及披露的任一新的方法或过程的步骤或任何新的组合。The present invention is not limited to the foregoing specific embodiments. The present invention extends to any new feature or any new combination disclosed in this specification, and any new method or process step or any new combination disclosed.
Claims (3)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 201110056858 CN102129459B (en) | 2011-03-10 | 2011-03-10 | Omnibearing enterprise data exchange high-speed engine |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 201110056858 CN102129459B (en) | 2011-03-10 | 2011-03-10 | Omnibearing enterprise data exchange high-speed engine |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN102129459A true CN102129459A (en) | 2011-07-20 |
| CN102129459B CN102129459B (en) | 2013-04-17 |
Family
ID=44267541
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN 201110056858 Expired - Fee Related CN102129459B (en) | 2011-03-10 | 2011-03-10 | Omnibearing enterprise data exchange high-speed engine |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN102129459B (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103399915A (en) * | 2013-07-31 | 2013-11-20 | 北京华易互动科技有限公司 | Optimal reading method for index file of search engine |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030035000A1 (en) * | 2000-09-01 | 2003-02-20 | Roberto Licon | System and method for selecting content for displaying over the internet based upon some user input |
| CN101520797A (en) * | 2009-02-11 | 2009-09-02 | 国电南瑞科技股份有限公司 | High-speed concurrent access method for power system large data files across platform |
-
2011
- 2011-03-10 CN CN 201110056858 patent/CN102129459B/en not_active Expired - Fee Related
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030035000A1 (en) * | 2000-09-01 | 2003-02-20 | Roberto Licon | System and method for selecting content for displaying over the internet based upon some user input |
| CN101520797A (en) * | 2009-02-11 | 2009-09-02 | 国电南瑞科技股份有限公司 | High-speed concurrent access method for power system large data files across platform |
Non-Patent Citations (2)
| Title |
|---|
| 《宿州学院学报》 20100831 张海洋 红黑树在linux虚拟内存区域管理中的应用 全文 1-3 第25卷, 第8期 * |
| 《软件导刊》 20090831 高庆、姜凡 红黑树算法及其应用 全文 1-3 第7卷, 第9期 * |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103399915A (en) * | 2013-07-31 | 2013-11-20 | 北京华易互动科技有限公司 | Optimal reading method for index file of search engine |
Also Published As
| Publication number | Publication date |
|---|---|
| CN102129459B (en) | 2013-04-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11237761B2 (en) | Management of multiple physical function nonvolatile memory devices | |
| JP2019153297A (en) | New SSD basic structure for FPGA-based acceleration | |
| CN107122368A (en) | A kind of data verification method, device and electronic equipment | |
| US8615488B2 (en) | Physical replication of database subset to improve availability and reduce resource cost in a cloud environment | |
| CN104133775A (en) | Method and apparatus for managing memory | |
| CN103049224A (en) | Method, device and system for importing data into physical tape | |
| JP2024509198A (en) | Soft deletion of data in a sharded database | |
| CN115587118A (en) | Task data dimension table association processing method and device and electronic equipment | |
| US11977785B2 (en) | Non-volatile memory device-assisted live migration of virtual machine data | |
| US11157456B2 (en) | Replication of data in a distributed file system using an arbiter | |
| US20220027187A1 (en) | Supporting clones with consolidated snapshots | |
| CN116701175A (en) | GDS system read and write performance test method, device and electronic equipment of server | |
| CN108897822A (en) | A kind of data-updating method, device, equipment and readable storage medium storing program for executing | |
| CN103064723B (en) | Method and computer system for identifying virtual machine memory | |
| US10055304B2 (en) | In-memory continuous data protection | |
| CN105426119A (en) | Storage apparatus and data processing method | |
| CN111625407B (en) | SSD performance test method and related components | |
| US9690886B1 (en) | System and method for a simulation of a block storage system on an object storage system | |
| CN107003932A (en) | The CACHE DIRECTORY processing method and contents controller of multi-core processor system | |
| CN102129459A (en) | Omnibearing enterprise data exchange high-speed engine | |
| CN107220342A (en) | The control method and system of a kind of distributed data base | |
| CN114138424B (en) | Virtual machine memory snapshot generation method and device and electronic equipment | |
| CN111241042B (en) | Distributed lock implementation method, system and equipment based on Etcd | |
| CN115437848A (en) | Data backup method and device, electronic equipment and storage medium | |
| CN118056183A (en) | Optimizing the Just-in-Time Compilation Process |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| C41 | Transfer of patent application or patent right or utility model | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20160106 Address after: 1, No. 4, No. three, 2, 610041 garden, Chengdu hi tech Zone, Sichuan, Chengdu Patentee after: CHENGDU SEFON SOFTWARE Co.,Ltd. Address before: 610041 Sichuan province Chengdu city Chengdu high tech Zone Gaopeng Road No. 11 block 22ABC Patentee before: Chengdu Sifang Information Technology Co.,Ltd. |
|
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20130417 |