Explicit casualty control in a client/server system
First Claim
1. A method of ensuring integrity of data in a social network service, wherein the social network service comprises a plurality of nodes that share a data set, said method comprising:
- receiving, by a processor of a first node of the plurality of nodes, an update request from a client node to update the data set, wherein the first node stores a first copy of the data set;
performing, by the first node, an update to the first copy of the data set in response to the update request;
updating, by the processor of the first node, a first counter that reflects a state of the first copy of the data set, wherein the first counter is cooperatively maintained by the plurality of nodes to indicate the state of the data set when an update from the first node was last received and recorded by the first node;
providing, by the processor of the first node, the client node with a token that comprises the first counter;
notifying, by the processor of the first node, other nodes of the plurality of nodes of the update made to the first copy of the dataset, wherein the other nodes are notified of the update by the processor asynchronously;
receiving, by a second node of the plurality of nodes, a read request for the data set from the client node, wherein the read request includes the token;
comparing, by the second node, a state of the data set indicated by the first counter of the received token to a state of the data set at the second node indicated by a second counter at the second node; and
when the state of the data set indicated by the second counter at the second node is not the same as the state of the data set indicated by the first counter of the received token, delaying, by the second node, responding to the read request of the client node until the state of the data set at the second node is updated to be the same as the state of the data set indicated by the first counter of the received token.
1 Assignment
0 Petitions
Accused Products
Abstract
Embodiments of the present invention provide a protocol for ensuring data integrity of requests made by clients of a social network service. In particular, when a client gets a confirmation from an update request, the confirmation is accompanied by a token that provides information about the update. When the client next makes a read request it passes the token along with the read request. The node at the social network service receiving the request then waits until it makes sure that it has received any notifications that precede the state represented by the token before it processes the request and replies to the client. The token might be, among other things, a physical timestamp, a counter reflecting transactions committed on a database server, or a vector timestamp. In addition, the same technique can be used to ensure ordering between read requests.
13 Citations
13 Claims
-
1. A method of ensuring integrity of data in a social network service, wherein the social network service comprises a plurality of nodes that share a data set, said method comprising:
-
receiving, by a processor of a first node of the plurality of nodes, an update request from a client node to update the data set, wherein the first node stores a first copy of the data set; performing, by the first node, an update to the first copy of the data set in response to the update request; updating, by the processor of the first node, a first counter that reflects a state of the first copy of the data set, wherein the first counter is cooperatively maintained by the plurality of nodes to indicate the state of the data set when an update from the first node was last received and recorded by the first node; providing, by the processor of the first node, the client node with a token that comprises the first counter; notifying, by the processor of the first node, other nodes of the plurality of nodes of the update made to the first copy of the dataset, wherein the other nodes are notified of the update by the processor asynchronously; receiving, by a second node of the plurality of nodes, a read request for the data set from the client node, wherein the read request includes the token; comparing, by the second node, a state of the data set indicated by the first counter of the received token to a state of the data set at the second node indicated by a second counter at the second node; and when the state of the data set indicated by the second counter at the second node is not the same as the state of the data set indicated by the first counter of the received token, delaying, by the second node, responding to the read request of the client node until the state of the data set at the second node is updated to be the same as the state of the data set indicated by the first counter of the received token. - View Dependent Claims (2, 3, 4)
-
-
5. A system for ensuring integrity of data in a social network service, wherein the social network service comprises a plurality of nodes that share a data set, the system comprising:
-
a computer memory containing instructions and a first copy of the data set; and a processor of a first node of the plurality of nodes configured to execute the instructions to; receive a first update request from a client node to update the data set; perform an update on the first copy of the data set in response to the first update request; update a counter that reflects a state of the first copy of the data set, wherein the counter is cooperatively maintained by the plurality of nodes to indicate the state of the data set when an update from the first node was last received and recorded by the first node; provide the client node with a token that reflects a state of the counter when the update to the first copy of the data set was performed; notify other nodes of the plurality of nodes of the update made to the first copy of the data set, wherein the other nodes are notified of the update by the processor asynchronously; receive a second update request for the data set from the client node, wherein the second update request includes the token; compare a state of the data set indicated by the state of the counter reflected in the received token to a current state of the data set indicated by the counter; and when the state of the data set indicated by the state of the counter in the received token is not the same as the current state of the data set indicated by the counter, delay responding to the read request of the client node until additional changes to the data set are received by the first node. - View Dependent Claims (6, 7, 8)
-
-
9. A method of ensuring integrity of data in a social network service, wherein the social network service comprises a plurality of nodes that share a data set, and wherein each node of the plurality of nodes stores its own copy of the data set, said method comprising:
-
receiving, by a processor of a first node of the plurality of nodes, a first update request from a client node to update the data set; performing, by the processor of the first node, an update on the copy of the data set at the stored at the first node in response to the first update request; updating, by the processor of the first node, a counter to reflect a state of the copy of the data set at the first node, wherein the counter is cooperatively maintained by the plurality of nodes to indicate a current state of the data set; providing, by the first node, the client node with a token that reflects a state of the counter when the update to the copy of the data set at the first node was performed; notifying, by the processor of the first node, other nodes of the plurality of nodes of the update made to the copy of the data set at the first node, wherein the other nodes are notified of the update by the processor asynchronously; receiving, by the processor of the first node, a second update request for the data set from the client node, wherein the second update request includes the token; comparing, by the processor of the first node, a state of the data set reflected by the received token to a current state of the data set indicated by the counter; and when the state of the data set reflected by the received token is not the same as the current state of the data set indicated by the counter, delaying, by the processor of the first node, responding to the read request of the client node until additional changes to the data set are received by the first node. - View Dependent Claims (10, 11, 12, 13)
-
Specification