Managed channel for asynchronous requests
AssigneeInternational Business Machines Corporation
InventorVincent Burckhardt
Life of this patent
Estimating the term…
Abstract
Apparatus and method for use with a data processing system, wherein the data processing system comprises a client and a server, comprising: a receive component for receiving a call from a client application to a first method of an object, and for receiving a reply on the channel; an interceptor component, for wrapping the object to provide a wrapped call to a second method of the wrapped object, and for invoking a response handler; a client encoder component for converting the wrapped call into a message; a client channel manager component for establishing a channel to the server; a sender component, for sending the message on the channel; a reply decoder component for decoding the reply to provide a response; and the sender component further for sending the response to the client application.
Claims16
A client method configured for use with a data processing system, wherein the data processing system comprises a client and a server connectable through a network, the method comprising:
- receiving a call from a client web application to a first method of a first native XmlHttpRequest (XHR) object, wherein the first method comprises a first Asynchronous JavaScript +Extensible Markup Language (Ajax) request to the server, and wherein the first Ajax request comprises a first plurality of attributes;
- wrapping the first native XHR object to provide a wrapped call to a second method of the wrapped XHR object, wherein the second method comprises a second Ajax request to the server;
- converting the wrapped call into a message, wherein the message comprises the first plurality of attributes;
- establishing a channel to the server configured to transport a plurality of asynchronous messages;
- intercepting the received call from the client web application to the first method of the first native XHR object;
- calling the wrapped call to the second method of the wrapped XHR object instead of calling the first method of the first native XHR object, wherein the second method is different from the first method;
- setting a unique message identification code for the message;
- sending the message on the channel;
- and
- correlating a reply unique message identification code set by the server to a reply corresponding to the unique message identification code for the message to identify which reply corresponds to which message of the plurality of messages sent over the channel.
A method configured for use with a data processing system, wherein the data processing system comprises a client and a server, the method comprising:
- receiving a call from a client web application to a first method of a native XmlHttpRequest (XHR) object, wherein the first method comprises a first Asynchronous JavaScript +Extensible Markup Language (Ajax) request to the server, and wherein the first Ajax request comprises a first plurality of attributes;
- wrapping the native XHR object to provide a wrapped call to a second method of the wrapped XHR object, wherein the second method comprises a second Ajax request to the server;
- converting the wrapped call into a message, wherein the message comprises the first plurality of attributes;
- intercepting the received call from the client web application to the first method of the native XHR object;
- calling the wrapped call to the second method of the wrapped XHR object instead of calling the first method of the native XHR object, wherein the second method is different from the first method;
- setting a unique message identification code for the message;
- sending the message on a channel configured to transport a plurality of asynchronous messages over a network from the client to the server;
- receiving the message on the channel from the client;
- decoding the received message to provide a request, wherein the request comprises the first plurality of attributes;
- in response to providing the request for fetching a response, sending the request to a resource;
- and
- setting a reply unique message identification code to a reply corresponding to the unique message identification code of the message to correlate which reply corresponds to which message of the plurality of asynchronous messages transported on the channel.
A client apparatus configured for use with a data processing system, wherein the data processing system comprises the client apparatus and a server connectable through a network, the client apparatus comprising:
- at least one processor;
- and
- at least one memory coupled with the at least one processor, the at least one memory comprising instructions, executable by the at least one processor, configured for:
- receiving a call from a client web application to a first method of a native XmlHttpRequest (XHR) object, wherein the first method comprises a first Asynchronous JavaScript +Extensible Markup Language (Ajax) request to the server, and wherein the first Ajax request comprises a first plurality of attributes;
- wrapping the native XHR object to provide a wrapped call to a second method of the wrapped XHR object, wherein the second method comprises a second Ajax request to the server;
- converting the wrapped call into a message, wherein the message comprises the first plurality of attributes;
- establishing a channel to the server configured to transport a plurality of asynchronous messages;
- intercepting the received call from the client web application to the first method of the native XHR object;
- calling the wrapped call to the second method of the wrapped XHR object instead of calling the first method of the native XHR object, wherein the second method is different from the first method;
- setting a unique message identification code for the message;
- sending the message on the channel;
- and
- correlating a reply unique message identification code set by the server to a reply corresponding to the unique message identification code for the message to identify which reply corresponds to which message of the plurality of messages sent over the channel.
A data processing system comprising:
- a client configured for:
- receiving a call from a client web application to a first method of a native XmlHttpRequest (XHR) object, wherein the first method comprises a first Asynchronous JavaScript +Extensible Markup Language (Ajax) request to a server, and wherein the first Ajax request comprises a first plurality of attributes;
- wrapping the native XHR object to provide a wrapped call to a second method of the wrapped XHR object, wherein the second method comprises a second Ajax request to the server;
- converting the wrapped call into a message, wherein the message comprises the first plurality of attributes;
- intercepting the received call from the client web application to the first method of the native XHR object;
- calling the wrapped call to the second method of the wrapped XHR object instead of calling the first method of the native XHR object, wherein the second method is different from the first method;
- setting a unique message identification code for the message;
- sending the message on a channel configured to transport a plurality of asynchronous messages over a network to the server;
- and
- a server apparatus comprising at least one processor and at least one memory coupled with the at least one processor, the at least one memory comprising instructions, executable by the at least one processor, configured for:
- receiving the message on the channel from the client;
- decoding the received message to provide a request, wherein the request comprises the first plurality of attributes;
- responsive to providing the request for fetching a response, sending the request to a resource;
- and
- setting a reply unique message identification code to a reply corresponding to the unique message identification code of the message to correlate which reply corresponds to which message of the plurality of asynchronous messages transported on the channel.
A computer program product comprising a non-transitory computer readable medium having a plurality of instructions stored therein, which, when executed by a processor, cause the processor to perform operations comprising:
- receiving a call from a client web application to a first method of a first native XmlHttpRequest (XHR) object, wherein the first method comprises a first Asynchronous JavaScript +Extensible Markup Language (Ajax) request to a server, and wherein the first Ajax request comprises a first plurality of attributes;
- wrapping the first native XHR object to provide a wrapped call to a second method of the wrapped XHR object, wherein the second method comprises a second Ajax request to the server;
- converting the wrapped call into a message, wherein the message comprises the first plurality of attributes;
- establishing a channel to the server configured to transport a plurality of asynchronous messages;
- intercepting the received call from the client web application to the first method of the first native XHR object;
- calling the wrapped call to the second method of the wrapped XHR object instead of calling the first method of the first native XHR object, wherein the second method is different from the first method;
- setting a unique message identification code for the message;
- sending the message on the channel;
- and
- correlating a reply unique message identification code set by the server to a reply corresponding to the unique message identification code for the message to identify which reply corresponds to which message of the plurality of messages sent over the channel.
A computer program product comprising a non-transitory computer readable medium having a plurality of instructions stored therein, which, when executed by at least one processor, cause the at least one processor to perform operations comprising:
- receiving a call from a client web application to a first method of a native XmlHttpRequest (XHR) object, wherein the first method comprises a first Asynchronous JavaScript +Extensible Markup Language (Ajax) request to a server, and wherein the first Ajax request comprises a first plurality of attributes;
- wrapping the native XHR object to provide a wrapped call to a second method of the wrapped XHR object, wherein the second method comprises a second Ajax request to the server;
- converting the wrapped call into a message, wherein the message comprises the first plurality of attributes;
- intercepting the received call from the client web application to the first method of the native XHR object;
- calling the wrapped call to the second method of the wrapped XHR object instead of calling the first method of the native XHR object, wherein the second method is different from the first method;
- setting a unique message identification code for the message;
- sending the message on a channel configured to transport a plurality of asynchronous messages over a network from a client to the server;
- receiving the message on the channel from the client
- decoding the received message to provide a request, wherein the request comprises the first plurality of attributes;
- in response to providing the request for fetching a response, sending the request to a resource;
- and
- setting a reply unique message identification code to a reply corresponding to the unique message identification code of the message to correlate which reply corresponds to which message of the plurality of asynchronous messages transported on the channel.
Dependencies are inferred from the claim text.