# US 2010/0169407 A1 · Web application execution method

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2010/0169407 A1
- Document ID: US20100169407A1
- Status: Published application
- Kind: A1
- Application number: 12/426,670
- Filed: 2009-04-20
- Published: 2010-07-01
- Earliest claimed: 2008-12-29
- Assignees: Industrial Technology Research Institute
- Inventors: Hsiang-Yuan Hsueh; Yi-Bin Lin; Jun-Bin Shi
- Web page: https://patentgrep.com/patent/US20100169407A1

## CPC

- G06F 9/54: Interprogram communication
- G06F 9/52: Program synchronisation; Mutual exclusion, e.g. by means of semaphores
- G06F 2209/541: Client-server
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A web application execution method, for a client to execute a web application on a remote server is provided. A connection status between the client and the remote server is monitored. If the connection is established, an online learning process is performed to monitor the handshakes between the client and the server, thereby constructing a virtual server. If the connection is disconnected, an offline service is activated, allowing the client to execute the web application through the virtual server. If the connection is reestablished after being disconnected, a synchronization process is performed to synchronize state machines within the virtual server and the server.

## Claims

### Claim 1

A web application execution method, adaptable for a client to execute a web application on a remote server, comprising:
observing a connection status between the client and the remote server;
if the connection status is online, processing an online learning process to monitor communication sessions between the client and the remote server to establish a virtual server for providing an offline service;
if the connection status is offline, diverting the client to the virtual server to access the offline service, such that the web application is executed without disruption; and
if the connection status is reestablished from offline, processing a synchronization process to synchronize execution states of the web application from the virtual server to the remote server.

### Claim 2 (depends on 1)

The web application execution method as claimed in claim 1, wherein the online learning process comprises:
recording a request initiated by the client, and a response generated by the remote server in response to the request;
analyzing the request to obtain one or more request parameters;
analyzing the response to obtain a header section and a body section, wherein the header section comprises one or more response parameters, and the body section comprises one or more web resources, structural information and web documents;
establishing a resource mapping database, for recording relationships between the request parameters, the response parameters and the body sections; and
establishing a resource bank for storage of the web resources, the structural information and the web documents.

### Claim 3 (depends on 2)

The web application execution method as claimed in claim 2, wherein the online learning process further comprises:
analyzing relationships between multiple requests initiated by the client, and relationships between multiple responses generated by the remote server, to establish a state machine; and
establishing the virtual server based on the resource mapping database, the resource bank and the state machine.

### Claim 4 (depends on 2)

The web application execution method as claimed in claim 2, wherein the online learning process further comprises:
if a response generated by the remote server comprises a declaration file defining offline web sources that are essential for offline operations, updating the resource mapping database and the resource bank by the offline web sources defined by the declaration file.

### Claim 5 (depends on 1)

The web application execution method as claimed in claim 1, wherein the offline service comprises:
diverting a request initiated by the client to the virtual server;
the virtual server analyzing the request to obtain one or more request parameters;
looking up the resource mapping database based on the request parameters, to obtain one or more response parameters, web resources, structural information, and web documents from the resource bank corresponding to the request parameters;
constructing a virtual response from the one or more response parameters, web resources, structural information, and web documents corresponding to the request parameters; and
transmitting the virtual response to the client in response to the request.

### Claim 6 (depends on 5)

The web application execution method as claimed in claim 5, wherein the offline service further comprises, inserting an HTTP entity tag (Etag) in the header section of the virtual response to indicate that the virtual response does not need an update.

### Claim 7 (depends on 5)

The web application execution method as claimed in claim 5, wherein the offline service further comprises, if looking up of the resource mapping database fails to obtain any information corresponding to the request parameters, sending a link failure message to the client.

### Claim 8 (depends on 5)

The web application execution method as claimed in claim 5, wherein the offline service further comprises, if a request diverted to the virtual server comprises uploaded data, providing an upload queue to buffer the request and the uploaded data.

### Claim 9 (depends on 8)

The web application execution method as claimed in claim 8, further comprising:
if the connection status is online, but a request initiated by the client meets a criterion for offline execution, diverting the client to the virtual server to process the offline service.

### Claim 10 (depends on 9)

The web application execution method as claimed in claim 9, wherein the synchronization process comprises, the virtual server transmitting one or more requests received when offline to the remote server based on the state machine, such that the execution states of the web application is consistent with the remote server.

### Claim 11 (depends on 10)

The web application execution method as claimed in claim 10, wherein the synchronization process further comprises, transmitting the requests and uploaded data buffered in the upload queue to the remote server.

### Claim 12 (depends on 1)

The web application method as claimed in claim 1, wherein the virtual server is a software program installed in the client.
