[go: up one dir, main page]

CN104239357A - Concurrent request processing for database transactions - Google Patents

Concurrent request processing for database transactions Download PDF

Info

Publication number
CN104239357A
CN104239357A CN201310250265.2A CN201310250265A CN104239357A CN 104239357 A CN104239357 A CN 104239357A CN 201310250265 A CN201310250265 A CN 201310250265A CN 104239357 A CN104239357 A CN 104239357A
Authority
CN
China
Prior art keywords
key
key assignments
data
transactions requests
transaction
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
Application number
CN201310250265.2A
Other languages
Chinese (zh)
Other versions
CN104239357B (en
Inventor
董玢
魏正隆
申永源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SAP SE
Original Assignee
SAP SE
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by SAP SE filed Critical SAP SE
Priority to CN201310250265.2A priority Critical patent/CN104239357B/en
Priority to US13/929,478 priority patent/US9430544B2/en
Publication of CN104239357A publication Critical patent/CN104239357A/en
Application granted granted Critical
Publication of CN104239357B publication Critical patent/CN104239357B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种请求处理器,可以接收对将要使用数据库的数据运行的事务的事务请求,并且可以将该事务请求的第一事务请求分类为简单事务请求,并且将该事务请求的第二事务请求分类为复杂事务请求。键值存储引擎可以使用在收到第一事务请求的之前确定的、并且基于该数据的预先计算的结果的键值存储来运行满足第一事务请求的第一事务,并且如果有的话可以更新反映由第一事务引起的键值存储的改变的键值Δ。关系存储引擎可以造成所述至少一个处理器使用包括数据的子集的关系存储来运行满足第二事务请求的第二事务,并且如果有的话可以更新反映由第二事务引起的关系存储的改变的关系Δ。同步器可以基于键值Δ和关系Δ来运行键值存储和关系存储的同步。

A request processor that can receive a transaction request for a transaction to be run using data from a database and can classify a first transaction request of the transaction request as a simple transaction request and a second transaction request of the transaction request as Complex transaction requests. The key-value store engine may run the first transaction satisfying the first transaction request using a key-value store determined prior to receipt of the first transaction request and based on precomputed results of the data, and may update the A key-value Δ reflecting the change to the key-value store caused by the first transaction. The relational storage engine may cause the at least one processor to run a second transaction that satisfies the second transaction's request using the relational storage comprising the subset of data, and may update to reflect changes, if any, to the relational storage caused by the second transaction The relationship Δ. A synchronizer can run a synchronization of key-value stores and relational stores based on key-value Δ and relationship Δ.

Description

用于数据库事务的并发请求处理Concurrent request processing for database transactions

技术领域technical field

此说明书涉及用于数据库的事务请求处理。This specification deals with transactional request processing for databases.

背景技术Background technique

各种类型的数据库通常用于存储、管理、访问或者利用数据。在关联的数据库操作中,可以读取、创建、更新、删除、比较、合并或操纵数据。Various types of databases are commonly used to store, manage, access or utilize data. In associated database operations, data can be read, created, updated, deleted, compared, merged, or manipulated.

在实践中,可以由许多不同的用户以重叠或并行的方式访问给定数据库。例如,许多用户可以在给定时间段之内向相同的数据库提交重叠的事务请求。在这种场景中,重要的是数据库之内的数据保持当前(current)、精确和一致。例如,在使用相同的数据满足来自第二用户的请求之前必须完成由第一用户做出的数据修改并使之可用,以便保证第二用户接收及时和精确的结果。In practice, a given database may be accessed by many different users in an overlapping or parallel fashion. For example, many users can submit overlapping transaction requests to the same database within a given period of time. In this scenario, it is important that the data within the database remain current, accurate, and consistent. For example, data modifications made by a first user must be completed and made available before using the same data to satisfy a request from a second user, in order to ensure that the second user receives timely and accurate results.

因此,可以延迟来自用户的事务请求直到与相同数据相关的先前的事务请求已经完成。在一些情况下,由给定用户感受到的结果延迟可以是极小或微小的。然而,在接收到大量并行事务请求的诸如上面谈到的那些情景中,用户可能感受不满意或不可接受的累积的延迟。Thus, a transaction request from a user can be delayed until a previous transaction request related to the same data has been completed. In some cases, the resulting delay experienced by a given user may be minimal or insignificant. However, in scenarios such as those discussed above where a large number of parallel transaction requests are received, users may experience unsatisfactory or unacceptable accumulated delays.

例如,具体地,诸如电子商务(e-commerce)或社交网络应用之类的基于网络的应用可以使上百万的用户能同时地尝试访问支持相应基于网络的应用的一个或多个数据库。因此在这种场景中以上描述的困难可能是显著的问题。作为结果,这种基于网络的应用的用户(例如,顾客)可能不满意,并且提供基于网络的应用的商户会感受在顾客的忠诚度和盈利方面的损失。For example, specifically, web-based applications such as electronic commerce (e-commerce) or social networking applications may enable millions of users to simultaneously attempt to access one or more databases supporting the respective web-based application. The difficulties described above may therefore be a significant problem in such scenarios. As a result, users (eg, customers) of such web-based applications may be dissatisfied, and merchants providing web-based applications may experience a loss in customer loyalty and profitability.

发明内容Contents of the invention

根据一个一般方面,一种系统可以包括记录在计算机可读介质上的、并且可由至少一个处理器运行的指令。所述系统可以包括请求处理器,被配置为造成所述至少一个处理器接收对将要使用数据库的数据运行的事务的事务请求,并且还被配置为造成所述至少一个处理器将该事务请求的第一事务请求分类为简单事务请求,并且将该事务请求的第二事务请求分类为复杂事务请求。所述系统可以包括键(key)值存储引擎,被配置为造成所述至少一个处理器使用在接收到第一事务请求之前确定的并且基于所述数据的预先计算的结果的键值存储来运行满足第一事务请求的第一事务,并且还被配置为如果有的话则更新反映由第一事务引起的键值存储的改变的键值Δ(delta)。所述系统可以包括关系存储引擎,被配置为造成所述至少一个处理器使用包括数据的子集的关系存储来运行满足第二事务请求的第二事务,并且还被配置为如果有的话则更新反映由第二事务引起的关系存储的改变的关系Δ。所述系统可以包括同步器,被配置为造成所述至少一个处理器基于键值Δ和关系Δ来运行键值存储和关系存储的同步。According to one general aspect, a system may include instructions recorded on a computer-readable medium and executable by at least one processor. The system may include a request processor configured to cause the at least one processor to receive a transaction request for a transaction to be executed using data of the database, and further configured to cause the at least one processor to receive a transaction request for the transaction request The first transaction request is classified as a simple transaction request, and the second transaction request of the transaction request is classified as a complex transaction request. The system may include a key-value store engine configured to cause the at least one processor to operate using a key-value store determined prior to receiving the first transaction request and based on a pre-computed result of the data A first transaction that satisfies the first transaction request and is further configured to update the key value Δ(delta), if any, to reflect changes to the key-value store caused by the first transaction. The system may include a relational storage engine configured to cause the at least one processor to execute a second transaction that satisfies the second transaction request using the relational storage comprising the subset of data, and further configured to, if any, The relation Δ is updated to reflect the change in the relational store caused by the second transaction. The system may include a synchronizer configured to cause the at least one processor to perform a synchronization of the key-value store and the relational store based on the key-value Δ and the relationship Δ.

实施方式可以包括以下特征中的一个或多个。例如,可以在包括数据库的数据库层从至少一个应用接收所述事务请求。Implementations may include one or more of the following features. For example, the transaction request may be received from at least one application at a database layer including a database.

所述请求处理器可以被配置为使用键值存储的预先计算的结果基于描述其满意可能性的特征的分类标准来分类第一事务请求和第二事务请求。结果计算器可以被配置为造成所述至少一个处理器基于将要由请求处理器接收到的将来事务请求的预测可能性来计算键值存储的预先计算的结果。所述同步器可以被配置为造成结果计算器基于键值Δ和关系Δ与该同步共同地更新预先计算的结果。The request processor may be configured to classify the first transaction request and the second transaction request based on a classification criterion characterizing their likelihood of satisfaction using the pre-computed results of the key-value store. The result calculator may be configured to cause the at least one processor to calculate a pre-computed result of the key-value store based on a predicted likelihood of future transaction requests to be received by the request processor. The synchronizer may be configured to cause the result calculator to update the precomputed result based on the key value Δ and relation Δ in conjunction with the synchronization.

所述键值存储引擎可以被配置为确定与第一事务请求关联的键,并且在键值存储之内执行相应值的查找。所述键值存储引擎可以包括无效通知器,被配置为基于键值Δ的更新来更新关系Δ。所述同步器可以被配置为基于关系Δ和从键值存储引擎的无效通知器接收到的更新来更新关系存储,以及其后清空关系Δ的内容。The key-value store engine may be configured to determine a key associated with the first transaction request and perform a lookup of the corresponding value within the key-value store. The key-value store engine may include an invalidation notifier configured to update relation Δ based on an update of key value Δ. The synchronizer may be configured to update the relation store based on the relation Δ and updates received from the key-value store engine's invalidation notifier, and thereafter clear the contents of the relation Δ.

所述关系存储引擎可以包括无效通知器,被配置为基于关系Δ的更新来更新键值Δ。所述同步器可以被配置为基于键值Δ和从关系存储引擎的无效通知器接收到的更新来更新键值存储,以及其后清空键值Δ的内容。The relational storage engine may include an invalidation notifier configured to update the key value Δ based on an update of the relation Δ. The synchronizer may be configured to update the key-value store based on the key-value Δ and updates received from an invalidation notifier of the relational storage engine, and thereafter clear the contents of the key-value Δ.

所述请求处理器、键值存储引擎、关系存储引擎以及同步器可以在系统的主存储器中实现。所述关系存储引擎可以被配置为造成所述至少一个处理器更新存储在非易失性存储器中的事务记录并且利用由第一事务或第二事务的运行引起的对数据库的任何改变来更新数据库。The request handler, key-value store engine, relational store engine and synchronizer can be implemented in the main memory of the system. The relational storage engine may be configured to cause the at least one processor to update a transaction record stored in the non-volatile memory and to update the database with any changes to the database caused by the running of the first transaction or the second transaction .

根据另一一般方面,用于运行存储在计算机可读存储介质上的指令的计算机实现的方法可以包括:接收对将要使用数据库的数据运行的事务的事务请求,将该事务请求的第一事务请求分类为简单事务请求,以及将该事务请求的第二事务请求分类为复杂事务请求。所述方法可以包括使用在接收到第一事务请求之前确定的以及基于数据的预先计算的结果的键值存储来运行满足第一事务请求的第一事务,使用包括数据的子集的关系存储来运行满足第二事务请求的第二事务,以及如果有的话则更新反映由第一事务引起的键值存储的改变的键值Δ。所述方法可以包括如果有的话则更新反映由第二事务引起的关系存储的改变的关系Δ,以及基于键值Δ和关系Δ运行键值存储和关系存储的同步。According to another general aspect, a computer-implemented method for executing instructions stored on a computer-readable storage medium may include receiving a transaction request for a transaction to be performed using data from a database, a first transaction request for the transaction request A transaction request is classified as a simple transaction request, and a second transaction request of the transaction request is classified as a complex transaction request. The method may include running a first transaction that satisfies the first transaction request using a key-value store determined prior to receiving the first transaction request and based on precomputed results of the data, using a relational store that includes a subset of the data to A second transaction is run that satisfies the second transaction's request, and updates the key value Δ, if any, to reflect the changes to the key value store caused by the first transaction. The method may include updating the relation Δ, if any, to reflect changes to the relational store caused by the second transaction, and running a synchronization of the key-value store and the relational store based on the key-value Δ and relation Δ.

实施方式可以包括以下特征中的一个或多个。例如,更新键值Δ可以包括基于键值Δ来更新关系Δ,以及更新关系Δ可以包括基于关系Δ来更新键值Δ。所述同步可以包括基于键值Δ和关系Δ与该同步共同地更新预先计算的结果。Implementations may include one or more of the following features. For example, updating the key value Δ may include updating the relationship Δ based on the key value Δ, and updating the relationship Δ may include updating the key value Δ based on the relationship Δ. The synchronizing may include updating precomputed results in conjunction with the synchronizing based on the key value Δ and relation Δ.

根据另一一般方面,有形地具体实现在非临时性计算机可读存储介质上的计算机程序产品可以包括指令。当所述指令被运行时可以被配置为接收对将要使用数据库的数据运行的事务的事务请求,将该事务请求的第一事务请求分类为简单事务请求,以及将该事务请求的第二事务请求分类为复杂事务请求。当所述指令被运行时可以被配置为使用在接收到第一事务请求之前确定的并且基于该数据的预先计算的结果的键值存储来运行满足第一事务请求的第一事务,以及使用包括数据的子集的关系存储来运行满足第二事务请求的第二事务。当所述指令被运行时可以被配置为如果有的话则更新反映由第一事务引起的键值存储的改变的键值Δ,如果有的话则更新反映由第二事务引起的关系存储的改变的关系Δ,以及基于键值Δ和关系Δ来运行键值存储和关系存储的同步。According to another general aspect, a computer program product tangibly embodied on a non-transitory computer-readable storage medium may include instructions. The instructions, when executed, may be configured to receive a transaction request for a transaction to be executed using data from a database, classify a first transaction request of the transaction request as a simple transaction request, and a second transaction request of the transaction request Classified as a complex transaction request. Said instructions, when executed, may be configured to run a first transaction that satisfies the first transaction request using a key-value store determined prior to receiving the first transaction request and based on precomputed results of the data, and using a key-value store that satisfies the first transaction request using A relational store of the subset of data is used to run a second transaction that satisfies the request of the second transaction. Said instructions, when executed, may be configured to update the key value Δ, if any, reflecting changes to the key-value store caused by the first transaction, and to update the key value Δ, if any, reflecting changes to the relational store caused by the second transaction. Changed relationship Δ, and based on the key value Δ and relationship Δ to run the synchronization of the key-value store and the relational store.

实施方式可以包括以下特征中的一个或多个。例如,在更新键值Δ中,当所述指令被运行时可以被配置为基于键值Δ来更新关系Δ,在更新关系Δ中,当所述指令被运行时可以被配置为基于关系Δ来更新键值Δ。Implementations may include one or more of the following features. For example, in updating the key value Δ, when the instruction is executed, it can be configured to update the relation Δ based on the key value Δ, and in updating the relation Δ, when the instruction is executed, it can be configured to update the relation Δ based on the relation Δ Update key value Δ.

所述同步可以包括基于关系Δ和从键值存储接收到的更新来更新关系存储,以及其后清空关系Δ的内容。所述同步可以包括基于键值Δ和从关系存储接收到的更新来更新键值存储,以及其后清空键值Δ的内容。The synchronizing may include updating the relationship store based on the relationship Δ and updates received from the key-value store, and thereafter clearing the contents of the relationship Δ. The synchronizing may include updating the key-value store based on the key-value Δ and updates received from the relational store, and thereafter clearing the contents of the key-value Δ.

所述同步可以包括基于键值Δ和关系Δ与该同步共同地更新预先计算的结果。可以在包括数据库的数据库层从至少一个应用接收所述事务请求。The synchronizing may include updating precomputed results in conjunction with the synchronizing based on the key value Δ and relation Δ. The transaction request may be received from at least one application at a database layer including a database.

在附图和下面的描述中阐述一个或多个实施方式的细节。其它特征将由从描述和附图、以及从权利要求书中变得清楚。The details of one or more implementations are set forth in the accompanying drawings and the description below. Other features will be apparent from the description and drawings, and from the claims.

附图说明Description of drawings

图1是用于管理并行数据库事务请求的系统的框图。Figure 1 is a block diagram of a system for managing parallel database transaction requests.

图2是示出图1的系统的示例实施方式细节的框图。FIG. 2 is a block diagram showing details of an example implementation of the system of FIG. 1 .

图3是示出图1、图2的系统的示例操作的流程图。FIG. 3 is a flowchart illustrating example operation of the system of FIGS. 1 and 2 .

图4是示出用于图1的系统中的示例预先请求计算结果的流程图。FIG. 4 is a flow diagram illustrating example pre-request calculation results for use in the system of FIG. 1 .

图5是用于图1的系统的示例实施方式中的B树数据结构的框图。FIG. 5 is a block diagram of a B-tree data structure used in an example implementation of the system of FIG. 1 .

图6是示出图1、图2的系统的额外的示例操作的流程图。FIG. 6 is a flowchart illustrating additional example operations of the systems of FIGS. 1 and 2 .

图7是示出用于更新图4的预先计算的结果的示例操作的流程图。FIG. 7 is a flowchart illustrating example operations for updating the precomputed results of FIG. 4 .

图8是使用分布、分级(scaled)架构的图1、图2的系统的示例实施方式的框图。Figure 8 is a block diagram of an example implementation of the system of Figures 1, 2 using a distributed, scaled architecture.

具体实施方式Detailed ways

图1是用于管理并行数据库事务请求的系统100的框图。在图1的示例中,数据库102示出为支持从应用104接收到的事务请求。如上所述,应用104可以接收大量并行事务请求。在图1的示例中,如下面详细描述的,在系统100的数据库层分离这种并行事务请求,以使得在数据库层之内不同地管理不同类型的事务请求。作为这些和有关特征的结果,作为一个整体来看,可以通过系统100立即和有效地满足事务请求,即使当在很短时间段之内接收到大量的事务请求的时候。FIG. 1 is a block diagram of a system 100 for managing parallel database transaction requests. In the example of FIG. 1 , database 102 is shown supporting transactional requests received from applications 104 . As noted above, applications 104 may receive a large number of parallel transaction requests. In the example of FIG. 1 , as described in detail below, such parallel transactional requests are separated at the database layer of system 100 such that different types of transactional requests are managed differently within the database layer. As a result of these and related features, transaction requests can be satisfied immediately and efficiently by the system 100 as a whole, even when a large number of transaction requests are received within a short period of time.

在图1的示例中,数据库102和应用104将理解为实际上表示架构的任何类型的已知或将来的实施方式,在该架构中前端应用与用户(或事务请求的其他源)(直接或间接地)交互,包括接收需要一个或多个后端数据库的支持的事务请求。为了示例和说明起见,在随后的示例实施方式中,数据库102通常描述为关系数据库,诸如可以使用一个或多个关系表来存储数据,在关系表中单个表格行表示相应的数据记录,而单个表格列表示相应的数据类型。In the example of FIG. 1 , database 102 and application 104 will be understood to represent virtually any type of known or future implementation of an architecture in which a front-end application interacts with a user (or other source of a transaction request) (directly or indirectly) interaction, including receiving transaction requests that require support from one or more backend databases. For purposes of illustration and description, in the example embodiments that follow, database 102 is generally described as a relational database, such as may store data using one or more relational tables in which a single table row represents a corresponding data record and a single The table columns represent the corresponding data types.

当然,如谈到的,数据库102可以表示与此处描述的特征和技术不矛盾的任何类型的数据库,诸如,例如,面向对象数据库。这种数据库通常与(多个)数据库管理技术或数据库管理系统(DBMS)以及关联的语言(诸如,在关系数据库情况下,结构化查询语言(SQL))相关。Of course, as mentioned, database 102 may represent any type of database not inconsistent with the features and techniques described herein, such as, for example, an object-oriented database. Such databases are typically associated with a database management technology(s) or database management system (DBMS) and associated languages such as, in the case of relational databases, Structured Query Language (SQL).

类似地,应用104可以表示可以访问数据库102的任何应用。同样为了说明和示例起见,此处可以就互联网应用(例如,电子商务或社交网络应用)而言来描述应用104。例如,应用104可以表示商业应用(例如,用于提供链管理、客户关系管理、或企业资源计划),商店的雇员利用该商业应用可以访问库存、客户或财务数据记录。Similarly, application 104 may represent any application that may access database 102 . Also for purposes of illustration and example, applications 104 may be described herein in terms of Internet applications (eg, e-commerce or social networking applications). For example, application 104 may represent a business application (eg, for providing chain management, customer relationship management, or enterprise resource planning) by which store employees may access inventory, customer, or financial data records.

此外在图1中,结果计算器106可以被配置为访问数据库102并且生成键值存储108的内容。在图1的示例中,键值存储108的内容可以存储为键值对,以使得键值存储引擎110可以使用特定键容易地执行查找以迅速地并精确地定位关联值。此外,可以使用诸如下面参照图5描述的一个或多个合适的数据结构存储键值存储108的内容。Also in FIG. 1 , result calculator 106 may be configured to access database 102 and generate the contents of key-value store 108 . In the example of FIG. 1 , the contents of key-value store 108 may be stored as key-value pairs so that key-value store engine 110 can easily perform a lookup using a particular key to quickly and precisely locate an associated value. Additionally, the contents of key-value store 108 may be stored using one or more suitable data structures, such as those described below with reference to FIG. 5 .

在下面参照图4详细地描述在填充键值存储108中的结果计算器106的操作。此外,在下面参照图7提供在系统100的操作期间随时间更新键值存储108的背景下的结果计算器106的操作。The operation of result calculator 106 in populating key-value store 108 is described in detail below with reference to FIG. 4 . Furthermore, the operation of result calculator 106 in the context of updating key-value store 108 over time during operation of system 100 is provided below with reference to FIG. 7 .

然而,通常,为了每次在接收到需要这种结果的事务请求之前准备键值存储108,结果计算器106可以被理解为识别将要利用数据库102执行的特定操作和计算。这样做时,结果计算器106可以预测将经由应用104接收到的事务请求、或事务请求的类型,并且可以预先计算和存储用于这种预测的事务请求的结果作为键值存储108。例如,结果计算器106可以基于在前接收到的这种事务请求的频率或相对频率来预测特定事务请求,或事务请求的类型的将来接收。In general, however, result calculator 106 may be understood to identify specific operations and calculations to be performed with database 102 in order to prepare key-value store 108 each time prior to receiving a transaction request requiring such a result. In doing so, result calculator 106 may predict transaction requests, or types of transaction requests, that will be received via application 104 , and may precompute and store results for such predicted transaction requests as key-value store 108 . For example, outcome calculator 106 may predict future receipt of a particular transaction request, or type of transaction request, based on the frequency or relative frequency of previously received such transaction requests.

另外,或替代地,结果计算器106可以基于数据库102和/或应用104的特征或方面来预测将来的事务请求。例如,与已经包括在数据库102之内达预定义最小时间的数据相比,新近存储到数据库102的数据可能更可能包括在由结果计算器106执行的计算中。在其中应用104表示电子商务相关的应用的另一示例中,可能发生的是某些类别的待售的商品被预测为短期中的事务请求的主体,以使得结果计算器106可以使用来自与这种待售商品有关的数据库102的数据执行关联的计算。Additionally, or alternatively, result calculator 106 may predict future transaction requests based on characteristics or aspects of database 102 and/or application 104 . For example, data that is newly stored to database 102 may be more likely to be included in calculations performed by result calculator 106 than data that has been included in database 102 for a predefined minimum time. In another example where application 104 represents an e-commerce related application, it may happen that certain categories of items for sale are predicted to be the subject of transaction requests in the short term, so that result calculator 106 may use The calculation of association is performed on the data of the database 102 related to a commodity for sale.

作为具体、简化的示例,可能发生的是数据库102是库存数据库,并且应用104表示库存管理应用。在这种设置中,可能发生的是频繁地接收请求关于待售的商品或待售的商品的类别的特定信息的事务请求。例如,这种事务请求可以指定对在特定时间段之内(例如,在特定年限之内)出售的这种商品的数量的请求。在这种场景中,结果计算器106可以预先计算用于键值存储108之内的存储的相应结果,例如,其中可以使用合适的散列算法生成特定键,并且该特定键是利用的这种事务请求的特定的这种示例的事务结果来唯一地识别的。因此,当由键值存储引擎110收到匹配事务请求时,键值存储引擎110可以再次使用合适的散列算法来迅速地识别用于请求的事务结果的相应键,并且可以其后执行在键值存储108之内的期望的事务结果的查找。As a specific, simplified example, it may happen that database 102 is an inventory database and application 104 represents an inventory management application. In such an arrangement, it may happen that transaction requests are frequently received requesting specific information about items for sale or categories of items for sale. For example, such a transaction request may specify a request for the quantity of such an item sold within a certain time period (eg, within a certain number of years). In such a scenario, the result calculator 106 may pre-compute the corresponding result for storage within the key-value store 108, for example, where a particular key may be generated using a suitable hashing algorithm and is utilized such Uniquely identified by the transaction result of a particular such instance of a transaction request. Thus, when a matching transaction request is received by key-value store engine 110, key-value store engine 110 can again use a suitable hashing algorithm to quickly identify the corresponding key for the requested transaction result, and can thereafter perform A lookup within the value store 108 for the desired transaction result.

如下面更详细的描述的,因此可以通过使用键值存储引擎110和键值存储108满足由应用104接收到的许多类型的公共事务请求。例如,仅仅作为描述的,可以非常迅速地满足请求预先计算值的简单读取的事务请求。类似地,也可以迅速地满足使用两个或多个预存储的值或结果的简单组合的读操作。此外,可以使用键值存储引擎110运行简单的写操作(例如,创建或插入操作),如下面也更详细地描述的。As described in more detail below, many types of common transaction requests received by applications 104 may thus be satisfied through use of key-value store engine 110 and key-value store 108 . For example, by way of illustration only, a transaction request requesting a simple read of a precomputed value can be satisfied very quickly. Similarly, read operations using simple combinations of two or more pre-stored values or results can also be satisfied quickly. In addition, simple write operations (eg, create or insert operations) can be performed using the key-value store engine 110, as also described in more detail below.

因此,如刚刚描述的,可以利用键值存储引擎110和键值存储108迅速和精确地满足由应用104接收到的大量事务请求。尽管如此,应用104还可能接收到许多类型的事务请求,其可能很难、不切实际,或不可能使用键值存储引擎110来满足。Thus, as just described, a large number of transaction requests received by applications 104 can be satisfied quickly and accurately with key-value store engine 110 and key-value store 108 . Nonetheless, applications 104 may receive many types of transaction requests that may be difficult, impractical, or impossible to satisfy using key-value store engine 110 .

因此,在图1的示例中,关系存储引擎112包括在图1的系统100中,其可以被配置为利用关系数据存储114以满足这种事务请求,使用键值存储引擎110和键值存储108可能不能满足这种事务请求。具体地,一些事务请求可能需要使用数据库102的数据执行逻辑上复杂和/或详细和过长的计算。在其他示例中,可能发生的是很难或不可能在收到一些事务请求之前预测它们,以使得可能不实际或不可能的是结果计算器106生成用于包括在键值存储108之内的相关的结果。此外,可能发生的是可以以特定大小优化使用键值存储108存储的大块数据,超过该特定大小通过结果计算器106的预先计算的结果会提供减弱的或可忽略的实际正返回(net positive return)。Thus, in the example of FIG. 1, relational storage engine 112 is included in system 100 of FIG. Such a transaction request may not be satisfied. In particular, some transaction requests may require logically complex and/or detailed and lengthy calculations to be performed using data from the database 102 . In other examples, it may happen that it is difficult or impossible to predict some transaction requests before they are received, so that it may not be practical or possible for the result calculator 106 to generate related results. Furthermore, it may happen that large chunks of data stored using the key-value store 108 may be optimized at a particular size beyond which precomputed results by the result calculator 106 provide diminished or negligible actual positive returns (net positive return).

因此,关系数据存储114可以表示数据库102的复制版本或子集,并且可以使用相同或修改的格式存储为底层数据库102。例如,在上面谈到的数据库102表示一个或多个关系表的关系数据库的场景中,可以使用相应于底层数据库102的行和列将关系数据存储114类似地存储为一个或多个关系表。作为结果,关系存储引擎112可以相对于关系数据存储114虚拟地应用从应用104接收到的任何事务请求,可以相对于数据库102应用该应用104。Thus, relational data store 114 may represent a replicated version or subset of database 102 and may be stored using the same or a modified format as underlying database 102 . For example, in the relational database scenario discussed above where database 102 represents one or more relational tables, relational data store 114 may similarly be stored as one or more relational tables using rows and columns corresponding to underlying database 102 . As a result, relational storage engine 112 can virtually apply any transaction requests received from application 104 against relational data store 114 , which application 104 can be applied against database 102 .

在操作中,请求处理器116可以被配置为接收可以通过应用104接收到的多个事务请求。请求处理器116可以咨询分类标准117以决定将特定事务请求路由到键值存储引擎110还是关系存储引擎112。In operation, request handler 116 may be configured to receive a plurality of transaction requests that may be received by application 104 . Request processor 116 may consult taxonomy 117 to decide whether to route a particular transaction request to key-value store engine 110 or relational store engine 112 .

一般说来,例如,如下面参照图6更详细描述的,分类标准117可以将任一输入的事务请求分类为简单或复杂,然而简单事务请求可以发送给键值存储引擎110,而更复杂的事务请求可以发送给关系存储引擎112。例如,在最直接的场景中,简单事务请求或许被识别为仅请求查询/读取操作的那些,和/或也许是基本写操作(例如,创建或插入操作)。同时,复杂事务请求可以定义为需要相对于包含在底层数据库102之内的数据的更广度的计算和/或操作的那些事务请求,因为在关系数据存储114之内表示这种数据。Generally speaking, for example, as described in more detail below with reference to FIG. Transaction requests can be sent to relational storage engine 112 . For example, in the most straightforward scenario, simple transaction requests might be identified as those requesting only query/read operations, and/or perhaps basic write operations (eg, create or insert operations). At the same time, complex transaction requests may be defined as those transaction requests that require more extensive computation and/or manipulation relative to the data contained within the underlying database 102 as such data is represented within the relational data store 114 .

另一方面,如可以从键值存储108和关系数据存储114的以上讨论中了解的,通过分类标准识别的简单事务请求可以理解为可以极可能包括在键值存储108之内的那些事务请求,而复杂事务请求可以被识别为可能需要访问关系数据存储114以成功完成的那些事务请求。因而,分类标准117的配置可以取决于在计算键值存储108的内容中的结果计算器106的操作的底层设置。例如,如果结果计算器106被配置为包括键值存储108之内的特定类型的数据,则可能与这种数据有关的事务请求可能更可能通过分类标准117分类为将要发送给键值存储引擎110的简单事务请求。因此,在用于路由到键值存储引擎110或关系存储引擎112的、分类输入事务请求中的请求处理器116的某些操作可以理解为至少部分地是有关就图1的系统100的用户方的设计配置的事情。On the other hand, as can be understood from the above discussion of key-value store 108 and relational data store 114, simple transaction requests identified by taxonomy can be understood as those transaction requests that can most likely be included within key-value store 108, Whereas complex transaction requests may be identified as those transaction requests that may require access to relational data store 114 for successful completion. Thus, the configuration of taxonomy 117 may depend on the underlying settings of the operation of result calculator 106 in computing the contents of key-value store 108 . For example, if result calculator 106 is configured to include a particular type of data within key-value store 108, transaction requests that may relate to such data may be more likely to be classified by classification criteria 117 as being sent to key-value store engine 110 A simple transaction request. Accordingly, certain operations of request processor 116 in classifying incoming transaction requests for routing to key-value store engine 110 or relational store engine 112 may be understood to be, at least in part, relevant on the user side of system 100 of FIG. The design configuration thing.

因此,如下面更详细地描述的,例如,参照图3、图6、图7,请求处理器116可以接收给定事务请求,并且基于分类标准117,可以将接收到的事务请求路由到键值存储引擎110以用于使用键值存储108满足该事务请求。仅仅作为参考,分类标准117可以访问结果计算器106和/或键值存储108的操作,以使得请求处理器116可以具有通过键值存储引擎110满足事务请求的高期望或确定性。然而,因为此处讨论的理由,还可能发生的是请求处理器116将可能不能通过使用键值存储108满足的事务请求路由到键值存储引擎110。在此情况下,键值存储引擎110和/或请求处理器116可以被配置为将这种事务请求进一步路由到关系存储引擎112。Thus, as described in more detail below, for example, with reference to FIGS. The storage engine 110 is configured to use the key-value store 108 to satisfy the transaction request. For information only, taxonomy 117 may access the operation of result calculator 106 and/or key-value store 108 such that request processor 116 may have a high expectation or certainty that a transaction request will be satisfied by key-value store engine 110 . However, for reasons discussed herein, it may also happen that request processor 116 routes transaction requests that may not be satisfied by using key-value store 108 to key-value store engine 110 . In this case, key-value store engine 110 and/or request processor 116 may be configured to route such transaction requests further to relational store engine 112 .

另外,如上面参考的,请求处理器116还可以基于分类标准117接收可以路由到关系存储引擎112的第二事务请求。其后,关系存储引擎112可以使用关系数据存储114满足路由的事务请求。Additionally, as referenced above, request processor 116 may also receive a second transaction request that may be routed to relational storage engine 112 based on classification criteria 117 . Thereafter, relational storage engine 112 may use relational data store 114 to satisfy routed transaction requests.

如下面参照图2更详细地描述的,可以使用主存储器运行键值存储引擎110和关系存储引擎112的操作,以便提高系统100的总体效率。然而,一般说来,使用易失存储介质实现主存储器,以致用于实现系统100的硬件或软件的崩溃(crash)或其他中断可能导致不希望的数据丢失。因此,如下面还参照图2描述的,可以使用底层非易失性存储介质存储数据库102自身。然后,在主存储器的易失存储介质的背景下,可以保持反映运行的全部数据事务的事务记录118。因此,可以使用事务记录118按需要/要求更新数据库102。然后,在硬件/软件崩溃或其他系统中断情况下,数据库102的数据将不被丢失,并且可以使用事务记录118被更新直到失败或其他中断的时间点处。作为结果,通常可以再创建和产生直到崩溃或其他中断的时间点的当前的系统100,该系统100包括关系数据存储114和键值存储108。As described in more detail below with reference to FIG. 2 , main memory may be used to run the operations of key-value store engine 110 and relational store engine 112 in order to increase the overall efficiency of system 100 . In general, however, main memory is implemented using volatile storage media such that a crash or other interruption of the hardware or software used to implement system 100 may result in undesired loss of data. Accordingly, the database 102 itself may be stored using an underlying non-volatile storage medium, as described below also with reference to FIG. 2 . Then, in the context of the volatile storage medium of the main memory, a transaction record 118 reflecting all data transactions run may be maintained. Thus, database 102 can be updated as needed/required using transaction records 118 . Then, in the event of a hardware/software crash or other system interruption, the data of database 102 will not be lost and can be updated with transaction records 118 until the point in time of the failure or other interruption. As a result, the current system 100 , including relational data store 114 and key-value store 108 , up to the point in time of a crash or other disruption, can generally be recreated and regenerated.

如可以从以上的说明书了解的,以及如下面更详细描述的,由键值存储引擎110运行的事务请求可以造成在键值存储108的内容方面的变化。类似地,由关系存储引擎112运行的事务请求可以导致在关系数据存储114的内容方面的改变。例如,由请求处理器116接收到并被路由到键值存储引擎110的事务请求可以造成对键值存储108的给定数据记录的改变。接着,与相同数据记录有关、并且由请求处理器116接收到并路由到键值存储引擎110的随后的事务请求必须反映所讨论的数据记录的更新值,以便向应用104提供当前的和精确的响应。As can be appreciated from the description above, and as described in more detail below, transaction requests executed by key-value store engine 110 may result in changes in the contents of key-value store 108 . Similarly, transactional requests executed by relational storage engine 112 may result in changes in the contents of relational data store 114 . For example, a transaction request received by request handler 116 and routed to key-value store engine 110 may result in a change to a given data record of key-value store 108 . Then, subsequent transaction requests related to the same data record and received by the request handler 116 and routed to the key-value store engine 110 must reflect the updated value of the data record in question in order to provide the application 104 with a current and accurate response.

类似地,由关系存储引擎112处理的稍后接收到的事务请求必须反映由关系存储引擎112处理的早先接收到的事务请求引起的、对关系数据存储114的早先更新。此外,但是类似地,在键值存储108的背景下,由关系存储引擎112收到的事务请求必须也以考虑对由键值存储引擎110引起的数据记录的更新的方式处理。类似地,但是相反地,由键值存储引擎110处理的事务请求必须反映作为由关系存储引擎112处理早先事务请求的结果的、对关系数据存储114做出的早先改变。Similarly, later received transactional requests processed by relational storage engine 112 must reflect earlier updates to relational data store 114 resulting from earlier received transactional requests processed by relational storage engine 112 . Additionally, but similarly, in the context of key-value store 108 , transaction requests received by relational storage engine 112 must also be handled in a manner that takes into account updates to data records caused by key-value store engine 110 . Similarly, but conversely, transactional requests processed by key-value store engine 110 must reflect earlier changes made to relational data store 114 as a result of processing earlier transactional requests by relational store engine 112 .

因此,如图1的示例中示出的,同步器119可以被配置为与键值存储引擎110和关系存储引擎112交互,以便由此保证键值存储108和关系数据存储114之间的同时性的期望定时和水平。例如,同步器119可以被配置为以定义的时间间隔运行键值存储108和关系数据存储114之间的完全同步,以便由此反映和包括任一和全部数据修改,该数据修改对反映因为刚在之前的同步化操作的完成而运行的全部事务请求是必须的。另外,或替代地,同步器119可以被配置为响应于请求或键值存储引擎110和/或关系存储引擎112的其他操作来运行这种同步。例如,同步器119可以在已经管理特定数目的事务请求之后,和/或与处理可能暗示或需要这种同步的特定事务请求或某类事务请求关联地处理同步。Accordingly, as shown in the example of FIG. 1 , synchronizer 119 may be configured to interact with key-value store engine 110 and relational store engine 112 to thereby guarantee simultaneity between key-value store 108 and relational data store 114 desired timing and level. For example, synchronizer 119 may be configured to run a full synchronization between key-value store 108 and relational data store 114 at defined intervals, to thereby reflect and include any and all data modifications that are not reflected due to just It is necessary to run all transaction requests at the completion of the previous synchronization operation. Additionally, or alternatively, synchronizer 119 may be configured to perform such synchronization in response to a request or other operation of key-value storage engine 110 and/or relational storage engine 112 . For example, synchronizer 119 may process synchronization after a certain number of transaction requests have been managed, and/or in association with processing a particular transaction request or class of transaction requests that may imply or require such synchronization.

为了便利利用同步器119的操作,并且通常保证向从应用104接收到的事务请求提供当前的、精确的结果,键值存储引擎110可以包括键值Δ120,其被配置为跟踪可能由通过键值存储引擎110处理事务请求造成的、键值存储108的任何改变。例如,由键值存储引擎110处理的事务请求可以造成在键值存储108之内插入新的数据记录。键值存储引擎110可以使用键值Δ120简单地存储创建的数据记录,而不在那时修改键值存储108的内容(或关系数据存储114或数据库102的内容)。To facilitate operations utilizing synchronizer 119, and generally to ensure that current, accurate results are provided to transaction requests received from applications 104, key-value store engine 110 may include key-value delta 120, which is configured to track Storage engine 110 processes any changes to key-value store 108 resulting from transaction requests. For example, a transaction request processed by key-value store engine 110 may result in a new data record being inserted within key-value store 108 . The key-value store engine 110 can simply store the created data record using the key-value Δ 120 without modifying the contents of the key-value store 108 (or the contents of the relational data store 114 or database 102) at that time.

类似地,删除键值存储108之内的结果的事务请求可以反映在键值Δ120之内。具体地,在后一示例中,不必须实际上从键值存储108中删除特定数据记录。而是,删除的数据记录可以使用键值Δ120简单地标记为无效的。然后,如上面参考的,有必要保证此后关系存储引擎112不利用或尝试访问如此删除的数据记录。因此,键值存储引擎110的无效通知器122可以被配置为向关系存储引擎112通知所讨论的数据记录的删除/无效。更具体地,例如,如下面参照图6详细描述的,无效通知器122可以被配置为向关系存储引擎112通知对键值Δ120的任何更新,在利用关系数据存储114向通过请求处理器116从应用104接收到的事务请求提供当前的、精确的响应方面,所述更新有可能影响关系存储引擎112的操作。Similarly, transaction requests to delete results within key-value store 108 may be reflected within key-value Δ 120 . Specifically, in the latter example, it is not necessary to actually delete a particular data record from key-value store 108 . Instead, deleted data records can simply be marked as invalid using the key value Δ120. Then, as referenced above, it is necessary to ensure that the relational storage engine 112 does not utilize or attempt to access the data records so deleted thereafter. Accordingly, the invalidation notifier 122 of the key-value storage engine 110 may be configured to notify the relational storage engine 112 of the deletion/invalidation of the data record in question. More specifically, for example, as described in detail below with reference to FIG. The transactional requests received by the applications 104 provide current, accurate responses in terms of updates that may affect the operation of the relational storage engine 112 .

类似地,关系存储引擎112可以保持关系Δ124,其反映由通过关系存储引擎112处理事务请求引起的对关系存储114的任何更新,并且该更新还没有通过同步器119的操作反映在关系数据存储114之内。对无效通知器122的操作也类似,关系存储引擎112可以包括无效通知器126,其也可以被配置为向键值存储引擎110发出特定数据的无效的通知,以便由此保证键值存储引擎110不向通过请求处理器116从应用接收到的事务请求提供不准确的或过时的响应。Similarly, relational store engine 112 may maintain relation Δ 124 that reflects any updates to relational store 114 that result from processing transaction requests by relational store engine 112 and that have not yet been reflected in relational data store 114 by operations of synchronizer 119 within. Also similar to the operation of the invalidation notifier 122, the relational storage engine 112 may include an invalidation notifier 126, which may also be configured to notify the invalidation of specific data to the key-value storage engine 110, so as to thereby ensure that the key-value storage engine 110 Inaccurate or stale responses are not provided to transaction requests received from applications via request handler 116 .

因此,在操作中,键值存储引擎110可以使用键值存储108满足来自请求处理器116的事务请求,并且此后更新键值Δ120以反映对键值存储108的任何所导致的改变。如果需要,则无效通知器122可以向关系存储引擎112通知此后将要反映在关系数据124之内的这种改变。关系存储引擎112可以因此利用关系Δ124,并且使用关系数据存储114以满足从请求处理器116接收到的后续的请求。类似说明可以适用于关系存储引擎112,即,可以使用关系数据存储114处理事务请求,并且可以通过无效通知器126向键值存储引擎110通知完全地、整个地、或部分地反映在关系Δ124中的对关系数据存储114的任何所导致的改变。Thus, in operation, key-value store engine 110 may satisfy a transaction request from request processor 116 using key-value store 108 and thereafter update key-value Δ 120 to reflect any resulting changes to key-value store 108 . If desired, invalidation notifier 122 may notify relational storage engine 112 of such changes to be reflected within relational data 124 thereafter. Relational store engine 112 may thus utilize relational delta 124 and use relational data store 114 to satisfy subsequent requests received from request processor 116 . A similar description may apply to the relational store engine 112, i.e., the relational data store 114 may be used to process transaction requests, and the key-value store engine 110 may be notified via the invalidation notifier 126 that the relation is fully, wholly, or partially reflected in the relation Δ 124 Any resulting changes to the relational data store 114 of .

例如,还如下面参照图6描述的,作为设计选择的问题,无效通知器122、126的操作可以稍微变化。例如,在一些实施方式中,当更新键值Δ120时,无效通知器122可以向关系Δ124通知所讨论的更新,并且可以由此造成对关系Δ124之内的相应数据记录的实际更新,由此反映对键值Δ120的底层更新。For example, as also described below with reference to FIG. 6, the operation of the invalidation notifiers 122, 126 may vary slightly as a matter of design choice. For example, in some implementations, when key value Δ120 is updated, invalidation notifier 122 may notify relation Δ124 of the update in question, and may thereby cause an actual update to the corresponding data record within relation Δ124, thereby reflecting Underlying update to key value Δ120.

然而,在其他示例实施方式中,无效通知器122可以简单地识别键值Δ120和/或键值存储108的有关的、修改的数据,以使得关系Δ124可以简单地跟踪识别的数据已经改变的事实,而不实际上在那时知道它的更新值。在后一种示例中,当通过关系存储引擎112收到与关系Δ124之内的、由无效通知器122识别的无效/修改的数据关联的事务请求时,关系存储引擎112可以触发同步器119以使用各自的键值Δ120和关系Δ124来部分地或完全同步键值存储108和关系数据存储114。在这种示例中,然后,可以了解的是同步器119的操作可能潜在地由无效通知器122、126之一或两者发送的通知的特定类型或数量而触发。However, in other example embodiments, the invalidation notifier 122 may simply identify the relevant, modified data of the key value Δ 120 and/or the key value store 108 such that the relationship Δ 124 may simply track the fact that the identified data has changed , without actually knowing its updated value at that time. In the latter example, when a transaction request is received by relational storage engine 112 associated with invalid/modified data within relation Δ124 identified by invalidation notifier 122, relational storage engine 112 may trigger synchronizer 119 to Key-value store 108 and relational data store 114 are partially or fully synchronized using respective key-value Δ 120 and relationship Δ 124 . In such an example, then, it can be appreciated that the operation of the synchronizer 119 could potentially be triggered by a particular type or number of notifications sent by either or both of the invalidation notifiers 122, 126.

因此,键值存储引擎110和关系存储引擎112能够以使能管理由应用104接收到的大量并行事务请求的、专门有效的方式提供快速和精确的响应。当这样做时,键值存储引擎110和关系存储引擎112可以分别地使用键值Δ120和关系Δ124也分别地跟踪对键值存储108和关系数据存储114的改变。在某一时间段之后,和/或响应于一些其它的刺激,同步器119可以更新关系数据存储114和键值存储108,在该时间可能期望或需要擦除键值Δ120和/或关系Δ124的一些或全部。如可以了解的,以及如下面也详细描述的,关于这一点可以通过在识别将要包括在同步器119的同步化操作中的特定数据中的无效通知器122、126的早先操作而便利同步器119的操作。此外,因为可以在主存储器中实现全部部件108-119,所以在满足应用104接收到的事务请求方面,所述部件的操作可以非常迅速和有效,即使在存在大量并行事务请求的情况下。Accordingly, key-value store engine 110 and relational store engine 112 are able to provide fast and precise responses in a specialized and efficient manner that enables management of the large number of parallel transaction requests received by applications 104 . When doing so, key-value store engine 110 and relational store engine 112 may use key-value Δ 120 and relation Δ 124 , respectively, to also track changes to key-value store 108 and relational data store 114 , respectively. Synchronizer 119 may update relationship data store 114 and key-value store 108 after a certain period of time, and/or in response to some other stimulus, at which time it may be desirable or necessary to erase key-value Δ120 and/or relationship Δ124 some or all. As can be appreciated, and as also described in detail below, the synchronizer 119 can be facilitated in this regard by the earlier operation of the invalid notifiers 122, 126 in identifying specific data to be included in the synchronization operation of the synchronizer 119. operation. Furthermore, because all components 108-119 can be implemented in main memory, their operation can be very rapid and efficient in satisfying transactional requests received by application 104, even in the presence of a large number of concurrent transactional requests.

如图1中示出的,系统100可以使用至少一个计算设备128实现,该至少一个计算设备128可以自身包括至少一个处理器128A和至少一个计算机可读存储介质128B。即,例如,可以使用在操作中部分或完全地彼此通信以及并行的两个或多个计算设备128实现系统100。类似地,可以利用并行运行的两个或多个处理器,以便提高系统100的操作的速度和效率。As shown in FIG. 1 , system 100 may be implemented using at least one computing device 128 , which may itself include at least one processor 128A and at least one computer-readable storage medium 128B. That is, for example, system 100 may be implemented using two or more computing devices 128 that operate partially or fully in communication with each other and in parallel. Similarly, two or more processors operating in parallel may be utilized in order to increase the speed and efficiency of the operation of system 100 .

如上面参考的,并且如下面参照图2更详细地描述和示出的,计算机可读存储介质128B可以表示至少两种不同类型的计算机存储器。例如,计算机可读存储介质128B可以表示用于在事务记录118中存储数据库102的第一、非易失性存储器。同时,计算机可读存储介质128B也可以通常表示作为至少一个计算设备128的主存储器提供的第二、易失性存储器。还如参照图2描述和示出的,可以利用这种主存储器以实现并运行图1的系统100的部件108-119中的任何一个。As referenced above, and as described and illustrated in more detail below with reference to FIG. 2 , computer-readable storage media 128B may represent at least two different types of computer memory. For example, computer-readable storage medium 128B may represent a first, non-volatile memory for storing database 102 in transaction log 118 . Meanwhile, the computer-readable storage medium 128B may also typically represent a second, volatile memory provided as a main memory of at least one computing device 128 . As also described and illustrated with reference to FIG. 2, such main memory may be utilized to implement and operate any of the components 108-119 of the system 100 of FIG.

虽然使用多个离散的、单个模块示出图1的系统100,但是可以了解,这种说明仅是为了示例和描述系统100的操作起见。因此,还可以了解的是可以组合系统100的任何两个或多个部件用于作为单个部件运行。类似地,但是相反地,图1的系统100中示出的任何单个部件可以在多种示例实施方式中分为两个或多个子部件。例如,同步器119的一些或全部可以分割并包括在键值存储引擎110和关系存储引擎112的相应部分之内。通过另一示例,请求处理器116的一些功能可以包括在键值存储引擎110的操作之内,因为,例如,如上面参考的,路由通过键值存储引擎110的事务请求可能不能使用键值存储108被满足,而是必须此后通过关系存储引擎112使用关系数据存储114来满足它。While the system 100 of FIG. 1 is shown using a number of discrete, individual modules, it will be appreciated that such illustration is for purposes of illustration and describing the operation of the system 100 only. Accordingly, it is also to be appreciated that any two or more components of system 100 may be combined for operation as a single component. Similarly, but conversely, any single component shown in system 100 of FIG. 1 may be divided into two or more subcomponents in various example embodiments. For example, some or all of synchronizer 119 may be split and included within corresponding portions of key-value store engine 110 and relational store engine 112 . By way of another example, some functionality of the request processor 116 may be included within the operation of the key-value store engine 110 because, for example, as referenced above, transactional requests routed through the key-value store engine 110 may not be able to use the key-value store 108 is satisfied, but must thereafter be satisfied by the relational storage engine 112 using the relational data store 114 .

图2是示出在图1的系统100的实施期间的不同类型的存储器的示例使用的框图。在图2的示例中,将用户202(表示一个或多个用户)示出为向数据库系统204提供事务请求。如所示,存储器206表示用于实现键值存储引擎110、关系存储引擎112以及同步器119的易失性的、主存储器的示例。当然,虽然为了简化起见未具体地在图2的示例中示出,可以了解的是还可以使用存储器206实现键值存储引擎110、关系存储引擎112以及同步器119(包括键值存储108和关系数据存储114)的各种内部和有关的部件。FIG. 2 is a block diagram illustrating an example use of different types of memory during implementation of the system 100 of FIG. 1 . In the example of FIG. 2 , user 202 (representing one or more users) is shown providing transaction requests to database system 204 . As shown, memory 206 represents an example of volatile, main memory used to implement key-value store engine 110 , relational store engine 112 , and synchronizer 119 . Of course, although not specifically shown in the example of FIG. Various internal and related components of the data store 114).

同时,第二存储器208示出为用于实现事务记录118和底层数据库102。如所示,例如,存储器208可以包括诸如硬盘或固态驱动器(SSD)的非易失性存储器。Meanwhile, a second memory 208 is shown for implementing transaction logging 118 and underlying database 102 . As shown, memory 208 may include non-volatile memory such as a hard disk or solid state drive (SSD), for example.

因此,如描述的,可以使用存储器206以快速、有效的方式运行键值存储引擎110、关系存储引擎112以及同步器119的操作。为了防止存储器206的固有不稳定性,如所示和描述的,关系存储引擎112可以不断地更新事务记录118,以便反映使用存储器206运行的全部事务。因此,在发生系统崩溃或其他故障时,可以仅使用事务记录118和数据库102的内容再现在中断的时候的系统的当前状态。Thus, the operations of key-value store engine 110 , relational store engine 112 , and synchronizer 119 may be performed in a fast, efficient manner using memory 206 as described. To guard against the inherent instability of memory 206 , relational storage engine 112 may continually update transaction records 118 to reflect all transactions performed using memory 206 , as shown and described. Thus, in the event of a system crash or other failure, only the transaction records 118 and the contents of the database 102 can be used to reproduce the current state of the system at the time of the outage.

此外,在实践中,可以不断地更新事务记录118,仅仅作为参考,但是它可以不是同步地反映数据库102之内的这种改变所必须的或期望的。而是,事务记录118可以在一时间段内、和/或直到事务的某一阈值数目才收集事务,随之会发生事务记录118和数据库102的同步,并且事务记录118的内容可以被清除。Furthermore, in practice, transaction record 118 may be constantly updated, for reference only, but it may not be necessary or desirable to reflect such changes within database 102 synchronously. Instead, transaction records 118 may not collect transactions for a period of time, and/or until some threshold number of transactions, after which synchronization of transaction records 118 and database 102 occurs, and the contents of transaction records 118 may be purged.

图3是示出图1的系统100的示例操作的流程图300。在图3的示例中,操作302-316示出为分离的、连续的操作。然而,可以了解的是操作302-316中的任何两个或多个可以以部分地或完全重叠或并行的方式、和/或以嵌套、迭代、分支或循环方式实现。此外,在这种变化之内,可以了解的是,可以包括图3的示例中未具体地示出的额外的或可替换操作,而同时可以省略操作302-316中的一个或多个。FIG. 3 is a flowchart 300 illustrating example operations of the system 100 of FIG. 1 . In the example of FIG. 3, operations 302-316 are shown as separate, sequential operations. However, it can be appreciated that any two or more of operations 302-316 may be implemented in a partially or fully overlapping or parallel fashion, and/or in a nested, iterative, branching, or looping fashion. Furthermore, within such variations, it can be appreciated that additional or alternative operations not specifically shown in the example of FIG. 3 may be included, while one or more of operations 302-316 may be omitted.

在图3的示例中,如上面参考的,可以接收对将要使用数据库的数据运行的事务的事务请求(302)。例如,请求处理器116可以通过应用104接收事务请求,例如,作为图2的应用104与用户202的交互的结果。In the example of FIG. 3 , as referenced above, a transaction request for a transaction to be run using data of a database may be received ( 302 ). For example, request handler 116 may receive a transaction request through application 104 , eg, as a result of an interaction between application 104 and user 202 of FIG. 2 .

事务请求的第一事务请求可以分类为简单事务请求(304)。例如,如描述的,请求处理器116可以咨询分类标准117以确定使用键值存储108的内容可能或必然满足该第一事务请求。如描述的,这种分类可以基于对键值存储108的实际认识,和/或可以基于第一事务请求的特性和类型。例如,如描述的,当具体对数据可能包括在键值存储108之内时作为数据的直接的创建/读取/更新/删除的任何事务请求可以分类为简单事务请求。A first transaction request of the transaction requests may be classified as a simple transaction request (304). For example, as described, request processor 116 may consult taxonomy 117 to determine that the first transaction request is likely or must be satisfied using the contents of key-value store 108 . As described, this classification may be based on actual knowledge of the key-value store 108, and/or may be based on the nature and type of the first transaction request. For example, as described, any transactional request that specifically is a direct create/read/update/delete of data as it may be included within key-value store 108 may be classified as a simple transactional request.

同时,事务请求的第二事务请求可以分类为复杂事务请求(306)。例如,请求处理器116可以基于分类标准117确定第二事务请求需要两个或多个数据记录或数据表的逻辑组合,或否则可能需要使用键值存储108不太可能的或不能满足的计算密集的计算。具体地,例如,可能要求一个或多个数据行(或全部数据表格)锁定直到完成第二事务请求的任何这种事务请求将可能分类为复杂事务请求。Meanwhile, a second transaction request of the transaction requests may be classified as a complex transaction request (306). For example, request processor 116 may determine based on classification criteria 117 that the second transaction request requires a logical combination of two or more data records or data tables, or may otherwise require computationally intensive processing that is unlikely or unsatisfactory using key-value store 108 . calculation. Specifically, for example, any such transaction request that may require one or more data rows (or an entire data table) to be locked until a second transaction request is completed will likely be classified as a complex transaction request.

此外在图3中,可以使用在接收到第一事务请求之前确定的、并且基于数据的预先计算的结果的键值存储来运行满足第一事务请求的第一事务(308)。例如,键值存储引擎110可以使用键值存储108满足第一事务请求,其中,如描述的,键值存储108的键内容可以已经由结果计算器106使用存储在数据库102(和/或存储在关系数据存储114)中的数据在前地计算出。Also in FIG. 3 , a first transaction that satisfies the first transaction request can be run using a key-value store determined prior to receipt of the first transaction request and based on precomputed results of the data (308). For example, key-value store engine 110 may satisfy a first transaction request using key-value store 108, wherein, as described, the key content of key-value store 108 may have been stored in database 102 for use by result calculator 106 (and/or stored in Data in the relational data store 114) is computed previously.

可以使用包括数据的子集的关系存储来运行满足第二事务请求的第二事务(310)。例如,关系存储引擎112可以使用关系数据存储114满足第二事务请求。A second transaction that satisfies the second transaction request can be executed using the relational store that includes the subset of data (310). For example, relational storage engine 112 may use relational data store 114 to satisfy the second transaction request.

如果有的话,则可以更新反映由第一事务引起的键值存储的改变的键值Δ(312)。例如,键值存储引擎110可以基于由第一事务请求的运行产生的键值存储108的任何改变来更新键值Δ120。The key value Δ, if any, may be updated to reflect the change to the key value store caused by the first transaction (312). For example, key-value store engine 110 may update key-value Δ 120 based on any changes to key-value store 108 resulting from execution of the first transaction request.

类似地,如果有的话,则可以更新反映由第二事务引起的关系存储的改变的关系Δ(314)。例如,关系存储引擎112可以使用关系数据存储114基于第二事务的运行来更新关系Δ124。Similarly, the relationship Δ, if any, may be updated to reflect the change to the relationship store caused by the second transaction (314). For example, relational store engine 112 may use relational data store 114 to update relation Δ 124 based on the execution of the second transaction.

最终在图3的示例中,可以基于键值Δ和关系Δ运行键值存储和关系存储的同步(316)。例如,同步器119可以使用键值Δ120和关系Δ124更新关系数据存储114。类似地,同步器119可以使用键值Δ120、关系Δ124、以及结果计算器106(如下面参照图7更详细地描述的,到必须重新计算将要存储在键值存储108之内的结果的程度)来更新键值存储108。Finally, in the example of FIG. 3 , a synchronization of the key-value store and the relational store can be run based on the key-value Δ and relationship Δ ( 316 ). For example, synchronizer 119 may update relational data store 114 with key value Δ 120 and relation Δ 124 . Similarly, synchronizer 119 may use key value Δ 120, relation Δ 124, and result calculator 106 (as described in more detail below with reference to FIG. 7, to the extent that results to be stored within key value store 108 must be recalculated) to update the key-value store 108.

图4是示出图1的结果计算器106的示例操作的流程图400。即,例如,流程图400示出可以运行以填充键值存储108的结果计算器106的操作,预期接收到的将来的事务请求可以由该键值存储108满足。FIG. 4 is a flowchart 400 illustrating example operation of the result calculator 106 of FIG. 1 . That is, for example, flowchart 400 illustrates operations of result calculator 106 that may be executed to populate key-value store 108 from which future transaction requests expected to be received may be satisfied.

在图4的示例中,可以通过结果计算器106加载全部必须的交易数据(402)。例如,结果计算器106可以访问数据库102,以便利用预期将是大量或部分将来的事务请求的主体的数据。例如,结果计算器106可以分析事务记录118以确定事务请求的相对频率或事务请求的类型,并且可以从其中推断以确定从数据库102提取哪个数据或哪个类型的数据。In the example of FIG. 4, all necessary transaction data may be loaded by the result calculator 106 (402). For example, result calculator 106 may access database 102 to utilize data that is expected to be the subject of many or some future transaction requests. For example, result calculator 106 may analyze transaction records 118 to determine the relative frequency of transaction requests or types of transaction requests, and may extrapolate therefrom to determine which data or type of data to extract from database 102 .

类似地,结果计算器106可以确定将要在提取的数据上执行的计算的类型,并且可以此后基于该数据运行计算(404)。此外,随时间,结果计算器106可以在系统100的操作期间监督键值存储108的使用,以便由此判断数据和在键值存储108的填充期间执行的关联的计算的选择的相对成功。因此,例如,在键值存储108的将来的更新期间,结果计算器106会更可能选择在基于键值存储108运行事务请求的期间已经由键值存储引擎110频繁地利用的数据和关联的计算。Similarly, result calculator 106 may determine the type of calculation to be performed on the extracted data, and may thereafter run calculations based on the data (404). Furthermore, over time, result calculator 106 may monitor the use of key-value store 108 during operation of system 100 to thereby judge the relative success of selection of data and associated calculations performed during population of key-value store 108 . Thus, for example, during future updates of the key-value store 108, the result calculator 106 will be more likely to select data and associated computations that have been frequently utilized by the key-value store engine 110 during execution of transaction requests based on the key-value store 108 .

最终在图4中,可以使用键值存储108存储计算结果(406)。在示例实施方式中,计算结果可以以使得能够通过键值存储引擎110在键值存储108之内快速、精确地查找期望的结果的方式存储。具体地,例如,图5示出可以利用来填充键值存储108的内容的B树数据结构。如所示,图5的B树数据结构包括以分级(hierarchical)形式安排的许多节点502-520。因此,从图5的数据结构内部查找任何特定数据项可以迅速地发生,因为数据结构的分布特性暗示访问任何特定数据项将需要最多遍历相对较小数目的分级数据结构的层。Finally in FIG. 4, the key-value store 108 may be used to store the calculation results (406). In an example implementation, calculation results may be stored in a manner that enables fast and precise lookup of desired results within key-value store 108 by key-value store engine 110 . Specifically, for example, FIG. 5 illustrates a B-tree data structure that may be utilized to populate the contents of the key-value store 108 . As shown, the B-tree data structure of FIG. 5 includes a number of nodes 502-520 arranged in a hierarchical fashion. Thus, looking up any particular data item from within the data structure of FIG. 5 can occur rapidly because the distributed nature of the data structure implies that accessing any particular data item will require traversing at most a relatively small number of levels of the hierarchical data structure.

更具体地,如所示,每个节点可以包括多个键和关联数据项,每个项还可以与数据结构的下一底层的节点和关联的键/数据项关联。因此,即使图5的数据结构的整体数据量显著地增加,数据结构层的深度也将不按比例增长,以使得实现为定位特定值的任何特定关键字的检索仅需要访问相对较小数目的层级来定位期望值。More specifically, as shown, each node may include multiple keys and associated data items, and each item may also be associated with the next underlying node and associated key/data item of the data structure. Therefore, even if the overall data volume of the data structure of FIG. Hierarchy to locate expectations.

在示例实施方式中,结果计算器106可以利用合适的散列算法来填充键值存储108,以使得键值存储引擎110可以利用相同的散列算法从键值存储108访问期望值。在这种场景中,如下面参照图8更详细描述的,结果计算器106可以使用多个不同的计算设备利用散列算法来实现图5的数据结构。因此,这种计算设备中的任何给定的一个中的数据量可以限于可接受的或期望的水平。此外,可以同时地运行许多分离的事务请求,以使得计算的负担可以在不同的并行的计算设备中间分配。In an example implementation, result calculator 106 may populate key-value store 108 with a suitable hashing algorithm such that key-value store engine 110 may access the desired value from key-value store 108 using the same hashing algorithm. In such a scenario, result calculator 106 may implement the data structure of FIG. 5 using a number of different computing devices using a hashing algorithm, as described in more detail below with reference to FIG. 8 . Accordingly, the amount of data in any given one of such computing devices may be limited to acceptable or desired levels. Furthermore, many separate transaction requests can be run concurrently so that the computational burden can be distributed among different parallel computing devices.

例如,在通过键值存储引擎110访问键值存储108期间,将简单地需要键值存储引擎110使用合适的散列算法找到与特定事务请求有关的相关节点。然后,取决于所讨论的事务请求的基础特性,将简单地需要键值存储引擎110重叠、添加、或去除相应的节点。当使用主存储器实现键值存储108时,如图2的示例中示出的,则例如,可以使用存储器池预先分配可用存储器空间用于实现键值存储108。此外,在这种示例实施方式中访问键值存储108可以运行为直接的存储器访问,而不需要在基础操作系统级别的资源。For example, during access of the key-value store 108 by the key-value store engine 110, the key-value store engine 110 would simply be required to use a suitable hashing algorithm to find the relevant nodes related to a particular transaction request. Then, depending on the underlying nature of the transaction request in question, the key-value store engine 110 would simply be required to overlap, add, or remove corresponding nodes. When the key-value store 108 is implemented using main memory, as shown in the example of FIG. 2 , then, for example, the available memory space for implementing the key-value store 108 may be pre-allocated using a memory pool. Furthermore, accessing the key-value store 108 in such an example implementation may operate as a direct memory access without requiring resources at the underlying operating system level.

此外,在键值存储108的背景下,可以在使用图5的数据结构时实现许多不同的变化和优化。例如,如上面参考的,结果计算器106可以被配置为使用被考虑可能由输入的事务请求频繁地访问的预先计算的结果来填充键值存储108。然而,尽管如此,可能发生的是,键值存储108的至少一些数据不被很频繁地访问。因此,为了节省键值存储108的数据要求,图5的数据结构的不被共同地或频繁地访问的这种B树节点可以重定位用于使用关系数据存储114和/或底层数据库102的存储。在更特定示例中,键值存储引擎110可以监督图5的B树的每个节点的命中率,并且,随时间,可以确定哪个这种节点被相对地和频繁地利用。然后,这种节点可以运动到关系数据存储114,也许连同同步器119的同步化操作一起。然后,如描述的,可以使用事务记录118记录对关系数据存储114的这种更新,并且最终反映在数据库102之内。Furthermore, in the context of key-value store 108, many different variations and optimizations can be implemented when using the data structure of FIG. 5 . For example, as referenced above, result calculator 106 may be configured to populate key-value store 108 with pre-computed results that are considered likely to be frequently accessed by incoming transaction requests. However, despite this, it may happen that at least some data of the key-value store 108 is not accessed very frequently. Therefore, in order to save the data requirements of the key-value store 108, such B-tree nodes of the data structure of FIG. . In a more particular example, key-value store engine 110 may monitor the hit rate of each node of the B-tree of FIG. 5 and, over time, may determine which such node is relatively and frequently utilized. Such nodes can then be moved to relational data store 114 , perhaps along with a synchronization operation by synchronizer 119 . Such updates to relational data store 114 may then be recorded using transaction records 118 and ultimately reflected within database 102, as described.

图6是示出图1和图2的系统的更详细示例操作的流程图600。在图6的示例中,事务请求可以被接受(602)。例如,如描述的,请求处理器116可以从应用104接收事务请求,用于基于分类标准117将其分类为简单或复杂事务请求(604)。然而,在额外的或可替换示例实施方式中,请求处理器116,或它的功能可以实现在键值存储引擎110之内或通过键值存储引擎110实现。例如,可能发生的是,全部事务请求初始地路由到键值存储引擎110,其然后可以确定这种事务请求是否可以使用键值存储108被满足。如果否,则事务请求可以被路由到关系存储引擎114。FIG. 6 is a flowchart 600 illustrating a more detailed example operation of the systems of FIGS. 1 and 2 . In the example of FIG. 6, a transaction request may be accepted (602). For example, request processor 116 may receive a transaction request from application 104 for classifying it as a simple or complex transaction request based on classification criteria 117 (604), as described. However, in additional or alternative example implementations, the request handler 116 , or its functionality, may be implemented within or by the key-value store engine 110 . For example, it may happen that all transactional requests are initially routed to key-value store engine 110 , which may then determine whether such transactional requests can be satisfied using key-value store 108 . If not, the transaction request can be routed to relational storage engine 114 .

然而,在图6的示例中一旦发生接受的事务请求的分类(604),则被确定分类为简单事务请求的事务请求还可以被分类为查询或写入事务(606)。如果事务请求是查询操作,则可以通过键值存储引擎110使用键值存储108来运行底层事务(608)。However, once classification of accepted transaction requests occurs (604) in the example of FIG. 6, transaction requests determined to be classified as simple transaction requests may also be classified as query or write transactions (606). If the transaction request is a query operation, the underlying transaction may be run by the key-value store engine 110 using the key-value store 108 (608).

通过特定示例,这种事务请求可以请求表示某一类型的项的全部实例的输出的读操作。然后,事务运行可以涉及简单地访问键值存储108以从中检索实例。另外,如上面参考的,键值存储引擎110可以检查键值Δ120,以便确定对该键值Δ120的任何先前的更新是否需要反映在为当前事务请求计算的结果之内。By way of specific example, such a transaction request may request a read operation representing an output of all instances of an item of a certain type. Transactional execution may then involve simply accessing the key-value store 108 to retrieve an instance from it. Additionally, as referenced above, the key value store engine 110 may examine the key value Δ 120 to determine whether any previous updates to the key value Δ 120 need to be reflected in the results calculated for the current transaction request.

例如,可能发生的是,在通过键值存储引擎110使用键值存储108运行先前的事务期间,特定项类型的额外的实例被创建或插入。因此,键值存储引擎110将更新事务请求结果以包括来自键值Δ120的额外的实例。更一般地,然后,可以了解的是,键值存储引擎110可以初始地运行使用键值存储108可以满足的任何这种查询操作,并且可以此后基于键值Δ120的内容来更新这种结果。For example, it may happen that, during a previous transaction run by key-value store engine 110 using key-value store 108 , additional instances of a particular item type were created or inserted. Therefore, the key-value store engine 110 will update the transaction request result to include the additional instance from the key-value Δ120. More generally, then, it will be appreciated that the key-value store engine 110 can initially run any such query operations that can be satisfied using the key-value store 108 , and can thereafter update such results based on the contents of the key value Δ120 .

在一些情况下,可能发生的是可以不使用键值存储108运行请求的事务。例如,可能发生的是不存在包含在图5的数据结构之内的相应的键和相关值。例如,如描述的,可能发生的是,所需的数据值先前移动到了关系存储114,或从未通过结果计算器106包括在键值存储108之内。在此情况下,如此处描述的,失败事务请求可以转送到关系存储引擎112从而用于运行(例如,如下面参照操作618描述的)。然而,如果事务已经成功地运行(608),则例如,可以向应用104和/或用户202返回相应的结果(610)。In some cases, it may happen that the requested transaction may be executed without using the key-value store 108 . For example, it may happen that there is no corresponding key and associated value contained within the data structure of FIG. 5 . For example, as described, it may happen that the required data values were previously moved to the relational store 114 , or were never included in the key-value store 108 by the result calculator 106 . In this case, the failed transaction request may be forwarded to the relational storage engine 112 for execution as described herein (eg, as described below with reference to operation 618). However, if the transaction has been successfully run (608), a corresponding result can be returned to the application 104 and/or user 202 (610), for example.

同时,如果确定原始的事务请求是写操作(606),则可以通过键值存储引擎110使用键值存储108尝试再次运行底层事务(612)。如上参照操作608描述的,这种事务运行可以包括连同键值Δ120的考虑一起的键值存储108的商询,以便由此获得当前、精确的结果。此外,如还参照操作608描述的,不能通过键值存储引擎110运行事务可能导致向关系存储引擎112转送事务请求,由此用于运行(例如,在操作618的背景下,如下面描述的)。Meanwhile, if it is determined that the original transaction request was a write operation (606), the key-value store 108 may be used by the key-value store engine 110 to attempt to run the underlying transaction again (612). As described above with reference to operation 608, such a transactional run may include a query of the key-value store 108 along with consideration of the key-value Δ 120 to thereby obtain current, accurate results. Furthermore, as also described with reference to operation 608, the inability to run a transaction through the key-value store engine 110 may result in forwarding the transaction request to the relational store engine 112 for execution (e.g., in the context of operation 618, as described below) .

在键值存储引擎110相对于键值存储108的内容来运行写操作的这种示例中,可以了解的是,这种事务将导致键值存储108的内容的改变,和/或对从其确定键值存储108的内容的底层数据的改变。因此,如上面参照图1谈到的,键值存储引擎110的无效通知器122可以向关系存储引擎112提供有关数据的在前版本不再有效或不是当前的通知(箭头615),以便保证关系存储引擎112不尝试使用这种使过时或无效数据来处理事务请求。In such an example where the key-value store engine 110 is performing a write operation with respect to the contents of the key-value store 108, it can be appreciated that such a transaction will result in a change to the contents of the key-value store 108, and/or affect the A change in the underlying data of the contents of the key-value store 108 . Thus, as discussed above with reference to FIG. 1 , invalidation notifier 122 of key-value storage engine 110 may provide notification (arrow 615) to relational storage engine 112 that a previous version of the data is no longer valid or current (arrow 615) in order to guarantee relational Storage engine 112 does not attempt to use such obsolete or invalid data to process transaction requests.

如谈到的,在某些示例实施方式中,无效通知器122可以向关系存储引擎112简单地通知数据无效,而不需要对关系Δ124的内容的相应的立即更新。例如,在已经更新了特定数据记录的内容的情况中,无效通知器122可以向关系Δ124简单地通知不应该使用相应的数据记录直到将来的同步过程已经被运行。只要关系存储引擎112不需要所讨论的该数据记录来满足事务请求,就可以累积这种无效通知。然后,在一定量时间之后,或在特定数目的无效通知和/或事务请求之后,可以通过使用同步器119更新关系Δ124以反映由无效通知器122指示的实际内容改变。As mentioned, in certain example implementations, the invalidation notifier 122 may simply notify the relational storage engine 112 that the data is invalid without requiring a corresponding immediate update to the contents of the relation Δ124. For example, where the content of a particular data record has been updated, the invalidation notifier 122 may simply notify the relation Δ 124 that the corresponding data record should not be used until a future synchronization process has been run. Such invalidation notifications may accumulate as long as the relational storage engine 112 does not require the data record in question to satisfy the transaction request. Then, after a certain amount of time, or after a certain number of invalidation notifications and/or transaction requests, the relation Δ124 may be updated to reflect the actual content change indicated by the invalidation notifier 122 by using the synchronizer 119 .

在额外的或可替换实施方式中,关系存储引擎112可以仅使用从无效通知器122接收到的无效通知的相关子集来执行关系Δ124的更新。例如,关系存储引擎112可以接收需要由无效通知器122指定为无效的数据的事务请求,并且可以此后要求对于需要对所讨论的该事务请求提供当前的、精确的结果的至少那些数据项立即更新关系Δ124。In additional or alternative implementations, relational storage engine 112 may perform updates of relation Δ 124 using only a relevant subset of invalidation notifications received from invalidation notifier 122 . For example, relational storage engine 112 may receive a transaction request that requires data designated as invalid by invalidity notifier 122, and may thereafter require immediate updates for at least those data items that need to provide current, accurate results for the transaction request in question. Relationship Δ124.

此外,在基于从无效通知器122接收到的通知来更新关系数据124中,关系存储引擎112的操作可以基于其他因素变化。例如,这种更新过程可以基于接收到的无效通知的类型而变化。例如,在无效通知指示从键值存储108删除特定数据记录的情况中,关系存储引擎112可以简单地需要将相关数据记录关联为在关系Δ124之内不可用,并且可以根本不需要从关系Δ124实际上删除有关的数据记录,直到诸如由同步器119执行了键值存储108和关系数据存储114的完全同步的时候。另一方面,在新的数据被创建、插入、或添加到键值Δ120的示例中,可能因此必须使用描述的一个或多个技术来更新关系Δ124,以便向关联的事务请求提供快速、精确的结果。Additionally, in updating relational data 124 based on notifications received from invalidation notifier 122, operation of relational storage engine 112 may vary based on other factors. For example, such update procedures may vary based on the type of invalidation notification received. For example, where an invalidation notification indicates deletion of a particular data record from key-value store 108, relational storage engine 112 may simply need to associate the related data record as unavailable within relation Δ124, and may not need to actually retrieve data from relation Δ124 at all. Related data records are deleted until a full synchronization of key-value store 108 and relational data store 114 is performed, such as by synchronizer 119 . On the other hand, in instances where new data is created, inserted, or added to key value Δ120, it may therefore be necessary to update relation Δ124 using one or more of the techniques described in order to provide fast, accurate result.

连同向关系存储引擎通知由当前写入请求的事务运行引起的数据无效(614),键值存储引擎110还可以更新键值Δ120自身。例如,如可以了解的,在从键值存储108删除数据的情况中,可以运行对键值Δ120的相应更新(616)。例如,被影响的数据记录的镜像可以包括在键值Δ120之内,并且或者标记为已删除/无效,或被改变以反映包括在运行的事务之内的底层写操作。Along with notifying the relational storage engine of the data invalidation caused by the transactional execution of the current write request (614), the key-value storage engine 110 may also update the key value Δ120 itself. For example, as can be appreciated, where data is deleted from key-value store 108, a corresponding update to key value Δ 120 can be performed (616). For example, a mirror image of the affected data record may be included within the key Δ 120 and either marked as deleted/invalid, or changed to reflect the underlying write operations involved in the running transaction.

因此,连同键值Δ120(616)的更新,可以返回事务结果(610)。如所示,此后可以继续接受请求(602),以使得分类为简单(604)的后续的事务请求可以继续以刚才描述的方式被处理,包括利用对于已经在先前运行的事务的上下文中做出的键值Δ120的任何更新。Therefore, along with the update of the key value Δ120 (616), a transaction result (610) may be returned. As shown, requests can continue to be accepted thereafter (602), so that subsequent transactional requests classified as simple (604) can continue to be processed in the manner just described, including using Any update of the key value Δ120.

同时,由请求处理器116分类为复杂(604)的事务请求可以转送到关系存储引擎112,因此事务可以被运行(618)。在运行事务中,可以了解的是,关系存储引擎112被配置为将关系Δ124连同关系数据存储114一起利用,以便保证运行的事务的结果是当前的和精确的(具体地,如上所述,关系Δ124将至少反映处理当前事务请求所需的相关数据的无效的指示,如上面参照箭头615谈到和示出的)。在任何情况下,如描述的,通过保证至少处理事务请求所需的关系Δ124的需要的部分是当前的,并且连同从关系数据存储114中获得的相关数据一起考虑,关系存储引擎112可以保证连同运行事务一起提供快速和精确的结果。Meanwhile, transactional requests classified as complex (604) by request processor 116 may be forwarded to relational storage engine 112 so the transaction may be executed (618). In running a transaction, it will be appreciated that the relational store engine 112 is configured to utilize the relational delta 124 in conjunction with the relational data store 114 in order to ensure that the results of the running transaction are current and accurate (specifically, relation Δ 124 will reflect at least an indication of the invalidity of relevant data required to process the current transaction request, as discussed and shown above with reference to arrow 615 ). In any case, as described, by ensuring that at least the required portion of relation Δ 124 required to process a transaction request is current and considered together with relevant data obtained from relational data store 114, relational storage engine 112 can ensure that the Running transactions together provides fast and precise results.

通过在关系存储引擎112中接收到的事务请求的分类的特性,非常可能的是关联的事务的运行(618)将导致对关系数据存储114的更新或其他改变是否是不必须的。因此,类似于无效通知器122的无效通知器126可以进行到向键值存储引擎110通知受运行的事务的影响的数据的无效(620)。具体地,如通过箭头621示出的,无效通知器126可以向键值Δ120发出无效通知。如上参照无效通知器122描述的,这种通知可以仅提供足够信息以防止键值存储引擎110错误地使用过时数据。此后,可以运行键值Δ120和键值存储108的局部或完全的同步,以便还保证通过键值存储引擎返回的任何后续的结果(例如,在操作中610)是当前和精确的。By the nature of the classification of transactional requests received in relational storage engine 112 , it is highly likely that execution of the associated transaction ( 618 ) would result in updates or other changes to relational data store 114 being unnecessary. Accordingly, invalidation notifier 126 , similar to invalidation notifier 122 , may proceed to notify key-value store engine 110 of the invalidation of data affected by the running transaction ( 620 ). Specifically, as shown by arrow 621 , the invalidation notifier 126 may issue an invalidation notification to the key value Δ120 . As described above with reference to the invalidation notifier 122, such a notification may only provide enough information to prevent the key-value store engine 110 from erroneously using stale data. Thereafter, a partial or full synchronization of key-value delta 120 and key-value store 108 may be performed to also ensure that any subsequent results returned by the key-value store engine (eg, in operation 610 ) are current and accurate.

如通过键值存储108的特性可以了解的,对键值Δ120的这种更新(616)可以最终依赖于结果计算器106的操作以向键值存储引擎110提供将要用于处理事务请求的当前、精确的数据。例如,如描述的,结果计算器106可以填充键值存储108,包括基于数据库102和/或关系数据存储114的底层数据运行某些计算。当这种底层数据改变时,例如,作为在处理事务请求中的关系存储引擎112的操作的结果,则基于这种变更的数据的计算必须也被更新以便提供当前的、精确的结果。这种更新可以作为一个或多个同步过程的一部分运行,如此处描述的,具体地,下面参照图7详细描述在更新键值Δ120中的结果计算器106的操作。As can be appreciated by the nature of the key-value store 108, this update (616) to the key value Δ 120 may ultimately rely on the operation of the result calculator 106 to provide the key-value store engine 110 with the current, precise data. For example, result calculator 106 may populate key-value store 108 , including running certain calculations based on underlying data from database 102 and/or relational data store 114 , as described. When such underlying data changes, eg, as a result of relational storage engine 112 operations in processing transactional requests, then calculations based on such changed data must also be updated in order to provide current, accurate results. Such updates may be run as part of one or more synchronization processes, as described herein, and in particular, the operation of result calculator 106 in updating key Δ 120 is described in detail below with reference to FIG. 7 .

然后,连同向键值存储引擎110通知有关数据无效(620),关系存储引擎112可以进行到更新关系Δ124(622)。然后,事务结果可以返回到应用104/用户102(624),并且此后请求可以继续被接受(602)。Then, along with notifying the key-value store engine 110 that the data is invalid (620), the relational store engine 112 may proceed to update the relation Δ124 (622). Transaction results may then be returned to the application 104/user 102 (624), and requests may continue to be accepted thereafter (602).

因此,流程图600的操作602-624示出图1的系统100可以以非常快速和有效的方式接收并处理大量的并行地接收到的事务请求,同时保证完成的高水平和精确度。随时间,在这种操作期间,可以理解的是,键值120和关系Δ124的内容可以增长并累积到不期望的数据量水平。例如,数据无效的通知可以在键值Δ120和/或关系Δ124之一或两者之内累积。更一般地,键值Δ120和/或关系Δ124的总大小可以增长到不期望的大。在此情况下,以上描述的保持并使用键值Δ120和关系Δ124的益处可能部分地或完全抵消,因为需要保持和使用键值Δ120和关系Δ124的计算资源可能最终胜过以上描述的益处。Thus, operations 602-624 of flowchart 600 illustrate that system 100 of FIG. 1 can receive and process a large number of transaction requests received in parallel in a very fast and efficient manner while maintaining a high level and accuracy of completion. Over time, during such operations, it will be appreciated that the content of key values 120 and relationships Δ 124 may grow and accumulate to undesired data volume levels. For example, notifications of data invalidation may accumulate within one or both of the key Δ 120 and/or the relationship Δ 124 . More generally, the total size of key values Δ 120 and/or relationships Δ 124 can grow to be undesirably large. In this case, the above-described benefits of maintaining and using keys Δ120 and relationships Δ124 may be partially or completely offset, as the computational resources required to maintain and use keys Δ120 and relationships Δ124 may ultimately outweigh the benefits described above.

因此,必须或期望的可能是执行一个或多个同步过程(626)。关于这一点,可以了解的是,存在上面谈到的至少三个不同类型的同步过程,其可以以不同的时间比例和/或响应于不同的触发事件而实现。Accordingly, it may be necessary or desirable to perform one or more synchronization processes (626). In this regard, it can be appreciated that there are at least three different types of synchronization processes mentioned above, which can be implemented at different time scales and/or in response to different triggering events.

例如,可以执行的一类同步包括更新键值Δ120和关系Δ124之一或两者,以便更新作为来自无效通知器122、126的早前接收的无效通知的结果、已经被指定为无效的包含在键值Δ120和关系Δ124中的数据。如描述的,这种同步可能相对频繁地发生,并且可以随着当前或预测的事务请求所需的标记为无效的仅那些部分数据的同步而发生。For example, one type of synchronization that may be performed includes updating one or both of the key value Δ 120 and the relation Δ 124 to update the data contained in the Data in key value Δ120 and relation Δ124. As described, such synchronization may occur relatively frequently, and may occur with the synchronization of only those portions of data that are marked as invalid as required by current or predicted transactions.

第二类型同步是指键值Δ120和关系Δ124与键值存储108和关系数据存储114的同步。在这种同步期间,对数据做出并且反映在键值Δ120和关系Δ124之一或两者之内的全部改变可以通过键值存储108和关系数据存储114的相应修改反映。因此,在完成这种同步过程时,键值存储108和关系数据存储114的内容将至少临时彼此一致,并且键值Δ120和关系Δ124可以至少自身被临时清空。The second type of synchronization refers to the synchronization of key value Δ 120 and relation Δ 124 with key value store 108 and relational data store 114 . During such synchronization, all changes made to the data and reflected in either or both of key value Δ 120 and relation Δ 124 may be reflected by corresponding modifications of key value store 108 and relational data store 114 . Thus, upon completion of such a synchronization process, the contents of key-value store 108 and relational data store 114 will be at least temporarily consistent with each other, and key-value Δ 120 and relation Δ 124 may themselves be at least temporarily emptied.

对于第三类型同步,还如上面谈到的,通过关系存储引擎112运行的全部事务可以反映在事务记录118中。因此,在第三类型同步过程期间,数据库102可以更新以反映全部这种跟踪的事务和关联数据。因此,事务记录118也可以被临时清空,直到接收到新事务。在一些实施例中,在确定是否和如何计算某些结果以用于包括在键值存储108之内中,事务记录118的内容可以为了通过结果计算器106的长期使用而保持。For the third type of synchronization, also as discussed above, all transactions run by the relational storage engine 112 may be reflected in the transaction record 118 . Thus, during the third type of synchronization process, database 102 may be updated to reflect all such tracked transactions and associated data. Therefore, transaction log 118 may also be temporarily emptied until a new transaction is received. In some embodiments, the contents of the transaction record 118 may be maintained for long-term use by the result calculator 106 in determining whether and how to calculate certain results for inclusion within the key-value store 108 .

如可以了解的,同步器119可以被配置为便利连同键值存储引擎110和/或关系存储引擎112的这种同步。通常,同步器119的操作可以分类为前向同步或反向同步。例如,前向同步可以指的是由通过键值存储引擎110处理的事务引起的同步,其将反映在键值Δ124中,并且此后传播到关系Δ124,并且因此传播到关系数据存储114以及此后,传播到事务记录118。As can be appreciated, synchronizer 119 may be configured to facilitate such synchronization along with key-value store engine 110 and/or relational store engine 112 . In general, the operation of synchronizer 119 can be classified as forward synchronization or reverse synchronization. For example, forward synchronization may refer to synchronization caused by transactions processed by the key-value store engine 110, which will be reflected in the key value Δ 124, and thereafter propagated to the relation Δ 124, and thus to the relational data store 114 and thereafter, Propagate to transaction record 118.

相反,反向同步可以理解为指的是作为由关系存储引擎112运行的事务的结果的、通过同步器119运行的同步。即,如上面谈到并且下面参照图7详细描述的,在关系存储引擎112中接收到由此用于运行的事务请求将通常需要对键值Δ120的更新,其可能需要完全或部分地由结果计算器106处理以便以当前的、最新的方式来更新键值Δ120,以及最终键值存储108。In contrast, reverse synchronization may be understood to refer to a synchronization run by synchronizer 119 as a result of a transaction run by relational storage engine 112 . That is, as discussed above and described in detail below with reference to FIG. 7 , receipt of a transaction request in the relational storage engine 112 for execution thereby will generally require an update to the key value Δ 120 , which may need to be calculated in whole or in part from the result Processor 106 to update key value Δ 120, and ultimately key value store 108, in a current, up-to-date manner.

通常,可以了解的是,第一类型同步(即,基于在Δ120,124中接收到的无效通知的同步)可能最频繁地和最容易地发生。同时,第二类型同步(即,与关联的清空Δ120、124的内容一起,使用相应的键值Δ120和关系Δ124更新键值存储108和关系数据存储114)可能相对更少频繁地发生。最终,在示例实施方式中,第三同步过程(即,使用事务记录118更新数据库102)需要更不频繁地发生。In general, it can be appreciated that the first type of synchronization (ie, synchronization based on invalidation notifications received in Δ120, 124) is likely to occur most frequently and most easily. Meanwhile, a second type of synchronization (ie, updating key-value store 108 and relational data store 114 with corresponding key-value Δ120 and relationship Δ124 along with associated clearing of the contents of Δ120, 124) may occur relatively less frequently. Finally, in the example implementation, the third synchronization process (ie, updating database 102 with transaction records 118 ) needs to occur less frequently.

图7是示出反向同步过程的示例操作的流程图700,与图6的箭头621大体地关联。在图7的示例中,假定已经由关系存储引擎112运行复杂事务,并且已经与其结合地更新关系Δ124。同时,如上面参照图6(例如,参照操作620)谈到的,无效通知器126可以向键值存储引擎110通知这种数据无效(702)。FIG. 7 is a flowchart 700 illustrating example operation of a reverse synchronization process, generally associated with arrow 621 of FIG. 6 . In the example of FIG. 7 , it is assumed that a complex transaction has been run by the relational storage engine 112 and the relation Δ 124 has been updated in conjunction therewith. Concurrently, the invalidation notifier 126 may notify the key-value store engine 110 of such data invalidation (702), as discussed above with reference to FIG. 6 (eg, with reference to operation 620).

还如上面参照图6描述的,可以因此利用相应的新数据值更新键值Δ120(704),例如或者立即连同接收到的数据无效的通知、或在关联的同步过程期间。于是,结果计算器106可以被配置为重新运行先前执行的操作和关联的计算以向键值存储108提供预先计算的结果,但是使用键值Δ120的当前的、更新的值(706)。As also described above with reference to FIG. 6 , key value Δ 120 may thus be updated ( 704 ) with the corresponding new data value, for example either immediately with a received notification that the data is invalid, or during an associated synchronization process. Result calculator 106 may then be configured to re-run previously performed operations and associated calculations to provide pre-computed results to key-value store 108 , but using the current, updated value of key Δ 120 ( 706 ).

因此,结果计算器106的相应输出也可以存储在键值Δ120之内(708)。然后,在由键值存储引擎110运行的后续的事务期间,键值Δ120将提供完整的和当前的数据,需要保证利用键值存储108的事务提供当前的、精确的事务结果。Accordingly, the corresponding output of result calculator 106 may also be stored within key Δ 120 (708). Then, during subsequent transactions run by key-value store engine 110, key-value delta 120 will provide the complete and current data needed to ensure that transactions utilizing key-value store 108 provide current, accurate transaction results.

图8是示出图1和图2的系统的详细示例实施方式的框图。在图8的示例中,多个计算设备802-810单独地用于不同的角色,以便实现和优化上面参照图1-图7描述的各种特征和功能。FIG. 8 is a block diagram illustrating a detailed example implementation of the system of FIGS. 1 and 2 . In the example of FIG. 8, multiple computing devices 802-810 are used individually for different roles in order to implement and optimize the various features and functions described above with reference to FIGS. 1-7.

具体地,如示出的,可以利用负载平衡器802以实现请求处理器116、同步器119和/或结果计算器106。同时,计算设备804、806、808提供键值存储部件108、110的单个、并行实现。最终在图8中,分离的计算设备810示出为实现相关存储器部件112、114。在图8的构造的示例实施方式中,例如,可以使用SAP HANA数据库系统实现关系存储引擎810,同时可以使用基于Java的应用服务器实现各种键值存储引擎804、806、808。Specifically, as shown, a load balancer 802 may be utilized to implement the request processor 116, the synchronizer 119, and/or the result calculator 106. At the same time, computing devices 804 , 806 , 808 provide a single, parallel implementation of key-value store components 108 , 110 . Finally in FIG. 8 , a separate computing device 810 is shown implementing the associated memory components 112 , 114 . In an example implementation of the construct of FIG. 8, for example, the relational storage engine 810 may be implemented using the SAP HANA database system, while the various key-value storage engines 804, 806, 808 may be implemented using a Java-based application server.

在示例实施方式中,可以平衡描述的系统和技术以保证事务隔离,其中需要一起完成许多数据改变,或者,如果这种完成不可能,则将一起失败。然而,在此处描述的实施方式中,可能发生在一些场景中的是,这种一组数据改变的子集可以成功地完成并在完成剩余的数据改变之前返回相应的结果。例如,可能发生的是返回部分结果然后同步过程不能成功地完成,以使得系统不能精确地提供全部请求的结果。In example embodiments, the described systems and techniques may be balanced to guarantee transactional isolation where many data changes need to be done together, or, if such doing is not possible, will fail together. However, in the embodiments described herein, it may occur in some scenarios that a subset of such a set of data changes may complete successfully and return corresponding results before the remaining data changes are completed. For example, it may happen that partial results are returned and then the synchronization process cannot be completed successfully, so that the system cannot provide exactly all requested results.

为了降低或消除相关的不期望的结果,可以在单个存储位置(例如,图8的804或810)之内保持事务隔离。然后,相关的存储引擎可以在提供结果的全部事务组之前等待(或,在一个或多个改变请求失败的情况下,在提供相应的错误消息之前)。To reduce or eliminate related undesired consequences, transactional isolation can be maintained within a single storage location (eg, 804 or 810 of FIG. 8). The relevant storage engine may then wait before providing the full transaction group with results (or, in the case of one or more change requests failing, before providing a corresponding error message).

另外,或替代地,响应于上面谈到的同步错误的类型,可以重新尝试同步过程(以便保持数据一致性)。在最终同步失败的不期望的事件中,则可以通知请求的应用以使得它可以实现任何应用专用的校正措施。Additionally, or alternatively, the synchronization process may be retried (in order to maintain data consistency) in response to the types of synchronization errors discussed above. In the unexpected event of eventual synchronization failure, the requesting application can then be notified so that it can implement any application-specific corrective measures.

因此,诸如图8的示例的实施方式,以及图1和图2的系统的各种其他实施例可以提供高速事务处理,即使对于很大数据量,和/或在存在大量的并行事务请求的情况下。通过实现键值存储引擎110和键值存储108以及数据库层,而不是应用层,如图1的示例中示出的,可以避免数据库层中的潜在的瓶颈。Accordingly, implementations such as the example of FIG. 8, as well as various other embodiments of the systems of FIGS. Down. By implementing key-value store engine 110 and key-value store 108 as well as the database layer, rather than the application layer, as shown in the example of FIG. 1 , potential bottlenecks in the database layer can be avoided.

此外,如通过图8的示例示出的,图1和图2的系统可以容易地缩放,由此利用并行运行的大量的计算设备,以使得再次,可以立即处理很大量的数据。此外,例如,如与尝试依赖于大量计算资源以求获得类似结果的解决方案比较,与获得这种高水平性能关联的费用可以显著地降低。Furthermore, as shown by the example of Figure 8, the systems of Figures 1 and 2 can be easily scaled, thereby utilizing a large number of computing devices running in parallel, so that again, very large amounts of data can be processed at once. Furthermore, the costs associated with achieving such high levels of performance can be significantly reduced, for example, as compared to trying solutions that rely on massive computing resources to achieve similar results.

可以在数字的电子线路中实现此处描述的各种技术的实施方式,或在计算机硬件、固件、软件或它们的组合中实现。实施方式可以被实现为计算机程序产品,即,有形地包括在信息载体(例如,在机器可读存储设备或传播信号)中的计算机程序,用于通过数据处理装置运行,或控制,例如,可编程处理器、计算机、或多个计算机的数据处理装置的操作。诸如上面描述的计算机程序的计算机程序可以以任何形式的编程语言编写,包括编译或解释语言,并且它可以以任何形式布置,包括作为独立程序或作为模块、组件、子例程、或适合用在计算环境中的其它单元。可以布置计算机程序以在位于一个地点或分布于多个地点并由通信网络互连的一个计算机或多个计算机上执行。Embodiments of the various techniques described herein may be implemented in digital electronics, or in computer hardware, firmware, software, or a combination thereof. Embodiments can be implemented as a computer program product, i.e. a computer program tangibly embodied in an information carrier (e.g. in a machine-readable storage device or in a propagated signal) for being executed by data processing means, or controlling, e.g. To program the operation of a processor, computer, or data processing device of multiple computers. A computer program such as the one described above can be written in any form of programming language, including compiled or interpreted languages, and it can be arranged in any form, including as a stand-alone program or as a module, component, subroutine, or suitable for use in other units in the computing environment. A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a communication network.

可以通过运行计算机程序的一个或多个可编程处理器执行方法步骤以通过在输入数据上操作并生成输出来执行功能。方法步骤也可以由专用逻辑电路,例如FPGA(现场可编程门阵列)或ASIC(专用集成电路)来执行,并且装置也可以实现为专用逻辑电路。Method steps may be performed by one or more programmable processors executing a computer program to perform functions by operating on input data and generating output. Method steps can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, such as an FPGA (Field Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit).

适合于计算机程序的执行的处理器包括例如通用和专用微处理器二者以及任何种类的数字计算机的任何一个或多个处理器。一般地,处理器将从只读存储器或随机存取存储器或这二者接收指令和数据。计算机的元件可以包括用于执行指令的至少一个处理器和用于存储指令和数据的一个或多个存储器件。一般地,计算机还可以包括一个或多个用于存储数据的大容量存储设备,例如磁盘、磁光盘或光盘,或可操作地耦接到该一个或多个大容量存储设备以从其接收数据或向其传送数据或二者皆有。适合于具体实现计算机程序指令和数据的信息载体包括所有形式的非易失性存储器,例如包括:半导体存储器件,例如EPROM、EEPROM和闪速存储器件;磁盘,例如内部硬盘或活动磁盘;磁光盘;和CD ROM和DVD-ROM盘。处理器和存储器可以由专用逻辑电路补充或并入专用逻辑电路中。Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read only memory or a random access memory or both. Elements of a computer may include at least one processor for executing instructions and one or more memory devices for storing instructions and data. In general, a computer may also include, or be operably coupled to, receive data from, one or more mass storage devices for storing data, such as magnetic, magneto-optical, or optical disks Or send data to it or both. Information carriers suitable for embodying computer program instructions and data include all forms of non-volatile memory, including, for example: semiconductor memory devices, such as EPROM, EEPROM and flash memory devices; magnetic disks, such as internal hard disks or removable disks; magneto-optical disks ; and CD ROM and DVD-ROM disks. The processor and memory can be supplemented by, or incorporated in, special purpose logic circuitry.

为了提供与用户的交互,实施方式可以被实现在具有例如CRT(阴极射线管)或LCD(液晶显示器)监视器之类的用于向用户显示信息的显示设备以及键盘和例如鼠标或跟踪球之类的指示设备的计算机上,通过这些,用户可以提供向计算机的输入。另一种设备也可以用于提供与用户的交互;例如,向用户提供的反馈可以是任何传感反馈的形式,例如,视觉反馈、听觉反馈、或触觉反馈;并且来自用户的输入可以以任何形式被接收,包括声波、语音或触觉的输入。To provide interaction with the user, embodiments may be implemented with a display device, such as a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying information to the user, as well as a keyboard and, for example, a mouse or trackball. on a computer such as a pointing device through which a user can provide input to the computer. Another device can also be used to provide interaction with the user; for example, the feedback provided to the user can be in the form of any sensory feedback, such as visual feedback, auditory feedback, or tactile feedback; and the input from the user can be in any form. Forms are received, including sonic, speech, or tactile input.

实施方式可以被实现在如下的计算系统中:包括后端部件,例如作为数据服务器;或包括中间件部件,例如应用服务器;或包括前端部件,例如具有图形用户界面或网络浏览器的客户端计算机,通过图形用户界面或网络浏览器,用户可以与此说明书描述的主题的实施方式交互;或一个或多个这样的后端、中间件或前端部件的任何组合。部件可以由任何形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”)和例如互联网的广域网(“WAN”)。Embodiments may be implemented in a computing system that includes a back-end component, such as a data server; or a middleware component, such as an application server; or a front-end component, such as a client computer with a graphical user interface or a web browser , through a graphical user interface or web browser, a user may interact with an implementation of the subject matter described in this specification; or any combination of one or more such back-end, middleware or front-end components. Components can be interconnected by any form or medium of digital data communication (eg, a communication network). Examples of communication networks include local area networks ("LANs") and wide area networks ("WANs") such as the Internet.

虽然已经如此处描述的示出描述的实施方式的特定特征,但是本领域技术人员现在将想到许多修改、替换、改变和等效物。因此,将理解所附的权利要求意图覆盖落入实施例范围的所有这种修改和改变。While certain features of the described embodiments have been illustrated as described herein, many modifications, substitutions, changes, and equivalents will now occur to those skilled in the art. It is therefore to be understood that the appended claims are intended to cover all such modifications and changes as fall within the scope of the embodiments.

Claims (20)

1. comprise and be recorded in a system that is on computer readable medium and the instruction that can be run by least one processor, described system comprises:
Request processor, be configured to cause at least one processor described to receive will the transactions requests of affairs of data run in usage data storehouse, and be configured to cause at least one processor described that first transactions requests of this transactions requests is categorized as simple transactions requests, and the second transactions requests of this transactions requests is categorized as complex transaction request.
Key assignments storage engines, that determine before being configured to cause at least one processor described to be used in receive the first transactions requests and run the first affairs of satisfied first transactions requests based on key assignments storages of the precalculated result of data, and be configured to then upgrade if any the key assignments Δ of the change reflecting the key assignments storage caused by the first affairs;
Relational storage engine, be configured to cause at least one processor described to use the relational storage comprising the subset of data to run the second affairs of satisfied second transactions requests, and be configured to the relationship delta then upgrading the change reflecting the relational storage caused by the second affairs if any; And
Synchronizer, is configured to cause at least one processor described to run key assignments based on key assignments Δ and relationship delta and stores and relational storage synchronous.
2. the system as claimed in claim 1, is wherein comprising in wide area information server layer from the described transactions requests of at least one application reception.
3. the system as claimed in claim 1, wherein said request processor is configured to use the precalculated result of key assignments storage, classify based on its criteria for classification being satisfied with the feature of possibility of description the first transactions requests and the second transactions requests.
4. system as claimed in claim 3, comprises result counter, is configured to cause at least one processor described to carry out based on the possibility of the prediction of the transactions requests in the future that will be received by request processor the precalculated result that calculation key stores.
5. system as claimed in claim 4, wherein said synchronizer is configured to cause described result counter based on key assignments Δ and relationship delta is synchronous with this jointly upgrades precalculated result.
6. the system as claimed in claim 1, wherein said key assignments storage engines is configured to determine and the key that the first transactions requests associates, and performs searching of analog value within key assignments stores.
7. the system as claimed in claim 1, wherein said key assignments storage engines comprises Notice Of Nonavailability device, is configured to upgrade relationship delta based on renewal key assignments Δ.
8. system as claimed in claim 7, wherein synchronizer is configured to based on relationship delta and the renewal relational storage of more newly arriving received based on the Notice Of Nonavailability device from key assignments storage engines, and after this empties the content of relationship delta.
9. the system as claimed in claim 1, wherein said relational storage engine comprises Notice Of Nonavailability device, is configured to upgrade key assignments Δ based on more newly arriving of relationship delta.
10. system as claimed in claim 9, wherein said synchronizer is configured to based on key assignments Δ and stores based on the renewal key assignments of more newly arriving that the Notice Of Nonavailability device from relational storage engine receives, and after this empties the content of key assignments Δ.
11. the system as claimed in claim 1, wherein said request processor, key assignments storage engines, relational storage engine and synchronizer realize in the primary memory of system.
12. systems as claimed in claim 11, wherein said relational storage engine be configured to cause at least one update processor described to store transaction journal in the nonvolatile memory and utilize caused by the operation of the first affairs or the second affairs more new database is come to its any change.
13. 1 kinds for running the computer implemented method of the instruction be stored on computer-readable recording medium, described method comprises:
Receive will the transactions requests of affairs of data run in usage data storehouse;
First transactions requests of this transactions requests is categorized as simple transactions requests;
Second transactions requests of this transactions requests is categorized as complex transaction request;
Be used in determine before receiving the first transactions requests and run the first affairs of satisfied first transactions requests based on the key assignments storage of the precalculated result of data;
Use the relational storage comprising the subset of data to run the second affairs of satisfied second transactions requests;
Then upgrade the key assignments Δ reflecting the change that the key assignments caused by the first affairs stores if any;
Then upgrade the relationship delta of the change reflecting the relational storage caused by the second affairs if any; And
Run key assignments based on key assignments Δ and relationship delta to store and relational storage synchronous.
14. methods as claimed in claim 13, wherein upgrade key assignments Δ and comprise and upgrade relationship delta based on this key assignments Δ, and wherein upgrade relationship delta further and comprise and upgrade key assignments Δ based on this relationship delta.
15. methods as claimed in claim 13, wherein saidly synchronously comprise based on key assignments Δ and relationship delta is synchronous with this jointly upgrades precalculated result.
16. 1 kinds of computer-readable recording mediums being visibly embodied in non-provisional comprise the computer program of instruction, and when described instruction is run, described computer program is configured to:
Receive will the transactions requests of affairs of data run in usage data storehouse;
First transactions requests of this transactions requests is categorized as simple transactions requests;
Second transactions requests of this transactions requests is categorized as complex transaction request;
Be used in determine before receiving the first transactions requests and run the first affairs of satisfied first transactions requests based on the key assignments storage of the precalculated result of data;
Use the relational storage comprising the subset of data to run the second affairs of satisfied second transactions requests;
Then upgrade the key assignments Δ reflecting the change that the key assignments caused by the first affairs stores if any;
Then upgrade the relationship delta of the change reflecting the relational storage caused by the second affairs if any; And
Run key assignments based on key assignments Δ and relationship delta to store and relational storage synchronous.
17. computer programs as claimed in claim 16, wherein in renewal key assignments Δ, be configured to when described instruction is run upgrade relationship delta based on this key assignments Δ, and, in renewal relationship delta, be configured to when described instruction is run upgrade key assignments Δ based on this relationship delta.
18. computer programs as claimed in claim 17, wherein saidly synchronously to comprise based on relationship delta and based on the renewal relational storage of more newly arriving received from key assignments storage, and after this empty the content of relationship delta, and further wherein said synchronously comprise based on key assignments Δ and upgrade key assignments based on more newly arriving of receiving from relational storage store, and after this empty the content of key assignments Δ.
19. computer programs as claimed in claim 16, wherein saidly synchronously comprise based on key assignments Δ and relationship delta is synchronous with this jointly upgrades precalculated result.
20. computer programs as claimed in claim 16, are wherein comprising in wide area information server layer from the described transactions requests of at least one application reception.
CN201310250265.2A 2013-06-21 2013-06-21 Concurrent request processing for db transaction Active CN104239357B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201310250265.2A CN104239357B (en) 2013-06-21 2013-06-21 Concurrent request processing for db transaction
US13/929,478 US9430544B2 (en) 2013-06-21 2013-06-27 Concurrent request handling for database transactions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310250265.2A CN104239357B (en) 2013-06-21 2013-06-21 Concurrent request processing for db transaction

Publications (2)

Publication Number Publication Date
CN104239357A true CN104239357A (en) 2014-12-24
CN104239357B CN104239357B (en) 2019-01-18

Family

ID=52111786

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310250265.2A Active CN104239357B (en) 2013-06-21 2013-06-21 Concurrent request processing for db transaction

Country Status (2)

Country Link
US (1) US9430544B2 (en)
CN (1) CN104239357B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603610A (en) * 2015-10-19 2017-04-26 阿里巴巴集团控股有限公司 Data acquisition method and apparatus
CN107402981A (en) * 2017-07-07 2017-11-28 国网浙江省电力公司信息通信分公司 A kind of data increment processing method and system based on distributed offline database
CN107710203A (en) * 2015-06-29 2018-02-16 微软技术许可有限责任公司 Transaction database layer on distributed key/value thesaurus
CN110515707A (en) * 2019-08-22 2019-11-29 上海交通大学 Deterministic concurrency control method and system based on pre-transaction processing
CN111259004A (en) * 2020-01-08 2020-06-09 腾讯科技(深圳)有限公司 Method for indexing data in storage engine and related device
CN112035471A (en) * 2020-08-28 2020-12-04 中国平安人寿保险股份有限公司 Transaction processing method and computer equipment
CN112559496A (en) * 2020-12-24 2021-03-26 百果园技术(新加坡)有限公司 Distributed database transaction atomicity realization method and device
CN113312415A (en) * 2020-02-27 2021-08-27 Sap欧洲公司 Near memory acceleration for database operations

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3161685B1 (en) * 2014-06-24 2022-06-08 Google LLC Processing mutations for a remote database
US9971526B1 (en) * 2015-06-29 2018-05-15 Amazon Technologies, Inc. Volume-based key-value store
US10083203B2 (en) 2015-08-11 2018-09-25 International Business Machines Corporation Reducing the cost of update, delete, and append-only insert operations in a database
US10445308B2 (en) * 2016-05-31 2019-10-15 Vmware, Inc. Commit coalescing for micro-journal based transaction logging
US10528436B2 (en) * 2016-05-31 2020-01-07 Vmware, Inc. Micro-journal based transaction logging
US11120002B2 (en) * 2016-07-20 2021-09-14 Verizon Media Inc. Method and system for concurrent database operation
US10705926B2 (en) * 2016-07-29 2020-07-07 Rubrik, Inc. Data protection and recovery across relational and non-relational databases
US10637964B2 (en) 2016-11-23 2020-04-28 Sap Se Mutual reinforcement of edge devices with dynamic triggering conditions
US10606820B2 (en) * 2017-05-12 2020-03-31 International Business Machines Corporation Synchronizing data values by requesting updates
US10614054B2 (en) * 2017-05-12 2020-04-07 International Business Machines Corporation Synchronizing data values by sending updates
US11593824B2 (en) * 2017-08-09 2023-02-28 Verisign, Inc. System and method for domain name valuation
US10885017B2 (en) * 2017-10-05 2021-01-05 Zadara Storage, Inc. Multiple transactions in a single KV store
US10841020B2 (en) 2018-01-31 2020-11-17 Sap Se Online self-correction on multiple data streams in sensor networks
CN109472681B (en) * 2018-11-22 2022-03-04 泰康保险集团股份有限公司 Enterprise batch payment method and device
EP3559891B1 (en) * 2018-11-27 2021-11-17 Advanced New Technologies Co., Ltd. Executing multi-party transactions using smart contracts
US10873504B1 (en) * 2019-07-17 2020-12-22 Hewlett Packard Enterprise Development Lp Managing concurrently received configuration requests in a computing network
US11429628B2 (en) * 2019-09-20 2022-08-30 Samsung Electronics Co., Ltd. Transaction grouping for overwrite merge
CN111144926B (en) * 2019-11-27 2023-07-18 泰康保险集团股份有限公司 Service request processing method, device, system, electronic equipment and readable medium
US11327962B1 (en) * 2020-01-23 2022-05-10 Rockset, Inc. Real-time analytical database system for querying data of transactional systems
US11645424B2 (en) * 2020-04-27 2023-05-09 International Business Machines Corporation Integrity verification in cloud key-value stores
JP7481244B2 (en) * 2020-12-02 2024-05-10 株式会社日立製作所 Data synchronization system, data synchronization device and data synchronization method
CN113806381B (en) * 2021-03-29 2025-05-16 北京京东拓先科技有限公司 Information processing method, device, equipment and storage medium
CN114064664A (en) * 2022-01-17 2022-02-18 北京奥星贝斯科技有限公司 Method and device for inquiring transaction modification content in database

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6862593B2 (en) * 2002-05-17 2005-03-01 Sun Microsystems, Inc. Separation of database transactions
CN101405735A (en) * 2006-03-17 2009-04-08 微软公司 Concurrency control within an enterprise resource planning system

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5261069A (en) 1990-08-13 1993-11-09 Hewlett-Packard Company Method of maintaining consistency of cached data in a database system
US6363387B1 (en) 1998-10-20 2002-03-26 Sybase, Inc. Database system providing methodology for enhancing concurrency using row update bit and deferred locking
US6609126B1 (en) * 2000-11-15 2003-08-19 Appfluent Technology, Inc. System and method for routing database requests to a database and a cache
US6718349B2 (en) 2000-12-14 2004-04-06 Borland Software Corporation Intelligent, optimistic concurrency database access scheme
US7164676B1 (en) * 2001-03-21 2007-01-16 Cisco Technology, Inc. Method and apparatus for a combined bulk and transactional database synchronous scheme
US7293028B2 (en) 2001-06-08 2007-11-06 Sap Ag Cache-conscious concurrency control scheme for database systems
CA2384259A1 (en) 2002-04-29 2003-10-29 Ibm Canada Limited-Ibm Canada Limitee Access concurrency for cached authorization information in relational database systems
US7120651B2 (en) 2003-08-01 2006-10-10 Oracle International Corporation Maintaining a shared cache that has partitions allocated among multiple nodes and a data-to-partition mapping
US7555499B2 (en) 2004-08-17 2009-06-30 Oracle International Corporation Diagnosing database performance problems using a plurality of wait classes
US7434010B2 (en) 2006-08-04 2008-10-07 Microsoft Corporation Combined pessimistic and optimisitic concurrency control
US7930274B2 (en) 2007-09-12 2011-04-19 Sap Ag Dual access to concurrent data in a database management system
US7761434B2 (en) 2007-11-19 2010-07-20 Red Hat, Inc. Multiversion concurrency control in in-memory tree-based data structures
US8170914B2 (en) 2008-11-07 2012-05-01 Bryan Mongeau Inventory control system for digital signage network having a plurality of screen zones associated with a plurality of displays
US8121980B2 (en) * 2009-02-13 2012-02-21 Microsoft Corporation Transactional record manager
US8949190B2 (en) 2011-11-07 2015-02-03 Sap Se Point-in-time database recovery using log holes
US8775397B2 (en) 2012-06-26 2014-07-08 Sap Ag Database access acceleration

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6862593B2 (en) * 2002-05-17 2005-03-01 Sun Microsystems, Inc. Separation of database transactions
CN101405735A (en) * 2006-03-17 2009-04-08 微软公司 Concurrency control within an enterprise resource planning system

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11301457B2 (en) 2015-06-29 2022-04-12 Microsoft Technology Licensing, Llc Transactional database layer above a distributed key/value store
CN107710203A (en) * 2015-06-29 2018-02-16 微软技术许可有限责任公司 Transaction database layer on distributed key/value thesaurus
CN107710203B (en) * 2015-06-29 2021-05-07 微软技术许可有限责任公司 Transaction database layer above distributed key/value store
CN106603610B (en) * 2015-10-19 2019-11-22 阿里巴巴集团控股有限公司 A kind of data acquisition and synchronous method, device
CN106603610A (en) * 2015-10-19 2017-04-26 阿里巴巴集团控股有限公司 Data acquisition method and apparatus
CN107402981A (en) * 2017-07-07 2017-11-28 国网浙江省电力公司信息通信分公司 A kind of data increment processing method and system based on distributed offline database
CN107402981B (en) * 2017-07-07 2023-07-18 国网浙江省电力公司信息通信分公司 A method and system for incremental data processing based on distributed offline database
CN110515707A (en) * 2019-08-22 2019-11-29 上海交通大学 Deterministic concurrency control method and system based on pre-transaction processing
CN110515707B (en) * 2019-08-22 2022-02-25 上海交通大学 Deterministic concurrency control method and system based on advanced transaction processing
CN111259004A (en) * 2020-01-08 2020-06-09 腾讯科技(深圳)有限公司 Method for indexing data in storage engine and related device
CN111259004B (en) * 2020-01-08 2023-04-14 腾讯科技(深圳)有限公司 Method for indexing data in storage engine and related device
CN113312415A (en) * 2020-02-27 2021-08-27 Sap欧洲公司 Near memory acceleration for database operations
CN112035471A (en) * 2020-08-28 2020-12-04 中国平安人寿保险股份有限公司 Transaction processing method and computer equipment
CN112035471B (en) * 2020-08-28 2024-05-17 中国平安人寿保险股份有限公司 Transaction processing method and computer equipment
CN112559496A (en) * 2020-12-24 2021-03-26 百果园技术(新加坡)有限公司 Distributed database transaction atomicity realization method and device

Also Published As

Publication number Publication date
US20140379638A1 (en) 2014-12-25
US9430544B2 (en) 2016-08-30
CN104239357B (en) 2019-01-18

Similar Documents

Publication Publication Date Title
US9430544B2 (en) Concurrent request handling for database transactions
US10762108B2 (en) Query dispatching system and method
US11176128B2 (en) Multiple access path selection by machine learning
CN104781812B (en) Policy driven data placement and information lifecycle management
US10248709B2 (en) Promoted properties in relational structured data
US10599676B2 (en) Replication control among redundant data centers
US12189641B2 (en) Systems and method for processing timeseries data
US20100332451A1 (en) System and method for providing high availability data
US12229162B2 (en) Asynchronous data replication in a multiple availability zone cloud platform
US11893042B2 (en) Methods and systems for automatically resharding a sharded collection of data
US11693828B2 (en) Real-time data replication in a multiple availability zone cloud platform
US20180137115A1 (en) High performance parallel indexing for forensics and electronic discovery
US11226985B2 (en) Replication of structured data records among partitioned data storage spaces
US20200250188A1 (en) Systems, methods and data structures for efficient indexing and retrieval of temporal data, including temporal data representing a computing infrastructure
US20110314085A1 (en) Offline modification of business data
US9239858B1 (en) High-concurrency transactional commits
US10423639B1 (en) Automated customization preservation
US20170169067A1 (en) Reminder processing of structured data records among partitioned data storage spaces
US12360998B2 (en) Distributed query plan generation
US11176004B2 (en) Test continuous log replay
CN112334891A (en) Centralized storage for search servers
US11048728B2 (en) Dependent object analysis
US10942892B2 (en) Transport handling of foreign key checks
Gonzalez-Aparicio et al. Evaluation of ACE properties of traditional SQL and NoSQL big data systems
CN118235123A (en) Mechanism for handling mode changes

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant