Graceful degradation of websocket connections to nonpersistent HTTP-based communications
First Claim
Patent Images
1. A method for switching between a persistent communication protocol between a client and a server and a nonpersistent communication protocol between the client and the server, the method comprising:
- establishing a persistent connection between the client and the server;
determining that the server can switch between the persistent and the nonpersistent communication protocols;
monitoring a battery of the client;
when a power level of the battery falls below a first threshold, terminating the persistent connection; and
initiating one or more nonpersistent connections between the client and the server;
wherein the persistent connection is a WebSockets connection, the WebSocket connection comprising a WebSocket object that remains open when the persistent connection is terminated and the one or more nonpersistent connections are initiated.
1 Assignment
0 Petitions
Accused Products
Abstract
Systems, methods, and apparatus for enabling communications between a client and server are herein disclosed such that a connection between the client and server can be switched from a persistent to a nonpersistent connection. Persistent connections tend to drain battery power and cause other degradations, and thus switching to nonpersistent connections, at least temporarily, can preserve battery power and enable other advantages.
-
Citations
27 Claims
-
1. A method for switching between a persistent communication protocol between a client and a server and a nonpersistent communication protocol between the client and the server, the method comprising:
-
establishing a persistent connection between the client and the server; determining that the server can switch between the persistent and the nonpersistent communication protocols; monitoring a battery of the client; when a power level of the battery falls below a first threshold, terminating the persistent connection; and initiating one or more nonpersistent connections between the client and the server; wherein the persistent connection is a WebSockets connection, the WebSocket connection comprising a WebSocket object that remains open when the persistent connection is terminated and the one or more nonpersistent connections are initiated. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A client hardware device configured to partake in a communication connection with a server, the client comprising a non-transitory memory comprising:
-
a protocol switching checker module that determines if the server can support, and switch between, persistent and nonpersistent communication protocols; a persistent connection module that establishes a persistent connection between the client and the server; a client state monitor that monitors a state of the client and initiates termination of the persistent connection when the state meets a predefined criterion; and a nonpersistent connection module that establishes at least one nonpersistent connection between the client and the server once the state meets the predefined criterion; wherein the persistent connection is a WebSockets connection; and wherein a WebSocket object of the WebSockets connection remains open when the persistent connection is switched to the one or more nonpersistent connections. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
-
-
21. A websocket decision engine of a web runtime engine of a client comprising:
-
a means for establishing a persistent connection with a server; a means for monitoring a state of the client; a means for terminating the persistent connection when the state of the client meets a predefined criterion; and a means for replacing the persistent connection with a nonpersistent connection subsequent to the state of the client meeting the predefined criterion; wherein the websocket decision engine further maintains a JavaScript WebSocket object associated with the persistent connection after termination of the persistent connection. - View Dependent Claims (22, 23, 24)
-
-
25. A non-transitory, tangible computer readable storage medium of a server, encoded with processor readable instructions to perform a method for carrying out communication between a client and the server, the method comprising:
-
receiving a connection request from a client including a query as to whether the server is able to engage in nonpersistent as well as persistent connections; returning a response to the client acknowledging that the server can engage in both nonpersistent and persistent connections; engaging in persistent communication with the client via a persistent connection; listening for a request for nonpersistent communication from the client once the persistent communication ends; receiving the request for nonpersistent communication from the client; and engaging in nonpersistent communication with the client; maintaining a JavaScript WebSocket object associated with the persistent connection after termination of the persistent connection. - View Dependent Claims (26, 27)
-
Specification