The present disclosure relates generally to data access. In an embodiment, the disclosure relates to handling data access requests in computer program updates.
A computer program is often updated to fix program errors, to provide new or changed configuration settings, and/or to incorporate new functionalities. An update of a computer program may involve a variety of different update techniques. For example, the update may be in the form of applying a patch, which is a small piece of software designed to fix program errors. In another example, the update may be in the form of executing an import application, which may replace existing components of a computer program with new components.
During an update of one or more computer programs belonging to a system, there is a period of time where a system may show inconsistent data caused by the update. As an example, multiple computer programs accessing data from a database that is being updated may result in the creation of erroneous or corrupted application objects, such as erroneous bills of delivery, invoices, orders, and other application objects. A typical technique to avoid data corruption or inconsistent data is to prevent execution of the computer program or transactions during the update. However, a shutdown of a computer program may not be practical or even possible given that many business-critical computer programs, for example, must be accessible at all times.
The present disclosure is illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements and in which:
The description that follows includes illustrative systems, methods, techniques, instruction sequences, and computing machine program products that embody illustrative embodiments of the present invention. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide an understanding of various embodiments of the inventive subject matter. It will be evident, however, to those skilled in the art that embodiments of the inventive subject matter may be practiced without these specific details. In general, well-known instruction instances, protocols, structures and techniques have not been shown in detail.
The embodiments described herein provide various techniques for handling data access requests in the update of a computer program. In the update of a computer program, data accessed by the computer program may also be updated. A list of particular data effected in the update is identified. When a request to access a particular piece of data is received during the update, the piece of data in the request is compared to the list of data to identify whether the piece of data is effected in the update. As explained in more detail below, access to the particular piece of data is either prevented or permitted based on results from the comparison.
The computing device 110 may include applications 150-153, a database management system (DBMS) 112, and a database 113. The applications 150-153 are computer programs that provide a variety of functionalities based on access of data stored in the database 113. For example, one or more of the applications 150-153 may provide order fulfillment, business monitoring, inventory control, online shopping, and/or any other suitable functions by way of interactions with other elements of the computing device 110, such as the database management system (DBMS) 112 and database 113. Generally, the database management system 112 may comprise any suitable system for managing a database instance. For example, the database management system 112 may receive requests for data (e.g., Structured Query Language (SQL) requests from one or more applications 150-153), retrieve requested data from the database 113, and return the requested data to one or more requestors (e.g., client devices 120-123).
The applications 150-153 communicate with database management system 112 over one or more interfaces provided by the database management system 112. The applications 150-153 may, in turn, support client applications executed by client devices 120-123. Such a client application may, for example, include a Web browser to access and display reports generated by the applications 150-153. In this regard, the computing device 110 may, for example, comprise a Web server to manage interactions with the client devices 120-123.
The database 113 is an example of a data structure. As used herein, a “data structure” provides context for the organization of data. Examples of data structures include databases, database tables, arrays, linked lists, indexes, and other data structures. In particular, a “database,” such as the database 113, refers to one or more structured sets of persistent data. An example of a database 113 is a single file containing many records. A “record,” as used herein, refers to one or more pieces of data stored in a data structure. For example, a record may refer to a group of related fields, or a single field, treated as a unit and comprising part of the database 113. The database 113 may be a relational database that includes one or more database tables, where each database table refers to a single store of related information.
In the illustrative example of
In accordance with embodiments of the present invention, applications 150-153 may continue to function and run, and thereby access some records in the database 113, during an update of one or more of the applications 150-153. Examples of data access operations include read data, add (or insert) data, delete data, modify (or update) data, and other data access operations. To maintain data consistency during the update, the database management system 112 or other components may, for example, identify whether a record being accessed is effected in the update process. As explained in detail below, if the record is effected in the updated process, then the database management system 112 can prevent the record from being accessed during the update process.
It should be appreciated that the computing device 110 may include other elements that are not shown and may be used during operation thereof, such as any suitable program code, scripts, or other functional data that is executable to interface with other elements of the system 100, other applications, other data files, operating system files, and device drivers. Furthermore, two or more elements of the system 100 may be located remote from one another and may communicate with one another via a network and/or a dedicated connection. Moreover, each displayed element of system 100 may comprise any number of hardware and/or software elements, some of which are located remote from each other element. The elements described herein as communicating with one another are directly or indirectly capable of communicating over any number of different systems for transferring data, including but not limited to shared memory communication, a local area network (LAN), a wide area network (WAN), a telephone network, a cellular network, a fiber-optic network, a satellite network, an infrared network, a radio frequency network, and any other type of network that may be used to transmit information between devices. Additionally, communication between systems may proceed over any one or more transmission protocols that are or become known, such as Asynchronous Transfer Mode (ATM), Internet Protocol (IP), Hypertext Transfer Protocol (HTTP) and Wireless Application Protocol (WAP).
The computing device 110 executes an operating system 202 that manages other software processes and/or services executing on the computing device 10. These software processes and/or other services may include an application 150, an update module 204, the database management system 112, and a database 113. Here, the update module 204 is configured to update the application 150. A patch is an example of an update module 204. An import application that is configured to import modified software components into a runtime system is another example of the update module 204. In the update of the application 150, the update module 204 may add, delete, and/or modify records in the database 113. For example, the update module 204 may update the application 150 to provide a new functionality, which may result in the addition of new records in the database 113. In another example, the update module 204 may update the application 150 to remove an existing functionality, which may result in the deletion of existing records associated with the obsolete, existing functionality. Other examples of records being effected in the update of the application 150 may include addition of one or more columns to a database table, addition of one or more rows to a database table, and modification of one or more records in a database table.
In the example depicted in
The database interface module 208 may, for example, define a set of methods, variables, and conventions that provide a consistent database interface. In one embodiment, the database interface module 208 may include a conflict identification module 210. The conflict identification module 210 is configured to identify whether a record accessed by the application 150 is a record effected in the update process. As explained in more detail below, the conflict identification module 210 may use the list of effected records stored in the notification data structure 212 for the identification. Based on this identification, the conflict identification module 210 may prevent or permit access of the record.
It should be appreciated that in other embodiments, the database management system 112 may include fewer, more, or different modules apart from those shown in
As depicted at 304, a request is received during the update of the computer program to access at least one record related to the data structure. This request may be made by the same computer program that is being updated or by other computer programs in, for example, a client-server database environment. During the update, the execution of the computer program being updated (and also other computer programs in the system) does not need to be terminated. That is, the computer programs may continue to execute and run during the update of one of the computer programs.
Upon receipt of the request, an identification is made at 306 that the record in the request matches one of the records effected in the update. In effect, for example, a match of the records may identify the request is requesting access to a record that currently does not exist, but will be added to the data structure in the update. Alternatively, a match of the records may identify the request is requesting access to an existing record that will be deleted from the data structure in the update.
Once a match is identified, the request may be prevented from accessing the record at 308. In effect, embodiments of the invention prevent access to records that are effected in the update, thereby, for example, maintaining data consistency during the update. For example, a computer program is prevented from accessing records that are to be deleted in the update, thereby, for example, preventing the data being stored in invalid records, and also retrieving (and using) data that will be obsolete or invalid as a result from the update.
To update the application 150 with modified and new error messages, for example, the update module 204 in the form of an import application is loaded and executed. The update module 204 includes a list of one or more records 404 that are to be added and/or deleted in the update. Each record in the list may be identified by an identifier, which refers to a value (numeric and/or textual) that uniquely identifies a record. For example, the identifier may be a column name of a database table in the database 113 identifying a particular column of records. In another example, the identifier may be a row name or key value of a database table identifying a particular row of records. In yet another example, the identifier may be a combination of column names and row names that identify a group of records in the database table. The update module 204 may define the list of records 404 in a file, and this file may be accessed to identify the list of records 404 to be temporarily stored in the notification data structure 212. The following Table B provides an example of the notification data structure 212 with a list of records 404 that are to be added and/or deleted in the update.
As depicted in Table B, the notification data structure 212 includes a column that identifies the particular tables in the database 113 and a corresponding column that identifies the rows in a particular table to be effected in the update. In this example, the row identifiers are the row names of a table. The row identifiers can specifically identify a single row (e.g., T101 or T108). Alternatively, the row identifiers can also generally identify multiple rows with an asterisk symbol (*), which is a wildcard character. The row identifier “*” selects all rows of a particular table while the row identifier “T*” selects all row names that starts with a character “T.”
During the update, the application 150 transmits a request 402 to access a particular record in the database 113. The process dispatcher module 206 receives the request 402 and, in one embodiment, queries the update module 204 to identify whether the update of the application 150 has started (or completed). In an alternate embodiment, the update module 204 may automatically transmit a notification 405 to the process dispatcher module 206 that the update has started (or completed). The start, completion, and other statuses or timings associated with the update are tracked by the import module, and the import module can provide such statuses to both the process dispatcher module 206 and the conflict identification module 210. If the process dispatcher module 206 identifies that the update process has not started, then the process dispatcher module 206 may directly forward or dispatch the request 402 to the database 113 by way of the database interface module 208, bypassing the conflict identification module 210.
On the other hand, if the process dispatcher module 206 identifies that the update process has started, then request 402 is dispatched to the conflict identification module 210, which is included in the database interface module 208. The conflict identification module 210 accesses the list of records 404 effected in the update process from the notification data structure 212. With the list of records 404, the conflict identification module 210 identifies whether the requested record matches a record in the list of records 404 by, for example, comparing the requested record against the list of records 404 retrieved from the notification data structure 212.
If the comparison does not identify a match with any record in the list of records 404, then the database interface module 208 permits the request to access the requested record in the database 113 because, for example, the requested record does not conflict with records that are effected in the update process. For example, a mismatch can indicate that the requested record is safe to access because this requested record will not be deleted in the update process.
On the other hand, if the comparison identifies a match, then the database interface module 208 prevents the request from accessing the requested record in the database 113. In an embodiment, the database interface module 208 can prevent access by suppressing any execution of data access commands associated with a requested record. Alternatively, the database interface module 208 can prevent access by aborting the request 402 to access that requested record. As discussed above, the database interface module 208 prevents access based on the match to maintain, for example, data consistency during the update of the application 150. As a result, for this example, the interception and filtering of the request 402 by the database interface module 208 prevent erroneous or obsolete error messages from being displayed by the application 150 during its update.
The database management system may then receive a request at 504 from a computer program to access a particular record related to a database table. In this example, a process dispatcher module queries an update module to identify at 506 whether an update of the computer program has started. If the update has not started, then the process dispatcher module permits the request to access the record at 510. In one embodiment, the process dispatcher module can permit the request to access the record by disabling the conflict identification module, which identifies whether the requested record matches any of the records defined in the notification data structure, as explained in more detail below.
On the other hand, if the update has started, then the process dispatcher module forwards the request to a conflict identification module that, as depicted at 508, identifies whether the requested record matches the list of records defined in the notification data structure by comparing the requested record with the list of records. In reference to 512, if a match is not identified between the requested record and any record in the list of records, then the request is permitted to access the requested record at 520. In this example, access is permitted because even though the update has started, the request is accessing existing records that are not effected in the update.
If a match is identified at 512, then the conflict identification module at 514 identifies whether an application or other computer program transmitted the request before or after a start of the update. The conflict identification module 210 can make the identification based on, in part, the status of the update, which can be provided by the update module 204 as discussed above. If the request is identified as being transmitted before the start of the update, then the request is prevented from accessing the record at 518. The request is prevented from accessing the record at this time because, for example, access of effected records during the update period by applications that have not been updated may result in data inconsistencies. That is, the conflict identification module can identify that the request is made from an “old” transaction, which is a transaction that was running before the start of the update, and it may potentially request to access obsolete or “old” data. Upon identification of the request originating from such an “old” transaction, the conflict identification module may prevent the request from accessing the record. As described in more detail below, when the last “old” transaction is finished, the conflict identification module may be disabled.
Still referring to
After completion of the update, the conflict identification module 210 may be disabled, which effectively disables the identification based on the comparison of the records. The notification data structure may then be cleared of the list of records for the current or most recent update because this current list is not relevant to future updates, which may effect a different set of records.
The machine is capable of executing a set of instructions (sequential or otherwise) that specify actions to be taken by that machine. Further, while only a single machine is illustrated, the term “machine” shall also be taken to include any collection of machines that individually or jointly execute a set (or multiple sets) of instructions to perform any one or more of the methodologies discussed herein.
The example of the computing device 110 includes a processor 602 (e.g., a central processing unit (CPU), a graphics processing unit (GPU) or both), a main memory 604 (e.g., random access memory (a type of volatile memory)), and static memory 606 (e.g., static random access memory (a type of volatile memory)), which communicate with each other via bus 608. The computing device 110 may further include video display unit 610 (e.g., a plasma display, a liquid crystal display (LCD) or a cathode ray tube (CRT)). The computing device 110 also includes an alphanumeric input device 612 (e.g., a keyboard), a user interface (UI) navigation device 614 (e.g., a mouse), a disk drive unit 616, a signal generation device 618 (e.g., a speaker), and a network interface device 620.
The disk drive unit 616 (a type of non-volatile memory storage) includes a machine-readable medium 622 on which is stored one or more sets of data structures and instructions 624 (e.g., software) embodying or utilized by any one or more of the methodologies or functions described herein. The data structures and instructions 624 may also reside, completely or at least partially, within the main memory 604 and/or within the processor 602 during execution thereof by computing device 110, with the main memory 604 and processor 602 also constituting machine-readable, tangible media.
The data structures and instructions 624 may further be transmitted or received over a computer network 650 via network interface device 620 utilizing any one of a number of well-known transfer protocols (e.g., HTTP).
Certain embodiments are described herein as including logic or a number of components, modules, or mechanisms. Modules may constitute either software modules (e.g., code embodied on a machine-readable medium or in a transmission signal) or hardware modules. A hardware module is a tangible unit capable of performing certain operations and may be configured or arranged in a certain manner. In example embodiments, one or more computer systems (e.g., the computing device 110) or one or more hardware modules of a computer system (e.g., a processor 602 or a group of processors) may be configured by software (e.g., an application or application portion) as a hardware module that operates to perform certain operations as described herein.
In various embodiments, a hardware module may be implemented mechanically or electronically. For example, a hardware module may comprise dedicated circuitry or logic that is permanently configured (e.g., as a special-purpose processor, such as a field programmable gate array (FPGA) or an application-specific integrated circuit (ASIC)) to perform certain operations. A hardware module may also comprise programmable logic or circuitry (e.g., as encompassed within a general-purpose processor 602 or other programmable processor) that is temporarily configured by software to perform certain operations. It will be appreciated that the decision to implement a hardware module mechanically, in dedicated and permanently configured circuitry, or in temporarily configured circuitry (e.g., configured by software) may be driven by cost and time considerations.
Accordingly, the term “hardware module” should be understood to encompass a tangible entity, be that an entity that is physically constructed, permanently configured (e.g., hardwired) or temporarily configured (e.g., programmed) to operate in a certain manner and/or to perform certain operations described herein. Considering embodiments in which hardware modules are temporarily configured (e.g., programmed), each of the hardware modules need not be configured or instantiated at any one instance in time. For example, where the hardware modules comprise a general-purpose processor 602 configured using software, the general-purpose processor 602 may be configured as respective different hardware modules at different times. Software may accordingly configure a processor 602, for example, to constitute a particular hardware module at one instance of time and to constitute a different hardware module at a different instance of time.
Modules can provide information to, and receive information from, other hardware modules. For example, the described hardware modules may be regarded as being communicatively coupled. Where multiples of such hardware modules exist contemporaneously, communications may be achieved through signal transmission (e.g., over appropriate circuits and buses) that connect the hardware modules. In embodiments in which multiple hardware modules are configured or instantiated at different times, communications between such hardware modules may be achieved, for example, through the storage and retrieval of information in memory structures to which the multiple hardware modules have access. For example, one hardware module may perform an operation, and store the output of that operation in a memory device to which it is communicatively coupled. A further hardware module may then, at a later time, access the memory device to retrieve and process the stored output. Hardware modules may also initiate communications with input or output devices, and can operate on a resource (e.g., a collection of information).
The various operations of example methods described herein may be performed, at least partially, by one or more processors 602 that are temporarily configured (e.g., by software) or permanently configured to perform the relevant operations. Whether temporarily or permanently configured, such processors 602 may constitute processor-implemented modules that operate to perform one or more operations or functions. The modules referred to herein may, in some example embodiments, comprise processor-implemented modules.
Similarly, the methods described herein may be at least partially processor-implemented. For example, at least some of the operations of a method may be performed by one or more processors 602 or processor-implemented modules. The performance of certain of the operations may be distributed among the one or more processors 602, not only residing within a single machine, but deployed across a number of machines. In some example embodiments, the processor or processors 602 may be located in a single location (e.g., within a home environment, an office environment or as a server farm), while in other embodiments the processors 602 may be distributed across a number of locations.
While the embodiment(s) is (are) described with reference to various implementations and exploitations, it will be understood that these embodiments are illustrative and that the scope of the embodiment(s) is not limited to them. In general, techniques for handling data access requests may be implemented with facilities consistent with any hardware system or hardware systems defined herein. Many variations, modifications, additions, and improvements are possible.
Plural instances may be provided for components, operations or structures described herein as a single instance. Finally, boundaries between various components, operations, and data stores are somewhat arbitrary, and particular operations are illustrated in the context of specific illustrative configurations. Other allocations of functionality are envisioned and may fall within the scope of the embodiment(s). In general, structures and functionality presented as separate components in the exemplary configurations may be implemented as a combined structure or component. Similarly, structures and functionality presented as a single component may be implemented as separate components. These and other variations, modifications, additions, and improvements fall within the scope of the embodiment(s).
Number | Name | Date | Kind |
---|---|---|---|
7421450 | Mazzarella et al. | Sep 2008 | B1 |
8819655 | Hopwood et al. | Aug 2014 | B1 |
20040054922 | Hiraga et al. | Mar 2004 | A1 |
20080154918 | Iwatsu et al. | Jun 2008 | A1 |
Number | Date | Country | |
---|---|---|---|
20100332505 A1 | Dec 2010 | US |