Patent application title:

Providing real-time events to applications

Publication number:

-

Publication date:
Application number:

15/224,341

Filed date:

2016-07-29

✅ Patent granted

Patent number:

US 10,291,607 B1

Grant date:

2019-05-14

PCT filing:

-

PCT publication:

-

Examiner:

Samson B Lemma | Arya Golriz

Agent:

LaForgia Law, P.C.

Adjusted expiration:

2036-07-29

Smart Summary: An app provider can send notifications and messages directly to users' devices without needing a third-party service. When users are connected to the app provider's system, they receive these notifications instantly. If users are not connected, the app provider will save the messages and send them the next time the users connect. This method simplifies the process by eliminating the need for unique device tokens typically used by third-party services. Overall, it allows for more efficient communication between the app and its users. 🚀 TL;DR

Abstract:

The present disclosure describes systems and methods for an app provider to deliver information—such as notifications, alerts, messages, and other data—between client devices without the use of a third-party push token. When receivers are connected to the app provider system, the app provider will deliver a notification and the communication to the receivers without the use of a third-party push token. When receivers are not connected to the app provider system, the app provider may cache communications and notifications until the next time the receiver connects to the app provider.

Inventors:

Assignee:

Applicant:

Interested in similar patents?

Get notified when new applications in this technology area are published.

Classification:

H04L63/083 »  CPC main

Network architectures or network communication protocols for network security for supporting authentication of entities communicating through a packet data network using passwords

H04L63/102 »  CPC further

Network architectures or network communication protocols for network security for controlling access to network resources Entity profiles

Description

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to U.S. Provisional Application No. 62/290,301, entitled, “Providing Real-Time Events to Applications,” filed Feb. 2, 2016 and U.S. Provisional Application No. 62/318,657, entitled, “Providing Real-Time Events to Applications,” filed Apr. 5, 2016, both of which are incorporated herein in their entireties by reference. This application is also related to U.S. application Ser. No. 15/224,314, entitled, “Providing Real-Time Events to Applications,” filed concurrently herewith, the entirety of which is herein incorporated by reference.

BACKGROUND OF THE INVENTION

When a user downloads an app, the user may be provided with options of the types of notifications the app can receive. For instance, the user may indicate that the app can receive notifications, such as alerts, badges, sounds, or any combination thereof. In order to receive these notifications, the app must register with a third-party notification system, such as Apple Push Notification (APN) service or Google Cloud Messaging (GCM) service. In response to receiving a registration request from an app, the third-party notification system will generate a unique device token, which is provided to the app on the client device.

After receiving the unique device token, the app transmits the unique device token to the app provider (e.g., the app developer). Accordingly, the app provider will use the unique device token to provide information, such as communications, data, content, updates, or notifications, to the app. For instance, the app may be a messaging tool and the information may be a message intended for another user of an app. Alternatively, the information may be a notification generated by the app provider. The app provider obtains the receiver app's unique device token and prepares the information for delivery to the receiver's app. Once the information has been prepared, it is transmitted to the third-party notification service, along with the receiver app's unique device token. The third-party notification service receives the information and unique device token from the app provider and uses the unique device token to route the information to the correct device. Upon receiving the information, the client device uses the received unique device token to associate the information with the appropriate app and provides the information to the correct app.

BRIEF DESCRIPTION OF THE DRAWINGS

Various embodiments of the invention are disclosed in the following detailed description and the accompanying drawings.

FIG. 1 illustrates an app provider system according to one embodiment.

FIG. 2 shows an example of a node in app provider system according to an embodiment of the disclosure.

FIG. 3 illustrates an exemplary process for an app connecting to the app provider system.

FIG. 4 illustrates a flowchart according to one embodiment for handling communications received from a user app addressed to another user's app.

FIG. 5 shows an exemplary flow communications between two communicants connected to the same node.

FIG. 6 illustrates an example of exchanging communications between user devices connected to different nodes in the app provider system.

FIGS. 7A and 7B illustrate embodiments of the app provider system handling communications when a user device is not connected to the app provider system.

FIG. 8 illustrates an exemplary process for handling communications without the use of a third-party push token.

FIG. 9 shows an exemplary process for handling a node failure in the app provider system.

FIGS. 10A and 10B illustrates an example of the app provider system handling a node failure.

FIG. 11 shows a process for provisioning a new node in an app provider system.

FIGS. 12A and 12B show an example of the app provider system provisioning a new node.

DETAILED DESCRIPTION

The invention can be implemented in numerous ways, including as a process; an apparatus; a system; a composition of matter; a computer program product embodied on a computer readable storage medium; and/or a processor, such as a processor configured to execute instructions stored on and/or provided by a memory coupled to the processor. In this specification, these implementations, or any other form that the invention may take, may be referred to as techniques. In general, the order of the steps of disclosed processes may be altered within the scope of the invention. Unless stated otherwise, a component such as a processor or a memory described as being configured to perform a task may be implemented as a general component that is temporarily configured to perform the task at a given time or a specific component that is manufactured to perform the task. As used herein, the term ‘processor’ refers to one or more devices, circuits, and/or processing cores configured to process data, such as computer program instructions.

A detailed description of one or more embodiments of the invention is provided below along with accompanying figures that illustrate the principles of the invention. The invention is described in connection with such embodiments, but the invention is not limited to any embodiment. The scope of the invention is limited only by the claims and the invention encompasses numerous alternatives, modifications and equivalents. Numerous specific details are set forth in the following description in order to provide a thorough understanding of the invention. These details are provided for the purpose of example and the invention may be practiced according to the claims without some or all of these specific details. For the purpose of clarity, technical material that is known in the technical fields related to the invention has not been described in detail so that the invention is not unnecessarily obscured.

The present disclosure describes a system and method that allows an app provider to facilitate the delivery of communications—such as alerts, messages, content, gaming data, and other data—between the app provider system and client devices, as well as among client devices, without the use of a third-party push token.

The app provider's system includes a load balancer and a cluster of nodes to provide users with the functionality offered by the app. For example, the cluster of nodes may allow users of the app to interact with each other. Alternatively, the cluster of nodes may provide a gaming interface to users of the app. In this regard, the cluster of node may include physical servers, virtual machines, or any combination thereof to render the services offered by the app provider.

Each node in the cluster of nodes includes at least a reactor module, a processor module, a plurality of queues, and an incoming message queue. In operation, client devices connect to the node and register with the app provider's system via the reactor module. The processor module includes a distributed routing table that contains entries for each connected client device and to which node they are connected. Each of the plurality of queues is assigned to a client device connected to a node in the cluster and stores communications for delivery to the client node. The incoming message queue is a distributed storage for all information received by the app provider. Entries in the receiver's queue include a pointer to the communication stored in the incoming message queue.

Additionally, each node includes replication data for at least one other node in the app provider system. The replication data includes the reactor module, the processor module, a plurality of queues, and the incoming message queue. The plurality of replicated queues may maintain the same state information as the plurality of queues on the node hosting the receiver's queue.

As noted above, a client device will connect to a node in the cluster of nodes. Specifically, the load balancer will distribute client devices amongst the nodes in the cluster. Once connected to the node, the client device will provide authentication information to the node. The node will verify the authentication information provided by the client device. If the verification fails, the node will deny the connection request.

However, when the verification is successful, the reactor module will register the client device with the cluster of nodes. Registration includes creating an ephemeral identifier for the client device, to which the device is bound. Next, the reactor module creates an entry in the distributed routing table for the client device that includes a client identifier, the ephemeral identifier, and information about which node the client device is connected to. Finally, the entry is propagated to the other nodes to update the distributed routing table maintained on those nodes.

Once registration is complete, a secure, persistent connection between the client device and the node is created. This persistent connection allows the client device to send and receive communications, such as messages, notifications, and other data, more efficiently and securely than through the use of a third-party notification system.

For example, when a first user, Alice, wants to communicate with a second user, Bob, she will connect to the app provider system and compose her message. After sending her communication, Alice's app will transmit it to the node her device is connected to. The reactor module receives the communication and provides the communication to the incoming message queue. While storing the communication in the incoming message queue, the reactor module will process the communication to determine how to handle the communication. For example, if the communication is a secure message, the reactor module may determine one or more receivers of the secure message. This may include determining an ephemeral identifier for each of the receivers of the secure message. If the reactor module recognizes the ephemeral identifier, it determines that the receiver's device is connected to the same node as Alice. Accordingly, the reactor module will route the communication directly to the receiver, Bob, without any further processing required by the node.

However, if the reactor module does not recognize the receiver's ephemeral identifier, it passes Alice's communication to the node's processor module. The processor module accesses the distributing routing table to determine if Bob's device is connected to the app provider system, and if so which node in the app provider system. If Bob's device is connected to a different node in the app provider system, the first node packages Alice's communication and transmits it to the reactor module of the node that Bob's device is connected to. The reactor module on the second node adds a notification to Bob's queue. Further, the second reactor module provides notification to Bob's device that a communication has been received. Accordingly, Bob's device will receive the notification in due course from his queue.

If the processor module determines that the receiver's devices are not connected, the app provider system may employ one of several fallback mechanisms to deliver Alice's communication. For instance, as communications are continually received for Bob, notifications would accumulate in Bob's assigned queue, with each entry in the queue having a pointer to the location of the communication in the incoming message queue. The pointer may track the accumulated notifications received by the app provider system since the last time Bob's device connected. The next time Bob's device connects to the app provider system, the newly received notifications are delivered in the order that they were received. For instance, Bob's queue may be flushed from the location of the pointer onward. Additionally, the pointer may be used to retrieve communications in Bob's queues that were indicated as previously delivered. In this regard, the app provider system may store communications in accordance with end-user service level agreements. Alternatively, the failback mechanism may include sending the communication, such as a message and notification, to a third-party notification service. The third-party notification service may then provide the notification to Bob's device using standard techniques. Accordingly, Bob may log into the app provider to retrieve his communications after receiving notification from the third-party notification server.

Periodically, one of the nodes in the app provider system may fail. In these situations, the client devices connected to that node will attempt to reconnect to the app provider system. Accordingly, the load balancer will redistribute the client devices across available nodes using load balancing techniques. In the event of a node failure, information that has not yet been delivered to client devices will not be lost. In this regard, user queues are not necessarily located on the node that the client device is connected to. Further, each queue is replicated on at least one other node. Accordingly, notifications from the replicated queue will be provided to the client device when the app provider system detects a connection event.

Further, in times of high volume, the app provider system may add additional nodes to deal with the additional volume. In this regard, the app provider system may provision a new node for the cluster. The new node may send a broadcast to the other nodes in the app provider system. Based on the other nodes' responses, the app provider system may realign to accommodate the new node. After realignment, the new node may be configured as a participant in the app provider system. This includes installing the reactor module, the processor module, a plurality of queues, and the incoming message queue. Further, the new node will be provided with replication information for at least one other node in the app provider system. Once the new node is configured, it will be allowed to receive connection requests from client devices and perform the processing described above.

Accordingly, the above-described system and processes allow app providers to provide information to client devices more securely and efficiently without the use of a push token provided by a third-party notification service. While the examples describe providing notifications and messages without the use of a third-party push token, the systems and processes may be applicable to other techniques, such as receiving notifications, messaging, file transfers, news, and other communications from the app provider and other third parties. For example, the app provider may want to provide a communication regarding an update to the app to all client devices. The app provider transmits the notification to every client device using the techniques described above. In particular, the reactor modules on each node determine whether the client device is connected thereto. If it is, the notification is added to the client device's queue and delivered in due course. If not, the notification passes to the processor module, which determines the node that the client device is connected to. The notification is forwarded to that node's reactor module, where it is subsequently added to the client device's queue to be delivered in the order in which it was received.

FIG. 1 illustrates an app provider system 100 according to one embodiment of the disclosure. The app provider system 100 includes a load balancer 110 and six nodes: 120-1, 120-2, 120-3, 120-4, 120-5, and 120-n. In various embodiments, the load balancer 110 is a high availability proxy that provides fast and reliable load balancing for secure, persistent connections. Additionally, the six nodes illustrated in FIG. 1 may include physical servers, virtual machines, or any combination thereof. In various embodiments, the nodes may be a plurality of virtual machines provided by a cloud service provider. In this regard, the virtual machines may be located on physical servers in a data center, server farm, or cloud-computing environment. According to various embodiments, the app provider system 100 may be distributed amongst a plurality of data centers around the world that communicate with each other. In this regard, the app provider system may include a load balancer for each data center, server farm, and/or cloud-computing environment. Furthermore, each data center, server farm, and/or cloud-computing environment may include any number of nodes to handle the workload for that data center. Accordingly, the app provider system may provision or remove nodes as discussed in greater detail below.

FIG. 1 also shows client devices 130, 132, 134, 136, and 138 connected to various nodes in app provider system 100. Client devices 130, 132, 134, 136, and 138 may be any device capable of downloading and executing an app provided by the app provider system 100, including, for example, mobile devices—such as laptops, smart phones, tablets, and phablets; computing devices—such as desktop computers and virtual machines; and internet-enabled devices—such as appliances, manufacturing equipment, and industrial equipment. Accordingly, client devices 130, 132, 134, 136, and 138 may be configured to access the app provider system 100 via the downloaded app. Additionally, FIG. 1 shows the app provider system 100 connected to a third-party notification system 150. The third-party notification system 150 may include Apple Push Notification (APN) service and/or Google Cloud Messaging (GCM) service. In operation, client devices 130, 132, 134, 136, and 138 may connect to the app provider system 100 using the downloaded app via a network, such as the Internet. For example, if the app is a secure messaging app, client devices may connect to the app provider system 100 to send and receive messages using an app installed on the client devices. In another example, the app may be a game and the client devices access the app provider system to interact with the gaming environment.

In order to provide the functionality provided by the app, each node in the app provider system needs to be configured to provide the services offered by the app. FIG. 2 illustrates a node 120-n in app provider system 100. Node 120-n includes a processor 210, a memory 220, and an interface 240 all interconnected by bus 230.

Processor 210 may be any processor capable of interacting with the components of node 120-n. For example, processor 210 may include a processor, multiprocessors, a multicore processor, a dedicated controller, such as an ASIC or an FPGA, or any combination thereof. Memory 220 may store information accessible by processor 210, including instructions and data that may be executed or otherwise used by the processor 210 for providing functionality to the app. For example, memory 220 may include a plurality of modules that, when executed by processor 210, perform functionality that enables the app to interact with the app provider system and other users of the app. In particular, memory 220 includes an incoming message queue 2250; a plurality of user queues 2260-0, 2260-1, 2260-n; a processor module 2270; and a reactor module 2280. The incoming message queue 2250 may be configured to store communications until they are delivered. For example, if the app is a secure messaging app, incoming message queue 2250 may store communications, such as messages, pictures, video, animated gifs, content, etc., until they are delivered to a recipient. Alternatively, if the app is a game, the incoming message queue 2250 may store an opponent's move or countermove until it is delivered to the intended user. Each of the plurality of user queues 2260-0, 2260-1, and 2260-n may be assigned to app users and configured to enqueue notifications and other communications for delivery to the assigned user. In various embodiments, the plurality of user queues 2260-0, 2260-1, and 2260-n may be distributed commit logs; however, the plurality of user queues may be any suitable queue including, for example, first-in first out (FIFO) queues, circular queues, priority queue, etc. Furthermore, the plurality of user queues may not be located on the same node that the user's app is connected to. Instead, the nodes may communicate with each other to add events to each user's assigned queue. The processor module 2270 may be configured to route information to users connected to different nodes. In this regard, processor module 2270 may include a distributed routing table 2272. Distributed routing table 2272 maintains routing information that reflects which nodes that users are connected to. The reactor module 2280 may be configured to accept users' connection requests, generate ephemeral identifiers for each of the users connected to the node, and route information between users connected to the same node. In order to accommodate the queues and modules, memory 220 may be any type of media capable of storing the information above, including a non-transitory computer-readable medium or any other suitable medium that stores data that may be read with the aid of an electronic device, such as a hard-drive, solid state drive, memory card, flash drive, ROM, RAM, DVD, or other optical disks, as well as other write-capable and read-only memories. Memory 220 may include short term or temporary storage as well as long term or persistent storage. According to some embodiments, memory 220 may be a storage area network (SAN) that is accessible by processor 210.

Interface(s) 240 may be dedicated hardware, software, or a combination thereof that is capable of connecting node 120-n to a network. In particular, interface(s) 240 may be capable of connecting and communicating with client devices that have an instantiation of the app installed thereon. Further, interface(s) 240 may be configured to communicate and interact with other nodes in the app provider system 100. In this regard, interface(s) 240 may include various configurations and use various communication protocols including Ethernet, TCP/IP, ATM, Simple Object Access Protocol (SOAP), Representational State Transfer (REST), cellular and wireless communication protocols (e.g. 802.11, LTE), instant messaging, HTTP and SMTP, and various combinations of the foregoing.

In order to access the full functionality of the app, user devices will need to connect to the app provider system. FIG. 3 illustrates a process 300 for connecting to the app provider system.

Process 300 begins in block 310 when a connection request is received from one of the client's apps. According to various embodiments, the load balancer will receive a connection request from the client app that includes an application identifier. The load balancer then determines whether the client app has previously connected to a node in the app provider system. In some embodiments, the load balancer hashes the received application identifier to generate an ephemeral identifier. The load balancer uses the generated ephemeral identifier to determine if the client app has previously connected to the system, and, if so, routes the client app to the node with which it previously connected. If the load balancer determines that the client app has not previously connected to the app provider system, the process proceeds to route the client app to an available node in the app provider system. In block 320, the connection request may be authenticated. In some embodiments, the reactor module located on the node will perform the authentication. In some embodiments, the authentication information may be a blob of data based on the user's password that is received from the client device and used to decrypt information stored on the app provider system. If the app provider system successfully decrypts the information using the received blob of data, then the user's identity is validated. Alternatively, the authentication information may include a username and password, which the reactor module compares to a database of authentication information. In still yet other examples, the authentication information may include multifactor authentication. For instance, the user may have to enter a password and a one-time code or biometric information and a one-time password. Accordingly, the reactor module may compare the multifactor authentication information to information stored by the app provider system to determine whether to authenticate the user and allow the app to connect to the app provider system.

If the authentication request fails, the process proceeds to block 340 where the app's connection request is denied. However, if the authentication is successful, the process proceeds to block 330 in which a secure, persistent connection is established between the client device and the app provider system and an ephemeral identifier is generated for the client device. According to various embodiments, the ephemeral identifier is generated by the reactor module. In particular, the reactor module may generate the ephemeral identifier by concatenating a node identifier and a hash of information related to the client device. The information related to the client device may include a username, device information—such as hardware identifiers, or any combination thereof. In block 332, the ephemeral identifier is bound to the client's device. In block 334, an entry is created in the distributed routing table that includes a client identifier, the ephemeral identifier, and information about which node the client device is connected to. As noted above, the entries in the routing table may be used to route information to clients' apps, and specifically, the nodes that those clients are connected to. Finally, in block 336, the newly created entry is distributed to other nodes in the app provider system. In this regard, the other nodes may update their distributed routing tables to reflect the new connection and enable information to be routed to the new device.

After a user app has connected to the app provider system, the user app may begin to interact with the app provider system. According to some examples, this may include communicating with other users of the app. FIG. 4 illustrates a flowchart of how the app provider system handles communications received from a sender's app that are addressed to one or more receivers. As used herein, “communication(s)” may include: notifications (e.g., push notifications), text messages, chat room messages, file sharing, file collaboration, control messages, commands, e-mails, documents, audiovisual files, Short Message Service messages (SMSes), or telecommunication data, such as voice calls (i.e., VOIP), teleconferences, video calls, and video conferences. Additionally, communications may include electronic transactions, such as credit card security, password protection, directories, and storage drive protection, video on demand security, online gaming, gambling, electronic distribution of music, videos, documents, online learning systems, databases, cloud storage and cloud environments, bank transactions, voting processes, military communications, security of medical records, communication between medically implanted devices and doctors, etc.

The process begins in block 410 with the app provider system receiving a communication from a sender's app. In various embodiments, a node in the app provider system receives the communication from the sender's app. In particular, the reactor module receives the incoming communication via a secure, persistent channel, such as Secure Sockets Layer (SSL) or Transport Layer Security (TLS). In various embodiments, incoming communications may also be encrypted via the Advanced Encryption Standard (AES) using at least one 256-bit encryption key that is shared between the app and the provider system. Upon receiving the communication, the reactor module parses the incoming communication in block 420. According to various embodiments, the communication is an encrypted message intended for one or more receivers. In this regard, the communication includes a header and a payload. The header includes sender information, receiver information, and decryption information. In various embodiments, the decryption information includes information necessary to decrypt the sender's message that only the intended receiver can decrypt and access. The payload of the communication includes the encrypted message and metadata identifying the one or more receivers of the sender's encrypted message.

In block 430, the node determines the one or more receivers' ephemeral identifiers. In various embodiments, the reactor module uses the metadata included in the payload of the communication to determine the one or more receivers of the communication. In this regard, the reactor module calculates the ephemeral identifier for each of the one or more receivers by performing a hash function on the receiver information contained in the metadata. Alternatively, the reactor module may refer to the distributed routing table to look up the one or more receivers' ephemeral identifier. For example, the reactor module may use the one or more receivers' information contained in the metadata, or a hash thereof, to obtain the one or more receivers' ephemeral identifier from the distributed routing table. In block 440, the communication is transmitted to the incoming message queue. That is, the reactor module stores the communication to the incoming message queue. According to some embodiments, writing the communication to the incoming message queue includes storing the communication on a node in a data center that is in geographic proximity to the receiver. In various embodiments, the communication is stored in the incoming message queue of the node that the receiver is connected to.

In block 450, the node determines whether one or more receivers' devices are connected to the same node as the sender device. In particular, the reactor module may perform the determination. In block 460, the node provides notification to the one or more receivers' apps when one or more of the receivers' devices are connected to the same node as the sender's device. In this regard, the reactor module may publish the notification to each of the one or more receivers' user queues. Alternatively, the reactor module may bypass the one or more receivers' user queues and provide the one or more receivers' apps with a push notification that they have a new communication. In yet another alternative, the reactor module may push the communication directly to the one or more receivers.

If, however, the reactor module determines that the one or more receiver devices are not connected to the same node as the sender device, the reactor module passes the communication to the processor module, which will determine whether the one or more receiver devices are connected to the app provider system in block 470. In various embodiments, the processor module uses the distributed routing table to determine whether one or more receiver devices are connected to the app provider system. When one or more receivers are connected to the app provider system, the processor module determines which node(s) the one or more receivers are connected to in block 480. For example, the processor module uses information contained in the distributed routing table to determine which node(s) the one or more receivers are connected to. In block 482, the newly received communication is added to the one or more receivers' user queues. In due course, the one or more receivers' apps will receive a notification of the new communication from their respective user queue. For instance, the notifications may be provided to the receivers' apps as soon as they arrive in the user queue, thereby providing near real-time notification of received communications. Alternatively, notifications may be provided from user queues using a throttling technique. That is, if the one or more receivers are active on the app provider system, alerts may be pushed every minute. However, if the one or more receivers are inactive, the time between alerts being pushed may gradually be increased. This technique can be repeated when the one or more users becomes active again.

When the node determines that one or more receivers are not connected to the app provider system, the app provider system relies on a fallback mechanism to deliver the communication to one or more receiver devices in block 490. In various embodiments, the fall back mechanism includes publishing received communications in the user queues. The next time the user's app connects to the app provider system, the app provider system detects a connection event and delivers the communications, or at least notifications of the communications, to the user's app. That is, the user's queue would be flushed of all communications received since the last time the user device connected to the app provider system. Alternatively, the fallback mechanism may provide the communication to a third-party notification system for notification and delivery using a push token via the techniques described above.

Turning to FIG. 5, an exemplary flow of a communication between two communicants connected to the same node is illustrated. In particular, FIG. 5 shows a first user device 130 (“Alice”) and a second user device 132 (“Bob”) connected to node 120-1. As discussed in greater detail above, node 120-1 includes incoming message queue 2250, a plurality of user queues 2260, a processor module 2270, and a reactor module 2280. According to the example illustrated in FIG. 5, Alice and Bob have both connected to a node in the app provider system; specifically, the load balancer delegated Alice and Bob to node 120-1. Further, node 120-1 has authenticated both Alice and Bob and assigned them each a unique ephemeral identifier. Thus, node 120-1 maintains a first secure, persistent connection with the first user device 130 and a second secure, persistent connection with the second user device 132.

In 510, Alice's user device 130 transmits a communication to the node 120-1 via the first secure, persistent connection. As noted above, the communication may be an encrypted message. In 520, the node 120-1 receives the communication from Alice's user device 130. Specifically, the reactor module 2280 receives the communication from Alice's user device 130 and begins processing the communication. This may include, for example, determining one or more receivers of the communication and transmitting the communication to the incoming message queue (not shown). According to various embodiments, the reactor module may generate an ephemeral identifier for each of the one or more receivers in order to determine the one or more receivers. In alternative embodiments, the reactor module may access the distributed routing table to determine the one or more receivers' ephemeral identifiers and which node the receiver device is connected.

After determining the one or more receivers' ephemeral identifiers, the reactor module 2280 determines whether any of the one or more receivers are connected to node 120-1. In this regard, the reactor module 2280 may maintain a table or database of user devices connected to node 120-1. Accordingly, the reactor module 2280 may refer to its own table or database to determine whether one or more receivers are connected to the node 120-1. Alternatively, the reactor module 2280 may access the distributed routing table maintained by the processor module 2270 to determine whether one or more receivers are connected to the same node as the sender device. If one or more receiver devices are not connected to the same node as the sender, the reactor module passes the communication to the processor module for further processing as discussed in greater detail below. However, if the one or more receiver devices are connected to the same node as the sender device, the reactor module routes the communication directly to the one or more receiver devices without any further processing required by the app developer system. In 530, the reactor module transmits Alice's communication directly to Bob's user device 132. By allowing the app provider system to handle the received communication and forward it to the intended recipient, the app provider system provides quicker and more efficient notification of the communication in a more secure manner than using a third-party notification system since third-party notification systems may be imitated by a malicious user, thereby exposing users of the app to receiving malicious communications.

More often than not, user devices will be connected to different nodes in the app provider system. FIG. 6 illustrates an example of exchanging communications between user devices connected to different nodes in the app provider system.

FIG. 6 shows Alice's first user device 130 connected to a first node 120-1 and Bob's second user device 132 connected to a second node 120-2. The first node 120-1 includes a first incoming message queue 2250; a plurality of first user queues 2260-0, 2260-1, . . . 2260-n; a first processor module 2270; and a first reactor module 2280. Similarly, the second node 120-2 includes a second incoming message queue 2350; Bob's user queue 2260-0; a plurality of second user queues (e.g., 2360-1, . . . 2360-n); a second processor module 2370, and a second reactor module 2380. The first node 120-1 and the second node 120-2 may be two nodes located in a cluster in the same data center. Alternatively, the first node 120-1 and the second node 120-2 may be located in different clusters in different data centers that belong to a single app developer system. In this regard, the two data centers may be interconnected via the Internet. Alternatively, the two data centers may be interconnected through a secure channel, such as a Virtual Private Network (VPN), leased lines, SSL, dark fiber, multiprotocol label switching (MPLS), multichassis link aggregation (MLAG), or any other secure communications channel. Further, the first incoming message queue 2250 and the second message queue 2350 may be a distributed table or database that is shared amongst the plurality of nodes in the app provider system. Alternatively, the first incoming message queue 2250 and the second message queue 2350 may be a storage area network (SAN) that is accessible by all the nodes in the app provider system. According to other examples, the first incoming message queue 2250 and the second message queue 2350 may be a single incoming message queue distributed amongst a plurality of nodes.

Returning to FIG. 6, Alice wishes to send a communication to Bob. In this regard, Alice's user device 130 transmits the communication to the first node 120-1 via a secure, persistent connection, such as SSL or TLS, in 610. The first reactor module 2280 receives the communication from Alice's user device 130 and begins processing it. For instance, the first reactor module 2280 transmits the communication to the first incoming message queue 2250 in 620. In 630, the first incoming message queue 2250 may distribute the communication to other incoming message queues. Distributing the communication may include providing copies of the communication to other incoming message queues on other nodes. Alternatively, distributing the communication may include updating table or database entries on other nodes' incoming message queues. In embodiments where the incoming message queue is a single queue accessible by all nodes in the app provider system, distributing the communication may be skipped.

While the communication is being stored in the incoming message queue, the reactor module 2280 processes the communication. As noted above, the reactor module 2280 determines whether one or more receiver devices are connected to the first node 120-1. Returning to the example illustrated in FIG. 6, the reactor module 2280 determines that Bob, one of the receivers of Alice's communication, is not connected to node 120-1. Accordingly, the first reactor module 2280 will pass the communication to the first processor module 2270 for further processing.

The first processor module 2270 obtains receiver information from the communication. After obtaining the receiver information, the first processor module 2270 may access the distributed routing table to determine if Bob's device 132 is connected to the app provider system. If the first processor module 2270 determines that Bob's device 132 is connected to the app provider system, the first processor module 2270 determines which node Bob's device 132 is connected to. In 650, the first processor module 2270 forwards Alice's communication to the second reactor module 2380 located on the second node 120-2.

Upon receiving the communication, the second reactor module 2380 may deliver the communication to the Bob's device 132 in 660. Delivery of the communication may include publishing the communication to Bob's queue 2360-0. In this regard, Bob's device may receive notification of Alice's communication in due course. According to this example, the notification received by Bob's device 132 would include information such that the app could retrieve the communication from the incoming message queue. Alternatively, reactor module 2380 may push a notification and the communication directly to Bob's device.

From time to time, a user device may disconnect from the app provider system. For instance, the user device may be powered down or the user may sever the secure, persistent connection between the user app and the app provider system. FIGS. 7A and 7B illustrate different embodiments for the app provider system's failback mechanisms for handling communications when a user device is not connected to the app provider system.

Turning to FIG. 7A, a first node 120-1 and a second node 120-2 in an app provider system are shown. The nodes are similar to the nodes described above with respect to FIG. 6. FIG. 7A shows Alice's first user device 130 connected to the first node 120-1; while Bob's second user device 132 is shown as not being connected to the app provider system.

When Alice wants to communicate with Bob, her user device 130 transmits a communication to the first node 120-1 as illustrated in 710. As discussed above, the first reactor module 2280 receives the communication from Alice's user device 130 and begins processing it. Additionally, the communication is stored in the first incoming message queue 2250 in 720 and may distributed to other incoming message queues 2350 in 730. While the message is being stored in the incoming message queues, the reactor module 2280 may further process the communication; specifically, it determines whether one or more receiver devices are connected to the first node 120-1. As illustrated in FIG. 7A, Bob is not connected to the app provider system. Accordingly, the reactor module 2280 determines that Bob, one of the receivers of Alice's communication, is not connected to the same node as the sender. In this regard, the first reactor module 2280 transmits the communication to the first processor module 2270, which will handle delivery of Alice's communication.

As noted above, the first processor module 2270 determines receiver information and uses information contained in the distributed routing table to determine if Bob's device 132 is connected to the app provider system. Accordingly, the first processor module will determine that Bob's device 132 is not connected to the app provider system. Instead, the first processor module 2270 may determine which node Bob's user queue is located on from the information contained in the distributed routing table. According to some embodiments, a user's user queue does not have to be located on the same node that the user's device connects to when accessing the app provider system. In 750, the first processor module 2270 will forward the communication to the reactor module on the node in which the user's user queue is located. As illustrated in FIG. 7A, the first processor module 2270 forwards the communication to reactor module 2380 on node 120-2. The first processor module 2270 may also include an indication that the communication is intended for a user that is not connected to the app provider system so that the second node avoids repeating the determining steps already performed by the first node. Upon receiving the communication, the reactor module 2380 may publish an entry to Bob's user queue. As illustrated in FIG. 7A, the reactor module 2380 adds an entry to Bob's user queue 2360-0. According to some embodiments, Bob's user queue 2360-0 includes a pointer 2362. The pointer may be incremented each time an entry is published to the user queue. In this regard, the pointer 2362 may be used to keep track of the entries added since a user last connected to the app provider system. When the user (e.g., Bob) reconnects to the app provider system, the pointer may be used to flush the notifications from the user queue. For instance, if Bob receives four notifications while disconnected from the app provider system, the pointer refers to the first notification received after Bob disconnected from the app provider system. When Bob reconnects to the app provider system, that first communication, along with the three communications received thereafter, will be pushed to the app located on Bob's user device. According to some embodiments, the pointer 2362 may be able to replay messages. That is, the pointer may be able to go backwards through a user's user queue to push communications that have been previously delivered to a user device. This may be used to restore communications that have been previously lost or when a user acquires a new device.

Turning to FIG. 7B, an alternative approach for handling communications when a user device is not connected to the app provider system is shown. In this regard, FIG. 7B shows an app provider system with a first node 120-1, a second node 120-2, a third node 120-3, a fourth node 120-4, a fifth node 120-5, and a sixth node 120-n. Additionally, FIG. 7B includes a third party notification system 150. Like FIG. 7A, Alice's user device 130 is connected to the first node 120-1 and Bob's user device 132 is disconnected from the app provider system.

As with previous examples, when Alice wants to communicate with Bob, she composes a communication and her user device 130 transmits it the first node 120-1 for delivery to Bob's device 132 as illustrated in 710. In 720, the communication is stored in the incoming message queue. Further, the communication may be distributed to the incoming message queue located on other nodes in the app provider system in 730. The reactor module 2280 determines whether Bob is connected to the first node 120-1 while the communication is being stored. Since Bob is not connected to the app provider system in FIG. 7B, the reactor module 2280 determines that Bob is not connected to the same node as the sender and passes the communication to the first processor module 2270. In this regard, the first processor module 2270 uses information contained in the distributed routing table to determine if Bob's device 132 is connected to the app provider system. Based on the example in FIG. 7B, the first processor module 2270 determines Bob's device 132 is not connected to the app provider system.

According to the embodiment illustrated in FIG. 7B, the first processor module 2270 relies on the third party notification system 150 to provide notification and delivery of the communication to the receiver's user device. In block 760, the first processor module 2270 packages the communication and transmits the communication to the third party notification system. As noted above, a user registers an app with a third party notification when configuring which notifications they would like to receive. In response to this registration, the third party notification system provides the app a unique device token that the third party notification system will use to provide notifications and communications to the app. Accordingly, the app will provide the unique device token to the app provider system so the app provider system may deliver notifications and communications via the third-party notification system. In this regard, packaging the communication may include combining the receiver's unique device token and the communication in a datagram that is transmitted to the third party notification system. If the receiver has more than one device, then the unique device token associated with each of the users' devices are included in the package transmitted to the third party notification system. Returning to the example shown in FIG. 7B, the first processor module 2270 transmits a unique device token and Alice's communication to the third party notification system 150 in 760. Accordingly, the third party notification system will deliver the notification and the communication to Bob's device 132 in due course.

FIG. 8 illustrates an exemplary process 800 for handling communications without the use of a push token provided by a third-party notification system. Process 800 begins in block 810 when the app provider system receives a communication for one or more receivers. In block 820, the app provider system determines whether the one or more receiver devices are connected to the app provider system. As discussed above, there are several techniques for the app provider system to determine whether the one or more receiver devices are connected to the app provider system. After determining that the one or more receiver devices are not connected to the app provider system, the app provider system publishes the communication to the one or more receivers' user queues in block 830. For example, the communication may be directed to a node in the app provider system that includes the user's user queue. The reactor module will receive the incoming communication and publish it to the respective user's user queue. In block 840, the app provider system updates replicas of the one or more receiver's user queues on other nodes in the app provider system. In this regard, each node in the app provider system includes replication information for at least one other node in the app provider system, including user queues. Accordingly, when the primary user queue is updated, the replicated user queues are updated to mirror the information contained in the primary user queue. In block 850, the app provider system delivers communications published to the one or more receivers' user queues during the next connection event. That is, the next time that the user device connects to the app provider system, the notifications and/or messages received by the app provider system while the user was disconnected will be delivered to the user's device.

As communications increase, nodes in the app provider system may fail. Such failures may be catastrophic for the app provider system. In addition to being a disruption of service, users may lose communications. Those two factors may deter users from downloading the app provider's app. In this regard, there is a need for nodes in the app provider system to fail that minimizes disruption of service and ensures that communications are not lost. FIG. 9 shows an exemplary process 900 for handling a node failure in the app provider system.

In block 910, the app provider system detects a node failure. In this regard, the other nodes in a system may detect that one or more nodes have failed. For example, nodes may transmit a heartbeat signal to indicate their presence. When the heartbeat signal is not detected, the other nodes may determine that the node has been lost. Alternatively, one or more nodes may be designated to periodically poll other nodes to determine their state. According to some embodiments, the load balancer may be responsible for determining node availability, including when one or more nodes fail.

When a node fails, the users that were connected to that node will attempt to reconnect to the app provider system. In block 920, the load balancer distributes reconnection requests to other nodes in the app provider system. As noted above, each node in the app provider system may include replication information of at least one other node. In block 930, the failed node's replication data is distributed to other nodes. This distribution may be equitable with each remaining node in the app provider system receiving a portion of the failed node's replication data. Alternatively, the app provider system may transfer the failed node's replication data to a single node, or several nodes, that assume the failed node's workload.

In block 940, the app provider system provides communications received for users that were disconnected from the app provider system when the node failed. In various embodiments, communications received after the node failed but before the user reconnected would accumulate in the user's user queue as discussed above with respect to FIG. 7A. When the user reconnects, a reconnection event is detected and the communications published to the user's user queue may be pushed to the reconnected device. Alternatively, the app provider system may rely on the third-party notification system as discussed above. According to this example, the third-party notification system would provide delivery of any notifications and/or communications on behalf of the app provider system.

Turning to FIGS. 10A and 10B, an example of the app provider system handling a failed node is illustrated. The app provider system illustrated in FIGS. 10A and 10B is similar to the one described above with respect to FIG. 1. In this regard, the app provider system 100 includes a load balancer 110 and six nodes: a first node 120-1, a second 120-2, a third node 120-3, a fourth node 120-4, a fifth node 120-5, and a sixth node (nth node) 120-n. FIG. 10A shows that a first client device 130 and a second client device 132 are connected to node 120-1; a third client device 134 is connected to node 120-2; a fourth client device 136 is connected to node 120-3; and a fifth client device 138 is connected to node 120-4.

FIGS. 10A and 10B also illustrate that every node in the app provider system includes replication information from at least one other node. For example, the first node 120-1 stores replication information 1020-2 for the second node 120-2; the second node 120-2 maintains replication information 1020-3 for the third node 120-3; the third node 1020-3 stores replication information 1020-4 for the fourth node 120-4; the fourth node 120-4 stores replication information 1020-5 for the fifth node 120-5; the fifth node 120-5 stores replication information 1020-n for the nth node 120-n; and the sixth node 120-n stores replication information 1020-1 for the first node 120-1. While FIGS. 10A and 10B illustrate one node being replicated on another node, replication information may be spread across several nodes. For instance, the replication information 1020-1 may be stored on multiple nodes, such as the sixth node 120-n and second node 120-2. The replication information may include configuration information. For instance, the replication information may include copies of the node's reactor module, processor module, plurality of user queues, and incoming message queue. Accordingly, the replication information may be updated regularly to reflect the state of the node. Since user information and communications are replicated across other nodes in near real-time, that information will not be lost in the event of a node failure.

Returning to FIG. 10A, the first client device 130 and the second client device 132 are shown as being connected to first node 120-1. However, first node 120-1 fails and the connections between the first client device 130 and the second client device 132 are terminated, as indicated by the broken lines. As noted above, the first client device 130 and the second client device 132 will attempt to reconnect to the app provider system. In this regard, both devices will reconnect via the load balancer, which will distribute the first client device 130 and the second client device 132 to other nodes in the system.

FIG. 10B shows the first client device 130 and the second client device 132 reconnected to the app provider system after the failure of the first node 120-1. Specifically, the first client device 130 reconnects to the sixth node 120-n and the second client device 132 reconnects to the second node 120-2. As noted above, the app provider system will detect a connection event for both the first user device 130 and the second user device 132. In response to detecting the connection event, the app provider system will deliver notifications and/or communications to the first and second user devices. According to some embodiments, the replication information 1020-1 on sixth node 120-n would include user queues for both the first client device 130 and the second client device 132. In this regard, the notifications and/or communications contained in the user queues stored in the replication information 1020-1 will be pushed to the first user device 130 and the second user device 132. In alternative embodiments, user queues for the first and second user devices may have been located on nodes other than the node that failed. According to these embodiments, the notifications and/or communications may be routed from the user's user queue to the user device via the node that the user device reconnected to. For example, the second user device's user queue may be located on the third node 120-3. When the second user device reconnects to the app provider system, the second user device's notifications and/or communications will be routed through the second node 120-2 as they are being delivered to the second user device 132.

The app provider system may need to occasionally provision a new node, for example, in response to a failed node or due to an increase in network traffic. FIG. 11 shows a process 1100 for provisioning a new node.

In block 1110, the app provider system provisions a new node. According to some embodiments, provisioning a new node may include requesting additional resources from a cloud service provider. These additional resources may include, for example, an additional virtual machine, more processing power, more memory, additional bandwidth, etc. In other embodiments, provisioning a new node may mean adding an additional server to the app provider system.

In block 1120, the new node broadcasts to the other nodes in the cluster. That is, the new node broadcasts a communication to the other nodes in the system to determine the overall configuration of the app provider system. In block 1130, the other nodes respond to the new node's broadcast. The response may include configuration information, geographic location, workload, and any other pertinent information for the new node. The new node receives the responses from the other nodes in the system. In block 1140, the nodes in the app provider system realign to accommodate the new node. Realignment may include redistributing user queues and the incoming message queue. Once the other nodes have realigned to accommodate the new node, the new node is configured as a participant in the cluster in block 1150. Configuring the new node may be done by at least one other node. In this regard, the new node receives copies of the reactor module, the processor module, the plurality of user queues, and the incoming message queue. Additionally, the new node's configuration may include receiving replication information for at least one other node in the app provider system. Once the new node is configured, the app provider system will allow the new node to accept connection requests from client devices in block 1160.

Turning to FIGS. 12A and 12B, an example of the app provider system provisioning a new node is shown. The app provider system shown in FIGS. 12A and 12B is similar to those described in FIGS. 1, 10A, and 10B and includes a load balancer 110 and six nodes: a first node 120-1, a second node 120-2, a third node 120-3, a fourth node 120-4, a fifth node 120-5, and a sixth node (nth node) 120-n. Further, FIGS. 12A and 12B show a first client device 130 and a second client device 132 connected to first node 120-1; a third client device 134 connected to second node 120-2; a fourth client device 136 connected to third node 120-3; and a fifth client device 138 connected to node fourth 120-4.

FIG. 12A also illustrates a seventh node 120-6 that is not part of the app provider system yet. When the app provider system needs another node, it implements the process described above in FIG. 11. Specifically, the app provider system requests an additional node, for example, in response to determining that traffic on the app provider system has increased or detecting that at least one node in the app provider system has failed. Accordingly, the seventh node 120-6 may be allocated to app provider system 100 as illustrated in FIG. 12B. After becoming part of the app provider system 100, the seventh node 120-6 broadcasts a communication to the other nodes in the system to determine the overall configuration of the app provider system. After receiving a response from the other nodes in the system, the seventh node 120-6 will receive configuration information. As illustrated in FIG. 12B, part of the configuration information the seventh node 120-6 receives includes replication information 1020-n. In this regard, the replication information may be redistributed amongst the plurality of nodes in the app provider system. FIG. 12B also illustrates how the existing nodes in the app provider system realign to accommodate the new node. After the node is configured, the load balancer 110 will begin directing connection requests to the seventh node 120-6 to redistribute the load on the app provider system.

The above-described embodiments disclose a system and method that provide an app provider the ability to deliver information without the use of a push token provided by a third-party notification service. Further, various embodiments describe the flexibility of the app provider system to handle node failures and the provisioning of additional nodes. While the foregoing embodiments have been described in some detail for purposes of clarity of understanding, the present disclosure is not limited to the details provided. There are many alternative ways of implementing the present disclosure. The disclosed embodiments should be construed as being illustrative and not restrictive.

Claims

What is claimed is:

1. A system, comprising:

a hardware processor configured to:

receive, at one of a plurality of nodes in a system, a connection request from a first client device, wherein the connection request includes authentication information;

determine whether the first client device has previously connected to the system;

when the first client device has not previously connected to the system, authenticate the first client device using the authentication information contained in the connection request;

after the first client device is authenticated, generate an ephemeral identifier for the first client device by concatenating a node identifier with hashed identifying information of the first client device, wherein the node identifier uniquely identifies the node to which the first client device is connected to amongst the plurality of nodes in the system;

bind the first client device to the generated ephemeral identifier; and

create an entry in a distributed routing table for the first client device that includes the ephemeral identifier;

provide the entry to the plurality of nodes in the system to update the distributed routing table located on each of the plurality of nodes;

maintain an incoming message queue to store one or more communications received from a plurality of second client devices; and

deliver, via a secure channel, a first communication from the incoming message queue to the first client device based on the entry for the first client device in the distributed routing table; and

a memory coupled to the hardware processor and configured to provide the hardware processor with instructions.

2. The system of claim 1, wherein the authentication information includes a username and password.

3. The system of claim 2, wherein the hardware processor is further configured to:

compare the username and password received from the first client device to a username and password maintained by the system.

4. The system of claim 1, wherein the authentication information includes a blob of data indicating that the password entered by the user on the first client device matches the password stored locally on the device.

5. The system of claim 1, wherein the secure channel is established when the first client device is successfully authenticated.

6. A method comprising:

receiving, at one of a plurality of nodes in a system, a connection request from a first client device, wherein the connection request includes authentication information;

determining, by one of a plurality of nodes in a system, whether the first client device has previously connected to the system;

when the first client device has not previously connected to the system, authenticating the first client device using the authentication information contained in the connection request;

after the first client device is authenticated, generating an ephemeral identifier for the first client device by concatenating a node identifier with hashed identifying information of the first client device, wherein the node identifier uniquely identifies the node to which the first client device is connected to amongst the plurality of nodes in the system;

binding the first client device to the generated ephemeral identifier;

creating an entry in a distributed routing table for the first client device that includes the ephemeral identifier;

providing the entry to the plurality of nodes in the system to update the distributed routing table located on each of the plurality of nodes;

maintaining an incoming message queue to store one or more communications received from a plurality of second client devices; and

delivering, via a secure channel, a first communication from the incoming message queue to the first client device based on the entry for the first client device in the distributed routing table.

7. The method of claim 6, wherein the authentication information includes a username and password.

8. The method of claim 7, further comprising:

comparing the username and password received from the first client device to a username and password maintained by the system.

9. The method of claim 6, wherein the authentication information includes a blob of data indicating that the password entered by the user on the first client device matches the password stored locally on the device.

10. The method of claim 6, wherein the secure channel is established when the first client device is successfully authenticated.

11. A non-transitory computer-readable medium comprising instructions that when, executed by at least one hardware processor, perform the steps of:

receiving, at one of a plurality of nodes in a system, a connection request from a first client device, wherein the connection request includes authentication information;

determining whether the first client device has previously connected to the system;

when the first client device has not previously connected to the system, authenticating the first client device using the authentication information contained in the connection request;

after the first client device is authenticated, generating an ephemeral identifier for the first client device by concatenating a node identifier with hashed identifying information of the first client device, wherein the node identifier uniquely identifies the node to which the first client device is connected to amongst the plurality of nodes in the system;

binding the first client device to the generated ephemeral identifier; and

creating an entry in a distributed routing table for the first client device that includes the ephemeral identifier;

providing the entry to the plurality of nodes in the system to update the distributed routing table located on each of the plurality of nodes;

maintaining an incoming message queue to store one or more communications received from a plurality of second client devices; and

delivering, via a secure channel, a first communication from the incoming message queue to the first client device based on the entry for the first client device in the distributed routing table.

12. The non-transitory computer-readable medium of claim 11, wherein the authentication information includes a username and password.

13. The non-transitory computer-readable medium of claim 12, further comprising instructions for:

comparing the username and password received from the first client device to a username and password maintained by the system.

14. The non-transitory computer-readable medium of claim 11, wherein the authentication information includes a blob of data indicating that the password entered by the user on the first client device matches the password stored locally on the device.

15. The non-transitory computer-readable medium of claim 11, wherein the secure channel is established when the first client device is successfully authenticated.

Resources

Images & Drawings included:

Sources:

Recent applications in this class:

Recent applications for this Assignee: