Maintaining persistence of a messaging system
Abstract
Methods, systems, and apparatus, including computer programs for identifying a first message in a first channel of a plurality of channels corresponding to a position in the first channel, wherein the first message is stored in a buffer having a time-to-live that has expired. The methods may also include sending, by one or more computer processors, a request for messages beginning at the position to one or more client devices that subscribe to the first channel and receiving, from at least one client device, a response message comprising one or more messages of the first channel that are at or after the position. The methods may further include retrieving messages for the first channel from one or more buffers of the first channel having time-to-lives that have not expired, and combining, by the one or more computer processors, the retrieved messages and the messages from the response message.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method, comprising:
identifying a first message in a first channel of a plurality of channels corresponding to a position in the first channel,
wherein the first message is stored in a buffer having a time-to-live that has expired;
sending, by one or more computer processors, a request for messages beginning at the position to one or more client devices that subscribe to the first channel; receiving, from at least one client device, a response message comprising one or more messages of the first channel that are at or after the position; retrieving messages for the first channel from one or more buffers of the first channel having time-to-lives that have not expired; and combining, by the one or more computer processors, the retrieved messages and the messages from the response message.
2 . The method of claim 1 , wherein each channel of the plurality of channels comprises a respective plurality of messages stored in one or more respective buffers according to an order, and wherein each buffer comprises a respective time-to-live.
3 . The method of claim 1 , comprising:
receiving a request from a second client device for messages of the first channel starting at the position.
4 . The method of claim 3 , comprising:
sending the combined messages to the second client device.
5 . The method of claim 1 , wherein the retrieved messages and the messages from the response message are combined according to an order.
6 . The method of claim 1 , wherein each of the one or more client devices store locally the one or more messages of the first channel that are at or after the position.
7 . The method of claim 1 , comprising:
selecting the response message from the client device that includes a greatest number of messages in response to the request.
8 . The method of claim 1 , wherein combining the retrieved messages and the messages from the response message comprises:
removing one or more duplicate messages from the combined messages.
9 . The method of claim 1 , wherein sending the request for messages beginning at the position to the one or more client devices that subscribe to the first channel comprises:
determining a respective connection latency to the first channel for the one or more client devices; and identifying one of the client devices having a shortest connection latency.
10 . The method of claim 1 , wherein sending the request for messages beginning at the position to the one or more client devices that subscribe to the first channel comprises:
determining time durations of respective current connection sessions to the first channel for the one or more client devices; and identifying one of the client devices having a longest current connection session.
11 . A system, comprising:
one or more computer processors programmed to perform operations to:
identify a first message in a first channel of a plurality of channels corresponding to a position in the first channel,
wherein the first message is stored in a buffer having a time-to-live that has expired;
send a request for messages beginning at the position to one or more client devices that subscribe to the first channel;
receive, from at least one client device, a response message comprising one or more messages of the first channel that are at or after the position;
retrieve messages for the first channel from one or more buffers of the first channel having time-to-lives that have not expired; and
combine the retrieved messages and the messages from the response message.
12 . The system of claim 11 , wherein each channel of the plurality of channels comprises a respective plurality of messages stored in one or more respective buffers according to an order, and wherein each buffer comprises a respective time-to-live.
13 . The system of claim 11 , wherein the operations are further to:
receive a request from a second client device for messages of the first channel starting at the position.
14 . The system of claim 13 , wherein the operations are further to:
send the combined messages to the second client device.
15 . The system of claim 11 , wherein the retrieved messages and the messages from the response message are combined according to an order.
16 . The system of claim 11 , wherein each of the one or more client devices store locally the one or more messages of the first channel that are at or after the position.
17 . The system of claim 11 , wherein to combine the retrieved messages and the messages from the response message the one or more computer processors are further to:
remove one or more duplicate messages from the combined messages.
18 . The system of claim 11 , wherein to send the request for messages beginning at the position to the one or more client devices that subscribe to the first channel the one or more computer processors are further to:
determine a respective connection latency to the first channel for the one or more client devices; and identify one of the client devices having a shortest connection latency.
19 . The system of claim 11 , wherein to send the request for messages beginning at the position to the one or more client devices that subscribe to the first channel the one or more computer processors are further to:
determine time durations of respective current connection sessions to the first channel for the one or more client devices; and identify one of the client devices having a longest current connection session.
20 . A non-transitory computer-readable medium having instructions stored thereon that, when executed by one or more computer processors, cause the one or more computer processors to:
identify a first message in a first channel of a plurality of channels corresponding to a position in the first channel,
wherein the first message is stored in a buffer having a time-to-live that has expired;
send, by one or more computer processors, a request for messages beginning at the position to one or more client devices that subscribe to the first channel; receive, from at least one client device, a response message comprising one or more messages of the first channel that are at or after the position; retrieve messages for the first channel from one or more buffers of the first channel having time-to-lives that have not expired; and combine, by the one or more computer processors, the retrieved messages and the messages from the response message.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.