Managing query subscription renewals in a messaging platform
Abstract
This disclosure relates to streaming real-time messages over time to client applications according to query subscriptions that match content from a large stream of messages exchanged on a messaging platform in a manner that increases the speed of message delivery, effectively controls the management of computer resources to handle the fluctuation of the number of active query subscriptions, and/or increases the security of matching the query subscriptions against messages generated from the perspective of the authors while delivering those messages in real-time from the perspective of the users that initiated the query subscriptions.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method comprising:
receiving, from a user device, a query subscription for matching content in a plurality of messages posted to a messaging platform; in response to a message of the plurality of messages satisfying the query subscription, generating a response event while the query subscription is active, the response event including a message identifier; determining whether the message identifier is stored in a memory cache; in response to the message identifier being stored in the memory cache, discarding the response event; and in response to the message identifier not being stored in the memory cache: storing the response event in the memory cache; publishing the response event to a response event bus; and transmitting, over a network, the message identified by the response event on the response event bus, to the user device.
2 . The method of claim 1 , further comprising:
assigning the query subscription to at least one first event producer and at least one second event producer, each of the at least one first event producer and the at least one second event producer is configured to separately receive the plurality of messages and generate response events.
3 . The method of claim 2 , wherein the query subscription is assigned to the at least one first event producer and the at least one second event producer based on a modulo operation inputted with a user identifier associated with the query subscription.
4 . The method of claim 2 , wherein the at least one first event producer is a first event producer group having a plurality of event producers, each of the plurality of event producers configured to receive a separate portion of the plurality of messages.
5 . The method of claim 1 , further comprising:
monitoring a number of query subscriptions processed at a plurality of event producers and a size of the plurality of messages; and adjusting a number of the plurality of event producers based on the number of query subscriptions and the size of the plurality of messages.
6 . The method of claim 1 , further comprising:
determining a number of response events stored in the memory cache over a period of time; and discarding a new response event in response to the number of response events stored in the memory cache exceeding a threshold amount during the period of time.
7 . The method of claim 1 , further comprising:
generating the message based on the message identifier and a user identifier associated with the query subscription.
8 . An apparatus comprising:
at least one processor; and
a non-transitory computer-readable medium storing executable instructions that when executed by the at least one processor cause the at least one processor to:
receive, from a user device, a query subscription for matching content in a plurality of messages posted to a messaging platform;
in response to a message of the plurality of messages satisfying the query subscription, generate a response event while the query subscription is active, the response event including a message identifier;
determine whether the message identifier is stored in a memory cache;
in response to the message identifier being stored in the memory cache, discard the response event; and
in response to the message identifier not being stored in the memory cache:
store the response event in the memory cache;
publish the response event to a response event bus; and
transmit, over a network, the message identified by the response event on the response event bus, to the user device.
9 . The apparatus of claim 8 , wherein the executable instructions include instructions that when executed by the at least one processor cause the at least one processor to:
assign the query subscription to at least one first event producer and at least one second event producer, each of the at least one first event producer and the at least one second event producer is configured to separately receive the plurality of messages and generate response events.
10 . The apparatus of claim 9 , wherein the query subscription is assigned to the at least one first event producer and the at least one second event producer based on a modulo operation inputted with a user identifier associated with the query subscription.
11 . The apparatus of claim 9 , wherein the at least one first event producer is a first event producer group having a plurality of event producers, each of the plurality of event producers configured to receive a separate portion of the plurality of messages.
12 . The apparatus of claim 8 , wherein the executable instructions include instructions that when executed by the at least one processor cause the at least one processor to:
monitor a number of query subscriptions processed at a plurality of event producers and a size of the plurality of messages; and adjust a number of the plurality of event producers based on the number of query subscriptions and the size of the plurality of messages.
13 . The apparatus of claim 8 , wherein the executable instructions include instructions that when executed by the at least one processor cause the at least one processor to:
determine a number of response events stored in the memory cache over a period of time; and discard a new response event in response to the number of response events stored in the memory cache exceeding a threshold amount during the period of time.
14 . The apparatus of claim 8 , wherein the executable instructions include instructions that when executed by the at least one processor cause the at least one processor to:
generate the message based on the message identifier and a user identifier associated with the query subscription.
15 . A non-transitory computer-readable medium storing executable instructions that when executed by at least one processor cause the least one processor to execute operations, the operations comprising:
receiving, from a user device, a query subscription for matching content in a plurality of messages posted to a messaging platform; in response to a message of the plurality of messages satisfying the query subscription, generating a response event while the query subscription is active, the response event including a message identifier; determining whether the message identifier is stored in a memory cache; in response to the message identifier being stored in the memory cache, discarding the response event; and in response to the message identifier not being stored in the memory cache:
storing the response event in the memory cache;
publishing the response event to a response event bus; and
transmitting, over a network, the message identified by the response event on the response event bus, to the user device.
16 . The non-transitory computer-readable medium of claim 15 , wherein the operations further comprise:
assigning the query subscription to at least one first event producer and at least one second event producer, each of the at least one first event producer and the at least one second event producer is configured to separately receive the plurality of messages and generate response events.
17 . The non-transitory computer-readable medium of claim 16 , wherein the query subscription is assigned to the at least one first event producer and the at least one second event producer based on a modulo operation inputted with a user identifier associated with the query subscription.
18 . The non-transitory computer-readable medium of claim 16 , wherein the at least one first event producer is a first event producer group having a plurality of event producers, each of the plurality of event producers configured to receive a separate portion of the plurality of messages.
19 . The non-transitory computer-readable medium of claim 15 , wherein the operations further comprise:
monitoring a number of query subscriptions processed at a plurality of event producers and a size of the plurality of messages; and adjusting a number of the plurality of event producers based on the number of query subscriptions and the size of the plurality of messages.
20 . The non-transitory computer-readable medium of claim 15 , wherein the operations further comprise:
determining a number of response events stored in the memory cache over a period of time; and discarding a new response event in response to the number of response events stored in the memory cache exceeding a threshold amount during the period of time.Join the waitlist — get patent alerts
Track US2022358167A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.