As used herein, the term “replica” refers to an instance of data available on a specific machine. The term “publisher” refers to a replica that makes data available for replication to other replicas. The term “subscriber” refers to a replica that receives copies of published data. The term “publication” refers to a collection of one or more articles from one database. The term “article” refers to an object specified for replication. For example, in Microsoft Server, an article is a component in a publication and can be a table, specified columns, specified rows, a stored procedure or view definition, a view, an indexed view, or a user-defined function. The term “published data” refers to data at the publisher that has been replicated. The term “subscription” refers to a specific instance or copy of published data.
The “lineage” contains version information about the changed entity. In the synchronization protocol, this is treated as an opaque metadata BLOB (i.e., binary large object). Typically, the synchronization protocol implementation interprets and maintains the version metadata depicted by the lineage.
A set of capabilities may be defined to provide whatever features are desired in a synchronization protocol. Such capabilities may then be grouped into different levels (L1, L2, etc) to provide a layered synchronization protocol. In an example embodiment, the following capabilities may be provided. It should be understood, however, that any capabilities may be defined, and that any number of capabilities may be defined.
The “Publisher updates on reference data” capability allows Publishers to make available reference data to Subscribers. Changes to the reference data are allowed only on the Publisher.
The “Filtered subsets of data” capability allows Publishers to make available different subsets of the same dataset to Subscribers.
The “Subscriber updates on transactional data specific to a subscription” capability allows specific Subscribers to update transactional data. This scenario is useful when the data being synchronized is well-partitioned and not shared by the clients that synchronize the data—for example, sales orders corresponding to a sales representative's customers.
The “Subscriber updates on transactional data shared by multiple subscriptions” capability allows multiple Subscribers to update transactional data. This scenario is useful when the data being synchronized is shared by the clients that synchronize the data—for example, sales orders corresponding to a sales team's customers. Conflicts are possible in this scenario.
The “Publisher and Subscriber updates on transactional data shared by multiple subscriptions” capability allows Publishers and multiple Subscribers to update transactional data. Conflicts are possible in this scenario and would need to be detected on both the Publisher and Subscriber.
The “Publisher Schema owner” capability describes the ability of the replica to own the schema of the dataset being replicated and also publish changes to the replicated schema. Typical deployment scenarios involve the Publisher owning this capability. It is not anticipated, however, that this capability will reside with the Subscriber replica when the Subscriber replica is the authoritative copy of the data.
The “conflict detection capability at Publisher” capability describes that if conflicts are possible, such conflicts are detected at the Publisher.
The “conflict detection capability at Subscriber” capability describes that if conflicts are possible, such conflicts are detected at the Subscriber.
The “conflict resolution capability at Publisher” capability describes that if conflicts are possible, such conflicts are resolved at the Publisher.
The “conflict resolution capability at Subscriber” capability describes that if conflicts are possible, such conflicts are resolved at the Subscriber.
The “Subscriber side change forwarding” capability allows the Subscriber to forward changes received from other replicas to the Publisher.
The “upload Subscriber's changes to a single Publisher” capability allows a change at the Subscriber to propagate to the first Publisher it synchronizes with, but not to Publishers contacted at subsequent merges. The limitation with this is that other Publishers only get this change via the Publisher that first synchronized with the Subscriber after the change was made.
The “upload Subscriber's changes to a multiple Publisher” capability allows a change at the Subscriber to propagate to multiple Publishers with which it synchronizes.
The “minimize redundant propagation of changes” allows the synchronization session to send only changes that are not already present on the destination. It is very possible in synchronization scenarios for a replica to already have seen a set of changes from a given partner. This could be due to out of band changes or if the Subscriber synchronizes with an alternate Publisher.
The “non-authoritative restore of publisher from subscriber” capability allows the scenario of restoring publisher to an older state and replicate data from subscriber to publisher to bring the publisher up-to-date with the subscriber.
The “non-authoritative restore of subscriber from publisher” capability allows the scenario of restoring subscriber to an older state and replicate data from publisher to subscriber to bring the subscriber up-to-date with the publisher.
The “preserve partition consistency for Publisher side updates” capability guarantees publisher side updates to be propagated to the Subscriber such that the subset of data at the Subscriber consistent with the Publisher.
The “accept out of partition updates on Subscriber” capability allows the Subscriber replica to upload changes to the Publisher that fall outside the partition to which the subscriber has subscribed.
The “preserve partition consistency for Subscriber side updates by sending compensating changes” capability prevents a Subscriber replica from uploading changes to the Publisher that fall outside the partition to which the subscriber has subscribed. Additionally, the Publisher propagates changes to the subscriber that revert such offending changes.
The following table groups these capabilities into five different sync protocol levels: L1-L5. It should be understood, however, that any number of capabilities may grouped into any number of protocol levels, and any protocol level may include any number of capabilities.
Message formats that may be used in a layered synchronization protocol will now be described. A “Message ID” may be defined as <Major Version Of Protocol>.<Minor Version of Protocol>.<Message Category>.<Message within category>. Which messages are valid for protocols at which levels will be described in detail below.
The originator of a “requestPublications” message [MessageID: 1.0.1.1] is the client. This message is sent by client to request the list of Publications that are available and the Subscriber has access to. An example “requestPublications” message follows:
The /requestPublications/security element specifies the security credentials of the Subscriber. It conforms to one of the Security Description Languages understood by the recipient. The recipient should send all the Publications that the Subscriber has access to in response to this message. The recipient may send Publications that the Subscriber does not have access to so that it may discover the presence of such publications, but it should not allow the Subscriber to subscribe to a publication that it does not have access to.
The /requestPublications/filter element specifies which publications the Subscriber wishes to enumerate. It conforms to one of the Filter Languages understood by the recipient. The recipient should send all the Publications that match this filter in response to this message. The recipient may send Publications that do not match the filter, but it should not.
The originator of a “conveyPublications” message [MessageID: 1.0.1.2] is the server. This message is sent as a response to a “conveyPublications” message sent by the Subscriber to request the list of Publications that are available and the Subscriber has access to. An example “conveyPublications” message follows:
The /conveyPublications/id element is a GUID identifying this request. Recipients MAY use this id to detect duplicate responses to the requestPublications message, but do NOT HAVE to do so. The /conveyPublications/publication element specifies the attributes of the publications that the Subscriber wishes to enumerate. The /conveyPublications/publication/id element uniquely (GUID) identifies this publication for the purposes of subscription. If a subscription request is sent via a requestSubscription message, it must specify the value of this attribute in the /requestSubscription/publication/id element.
The originator of the “requestSubscription” message [MessageID: 1.0.1.3] is the client. This message is sent by client to request a subscription to a given publication. An example “requestSubscription” message follows:
The /requestSubscription/id element is a GUID identifying this request. Recipients MAY use this id to detect duplicate requestSubscription messages, but do NOT HAVE to do so. The /requestSubscription/publication/id element contains the id (copied from /conveyPublications/publication/id) of the publication the Subscriber wishes to subscribe to. The /requestSubscription/partition_identifier element contains a generic string the uniquely identifies the partition of data the Subscriber is interested in. This allows the Subscriber to request a subscription to a partition which is parameterized subset of data available at the Publisher. For example, the “SalesPersonData” publication might have made available different data sets unique to all the sales personnel in a company. The partition identifier allows the Subscriber to request a subscription to a specific data set—for example “sales person id=Mary Kate” could identify the identity of the salesperson.
The originator of a “grantSubscription” message [MessageID: 1.0.1.4] is the server. This message is sent by server to acknowledge the client's request for a subscription to a given publication. An example “grantSubscription” message follows:
The /grantSubscription/id element is a GUID identifying this request. The /grantSubscription/subscription/id element contains the id (copied from /requestSubscription/id) of the subscription request the Publisher wishes to acknowledge.
The originator of a “removeSubscription” message [MessageID: 1.0.1.5] is the client. This message is sent by client to remove a subscription to a given publication. An example “removeSubscription” message follows:
The /removeSubscription/id element is a GUID identifying this request. Recipients MAY use this id to detect duplicate removeSubscription messages, but do NOT HAVE to do so. The /removeSubscription/publication/id element contains the id (copied from /conveyPublications/publication/id) of the publication the Subscriber wishes to subscribe to. The /removeSubscription/partition_identifier element contains a generic string the uniquely identifies the partition of data the Subscriber is interested in. This allows the Subscriber to identify the subscription to a partition to which it has subscribed.
The originator of an “ackRemoveSubscription” message [MessageID: 1.0.1.6] is the server. This message is sent by server to acknowledge the client's request for removal of a subscription to a given publication. An example “ackRemoveSubscription” message follows:
The /ackRemoveSubscription/id element is a GUID identifying this request. The /ackRemoveSubscription/subscription/id element contains the id (copied from /removeSubscription/id) of the subscription removal request the Publisher wishes to acknowledge.
The originator of a “requestPublicationSchema” message [MessageID: 1.0.2.1] is the client. This message is sent by client to request the schema corresponding to a given publication. An example “requestPublicationSchema” message follows:
The /requestPublicationSchema/publication/id element contains the id (copied from /conveyPublications/publication/id) of the publication the Subscriber has subscribed to.
The originator of a “conveyPublicationSchema” message [MessageID: 1.0.2.2] is the server. This message is sent by server in response to the requestPublicationSchema message. An example “conveyPublicationSchema” message follows:
The /conveyPublicationSchema/publicationSchema element contains the publication schema defined as an XSD. The /conveyPublicationSchema/publicationSchema/schema Version element contains the version of the publication schema.
The originator of a “requestInitialData” message [MessageID: 1.0.2.3] is the client. This message is sent by client to request the initial data set corresponding to the subscription. An example “requestInitialData” message follows:
The originator of a “conveyInitialData” message [MessageID: 1.0.2.4] is the server. This message is sent by server in response to the requestInitialData message. An example “conveyInitialData” message follows:
The originator of a “requestDownloads” message [MessageID: 1.0.3.1] is the client. This message is sent by client to request incremental data to download. An example “requestDownloads” message follows:
The /requestDownloads/lastDownloadSyncAnchor element contains the sync anchor that the Subscriber received from the Publisher during the previous synchronization. This allows the Publisher to download only the changes that have occurred after the time the Subscriber last synchronized.
The originator of a “conveyDownloads” message [MessageID: 1.0.3.2] is the server. This message is sent as a response to a requestDownloads message sent by the Subscriber. An example “requestDownloads” message follows:
The /conveyDownloads/changes element contains the incremental data changes in an XML form. The XML data adheres to the xsd schema for the publication sent in the conveyPublicationSchema message. The /conveyDownloads/downloadSyncAnchor element contains the sync anchor that the Subscriber MUST persist after having successfully processed all the downloads. This allows the Publisher to subsequently only send downloads for data that has changed since the previous synchronization session.
The originator of a “conveyuploads” message [MessageID: 1.0.3.3] is the subscriber. An example “conveyuploads” message follows:
The /conveyUploads/changes element contains the incremental data changes in an XML form. The XML data adheres to the xsd schema for the publication sent in the conveyPublicationSchema message. The /conveyUploads/uploadSyncAnchor element contains the sync anchor that the Publisher returns in the ackUploads message after it has successfully consumed all the uploaded data. This allows the Subscriber to subsequently only send uploads for data that has changed since the previous synchronization session.
The originator of an “ackUploads” message [MessageID: 1.0.3.3] is the publisher. An example “ackUploads” message follows:
The /ackUploads/uploadSyncAnchor element contains the sync anchor that the Publisher returns to the Subscriber. This allows the Subscriber to subsequently only send uploads for data that has changed since the previous synchronization session.
The originator of a “publisherErrors” message [MessageID: 1.0.4.1] is the publisher. This message is sent by publisher in response to any of the client requests to indicate error states. An example “publisherErrors” message follows:
The /publisherError/error_id element identifies the error. The /publisherError/errorSource element identifies the source of the error. The /publisherError/errorDescription element identifies the error using a string representation.
In an example embodiment, the Publisher can understand multiple levels at one time. The Subscriber would select a level from among the several levels offered, and operate at that level. Thus, the Subscriber could select the lowest (i.e., simplest) level at which it can operate and still provide all the features that it would need to perform in a particular scenario.
Protocol layering provides for classifying capabilities in such a way that capabilities that are unnecessary for a certain scenario, where data handling might not be as complex, are not necessarily provided. The capabilities can be grouped based on typical, real-world scenarios. The capabilities in a certain group map to one or more real-world scenarios. Thus, only the lowest required protocol level needs to be provided. Higher-level protocols are accumulative and can service lower-level applications. For example, if a node supports level 3, then it also supports level 2 and level 1. The server should be configured (or implemented) to handle up to the maximum level. If the client comes in with a request that is not supported by the highest-level protocol the server can support, then the server will simply not respond. For example, if the client supports level 3, and the server supports only level 2, then the server may be unable to support the client's request.
A first subset of the set of defined capabilities may be grouped into a first-level protocol, L1. L1 may be applicable to a scenario as depicted in
The discovery protocol defines the set of messages that are needed to establish a synchronization relationship between a client (Subscriber) and a server (Publisher). Suppose, for example, that a Publisher makes data available. A Subscriber “discovers” from the Publisher what data is available. The Subscriber may be interested in a certain subset (partition) of the available data, and asks for that subset.
The first phase of this protocol is optional since it allows any L1 client to talk to any L1 server and discover the set of publications that are available and accessible. The request subscription phase of the protocol is mandatory in order to establish the synchronization relationship between the Publisher and Subscriber replicas. The following table provides a list of messages that may be included in the discovery protocol.
The initial data population protocol defines the set of messages that are needed to populate the data set of the Subscriber replica that has already successfully established a subscription to a given Publication. The following table provides a list of messages that may be included in the initial data population protocol.
The following table provides a list of messages that may be included in the initial data population protocol.
A second subset of the set of defined capabilities may be grouped into a second-level protocol, L2. L2 may be applicable to a scenario as depicted in
L2 may include a discovery protocol, an initial data population protocol, and an incremental synchronization protocol. L2 may have capabilities that are cumulative over L1 capabilities. Additionally, L2 protocol allows subscribers to make updates to the data.
The discovery and initial data population protocol messages for L2 are the same as for L1. L2, however, allows subscribers to make updates to the data. The incremental synchronization part of the protocol has an additional phase to send changes from subscriber to the publisher, as described in the following table.
A third subset of the set of defined capabilities may be grouped into a third-level protocol, L3. L3 may be applicable to a scenario as depicted in
L3 may include discovery and initial data population protocols that are the same as L2. L3 may have capabilities that are cumulative over L2 capabilities. Additionally, L3 protocol allows multiple subscribers to make updates to the same set of data. It detects and resolves conflicts at the publisher side. To handle conflicts due to simultaneous updates to the same data by multiple subscribers, the L3 exchanges lineage information for each changed entity in its incremental synchronization phase, which is described in the following table.
Similarly, a fourth subset of the set of defined capabilities may be grouped into a fourth-level protocol, L4, a fifth subset of the set of defined capabilities may be grouped into a fifth-level protocol, L5, and so on.
L4 may have capabilities that are cumulative over L3, and may be applicable to a scenario as depicted in
L5 may have capabilities that are cumulative over L4, and may be applicable to a scenario as depicted in
Although not required, the invention can be implemented via an application programming interface (API), for use by a developer or tester, and/or included within the network browsing software which will be described in the general context of computer-executable instructions, such as program modules, being executed by one or more computers (e.g., client workstations, servers, or other devices). Generally, program modules include routines, programs, objects, components, data structures and the like that perform particular tasks or implement particular abstract data types. Typically, the functionality of the program modules may be combined or distributed as desired in various embodiments. Moreover, those skilled in the art will appreciate that the invention may be practiced with other computer system configurations. Other well known computing systems, environments, and/or configurations that may be suitable for use with the invention include, but are not limited to, personal computers (PCs), automated teller machines, server computers, hand-held or laptop devices, multi-processor systems, microprocessor-based systems, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and the like. An embodiment of the invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network or other data transmission medium. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
With reference to
Computer 110 typically includes a variety of computer readable media. Computer readable media can be any available media that can be accessed by computer 110 and includes both volatile and nonvolatile, removable and non-removable media. By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer storage media includes both 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, but is not limited to, random access memory (RAM), read-only memory (ROM), Electrically-Erasable Programmable Read-Only Memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CDROM), digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by computer 110. 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, radio frequency (RF), infrared, and other wireless media. Combinations of any of the above should also be included within the scope of computer readable media.
The system memory 130 includes computer storage media in the form of volatile and/or nonvolatile memory such as ROM 131 and RAM 132. A basic input/output system 133 (BIOS), containing the basic routines that help to transfer information between elements within computer 110, such as during start-up, is typically stored in ROM 131. RAM 132 typically contains data and/or program modules that are immediately accessible to and/or presently being operated on by processing unit 120. By way of example, and not limitation,
The computer 110 may also include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only,
The drives and their associated computer storage media discussed above and illustrated in
A monitor 191 or other type of display device is also connected to the system bus 121 via an interface, such as a video interface 190. In addition to monitor 191, computers may also include other peripheral output devices such as speakers 197 and printer 196, which may be connected through an output peripheral interface 195.
The computer 110 may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 180. The remote computer 180 may be a personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer 110, although only a memory storage device 181 has been illustrated in
When used in a LAN networking environment, the computer 110 is connected to the LAN 171 through a network interface or adapter 170. When used in a WAN networking environment, the computer 110 typically includes a modem 172 or other means for establishing communications over the WAN 173, such as the Internet. The modem 172, which may be internal or external, may be connected to the system bus 121 via the user input interface 160, or other appropriate mechanism. In a networked environment, program modules depicted relative to the computer 110, or portions thereof, may be stored in the remote memory storage device. By way of example, and not limitation,
One of ordinary skill in the art can appreciate that a computer 110 or other client devices can be deployed as part of a computer network. In this regard, the present invention pertains to any computer system having any number of memory or storage units, and any number of applications and processes occurring across any number of storage units or volumes. An embodiment of the present invention may apply to an environment with server computers and client computers deployed in a network environment, having remote or local storage. The present invention may also apply to a standalone computing device, having programming language functionality, interpretation and execution capabilities.
Number | Date | Country | Kind |
---|---|---|---|
1518/DEL/2006 | Jun 2006 | IN | national |