Data structure refers to a particular manner of organizing and storing data. In other words, data is structured in accordance with a particular data model or schema. In a database, for instance, a database definition (a.k.a. database model) specifies structure in terms of metadata that defines database objects. In relational database management system (RDBMS), for example, the metadata includes tables, views, functions, procedures, and other system objects. The metadata can also include reference data (e.g., zip codes, states, countries . . . ) that is stored in tables but is logically part of the definition. A database definition can be stored in various source and operational formats and deployed as a live database on a running database server, for instance.
A variety of applications exists that exploit the database definition to provide various tools or services including deployment, upgrade, comparison, navigation, and validation, among others. By way of example, tools exist that provide a visualization of the structure of a database.
The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed subject matter. This summary is not an extensive overview. It is not intended to identify key/critical elements or to delineate the scope of the claimed subject matter. Its sole purpose is to present some concepts in a simplified form as a prelude to the more detailed description that is presented later.
Briefly described, the subject disclosure pertains to a drift detection and notification. Structure associated with a data source can be automatically monitored by polling a data source periodically at configurable intervals. If a drift condition, or change, pertaining to data source structure, is detected (e.g., table or column of table added, deleted or modified), one or more subscribers can be notified. In accordance with one aspect of the disclosure, occurrence of a drift condition can be detected and communicated to subscribers. Additional information can optionally be acquired and provided to subscribers such as the identity of a particular structure or object that changed and the nature of the change as a function of each subscriber's subscription.
To the accomplishment of the foregoing and related ends, certain illustrative aspects of the claimed subject matter are described herein in connection with the following description and the annexed drawings. These aspects are indicative of various ways in which the subject matter may be practiced, all of which are intended to be within the scope of the claimed subject matter. Other advantages and novel features may become apparent from the following detailed description when considered in conjunction with the drawings.
In most environments, a data source, such as a database, is a shared commodity that can be accessed simultaneously by multiple entities, or clients. Moreover, any client with sufficient access rights can modify the structure of the data source. For example, a column in a table could be deleted or a column name could be changed, among other things. In other words, a drift condition occurs since the data structure has drifted away from its previous state. Changes made by one client are invisible but affecting to other clients, since database management systems (DBMSs) either do not maintain a connection with clients or do not extend notifications to connected clients. This is motivated at least in part to optimize performance and scalability of database systems. As a result, a failure can occur anytime based on differences between expected and actual data structure. This may require recompilation, reconfiguration, and/or redeployment of non-resilient client applications. Resilient applications can survive changes without recompilation and redeployment. Nevertheless, resilient applications can still be adversely affected by changes.
One solution to the above noted issues is for client applications to inject specialized code, like database triggers, into a target source and log changes. Alternatively, database environments can be configured to enable use of built-in logging measures. Still further yet, users can be required to perform refreshes explicitly to resynchronize the internal state of a client application with the current data structure. Injecting specialized code or employing built-in logging, however, imposes requirements on a target data source that affects operational characteristics of the data source and consequently overall solutions. For instance, such mechanism can adversely slow down all solution applications working over the same target data source. Furthermore, for a class of client applications and environments, such practices are not even allowed because of enterprise policies or constraints. Client applications that support explicit refresh avoid the aforementioned problems, but do so at the expense of downgraded user experience. For example, a user of a client application does not know when the underlying state of a data source has changed and when to invoke the explicit refresh.
Details below are generally directed toward drift detection and notification. Such functionality can be performed automatically, so as not to compromise client user experience, as well as external to and without obligations, or requirements, on a database management system, for example, to track the state of data structure. Data structure can be monitored and drift, or changes, detected, for example by polling a data source for current state information and comparing it with previous state information. Upon detection of a change, a subscribed client can be notified that a change has occurred. Optionally, additional information can be acquired from a data source and communicated to a subscribed client such as the name and type of object that was changed as well as the nature of the change (e.g., modification, addition, removal, renames . . . ). This is lightweight as polling and data retention can be limited to that required to detect a drift. Further, there need not be any special support from a target data-source management system, apart from security permissions to access data-structure information. Additionally, capabilities of a data source, database management system, or database server can be exploited to optimize drift detection and notification.
Various aspects of the subject disclosure are now described in more detail with reference to the annexed drawings, wherein like numerals refer to like or corresponding elements throughout. It should be understood, however, that the drawings and detailed description relating thereto are not intended to limit the claimed subject matter to the particular form disclosed. Rather, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the claimed subject matter.
Referring initially to
The detection component 110 is configured to detect the presence of a drift condition. Here, a drift condition means any change in data structure. Data structure can include a number of objects such as tables, views, and stored procedures (text objects), among other things, and can be hierarchical in nature. A change in data structure can include adding a new object, removing an existing object, or renaming an existing object, among other mutations. For example, if a table has two columns at time “T0” and at time “T1” a new column is added, a drift condition can be said to exist because the structure has drifted from its previous state. Similarly, a drift condition can occur when a table is added or removed. Furthermore, the detection component 110 can be configured to detect a drift condition with respect to anything that can be used as, or is analogous to, structure such as reference data. For example, a change in the content of a table including zip codes can be considered a drift condition.
The detection component 110 can periodically check for the presence of drift by polling a data source (or more specifically a management system associated with the data source) at configurable intervals (e.g., 1 minute, 5 minutes, 10 minutes . . . ) or on-demand in response to a request by a subscriber (e.g., between intervals, as needed). As a result, drift detection can be said to be lightweight since it does not adversely impact the performance or scalability of a data source or data-source management system. More specifically, a data source or related functionality need not be burdened with tracking and maintaining state.
Many different mechanisms can be employed by the detection component 110 to detect a drift condition, or change, with respect to data structure. Turning attention to
Comparison component 220 is configured to compare values obtained by the value acquisition component 210 from different times. More specifically, a previously acquired value, saved in data store 120, for example, can be compared with a currently acquired valued. If the values differ, a drift condition, or change, has been detected. For example, if the checksum computed at time “T0” is different from the checksum computed at time “T1,” a drift condition has been detected. Similarly, a drift condition can be detected if the time stamp associated with one or more data structures differs from that which was previously recorded. If a drift condition has been detected, the currently computed or acquired value can be saved, for example to data store 120, for subsequent comparisons.
Returning to
The identification component 130 is configured to identify information concerning a drift condition. If a drift condition occurs, it is detectable with respect to a specific object. For example, the checksums associated with a specific table may not match. However, checksum values are very lightweight and do not communicate any meaningful information outside the drift detection system 100. The identification component 130 can determine more specific information regarding the drift condition.
Returning to
The drift detection system 100 can be implemented in various manners. For example, in one embodiment, the drift detection system 100 can be a client application, or portion thereof, that interacts with a database management system or database server. In one instance, drift detection can be performed in the background without interrupting main application flow or compromising user experience while also not requiring support from the database server other than permitting access thereto. In another non-limiting example, the drift detection system 100 can be embodied as a web service or middle-tier application. This could help manage load on a database server as well as address particular security concerns, if only select client machines (subscribers) are allowed to access selected structural information.
The drift detection system 100 is generic and can operate over a plurality of domains including XML documents and databases and even various different implementations of databases. As a result, the drift detection system 100 can provide a common, or standard, way of detecting and communicating changes. Furthermore, specific embodiments can result be lightweight and execute expeditiously. More specifically, the drift detection system 100 can be lightweight since no requirements are made of the data management systems that affect performance and scalability. Further, solely information needed to communicate drift conditions can be maintained. Further yet, simply comparing checksums, timestamps, or other values can result in fast execution.
On the client-side of the two-tier architecture is the drift detection system 100. Three subscribers 430 subscribe to the drift detection system 100. Upon registration, the drift detection system 100 queries the database management system 410 for a set of information that captures the state of the database. Here, the drift detection system 100 saves a catalog footprint 420 that captures structures structure of the database. The drift detection system 100 can next establish a configurable cadence on which the database management system 410 is polled to detect drift conditions. The polling frequency can be configured by a subscriber. Additionally, a subscriber can initiate a drift check request at any time, for example if needed between intervals. Regardless of whether the drift check invokes automatically at a periodic interval or on-demand by a particular subscriber, details of any detected drifts would notify to all subscribers as per their subscription.
This solution can significantly improve the performance and user experience of client scenarios. For example, consider a visual tree control showing a list of database objects. Using the drift detection system 100, the visual controls can be automatically updated at regular intervals without requiring explicit action. Further, since the system is lightweight and can serve multiple subscribers, the interval can be set for client needs.
Note also that in an alternate embodiment, the system catalog 412 can be extensible. Database management systems 410 include the system catalog 412 at least portions of which can be queried. Conventionally, however, the system catalog 412 is not extensible. As a result, information about structure such as the checksum is stored external to the database management system 410. Where the system catalog 412 is extensible, information about structure can be stored next to the object. For example, another column, a user column, that sits in the system catalog 412 can be added, where this extra information such as checksum is stored. Storing structural information outside the system catalog 412 requires management of the lifetime of information. If a table is deleted, the checksum needs to be identified and removed. Similarly, if a new object is created a new checksum, for example, should be added. Further yet, if backup of the system catalog 412 is made it will be unaware of checksum that reside outside the system catalog 412. These concerns can be addressed by adding such information to the system catalog 412. Additionally, the information can be stored in the actual database as opposed to in an extensible system catalog 412 or external to the database management system 410. This is another example of where knowledge of a database management system or the like can be exploited to optimize or improve the process of drift detection and notification.
The aforementioned systems, architectures, environments, and the like have been described with respect to interaction between several components. It should be appreciated that such systems and components can include those components or sub-components specified therein, some of the specified components or sub-components, and/or additional components. Sub-components could also be implemented as components communicatively coupled to other components rather than included within parent components. Further yet, one or more components and/or sub-components may be combined into a single component to provide aggregate functionality. Communication between systems, components and/or sub-components can be accomplished in accordance with either a push and/or pull model. The components may also interact with one or more other components not specifically described herein for the sake of brevity, but known by those of skill in the art.
Furthermore, various portions of the disclosed systems above and methods below can include or employ of artificial intelligence, machine learning, or knowledge or rule-based components, sub-components, processes, means, methodologies, or mechanisms (e.g., support vector machines, neural networks, expert systems, Bayesian belief networks, fuzzy logic, data fusion engines, classifiers . . . ). Such components, inter alia, can automate certain mechanisms or processes performed thereby to make portions of the systems and methods more adaptive as well as efficient and intelligent. By way of example, and not limitation, the detection component 110 could utilize such mechanisms to infer when checks are made to optimize correspondence with a data source. The identification component 130 could also employ these mechanisms to infer nature of changes over time, such as that only particular changes are allowed by the data source (e.g., additions, modification . . . )
In view of the exemplary systems described supra, methodologies that may be implemented in accordance with the disclosed subject matter will be better appreciated with reference to the flow chart of
Referring to
Once it is determined that there was a change to the structure, or in other words a drift, the actual portion of the structure or object that changed can be identified at numeral 520. For instance, the name and type of the object can be obtained. Consider an exemplary scenario where the structure includes a table with two columns: “C1” or type integer and “C2” of type string. Assuming a change occurred with respect to the first column, “C1” and integer can be returned. In other scenarios, a stored procedure or a view may be changed such that the name of the stored procedure or view can be returned as well as an indication that the name is that of a stored procedure or view.
At reference numeral 530, the nature of the change to the identified object is determined (e.g., addition, alteration, removal . . . ) as a function of current and previous states of the object. In one embodiment, the data structure can be queried to obtain the identified object. A comparison can then be made between the current object state and a previous object state to identify the difference. For example, the nature of change can correspond to addition of a column, deletion of a column or renaming a column in a table, among other things.
At numeral 540, subscribers, such as client applications, are notified of the occurrence of a change, the identity of the object that changed, and/or the nature of the change based on their subscription. A client application that is either less privileged with respect to its subscription or non-resilient to change need only be informed that a change occurred. Resilient client applications may be capable of dealing with more detailed information including the identity of the changed object and/or the nature of the change to the changed object. Various subscriptions can be made available to enable a client application to subscribe to supported and desired information regarding change or drift. Further, the method 500 can be optimized as a function of subscriptions. For instance, if there are only subscriptions that require notification of the occurrence of a change, additional detail regarding the identity of the changed object and the nature of the change need not be acquired. In another instance, if all subscribers need change details, the details can be fetched in the same batch or concurrently.
The above systems and methods describe detecting and notifying subscribers of a drift pertaining to the structure of a data source. Additionally, drift detection and notification can be employed with respect to anything that can be utilized as structure such as reference data. However, aspects of drift detection and notification herein are not limited to structure. In fact, aspects can also be applied with respect to data held within structure even if such data is not reference data. Conventional data change functionality, if provided at all, forms part of a management system, and affects the performance of a corresponding database. Aspects of drift detection provide a more lightweight approach.
The word “exemplary” or various forms thereof are used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other aspects or designs. Furthermore, examples are provided solely for purposes of clarity and understanding and are not meant to limit or restrict the claimed subject matter or relevant portions of this disclosure in any manner. It is to be appreciated a myriad of additional or alternate examples of varying scope could have been presented, but have been omitted for purposes of brevity.
As used herein, the terms “component,” and “system,” as well as various forms thereof (e.g., components, systems, sub-systems . . . ) are intended to refer to a computer-related entity, either hardware, a combination of hardware and software, software, or software in execution. For example, a component may be, but is not limited to being, a process running on a processor, a processor, an object, an instance, an executable, a thread of execution, a program, and/or a computer. By way of illustration, both an application running on a computer and the computer can be a component. One or more components may reside within a process and/or thread of execution and a component may be localized on one computer and/or distributed between two or more computers.
The conjunction “or” as used this description and appended claims in is intended to mean an inclusive “or” rather than an exclusive “or,” unless otherwise specified or clear from context. In other words, “‘X’ or ‘Y’” is intended to mean any inclusive permutations of “X” and “Y.” For example, if “‘A’ employs ‘X,’” “‘A employs ‘Y,’” or “‘A’ employs both ‘X’ and ‘Y,’” then “‘A’ employs ‘X’ or ‘Y’” is satisfied under any of the foregoing instances.
As used herein, the term “inference” or “infer” refers generally to the process of reasoning about or inferring states of the system, environment, and/or user from a set of observations as captured via events and/or data. Inference can be employed to identify a specific context or action, or can generate a probability distribution over states, for example. The inference can be probabilistic—that is, the computation of a probability distribution over states of interest based on a consideration of data and events. Inference can also refer to techniques employed for composing higher-level events from a set of events and/or data. Such inference results in the construction of new events or actions from a set of observed events and/or stored event data, whether or not the events are correlated in close temporal proximity, and whether the events and data come from one or several event and data sources. Various classification schemes and/or systems (e.g., support vector machines, neural networks, expert systems, Bayesian belief networks, fuzzy logic, data fusion engines . . . ) can be employed in connection with performing automatic and/or inferred action in connection with the claimed subject matter.
Furthermore, to the extent that the terms “includes,” “contains,” “has,” “having” or variations in form thereof are used in either the detailed description or the claims, such terms are intended to be inclusive in a manner similar to the term “comprising” as “comprising” is interpreted when employed as a transitional word in a claim.
In order to provide a context for the claimed subject matter,
While the above disclosed system and methods can be described in the general context of computer-executable instructions of a program that runs on one or more computers, those skilled in the art will recognize that aspects can also be implemented in combination with other program modules or the like. Generally, program modules include routines, programs, components, data structures, among other things that perform particular tasks and/or implement particular abstract data types. Moreover, those skilled in the art will appreciate that the above systems and methods can be practiced with various computer system configurations, including single-processor, multi-processor or multi-core processor computer systems, mini-computing devices, mainframe computers, as well as personal computers, hand-held computing devices (e.g., personal digital assistant (PDA), phone, watch . . . ), microprocessor-based or programmable consumer or industrial electronics, and the like. Aspects can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. However, some, if not all aspects of the claimed subject matter can be practiced on stand-alone computers. In a distributed computing environment, program modules may be located in one or both of local and remote memory storage devices.
With reference to
The processor(s) 620 can be implemented with a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any processor, controller, microcontroller, or state machine. The processor(s) 620 may also be implemented as a combination of computing devices, for example a combination of a DSP and a microprocessor, a plurality of microprocessors, multi-core processors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
The computer 610 can include or otherwise interact with a variety of computer-readable media to facilitate control of the computer 610 to implement one or more aspects of the claimed subject matter. The computer-readable media can be any available media that can be accessed by the computer 610 and includes volatile and nonvolatile media, and removable and non-removable media. Computer-readable media can comprise computer storage media and communication media.
Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes memory devices (e.g., random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM) . . . ), magnetic storage devices (e.g., hard disk, floppy disk, cassettes, tape . . . ), optical disks (e.g., compact disk (CD), digital versatile disk (DVD) . . . ), and solid state devices (e.g., solid state drive (SSD), flash memory drive (e.g., card, stick, key drive . . . ) . . . ), or any other like mediums which can be used to store the desired information and which can be accessed by the computer 610. Furthermore, computer storage media excludes signals.
Communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. Combinations of any of the above should also be included within the scope of computer-readable media.
Memory 630 and mass storage 650 are examples of computer-readable storage media. Depending on the exact configuration and type of computing device, memory 630 may be volatile (e.g., RAM), non-volatile (e.g., ROM, flash memory . . . ) or some combination of the two. By way of example, the basic input/output system (BIOS), including basic routines to transfer information between elements within the computer 610, such as during start-up, can be stored in nonvolatile memory, while volatile memory can act as external cache memory to facilitate processing by the processor(s) 620, among other things.
Mass storage 650 includes removable/non-removable, volatile/non-volatile computer storage media for storage of large amounts of data relative to the memory 630. For example, mass storage 650 includes, but is not limited to, one or more devices such as a magnetic or optical disk drive, floppy disk drive, flash memory, solid-state drive, or memory stick.
Memory 630 and mass storage 650 can include, or have stored therein, operating system 660, one or more applications 662, one or more program modules 664, and data 666. The operating system 660 acts to control and allocate resources of the computer 610. Applications 662 include one or both of system and application software and can exploit management of resources by the operating system 660 through program modules 664 and data 666 stored in memory 630 and/or mass storage 650 to perform one or more actions. Accordingly, applications 662 can turn a general-purpose computer 610 into a specialized machine in accordance with the logic provided thereby.
All or portions of the claimed subject matter can be implemented using standard programming and/or engineering techniques to produce software, firmware, hardware, or any combination thereof to control a computer to realize the disclosed functionality. By way of example and not limitation, the drift detection system 100, or portions thereof, can be, or form part, of an application 662, and include one or more modules 664 and data 666 stored in memory and/or mass storage 650 whose functionality can be realized when executed by one or more processor(s) 620.
In accordance with one particular embodiment, the processor(s) 620 can correspond to a system on a chip (SOC) or like architecture including, or in other words integrating, both hardware and software on a single integrated circuit substrate. Here, the processor(s) 620 can include one or more processors as well as memory at least similar to processor(s) 620 and memory 630, among other things. Conventional processors include a minimal amount of hardware and software and rely extensively on external hardware and software. By contrast, an SOC implementation of processor is more powerful, as it embeds hardware and software therein that enable particular functionality with minimal or no reliance on external hardware and software. For example, the drift detection system 100 and/or associated functionality can be embedded within hardware in a SOC architecture.
The computer 610 also includes one or more interface components 670 that are communicatively coupled to the system bus 640 and facilitate interaction with the computer 610. By way of example, the interface component 670 can be a port (e.g., serial, parallel, PCMCIA, USB, FireWire . . . ) or an interface card (e.g., sound, video . . . ) or the like. In one example implementation, the interface component 670 can be embodied as a user input/output interface to enable a user to enter commands and information into the computer 610, for instance by way of one or more gestures or voice input, through one or more input devices (e.g., pointing device such as a mouse, trackball, stylus, touch pad, keyboard, microphone, joystick, game pad, satellite dish, scanner, camera, other computer . . . ). In another example implementation, the interface component 670 can be embodied as an output peripheral interface to supply output to displays (e.g., CRT, LCD, plasma . . . ), speakers, printers, and/or other computers, among other things. Still further yet, the interface component 670 can be embodied as a network interface to enable communication with other computing devices (not shown), such as over a wired or wireless communications link.
What has been described above includes examples of aspects of the claimed subject matter. It is, of course, not possible to describe every conceivable combination of components or methodologies for purposes of describing the claimed subject matter, but one of ordinary skill in the art may recognize that many further combinations and permutations of the disclosed subject matter are possible. Accordingly, the disclosed subject matter is intended to embrace all such alterations, modifications, and variations that fall within the spirit and scope of the appended claims.
This application claims the benefit of U.S. Provisional Application No. 61/605,706, filed Mar. 1, 2012, and entitled “DRIFT DETECTION AND NOTIFICATION,” and is incorporated in its entirety herein by reference.
Number | Date | Country | |
---|---|---|---|
61605706 | Mar 2012 | US |