WO2012070925A1 - Method and system for asynchronous processing in a web application server - Google Patents

Method and system for asynchronous processing in a web application server Download PDF

Info

Publication number
WO2012070925A1
WO2012070925A1 PCT/MY2011/000074 MY2011000074W WO2012070925A1 WO 2012070925 A1 WO2012070925 A1 WO 2012070925A1 MY 2011000074 W MY2011000074 W MY 2011000074W WO 2012070925 A1 WO2012070925 A1 WO 2012070925A1
Authority
WO
WIPO (PCT)
Prior art keywords
result
request
processing
query request
status
Prior art date
Application number
PCT/MY2011/000074
Other languages
French (fr)
Inventor
Eric Chee Soon Foong
Original Assignee
Mimos Berhad
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mimos Berhad filed Critical Mimos Berhad
Publication of WO2012070925A1 publication Critical patent/WO2012070925A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

Definitions

  • the present invention relates generally to a method and system for asynchronous processing in a web application server, more particularly to an asynchronous message processing method and system using HyperText Transfer Protocol (HTTP) targeted to be implemented in web application servers, independent of its underlying messaging technology.
  • HTTP HyperText Transfer Protocol
  • Asynchronous message processing of web applications is preferred over the traditional synchronous processing as asynchronous processing is executed based on a non-blocking scheme, allowing a main program flow to continue processing instead of waiting for a processing result from the web application server where the web application resides.
  • a messaging server is a component often used to manage these asynchronous message queues between a client and the web application server.
  • Messaging servers such as JavaEE (Enterprise Edition) servers employ its corresponding messaging technology that include Java Message Service.
  • AJAX Asynchronous Java Script and XML
  • AJAX is group of technologies brought together by Java Scripts; these technologies include HTML, Cascading Style Sheets (CSS), Document Object Model (DOM), Extended Markup Language (XML), Extensible Stylesheet Language Transformations (XSLT) and the XMLHTTPRequest object for asynchronous communication.
  • CSS Cascading Style Sheets
  • DOM Document Object Model
  • XML Extended Markup Language
  • XSLT Extensible Stylesheet Language Transformations
  • United States of America Patent Publication No. US 2007/0130293 discloses an implementation of asynchronous portal pages using only the XMLHTTPRequest component of the AJAX technology with the objective of maintaining the traditional portlet programming models, which are based on non-AJAX technology.
  • Sun Microsystems Inc released the Java Servlet Specification 3.0 that focused on delivering various new features, one of which caters for asynchronous processing of web applications.
  • requests are processed such that a main program flow or thread may return to a JavaEE server to perform other tasks, hence reducing cost and improving the efficiency of asynchronous message processing.
  • the requirement for implementing the asynchronous processing according to the Java Servlet Specification 3.0 will be compatibility of the underlying messaging technology with Java.
  • the present invention provides a method and system for asynchronous message processing, using HTTP, to be implemented in web application servers.
  • the present invention proposes a cost-effective and efficient method and system for the realization of asynchronous message processing in web applications and is targeted to be implemented in existing web application servers, independent of the underlying messaging technology employed by these web application servers.
  • a method for asynchronous processing in a web application server comprises in response to receiving a query request from a client, processing the query request and in response to receiving a result check request from the client, processing the result check request.
  • Processing the query request further comprises tracking the query request, instantiating data processing of the query request and storing processing results from data processing of the query request.
  • Processing the result check request further comprises retrieving processing results corresponding to the result check request and returning processing results to the client.
  • the query request comprises an asynchronous XMLHTTP Request and the result check request comprises a HTTP Request.
  • the web application server comprises a Web Request Handler, a Web Response Handler, a Url Store table, a Result Tracker table, a Result table and a Request Processor.
  • the Web Request Handler processes the query request by tracking the query request using the Url Store table and the Result Tracker table, instantiating data processing of the query request in the Request Processor and storing processing results from data processing of the query request in the Result table.
  • the Web Response Handler In response to receiving a result check request from the client, the Web Response Handler processes the result check request by retrieving processing results corresponding to the result check request using the Url Store table, the Result Tracker table and the Result table and returning processing results to the client.
  • the query request comprises an asynchronous XMLHTTP Request and the result check request comprises a HTTP Request.
  • the method and system for asynchronous processing in the web application server provides for a fundamental asynchronous processing flow with the assumptions that (a) during processing the query request received from the client, (i) the query request received from the client is a first instance of the said query request, i.e.
  • the query request has not been previously tracked; and (ii) the duration from instantiating data processing of the query request to before storing processing results from data processing of the query request does not exceed an expiry duration of the query request; and (b) during processing the result check request received from the client, (iii) processing results have been established at the time of retrieving processing results corresponding to the result check request.
  • the method and system for asynchronous processing in the web application server provide for alternatives of the fundamental asynchronous processing flow, wherein (a) during processing the query request received from the client, (i) the query request received from the client is a second (or subsequent) instance of the said query request, i.e. the query request has been previously tracked and (ii) the duration from instantiating data processing of the query request to before storing processing results from data processing of the query request exceeds an expiry duration of the query request; and (b) during processing the result check request received from the client, (iii) processing results have not been established at the time of retrieving processing results corresponding to the result check request.
  • FIGURE 1 illustrates a data structure of a Uniform Resource Locator (Url) Store table.
  • FIGURE 2 illustrates a data structure of a Result table.
  • FIGURE 3 illustrates a data structure of a Result Tracker table.
  • FIGURE 4 illustrates a fundamental asynchronous processing flow in a web application server for processing a query request received from a client.
  • FIGURE 5 illustrates a fundamental asynchronous processing flow in a web application server for processing a result check request received from a client.
  • FIGURES 6A & 6B illustrate an alternative of the fundamental asynchronous processing flow in a web application server for processing a query request received from a client.
  • FIGURE 7 illustrates an alternative of the fundamental asynchronous processing flow in a web application server for processing a result check request received from a client.
  • the present invention relates to a method and system for asynchronous processing in a web application server.
  • this specification will describe the present invention according to the preferred embodiments of the present invention.
  • limiting the description to the preferred embodiments of the invention is merely to facilitate discussion of the present invention and it is envisioned that those skilled in the art may devise various modifications and equivalents without departing from the scope of the appended claims.
  • the present invention more particularly relates to a method and system for asynchronous processing of web applications using HyperText Transfer Protocol (HTTP) and is to be implemented on existing web application servers.
  • HTTP HyperText Transfer Protocol
  • the present invention may be implemented independent of the underlying messaging technology employed by the web application servers and it provides an alternative method and system to implement asynchronous processing compared to the existing messaging server technology.
  • Asynchronous processing of web applications involves asynchronous processing of messages between a client and the web application server in which the web applications reside.
  • the existing XMLHTTP Request Application Programming Interface is utilized to enable the implementation of asynchronous processing of web applications.
  • the client is an entity that requests such processing and may be a described as a computing device (e.g. desktop computer, mobile computer such as laptop or handheld computing devices) with the capability of sending HTTP requests and Extended Markup Language HTTP (XMLHTTP) requests, while being able to receive and display HTTP responses comprising any one or a combination of HyperText Markup Language (HTML) file, XML file, script file, plain file, binary data, alphanumeric data or any other relevant file or data formats.
  • HTML HyperText Markup Language
  • XML file XML file
  • script file plain file
  • binary data binary data
  • alphanumeric data any other relevant file or data formats.
  • the client may often be referred to as a HTTP client.
  • the web application server may be described as a software system installed on a physical computing server machine, a virtual server machine or an embedded server within a computing device.
  • the software system is capable of receiving HTTP and XMLHTTP requests, and thereafter processing these requests accordingly.
  • the web application server comprises a Web Request Handler, a Web Response Handler, a Uniform Resource Locator (Url) Store table, a Result Tracker table, a Result table and a Request Processor.
  • the Web Request Handler and the Web Response Handler are components that receive a request and generate a response based on that request.
  • the Web Request Handler and the Web Response Handler may be implement as computer program in the form of HTTP interface such as servlets.
  • the Web Request Handler and the Web Response Handler are capable of receiving HTTP and XMLHTTP requests, and thereafter processing these requests accordingly.
  • the Request Processor may be implement as a computer program that utilizes data in the client's HTTP and XMLHTTP request to perform processing which includes retrieving data from a database, performing calculation, or performing required business logic for data processing.
  • the Request Processor generates processing results in at least one of the following forms; HTML file, XML file, script file, plain file, binary data, alphanumeric data, database table record or any other relevant file or data formats.
  • the Url Store table, the Result Tracker table and the Result table are essentially mapping tables that contain data in a predetermined structure.
  • the Url Store table, the Result Tracker table and the Result table may be in the form of a software storage format in at least one of a database table, system file or system memory. Reference is collectively being made to FIGURES 1 , 2 and 3.
  • FIGURE 1 illustrates a data structure of the Url Store table.
  • the Url Store table maps a HTTP Urlld to its corresponding expiry duration. The expiry duration is determined by a system user.
  • FIGURE 2 illustrates a data structure of the Result table.
  • the Result table stores processing results that are mapped to corresponding HTTP Urlld and Unique Id.
  • FIGURE 3 illustrates a data structure of the Result Tracker table.
  • the Result Tracker table stores processing status as well as processing start times that are mapped to corresponding HTTP Urlld and Unique Id.
  • the processing status may be represented at any one time as being any one of the following result status': 'In Process', 'Completed' or 'Expired'.
  • Result status 'In Process' denotes that data is being processed by the Request Processor.
  • Result status 'Complete' denotes that the data processing by the Request Processor is complete and that processing results are stored in the Result table.
  • Result status 'Expired' denotes that the processing duration has exceeded the expiry duration.
  • the method and system according to the present invention comprises processing a query request, in response to receiving the query request from the client and processing a result check request, in response to receiving the result check request from the client.
  • the query request comprises an asynchronous XMLHTTP Request and the result check request comprises a HTTP Request.
  • the query request which is the XMLHTTP Request, is implemented at the client-end using the XMLHTTP Request component used in standard web browsers, such as Internet Explorer and Mozilla Firefox.
  • the XMLHTTP Request comprises data, a HTTP Urlld and a boolean value that denotes the messaging type, that is either synchronous or asynchronous, the later will be denoted in the case of the present invention.
  • the query request is therefore an asynchronous Url call.
  • the result check request which is the HTTP Request comprises a HTTP Urlld corresponding to the HTTP Urlld within the XMLHTTP Request for which processing results is required to be retrieved. For every query request, there can be only one corresponding result check request.
  • the Web Request Handler In response to receiving the query request from the client, the Web Request Handler begins processing the query request by tracking the query request using the Url Store table and the Result Tracker table. The Web Request Handler then continues to instantiate data processing of the query request in the Request Processor and finally stores processing results from data processing of the query request in the Result table.
  • the Web Response Handler In response to receiving the result check request from the client, the Web Response Handler processes the result check request by retrieving processing results corresponding to the result check request using the Url Store table, the Result Tracker table and the Result table and returning processing results to the client.
  • the method and system for asynchronous processing in the web application server provides for a fundamental asynchronous processing flow with several assumptions made during processing the query request received from the client and during processing the result check request received from the client.
  • FIGURE 4 illustrates the fundamental asynchronous processing flow in the web application server for processing the query request received from the client. This figure illustrates how the asynchronous process is evoked by the query request, how query request is tracked, how the processing results is generated and stored.
  • the fundamental or basic asynchronous processing flow during the processing of the query request received from the client assumes that (i) the query request received from the client is a first instance of the said query request, i.e. the query request has not been previously tracked; and (ii) the duration from instantiating data processing of the query request to before storing processing results from data processing of the query request does not exceed an expiry duration of the query request.
  • the fundamental asynchronous processing flow during the processing of the query request begins with the HTTP client sending the query request, which is the asynchronous XMLHTTP Request, to the web application server (101).
  • the query request is received by the Web Request Handler within the web application server.
  • the web application server Upon receiving the query request from the HTTP client, the web application server instantly returns an 'In Process' status message to the HTTP client (102) to indicate that the query request is being processed.
  • the status message may be in the form of a HTML file, XML file, script file, plain file, alphanumeric data or any other relevant file or data format.
  • the query request which is the asynchronous XMLHTTP Request, comprises request data and a HTTP Urlld.
  • the Web Request Handler uses the HTTP Urlld to check the expiry duration of the query request from the Url Store table (103).
  • the Url Store table returns the expiry duration to the Web Request Handler (104).
  • the expiry duration is not utilized as the assumption is made that the duration from instantiating data processing of the query request to before storing processing results from data processing of the query request does not exceed the expiry duration of the query request.
  • the Web Request Handler then begins to track the query request. Using the HTTP Urlld of the query request, the Web Request Handler refers to the Result Tracker table to obtain any result status that may be available (105). In the fundamental asynchronous processing flow, it is assumed that the query request received from the client is a first instance of the said query request, i.e. the query request has not been previously tracked and therefore, no result status will be available.
  • the Result Tracker table returns to the Web Request Handler indicating that no results status was found (106). This indicates to the Web Request Handler that the query request has not yet been processed and hence, the Web Request Handler will then create a new record in the Result Tracker table (107).
  • This new record contains the HTTP Urlld of the query request that will be designated with a Unique Identifier (Id).
  • the Unique Id is a value that may be produced by means of any one of a database table counting number, program counting number or computer hashing program. Additionally, this new record will be designated a result status of 'In Process' and a processing start time to indicate the time when processing the request data within the query request begins. This new record will serve to track the query request throughout the entire processing flow of processing of the query request and processing the result check request which may be received from the client at a later time.
  • the Web Request Handler proceeds to instantiate data processing of the query request by passing to the Request Processor, request data within the asynchronous XMLHTTP Request (108).
  • the Request Processor uses the request data to perform processing (109) which may comprise retrieving data from a database, performing calculation, or performing required business logic for data processing.
  • the Request Processor returns the processing results to the Web Request Handler (1 10). "
  • the Web Request Handler determines if the expiry duration of the query request has lapsed by comparing the processing start time in the Result table to the current time. In the fundamental asynchronous processing flow, it is assumed that the duration from instantiating data processing of the query request to before storing processing results from data processing of the query request does not exceed the expiry duration of the query request.
  • the Web Request Handler uses the Unique Id of the query request to designate a 'Completed' result status in the Result Tracker table (11 1) ⁇ Finally, using the HTTP Urlld and the Unique Id, the Web Request Handler stores the processing results obtained from the Request Processor in the Result table (112). The processing results stored in the Result table will only be retrieved by the web application server and returned to the client upon receiving the result check request [comprising the HTTP Urlld of the query request] from the client.
  • FIGURE 5 illustrates the fundamental asynchronous processing flow in the web application server for processing the result check request received from the client. This figure illustrates how the client retrieves the processing results.
  • the fundamental asynchronous processing flow during the processing of the result check request received from the client assumes that processing results have been established at the time of retrieving processing results corresponding to the result check request.
  • the fundamental asynchronous processing flow during the processing of the result check request begins with the HTTP client sending the result check request, which is the HTTP Request, to the web application server (201).
  • the result check request is received by the Web Response Handler within the web application server.
  • the result check request comprises the HTTP Urlld of the query request for which processing results are required by the client.
  • the Web Response Handler Upon receiving the result check request from the HTTP client, the Web Response Handler then begins to retrieve processing results. Using the HTTP Urlld of the result check request, the Web Response Handler refers to the Result Tracker table to obtain the Unique Id corresponding to the HTTP Urlld of the result check request and any result status that may be available (202). The fundamental asynchronous processing flow during the processing of the result check request received from the client assumes that processing results have been established at the time of retrieving processing results corresponding to the result check request and therefore, a 'Completed' result status for the HTTP Urlld of the result check request will be available in the Result Tracker table.
  • the Result Tracker table returns to the Web Response Handler the Unique Id corresponding to the HTTP Urlld of the result check request with results status 'Completed' (203).
  • the Web Response Handler uses the Unique Id to retrieve the processing results from the Result table (204). Based on the Unique Id, the Result table returns the processing results to the Web Response Handler (205).
  • the Web Response Handler consolidates the processing results received from the Result table (206). Consolidation of the processing results may comprise combining the processing results if multiple processing results are found, or performing any formatting before returning the processing results to the HTTP client.
  • the Web Response Handler Prior to returning the processing results to the HTTP client, deletes the processing results stored in the Result table for the Unique Id corresponding to the HTTP Urlld of the result check request (207). The Web Response Handler also deletes from the Result Tracker table, the record for the Unique Id corresponding to the HTTP Urlld of the result check request (208), which is the record created by the Web Request Handler for the HTTP Urlld of the query request (107). Finally, the Web Response Handler returns the processing results to the HTTP client (209). The steps of deleting (207, 208) may be performed after the Web Response Handler returns the processing results to the HTTP client (209).
  • the method and system for asynchronous processing in the web application server provide for alternatives of the fundamental asynchronous processing flow based on the converse of the assumptions made during processing the query request received from the client and during processing the result check request received from the client.
  • FIGURES 6A & 6B illustrate the alternative of the fundamental asynchronous processing flow in the web application server for processing the query request received from the client.
  • This figure illustrates the alternative of the fundamental asynchronous processing flow during processing the query request received from the client, where (i) the query request received from the client is a second (or subsequent) instance of the said query request, i.e. the query request has been previously tracked; and (ii) the duration from instantiating data processing of the query request to before storing processing results from data processing of the query request exceeds the expiry duration of the query request.
  • the query request received from the client is a first instance of the said query request, i.e. the query request has not been previously tracked. Therefore, no result status will be available in the Result Tracker table when the Web Request Handler begins to track the query request using the HTTP Urlld of the query request, where the Web Request Handler will create a new record in the Result Tracker table (306) [as described before (107)].
  • the query request received from the client is a second (or subsequent) instance of the said query request and that the query request has in fact been previously tracked in the Result Tracker table.
  • the previously tracked query request may have any one of the following result status': 'In Process', 'Completed' or 'Expired'.
  • the processing results would have been stored in the Result table and will only be retrieved by the web application server and returned to the client upon receiving the result check request [comprising the HTTP Urlld of the query request] from the client.
  • the Web Request Handler determines if the expiry duration of the query request has lapsed by comparing the processing start time in the Result table to the current time (303). If the expiry duration of the query request has not lapsed (304), it implies that the result status should be an 'In Process' result status. As part of tracking the query request, the Web Request Handler uses the Unique Id of the query request to designate an 'In Process' result status in the Result Tracker table. Once complete, the processing results would be stored in the Result table and will only be retrieved by the web application server and returned to the client upon receiving the result check request [comprising the HTTP Urlld of the query request] from the client.
  • the Web Request Handler uses the Unique Id of the query request to designate an 'Expired' result status in the Result Tracker table (305).
  • the Web Request Handler repeats (306) the steps of creating (107), instantiating (108), designating (1 1 1) and storing (1 12) of the fundamental asynchronous processing flow during the processing of the query request. Once complete, the processing results would be stored in the Result table and will only be retrieved by the web application server and returned to the client upon receiving the result check request [comprising the HTTP Urlld of the query request] from the client.
  • the duration from instantiating data processing of the query request to before storing processing results from data processing of the query request does not exceed the expiry duration of the query request.
  • this might not always be the case as the duration from instantiating data processing of the query request to before storing processing results from data processing of the query request may exceed the expiry duration of the query request. This implies that the processing performed by the Request Processor is unable to generate processing results before the expiry duration of the query request.
  • the Web Request Handler determines if the expiry duration of the query request has lapsed by comparing the processing start time in the Result table to the current time (402).
  • the assumption made in the fundamental asynchronous processing flow is that the Request Processor is able to generate processing results before the expiry duration of the query request wherein the expiry duration of the query request would have not lapsed (403).
  • the Web Request Handler uses the Unique Id of the query request to designate a 'Completed' result status in the Result Tracker table (1 1 1).
  • the Web Request Handler stores the processing results obtained from the Request Processor in the Result table (1 12).
  • the processing results stored in the Result table will only be retrieved by the web application server and returned to the client upon receiving the result check request [comprising the HTTP Urlld of the query request] from the client.
  • the Request Processor is unable to generate processing results before the expiry duration of the query request wherein the expiry duration of the query request would have lapsed (404).
  • the Web Request Handler uses the Unique Id of the query request to designate an 'Expired' result status in the Result Tracker table. Using the HTTP Urlld and the Unique Id, the Web Request Handler stores no processing results in the Result table. In this case, no processing results will be retrieved by the web application server upon receiving the result check request [comprising the HTTP Urlld of the query request] from the client.
  • the client will be required to send a second (or subsequent) instance of the said query request, wherein the Web Request Handler repeats (306) the steps of creating (107), instantiating (108), designating (1 1 1) and storing (112) of the fundamental asynchronous processing flow during the processing of the query request.
  • the processing results would be stored in the Result table and will only be retrieved by the web application server and returned to the client upon receiving the result check request [comprising the HTTP Urlld of the query request] from the client.
  • FIGURE 7 illustrates the alternative of the fundamental asynchronous processing flow in the web application server for processing the result check request received from the client.
  • This figure illustrates the alternative of the fundamental asynchronous processing flow during processing the result check request received from the client, where processing results have not been established at the time of retrieving processing results corresponding to the result check request.
  • the fundamental asynchronous processing flow it is assumed that processing results have been established at the time of retrieving processing results corresponding to the result check request and therefore, a 'Completed' result status for the HTTP Urlld of the result check request will be available in the Result Tracker table (501).
  • processing results may have not been established at the time of retrieving processing results corresponding to the result check request, wherein the result status in the Result Tracker table may be found to be an 'In Process' or 'Expired' result status or no result status may be found in the Result Tracker table.
  • the client will be required to send the query request to the web application server, wherein the Web Request Handler will process the query request based on the either the fundamental or alternative asynchronous processing flow, and thereafter, attempt to retrieve the processing results by sending the corresponding result check request to the web application server, wherein the Web Response Handler will process the result check request based on the either the fundamental or alternative asynchronous processing flow.
  • the Web Response Handler returns a 'Processing Expired' status message to the client (503).
  • the client will be required to send a second (or subsequent) instance of the said query request, wherein the Web Request Handler repeats (306) the steps of creating (107), instantiating (108), designating (1 1 1) and storing (1 12) of the fundamental asynchronous processing flow during the processing of the query request.
  • the processing results would be stored in the Result table and will only be retrieved by the web application server and returned to the client upon receiving the result check request [comprising the HTTP Urlld of the query request] from the client.
  • the Web Response Handler returns an 'In Process' status message to the client (504).
  • the client will be required to re-send the result check request to the web application server at a later time.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention provides a method and system for asynchronous processing in a web application server, wherein the web application server comprises a Web Request Handler, a Web Response Handler, a Url Store table, a Result Tracker table, a Result table and a Request Processor. In response to receiving a query request (101) from a client, the Web Request Handler processes the query request by tracking the query request using the Url Store table and the Result Tracker table, instantiating data processing of the query request in the Request Processor and storing processing results from data processing of the query request in the Result table. In response to receiving a result check request (201) from the client, the Web Response Handler processes the result check request by retrieving processing results corresponding to the result check request using the Url Store table, the Result Tracker table and the Result table and returning processing results to the client.

Description

METHOD AND SYSTEM FOR ASYNCHRONOUS PROCESSING IN A WEB
APPLICATION SERVER
FIELD OF INVENTION
The present invention relates generally to a method and system for asynchronous processing in a web application server, more particularly to an asynchronous message processing method and system using HyperText Transfer Protocol (HTTP) targeted to be implemented in web application servers, independent of its underlying messaging technology.
BACKGROUND ART
The simplification of web application script writing translated into an evolution of the internet (or intranet) from having merely primitive static HTML web pages to containing highly dynamic web pages that have enabled various interactive online applications such as e-commerce, e-mail, online banking and share trading as well as web forums and communities. Due to the dynamic and interactive nature of web applications, efficient processing of these web applications is essential and in fact has been and still is an area of interest for research and development.
Asynchronous message processing of web applications is preferred over the traditional synchronous processing as asynchronous processing is executed based on a non-blocking scheme, allowing a main program flow to continue processing instead of waiting for a processing result from the web application server where the web application resides. A messaging server is a component often used to manage these asynchronous message queues between a client and the web application server. Messaging servers such as JavaEE (Enterprise Edition) servers employ its corresponding messaging technology that include Java Message Service.
One of the asynchronous message processing models that recently emerged is Asynchronous Java Script and XML (AJAX) which is a web development that allows asynchronous processing of web applications residing in web application servers. AJAX is group of technologies brought together by Java Scripts; these technologies include HTML, Cascading Style Sheets (CSS), Document Object Model (DOM), Extended Markup Language (XML), Extensible Stylesheet Language Transformations (XSLT) and the XMLHTTPRequest object for asynchronous communication. United States of America Patent Publication No. US 2007/0130293, discloses an implementation of asynchronous portal pages using only the XMLHTTPRequest component of the AJAX technology with the objective of maintaining the traditional portlet programming models, which are based on non-AJAX technology. Sun Microsystems Inc released the Java Servlet Specification 3.0 that focused on delivering various new features, one of which caters for asynchronous processing of web applications. According to the Java Servlet Specification 3.0, requests are processed such that a main program flow or thread may return to a JavaEE server to perform other tasks, hence reducing cost and improving the efficiency of asynchronous message processing. The requirement for implementing the asynchronous processing according to the Java Servlet Specification 3.0 will be compatibility of the underlying messaging technology with Java.
Based on existing disclosures, it is apparent that asynchronous processing of web applications may be implemented either using the AJAX web development model or based on the Java Servlet Specification Version 3.0. However, the limitation of both implementations lie in the compatibility of the underlying messaging technology as well as the programming models of the existing web application server, wherein both are required to be based on either Java or AJAX technology. Therefore, there is need for a model of asynchronous message processing that can be implemented on existing web application servers (with traditional programming models), independent of its underlying messaging technology. SUMMARY OF INVENTION
The present invention provides a method and system for asynchronous message processing, using HTTP, to be implemented in web application servers. The present invention proposes a cost-effective and efficient method and system for the realization of asynchronous message processing in web applications and is targeted to be implemented in existing web application servers, independent of the underlying messaging technology employed by these web application servers. In one aspect of the present invention is a method for asynchronous processing in a web application server. The method comprises in response to receiving a query request from a client, processing the query request and in response to receiving a result check request from the client, processing the result check request. Processing the query request further comprises tracking the query request, instantiating data processing of the query request and storing processing results from data processing of the query request. Processing the result check request further comprises retrieving processing results corresponding to the result check request and returning processing results to the client. Preferably the query request comprises an asynchronous XMLHTTP Request and the result check request comprises a HTTP Request.
In a further aspect of the present invention is a system for asynchronous processing in a web application server, wherein the web application server comprises a Web Request Handler, a Web Response Handler, a Url Store table, a Result Tracker table, a Result table and a Request Processor. In response to receiving a query request from a client, the Web Request Handler processes the query request by tracking the query request using the Url Store table and the Result Tracker table, instantiating data processing of the query request in the Request Processor and storing processing results from data processing of the query request in the Result table. In response to receiving a result check request from the client, the Web Response Handler processes the result check request by retrieving processing results corresponding to the result check request using the Url Store table, the Result Tracker table and the Result table and returning processing results to the client. Preferably the query request comprises an asynchronous XMLHTTP Request and the result check request comprises a HTTP Request. In one embodiment of the present invention, the method and system for asynchronous processing in the web application server provides for a fundamental asynchronous processing flow with the assumptions that (a) during processing the query request received from the client, (i) the query request received from the client is a first instance of the said query request, i.e. the query request has not been previously tracked; and (ii) the duration from instantiating data processing of the query request to before storing processing results from data processing of the query request does not exceed an expiry duration of the query request; and (b) during processing the result check request received from the client, (iii) processing results have been established at the time of retrieving processing results corresponding to the result check request.
In other embodiments of the present invention, the method and system for asynchronous processing in the web application server provide for alternatives of the fundamental asynchronous processing flow, wherein (a) during processing the query request received from the client, (i) the query request received from the client is a second (or subsequent) instance of the said query request, i.e. the query request has been previously tracked and (ii) the duration from instantiating data processing of the query request to before storing processing results from data processing of the query request exceeds an expiry duration of the query request; and (b) during processing the result check request received from the client, (iii) processing results have not been established at the time of retrieving processing results corresponding to the result check request.
The present invention consists of features and a combination of parts hereinafter fully described and illustrated in the accompanying drawings, it is being understood that various changes in the details may be made without departing from the scope of the invention or sacrificing any of the advantages of the present invention. BRIEF DESCRIPTION OF THE ACCOMPANYING DRAWINGS
To further clarify various aspects of some embodiments of the present invention, a more particular description of the invention will be rendered by references to specific embodiments thereof, which are illustrated, in the appended drawings. It is appreciated that these drawings depict only typical embodiments of the invention and are therefore not to be considered limiting of its scope. The invention will be described and explained with additional specificity and detail through the accompanying drawings in which: FIGURE 1 illustrates a data structure of a Uniform Resource Locator (Url) Store table.
FIGURE 2 illustrates a data structure of a Result table.
FIGURE 3 illustrates a data structure of a Result Tracker table.
FIGURE 4 illustrates a fundamental asynchronous processing flow in a web application server for processing a query request received from a client.
FIGURE 5 illustrates a fundamental asynchronous processing flow in a web application server for processing a result check request received from a client.
FIGURES 6A & 6B illustrate an alternative of the fundamental asynchronous processing flow in a web application server for processing a query request received from a client. FIGURE 7 illustrates an alternative of the fundamental asynchronous processing flow in a web application server for processing a result check request received from a client. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
The present invention relates to a method and system for asynchronous processing in a web application server. Hereinafter, this specification will describe the present invention according to the preferred embodiments of the present invention. However, it is to be understood that limiting the description to the preferred embodiments of the invention is merely to facilitate discussion of the present invention and it is envisioned that those skilled in the art may devise various modifications and equivalents without departing from the scope of the appended claims.
The present invention more particularly relates to a method and system for asynchronous processing of web applications using HyperText Transfer Protocol (HTTP) and is to be implemented on existing web application servers. The present invention may be implemented independent of the underlying messaging technology employed by the web application servers and it provides an alternative method and system to implement asynchronous processing compared to the existing messaging server technology.
Asynchronous processing of web applications involves asynchronous processing of messages between a client and the web application server in which the web applications reside. The existing XMLHTTP Request Application Programming Interface (API) is utilized to enable the implementation of asynchronous processing of web applications.
The client is an entity that requests such processing and may be a described as a computing device (e.g. desktop computer, mobile computer such as laptop or handheld computing devices) with the capability of sending HTTP requests and Extended Markup Language HTTP (XMLHTTP) requests, while being able to receive and display HTTP responses comprising any one or a combination of HyperText Markup Language (HTML) file, XML file, script file, plain file, binary data, alphanumeric data or any other relevant file or data formats. The client may often be referred to as a HTTP client.
The web application server may be described as a software system installed on a physical computing server machine, a virtual server machine or an embedded server within a computing device. The software system is capable of receiving HTTP and XMLHTTP requests, and thereafter processing these requests accordingly. The web application server comprises a Web Request Handler, a Web Response Handler, a Uniform Resource Locator (Url) Store table, a Result Tracker table, a Result table and a Request Processor. The Web Request Handler and the Web Response Handler are components that receive a request and generate a response based on that request. The Web Request Handler and the Web Response Handler may be implement as computer program in the form of HTTP interface such as servlets. The Web Request Handler and the Web Response Handler are capable of receiving HTTP and XMLHTTP requests, and thereafter processing these requests accordingly.
The Request Processor may be implement as a computer program that utilizes data in the client's HTTP and XMLHTTP request to perform processing which includes retrieving data from a database, performing calculation, or performing required business logic for data processing. The Request Processor generates processing results in at least one of the following forms; HTML file, XML file, script file, plain file, binary data, alphanumeric data, database table record or any other relevant file or data formats.
The Url Store table, the Result Tracker table and the Result table are essentially mapping tables that contain data in a predetermined structure. The Url Store table, the Result Tracker table and the Result table may be in the form of a software storage format in at least one of a database table, system file or system memory. Reference is collectively being made to FIGURES 1 , 2 and 3. FIGURE 1 illustrates a data structure of the Url Store table. The Url Store table maps a HTTP Urlld to its corresponding expiry duration. The expiry duration is determined by a system user.
FIGURE 2 illustrates a data structure of the Result table. The Result table stores processing results that are mapped to corresponding HTTP Urlld and Unique Id.
FIGURE 3 illustrates a data structure of the Result Tracker table. The Result Tracker table stores processing status as well as processing start times that are mapped to corresponding HTTP Urlld and Unique Id. The processing status may be represented at any one time as being any one of the following result status': 'In Process', 'Completed' or 'Expired'. Result status 'In Process' denotes that data is being processed by the Request Processor. Result status 'Complete' denotes that the data processing by the Request Processor is complete and that processing results are stored in the Result table. Result status 'Expired' denotes that the processing duration has exceeded the expiry duration.
The method and system according to the present invention comprises processing a query request, in response to receiving the query request from the client and processing a result check request, in response to receiving the result check request from the client. The query request comprises an asynchronous XMLHTTP Request and the result check request comprises a HTTP Request.
The query request, which is the XMLHTTP Request, is implemented at the client-end using the XMLHTTP Request component used in standard web browsers, such as Internet Explorer and Mozilla Firefox. The XMLHTTP Request comprises data, a HTTP Urlld and a boolean value that denotes the messaging type, that is either synchronous or asynchronous, the later will be denoted in the case of the present invention. The query request is therefore an asynchronous Url call.
The result check request, which is the HTTP Request comprises a HTTP Urlld corresponding to the HTTP Urlld within the XMLHTTP Request for which processing results is required to be retrieved. For every query request, there can be only one corresponding result check request.
In response to receiving the query request from the client, the Web Request Handler begins processing the query request by tracking the query request using the Url Store table and the Result Tracker table. The Web Request Handler then continues to instantiate data processing of the query request in the Request Processor and finally stores processing results from data processing of the query request in the Result table.
In response to receiving the result check request from the client, the Web Response Handler processes the result check request by retrieving processing results corresponding to the result check request using the Url Store table, the Result Tracker table and the Result table and returning processing results to the client.
Fundamental asynchronous processing flow
In one embodiment of the present invention, the method and system for asynchronous processing in the web application server provides for a fundamental asynchronous processing flow with several assumptions made during processing the query request received from the client and during processing the result check request received from the client.
Reference is being made to FIGURE 4. FIGURE 4 illustrates the fundamental asynchronous processing flow in the web application server for processing the query request received from the client. This figure illustrates how the asynchronous process is evoked by the query request, how query request is tracked, how the processing results is generated and stored. The fundamental or basic asynchronous processing flow during the processing of the query request received from the client assumes that (i) the query request received from the client is a first instance of the said query request, i.e. the query request has not been previously tracked; and (ii) the duration from instantiating data processing of the query request to before storing processing results from data processing of the query request does not exceed an expiry duration of the query request.
The fundamental asynchronous processing flow during the processing of the query request begins with the HTTP client sending the query request, which is the asynchronous XMLHTTP Request, to the web application server (101). The query request is received by the Web Request Handler within the web application server. Upon receiving the query request from the HTTP client, the web application server instantly returns an 'In Process' status message to the HTTP client (102) to indicate that the query request is being processed. The status message may be in the form of a HTML file, XML file, script file, plain file, alphanumeric data or any other relevant file or data format.
The query request, which is the asynchronous XMLHTTP Request, comprises request data and a HTTP Urlld. Using the HTTP Urlld, the Web Request Handler checks the expiry duration of the query request from the Url Store table (103). The Url Store table returns the expiry duration to the Web Request Handler (104). In the fundamental asynchronous processing flow, the expiry duration is not utilized as the assumption is made that the duration from instantiating data processing of the query request to before storing processing results from data processing of the query request does not exceed the expiry duration of the query request.
The Web Request Handler then begins to track the query request. Using the HTTP Urlld of the query request, the Web Request Handler refers to the Result Tracker table to obtain any result status that may be available (105). In the fundamental asynchronous processing flow, it is assumed that the query request received from the client is a first instance of the said query request, i.e. the query request has not been previously tracked and therefore, no result status will be available. The Result Tracker table returns to the Web Request Handler indicating that no results status was found (106). This indicates to the Web Request Handler that the query request has not yet been processed and hence, the Web Request Handler will then create a new record in the Result Tracker table (107). This new record contains the HTTP Urlld of the query request that will be designated with a Unique Identifier (Id). The Unique Id is a value that may be produced by means of any one of a database table counting number, program counting number or computer hashing program. Additionally, this new record will be designated a result status of 'In Process' and a processing start time to indicate the time when processing the request data within the query request begins. This new record will serve to track the query request throughout the entire processing flow of processing of the query request and processing the result check request which may be received from the client at a later time.
The Web Request Handler proceeds to instantiate data processing of the query request by passing to the Request Processor, request data within the asynchronous XMLHTTP Request (108). The Request Processor uses the request data to perform processing (109) which may comprise retrieving data from a database, performing calculation, or performing required business logic for data processing. The Request Processor returns the processing results to the Web Request Handler (1 10). " Upon receipt of the processing results, the Web Request Handler determines if the expiry duration of the query request has lapsed by comparing the processing start time in the Result table to the current time. In the fundamental asynchronous processing flow, it is assumed that the duration from instantiating data processing of the query request to before storing processing results from data processing of the query request does not exceed the expiry duration of the query request. This implies that the processing performed by the Request Processor yields processing results before the expiry duration of the query request. As part of tracking the query request, the Web Request Handler uses the Unique Id of the query request to designate a 'Completed' result status in the Result Tracker table (11 1)· Finally, using the HTTP Urlld and the Unique Id, the Web Request Handler stores the processing results obtained from the Request Processor in the Result table (112). The processing results stored in the Result table will only be retrieved by the web application server and returned to the client upon receiving the result check request [comprising the HTTP Urlld of the query request] from the client.
Reference is being made to FIGURE 5. FIGURE 5 illustrates the fundamental asynchronous processing flow in the web application server for processing the result check request received from the client. This figure illustrates how the client retrieves the processing results. The fundamental asynchronous processing flow during the processing of the result check request received from the client assumes that processing results have been established at the time of retrieving processing results corresponding to the result check request.
The fundamental asynchronous processing flow during the processing of the result check request begins with the HTTP client sending the result check request, which is the HTTP Request, to the web application server (201). The result check request is received by the Web Response Handler within the web application server. The result check request comprises the HTTP Urlld of the query request for which processing results are required by the client.
Upon receiving the result check request from the HTTP client, the Web Response Handler then begins to retrieve processing results. Using the HTTP Urlld of the result check request, the Web Response Handler refers to the Result Tracker table to obtain the Unique Id corresponding to the HTTP Urlld of the result check request and any result status that may be available (202). The fundamental asynchronous processing flow during the processing of the result check request received from the client assumes that processing results have been established at the time of retrieving processing results corresponding to the result check request and therefore, a 'Completed' result status for the HTTP Urlld of the result check request will be available in the Result Tracker table. The Result Tracker table returns to the Web Response Handler the Unique Id corresponding to the HTTP Urlld of the result check request with results status 'Completed' (203). The Web Response Handler then uses the Unique Id to retrieve the processing results from the Result table (204). Based on the Unique Id, the Result table returns the processing results to the Web Response Handler (205). The Web Response Handler consolidates the processing results received from the Result table (206). Consolidation of the processing results may comprise combining the processing results if multiple processing results are found, or performing any formatting before returning the processing results to the HTTP client. Prior to returning the processing results to the HTTP client, the Web Response Handler deletes the processing results stored in the Result table for the Unique Id corresponding to the HTTP Urlld of the result check request (207). The Web Response Handler also deletes from the Result Tracker table, the record for the Unique Id corresponding to the HTTP Urlld of the result check request (208), which is the record created by the Web Request Handler for the HTTP Urlld of the query request (107). Finally, the Web Response Handler returns the processing results to the HTTP client (209). The steps of deleting (207, 208) may be performed after the Web Response Handler returns the processing results to the HTTP client (209).
Alternative asynchronous processing flow
In other embodiments of the present invention, the method and system for asynchronous processing in the web application server provide for alternatives of the fundamental asynchronous processing flow based on the converse of the assumptions made during processing the query request received from the client and during processing the result check request received from the client. Reference is being made to FIGURES 6A & 6B collectively. FIGURES 6A & 6B illustrate the alternative of the fundamental asynchronous processing flow in the web application server for processing the query request received from the client. This figure illustrates the alternative of the fundamental asynchronous processing flow during processing the query request received from the client, where (i) the query request received from the client is a second (or subsequent) instance of the said query request, i.e. the query request has been previously tracked; and (ii) the duration from instantiating data processing of the query request to before storing processing results from data processing of the query request exceeds the expiry duration of the query request.
In the fundamental asynchronous processing flow, it is assumed that the query request received from the client is a first instance of the said query request, i.e. the query request has not been previously tracked. Therefore, no result status will be available in the Result Tracker table when the Web Request Handler begins to track the query request using the HTTP Urlld of the query request, where the Web Request Handler will create a new record in the Result Tracker table (306) [as described before (107)]. However, this might not always be the case as there could be an occurrence of a double-submit, wherein the query request received from the client is a second (or subsequent) instance of the said query request and that the query request has in fact been previously tracked in the Result Tracker table. The previously tracked query request may have any one of the following result status': 'In Process', 'Completed' or 'Expired'.
If the result status in the Result Tracker table is found to be a 'Completed' result status (302), the processing results would have been stored in the Result table and will only be retrieved by the web application server and returned to the client upon receiving the result check request [comprising the HTTP Urlld of the query request] from the client.
If the result status in the Result Tracker table is found not to be a 'Completed' result status, the possibilities remain that it may be either an 'In Process' result status or an 'Expired' result status. The Web Request Handler then determines if the expiry duration of the query request has lapsed by comparing the processing start time in the Result table to the current time (303). If the expiry duration of the query request has not lapsed (304), it implies that the result status should be an 'In Process' result status. As part of tracking the query request, the Web Request Handler uses the Unique Id of the query request to designate an 'In Process' result status in the Result Tracker table. Once complete, the processing results would be stored in the Result table and will only be retrieved by the web application server and returned to the client upon receiving the result check request [comprising the HTTP Urlld of the query request] from the client.
If the expiry duration of the query request has lapsed, it implies that the result status should be an 'Expired' result status. As part of tracking the query request, the Web Request Handler uses the Unique Id of the query request to designate an 'Expired' result status in the Result Tracker table (305). The Web Request Handler repeats (306) the steps of creating (107), instantiating (108), designating (1 1 1) and storing (1 12) of the fundamental asynchronous processing flow during the processing of the query request. Once complete, the processing results would be stored in the Result table and will only be retrieved by the web application server and returned to the client upon receiving the result check request [comprising the HTTP Urlld of the query request] from the client.
In the fundamental asynchronous processing flow, it is assumed that the duration from instantiating data processing of the query request to before storing processing results from data processing of the query request does not exceed the expiry duration of the query request. However, this might not always be the case as the duration from instantiating data processing of the query request to before storing processing results from data processing of the query request may exceed the expiry duration of the query request. This implies that the processing performed by the Request Processor is unable to generate processing results before the expiry duration of the query request.
In the fundamental asynchronous processing flow, upon receipt of the processing results, the Web Request Handler determines if the expiry duration of the query request has lapsed by comparing the processing start time in the Result table to the current time (402). The assumption made in the fundamental asynchronous processing flow is that the Request Processor is able to generate processing results before the expiry duration of the query request wherein the expiry duration of the query request would have not lapsed (403). In this case the Web Request Handler uses the Unique Id of the query request to designate a 'Completed' result status in the Result Tracker table (1 1 1). Using the HTTP Urlld and the Unique Id, the Web Request Handler stores the processing results obtained from the Request Processor in the Result table (1 12). The processing results stored in the Result table will only be retrieved by the web application server and returned to the client upon receiving the result check request [comprising the HTTP Urlld of the query request] from the client.
In case of the alternative asynchronous processing flow, the Request Processor is unable to generate processing results before the expiry duration of the query request wherein the expiry duration of the query request would have lapsed (404). In this case the Web Request Handler uses the Unique Id of the query request to designate an 'Expired' result status in the Result Tracker table. Using the HTTP Urlld and the Unique Id, the Web Request Handler stores no processing results in the Result table. In this case, no processing results will be retrieved by the web application server upon receiving the result check request [comprising the HTTP Urlld of the query request] from the client. Therefore, to 'recover' from this 'Expired' result status, that is in order to obtain processing results, the client will be required to send a second (or subsequent) instance of the said query request, wherein the Web Request Handler repeats (306) the steps of creating (107), instantiating (108), designating (1 1 1) and storing (112) of the fundamental asynchronous processing flow during the processing of the query request. Once complete, the processing results would be stored in the Result table and will only be retrieved by the web application server and returned to the client upon receiving the result check request [comprising the HTTP Urlld of the query request] from the client.
Reference is being made to FIGURE 7. FIGURE 7 illustrates the alternative of the fundamental asynchronous processing flow in the web application server for processing the result check request received from the client. This figure illustrates the alternative of the fundamental asynchronous processing flow during processing the result check request received from the client, where processing results have not been established at the time of retrieving processing results corresponding to the result check request. In the fundamental asynchronous processing flow, it is assumed that processing results have been established at the time of retrieving processing results corresponding to the result check request and therefore, a 'Completed' result status for the HTTP Urlld of the result check request will be available in the Result Tracker table (501). However, in the alternative asynchronous processing flow, processing results may have not been established at the time of retrieving processing results corresponding to the result check request, wherein the result status in the Result Tracker table may be found to be an 'In Process' or 'Expired' result status or no result status may be found in the Result Tracker table.
The later case, where no result status is found in the Result Tracker table may occur in the event where the web application server receives a result check request from the client without prior having received a corresponding query request from the client. If the result status is not found in the Result Tracker table, the Web Response Handler returns a 'Not In Process' status message to the client (502, 505). In order to obtain any processing results in this case, the client will be required to send the query request to the web application server, wherein the Web Request Handler will process the query request based on the either the fundamental or alternative asynchronous processing flow, and thereafter, attempt to retrieve the processing results by sending the corresponding result check request to the web application server, wherein the Web Response Handler will process the result check request based on the either the fundamental or alternative asynchronous processing flow.
If the result status in the Result Tracker table is found to be an 'Expired' result status, the Web Response Handler returns a 'Processing Expired' status message to the client (503). In order to obtain processing results in this case, the client will be required to send a second (or subsequent) instance of the said query request, wherein the Web Request Handler repeats (306) the steps of creating (107), instantiating (108), designating (1 1 1) and storing (1 12) of the fundamental asynchronous processing flow during the processing of the query request. Once complete, the processing results would be stored in the Result table and will only be retrieved by the web application server and returned to the client upon receiving the result check request [comprising the HTTP Urlld of the query request] from the client. If the result status in the Result Tracker table is found to be an 'In Process' result status, the Web Response Handler returns an 'In Process' status message to the client (504). In order to obtain processing results in this case, the client will be required to re-send the result check request to the web application server at a later time.

Claims

1. A method for asynchronous processing in a web application server, the method comprises
in response to receiving a query request (101) from a client, processing the query request; and
in response to receiving a result check request (201) from the client, processing the result check request;
wherein processing the query request further comprises
tracking the query request;
instantiating data processing of the query request; and
storing processing results from data processing of the query request; wherein processing the result check request further comprises retrieving processing results corresponding to the result check request; and
returning processing results to the client.
2. A method according to claim 1 wherein, processing the query request in a Web Request Handler further comprises
obtaining (103,104), from a Url Store table, an expiry duration of the query request;
obtaining (105, 106), from a Result Tracker table, a result status of the query request; and
if the result status is not found;
creating (107), in the Result Tracker table, a record for a HTTP Urlld of the query request and designating the query request with a Unique Id, an 'In Process' result status and a processing start time; instantiating (108) a Request Processor to process data of the query request;
receiving (1 10) processing results from the Request Processor; designating (1 1 1), in the Result Tracker table, the query request with a 'Completed' result status using the Unique Id; and storing (1 12) processing results in a Result table. A method according to claim 1 wherein, processing the result check request in a Web Response Handler further comprises
obtaining, from the Result Tracker table, the result status using the HTTP Urlld of the result check request; and
if the result status is 'Completed';
retrieving (202, 203), from the Result Tracker table the Unique Id corresponding to the HTTP Urlld of the result check request;
retrieving (204, 205), from the Result table, processing results using the Unique Id;
deleting (207), from the Result table, processing results for the Unique Id;
deleting (208), from the Result Tracker table, the record for the Unique Id; and
returning (209) processing results to the client.
A method according to claim 1 wherein, the query request comprises an asynchronous XMLHTTP Request.
A method according to claim 1 wherein, the result check request comprises a HTTP Request.
A method according to claim 2 wherein, processing the query request in the Web Request Handler further comprises returning an 'In Process' status message (102) to the client.
A method according to claim 3 wherein, processing the result check request in the Web Response Handler further comprises consolidating processing results (206).
A method according to claim 2 wherein, if the result status is found to be a 'Completed' result status (301) when obtaining (105, 106), from the Result Tracker table, the result status of the query request, processing the query request in the Web Request Handler further comprises returning (302), a 'Complete' status message to the client.
A method according to claim 2 wherein, if the result status is found not to be a 'Completed' result status when obtaining (105, 106), from the Result Tracker table, the result status of the query request, processing the query request in the Web Request Handler further comprises
determining if the expiry duration of the query request has lapsed by comparing the processing start time in the Result table to a current time (303); and
if the expiry duration of the query request has not lapsed (304),
designating, in the Result Tracker table, the query request with an
'In Process' result status;
if the expiry duration of the query request has lapsed,
designating (305), in the Result Tracker table, the query request with an 'Expired' result status; and
repeating (306) the steps of creating (107), instantiating (108), designating (1 1 1) and storing (1 12).
A method according to claim 2 wherein, upon receiving (1 10) processing results from the Request Processor, processing the query request in the Web Request Handler further comprises
determining (402) if the expiry duration of the query request has lapsed by comparing the processing start time in the Result table to a current time; and
if the expiry duration of the query request has not lapsed (403),
designating (1 1 1), in the Result Tracker table, the query request with a 'Completed' result status using the Unique Id; and
storing (1 12) processing results in the Result table; if the expiry duration of the query request has lapsed (404),
designating, in the Result Tracker table, the query request with an
'Expired' result status; and
storing no processing results in the Result table. A method according to claim 3 wherein, if the result status is not found, processing the result check request in the Web Response Handler further comprises
returning (502, 505) a 'Not In Process' status message to the client.
A method according to claim 3 wherein, if the result status is found to be an 'Expired' result status, processing the result check request in the Web Response Handler further comprises
returning (503) a 'Processing Expired' status message to the client.
A method according to claim 3 wherein, if the result status is found to be an 'In Process' result status, processing the result check request in the Web Response Handler further comprises
returning (504) an 'In Process' status message to the client.
A system for asynchronous processing in a web application server, the system comprises means for
in response to receiving a query request (101) from a client, processing the query request; and
in response to receiving a result check request (201) from the client, processing the result check request;
wherein the means for processing the query request further comprises means for
tracking the query request;
instantiating data processing of the query request; and
storing processing results from data processing of the query request; wherein the means for processing the result check request further comprises means for
retrieving processing results corresponding to the result check request; and
returning processing results to the client.
15. A system according to claim 14 wherein, a Web Request Handler processes the query request and the Web Request Handler further comprises means for obtaining (103,104), from a Url Store table, an expiry duration of the query request;
obtaining (105, 106), from a Result Tracker table, a result status of the query request; and
if the result status is not found;
creating (107), in the Result Tracker table, a record for a HTTP Urlld of the query request and designating the query request with a Unique Id, an 'In Process' result status and a processing start time; instantiating (108) a Request Processor to process data of the query request;
receiving (110) processing results from the Request Processor; designating (1 11), in the Result Tracker table, the query request with a 'Completed' result status using the Unique Id; and storing (1 12) processing results in a Result table.
A system according to claim 14 wherein, a Web Response Handler processes the result check request and the Web Response Handler further comprises means for obtaining, from the Result Tracker table, the result status using the HTTP Urlld of the result check request; and
if the result status is 'Completed';
retrieving (202, 203), from the Result Tracker table the Unique Id corresponding to the HTTP Urlld of the result check request;
retrieving (204, 205), from the Result table, processing results using the Unique Id;
deleting (207), from the Result table, processing results for the Unique Id;
deleting (208), from the Result Tracker table, the record for the Unique Id; and
returning (209) processing results to the client.
17. A system according to claim 14 wherein, the query request comprises an asynchronous XMLHTTP Request.
18. A system according to claim 14 wherein, the result check request comprises -a HTTP Request.
A system according to claim 14 wherein, the client is a computing device comprising means for
sending a XMLHTTP request and a HTTP request; and
displaying a HTTP response.
A system according to claim 19 wherein, the HTTP response comprises at least one of a HTML file, XML file, script file, plain file, binary data or alphanumeric data.
A system according to claim 19 wherein, the computing device comprises at least one of a computing server, desktop computer, laptop or hand-held device.
A system according to claim 14 wherein, the web application server is a software system installed on at least one of a physical computing server machine, a virtual server machine or an embedded server within a computing device.
A system according to claim 22 wherein, the software system comprises means for receiving a XMLHTTP request and a HTTP request; and
processing the XMLHTTP request and the HTTP request.
A system according to claim 15 wherein, the Web Request Handler further comprises means for returning an 'In Process' status message (102) to the client.
25. A system according to claim 15 wherein, the Unique Id comprises a value produced from at least one of a database table counting number, program counting number or computer hashing program.
26. A system according to claim 15 wherein, the Web Request Handler is a software that comprises means for
receiving a XMLHTTP request and a HTTP request; and processing the XMLHTTP request and the HTTP request.
27. A system according to claim 15 wherein, the Request Processor is a software that comprises means for
receiving a XMLHTTP request and a HTTP request; and
processing data of the XMLHTTP request and the HTTP request.
28. A system according to claim 15 wherein, the processing results comprises at least one of a HTML file, XML file, script file, plain file, binary data, alphanumeric data or database table record.
29. A system according to claim 16 wherein, processing the result check request in the Web Response Handler further comprises means for consolidating processing results (206).
30. A system according to claim 16 wherein, the Web Response Handler is a software that comprises means for receiving a XMLHTTP request and a HTTP request.
31. A system according to claims 15 and 16 wherein, the Url Store table, the Result Tracker table and the Result table is in the form of a software storage format in at least one of a database table, system file or system memory
32. A system according to claim 15 wherein, if the result status is found to be a 'Completed' result status (301) when obtaining (105, 106), from the Result Tracker table, the result status of the query request, processing the query request in the Web Request Handler further comprises means for
returning (302), a 'Complete' status message to the client.
33. A system according to claim 15 wherein, if the result status is found not to be a 'Completed' result status when obtaining (105, 106), from the Result Tracker table, the result status of the query request, processing the query request in the Web Request Handler further comprises means for determining if the expiry duration of the query request has lapsed by comparing the processing start time in the Result table to a current time (303); and
if the expiry duration of the query request has not lapsed (304), designating, in the Result Tracker table, the query request with an 'In Process' result status;
if the expiry duration of the query request has lapsed, designating (305), in the Result Tracker table, the query request with an 'Expired' result status; and
repeating (306) the steps of creating (107), instantiating ( 108), designating (1 1 1) and storing (1 12).
A system according to claim 15 wherein, upon receiving (1 10) processing results from the Request Processor, processing the query request in the Web Request Handler further comprises means for
determining (402) if the expiry duration of the query request has lapsed by comparing the processing start time in the Result table to a current time; and
if the expiry duration of the query request has not lapsed (403),
designating (1 1 1), in the Result Tracker table, the query request with a 'Completed' result status using the Unique Id; and
storing (1 12) processing results in the Result table;
if the expiry duration of the query request has lapsed (404),
designating, in the Result Tracker table, the query request with an
'Expired' result status; and
storing no processing results in the Result table.
A system according to claim 16 wherein, if the result status is not found, processing the result check request in the Web Response Handler further comprises means for
returning (502, 505) a 'Not In Process' status message to the client.
36. A system according to claim 16 wherein, if the result status is found to be an 'Expired' result status, processing the result check request in the Web Response Handler further comprises means for
returning (503) a 'Processing Expired' status message to the client.
37. A system according to claim 16 wherein, if the result status is found to be an 'In Process' result status, processing the result check request in the Web Response Handler further comprises means for
returning (504) an 'In Process' status message to the client.
PCT/MY2011/000074 2010-11-24 2011-06-06 Method and system for asynchronous processing in a web application server WO2012070925A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
MYPI2010005552 2010-11-24
MYPI2010005552 MY151317A (en) 2010-11-24 2010-11-24 Method and system for asynchronous processing in a web application server

Publications (1)

Publication Number Publication Date
WO2012070925A1 true WO2012070925A1 (en) 2012-05-31

Family

ID=46146083

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/MY2011/000074 WO2012070925A1 (en) 2010-11-24 2011-06-06 Method and system for asynchronous processing in a web application server

Country Status (2)

Country Link
MY (1) MY151317A (en)
WO (1) WO2012070925A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685375A (en) * 2012-09-11 2014-03-26 金蝶软件(中国)有限公司 Method and system for interaction between client and web application, and web server
CN103964270A (en) * 2014-05-27 2014-08-06 重庆大学 Method for building elevator running status monitoring system
CN104426964A (en) * 2013-08-29 2015-03-18 腾讯科技(深圳)有限公司 Data transmission method, device and terminal, and computer storage medium
CN105893546A (en) * 2016-04-01 2016-08-24 赵忠义 One-time asynchronous checking and accurate positioning prompt mode adopted in BS software system
CN106598604A (en) * 2016-12-16 2017-04-26 数源科技股份有限公司 Network information display method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040078486A1 (en) * 2002-10-16 2004-04-22 International Business Machines Corporation Mechanism to provide callback capabilities for unreachable network clients
US20090138545A1 (en) * 2007-11-23 2009-05-28 International Business Machines Corporation Asynchronous response processing in a web based request-response computing system
WO2011080994A1 (en) * 2009-12-28 2011-07-07 Canon Kabushiki Kaisha Server apparatus, terminal apparatus, and printing system and data conversion method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040078486A1 (en) * 2002-10-16 2004-04-22 International Business Machines Corporation Mechanism to provide callback capabilities for unreachable network clients
US20090138545A1 (en) * 2007-11-23 2009-05-28 International Business Machines Corporation Asynchronous response processing in a web based request-response computing system
WO2011080994A1 (en) * 2009-12-28 2011-07-07 Canon Kabushiki Kaisha Server apparatus, terminal apparatus, and printing system and data conversion method thereof

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685375A (en) * 2012-09-11 2014-03-26 金蝶软件(中国)有限公司 Method and system for interaction between client and web application, and web server
CN104426964A (en) * 2013-08-29 2015-03-18 腾讯科技(深圳)有限公司 Data transmission method, device and terminal, and computer storage medium
CN104426964B (en) * 2013-08-29 2018-07-27 腾讯科技(深圳)有限公司 Data transmission method, device and terminal, computer storage media
CN103964270A (en) * 2014-05-27 2014-08-06 重庆大学 Method for building elevator running status monitoring system
CN105893546A (en) * 2016-04-01 2016-08-24 赵忠义 One-time asynchronous checking and accurate positioning prompt mode adopted in BS software system
CN106598604A (en) * 2016-12-16 2017-04-26 数源科技股份有限公司 Network information display method

Also Published As

Publication number Publication date
MY151317A (en) 2014-05-15

Similar Documents

Publication Publication Date Title
JP6646781B2 (en) System, method and storage medium for improving access to search results
US7818506B1 (en) Method and system for cache management
US10805245B1 (en) Thumbnail image previews
US9852401B2 (en) Providing additional email content in an email client
US7873632B2 (en) Systems and methods for associating a keyword with a user interface area
US7657611B2 (en) Content request optimization
US9459888B2 (en) Implementing browser based hypertext transfer protocol session storage
US8468145B2 (en) Indexing of URLs with fragments
US9232011B2 (en) Tracking navigation flows within the same browser tab
US20040172389A1 (en) System and method for automated tracking and analysis of document usage
JP2010500689A (en) Method for enabling web analysis of interactive web applications
US20180157754A1 (en) Access to network content
JP6016808B2 (en) Method and server system for implementing web access
WO2012070925A1 (en) Method and system for asynchronous processing in a web application server
TWI539302B (en) Late resource localization binding for web services
EP3092611A1 (en) Method, apparatus, and system for communicating and presenting product information
JP2010257453A (en) System for tagging of document using search query data
US20040158617A1 (en) Methods and systems for processing a link
AU2016317736B2 (en) Systems and methods for prefetching dynamic URLs
US20050171950A1 (en) Managing application status information for a computer application
WO2016086784A1 (en) Method, apparatus and system for collecting webpage data
US20040111394A1 (en) Hidden fields for containing debug information
KR101616063B1 (en) Content server latency determination
JP2007219619A (en) Information management program, device, and method
CN103246656A (en) Method and server for generating static cached page

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11843177

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11843177

Country of ref document: EP

Kind code of ref document: A1