Search

US-12627750-B2 - Automatic optimization of remote service request

US12627750B2US 12627750 B2US12627750 B2US 12627750B2US-12627750-B2

Abstract

A computer-implemented method, computer system, and computer program product for communication between a sender and a receiver according to a communication protocol, comprising: generating a message for sending to a receiver; translating the message from a sender format used by the sender into a predetermined format dependent on the communication protocol; sending the translated message to the receiver, the translated message comprising a map invitation; causing the receiver to translate the translated message into a receiver format used by the receiver; causing the receiver to exchange a first map indicative of a mapping between a first format and the predetermined format; and sending a subsequent message to the receiver in the first format.

Inventors

  • Trevor Clifford Dolby
  • John Anthony Reeve
  • Andrew John Coleman

Assignees

  • INTERNATIONAL BUSINESS MACHINES CORPORATION

Dates

Publication Date
20260512
Application Date
20241022
Priority Date
20240912

Claims (20)

  1. 1 . A computer-implemented method for communication between a sender and a receiver according to a communication protocol, the method comprising: generating a message for sending to a receiver; translating the message from a sender format used by the sender into a predetermined format dependent on the communication protocol; sending the translated message to the receiver, the translated message comprising a map invitation; causing the receiver to translate the translated message into a receiver format used by the receiver; causing the receiver to exchange a first map indicative of a mapping between a first format and the predetermined format; and sending a subsequent message to the receiver in the first format.
  2. 2 . The computer-implemented method of claim 1 , wherein causing the receiver to exchange comprises causing the receiver to send the first map to the sender, the first format comprising the receiver format.
  3. 3 . The computer-implemented method of claim 2 , wherein sending the subsequent message comprises: generating the subsequent message for sending to the receiver; translating the subsequent message from the sender format into the receiver format using the first map; and sending the subsequent message to the receiver in the receiver format.
  4. 4 . The computer-implemented method of either of claim 3 , wherein translating the subsequent message from the sender format into the receiver format comprises: translating the subsequent message from the sender format into the predetermined format using a second map indicative of a mapping between the sender format and the predetermined format; and translating the subsequent message from the predetermined format into the receiver format using the first map.
  5. 5 . The computer-implemented method of claim 4 , further comprising: generating a combined map indicative of a translation between the sender format and the receiver format, wherein translating the subsequent message from the sender format into the receiver format comprises using the combined map.
  6. 6 . The computer-implemented method of claim 5 , wherein generating the combined map is carried out in the background.
  7. 7 . The computer method of claim 5 , wherein generating the combined map comprises analyzing sub-structures of the first and second maps to produce a minimal function that maps elements required in an output schema of the combined map.
  8. 8 . The computer-implemented method of claim 7 , wherein an element used in only a selection from the group consisting of: the first map and second map, is removed from the combined map.
  9. 9 . The computer-implemented method of claim 1 , wherein causing the receiver to exchange comprises causing the receiver to receive from the sender the first map, wherein the first format comprises the sender format.
  10. 10 . The computer-implemented method of claim 9 wherein sending the subsequent message comprises: generating the subsequent message for sending to the receiver; sending the subsequent message to the receiver in the sender format; and translating the subsequent message from the sender format into the receiver format using the first map.
  11. 11 . The computer-implemented method of claim 1 , wherein the communication protocol is HTTP.
  12. 12 . A computer system for communication between a sender and a receiver according to a communication protocol, the computer system comprising: a processor set; one or more computer-readable storage media; and program instructions stored on the one or more computer-readable storage media to cause the processor set to perform operations comprising: generating a message for sending to a receiver; translating the message from a sender format used by the sender into a predetermined format dependent on the communication protocol; sending the translated message to the receiver, the translated message comprising a map invitation; causing the receiver to translate the translated message into a receiver format used by the receiver; causing the receiver to exchange a first map indicative of a mapping between a first format and the predetermined format; and sending a subsequent message to the receiver in the first format.
  13. 13 . The computer system of claim 12 , wherein causing the receiver to exchange comprises causing the receiver to send the first map to the sender, the first format comprising the receiver format.
  14. 14 . The computer system of claim 13 , wherein sending the subsequent message comprises: generating the subsequent message for sending to the receiver; translating the subsequent message from the sender format into the receiver format using the first map; and sending the subsequent message to the receiver in the receiver format.
  15. 15 . The computer system of claim 14 , wherein translating the subsequent message from the sender format into the receiver format comprises: translating the subsequent message from the sender format into the predetermined format using a second map indicative of a mapping between the sender format and the predetermined format; and translating the subsequent message from the predetermined format into the receiver format using the first map.
  16. 16 . The computer system of claim 15 , wherein the operations further comprise: generating a combined map indicative of a translation between the sender format and the receiver format, wherein translating the subsequent message from the sender format into the receiver format comprises using the combined map.
  17. 17 . The computer system of claim 16 , wherein generating the combined map is carried out in the background.
  18. 18 . The computer system of claim 12 , wherein causing the receiver to exchange comprises causing the receiver to receive from the sender the first map, wherein the first format comprises the sender format.
  19. 19 . The computer system of claim 18 wherein sending the subsequent message comprises: generating the subsequent message for sending to the receiver; sending the subsequent message to the receiver in the sender format; and translating the subsequent message from the sender format into the receiver format using the first map.
  20. 20 . A computer program product for communication between a sender and a receiver according to a communication protocol, the computer program product comprising: one or more computer-readable storage media; and program instructions stored on the one or more computer-readable storage media to perform operations comprising: generating a message for sending to a receiver; translating the message from a sender format used by the sender into a predetermined format dependent on the communication protocol; sending the translated message to the receiver, the translated message comprising a map invitation; causing the receiver to translate the translated message into a receiver format used by the receiver; causing the receiver to exchange a first map indicative of a mapping between a first format and the predetermined format; and sending a subsequent message to the receiver in the first format.

Description

BACKGROUND An application programming interface (API) is a way for two or more computer programs to communicate with each other. A common protocol for transferring hypertext and data exchange over the internet is Hypertext Transfer Protocol (HTTP). HTTP operates as a request-response protocol in the client-server computing model. For example, a client, such as a web browser sends an HTTP request to a server, which processes the request and sends back an HTTP response, which includes status information and the requested content. The canonical format of an HTTP request refers to the standardized and well-defined structure that every HTTP request follows. SUMMARY According to the present invention there are provided a method, a system, and a computer program product according to the independent claims. Viewed from a first aspect, the present invention provides a computer implemented method for communication between a sender and a receiver according to a communication protocol, the method comprising: the sender: generating a message for sending to the receiver; translating the message from a sender format used by the sender into a predetermined format dependent on the communication protocol; and sending the translated message to the receiver, the translated message comprising a map invitation; and the receiver: translating the translated message into a receiver format used by the receiver; and exchanging, a first map indicative of a mapping between a first format and the predetermined format; and the sender sending a subsequent message to the receiver in the first format. Viewed from a further aspect, the present invention provides a system for communication between a sender and a receiver according to a communication protocol, the system comprising: the sender operable for: generating a message for sending to the receiver; translating the message from a sender format used by the sender into a predetermined format dependent on the communication protocol; and sending the translated message to the receiver, the translated message comprising a map invitation; and the receiver operable for: translating the translated message into a receiver format used by the receiver; and exchanging, a first map indicative of a mapping between a first format and the predetermined format; and the sender operable for sending a subsequent message to the receiver in the first format. Viewed from a further aspect, the present invention provides a computer program product for communication between a sender and a receiver according to a communication protocol, the computer program product comprising a computer readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method for performing the steps of the invention. BRIEF DESCRIPTION OF THE DRAWINGS The present invention will now be described, by way of example only, with reference to preferred embodiments, as illustrated in the following figures: FIG. 1 depicts a computing environment 100, according to an embodiment of the present invention; FIG. 2 depicts a high-level exemplary schematic flow diagram 200 depicting operation method steps for a client to request data from a server, in accordance with the prior art; FIG. 3 depicts a high-level exemplary schematic flow diagram 300 depicting operation method steps for the client to request and receive data from the server, in accordance with the prior art; FIG. 4A depicts a high-level exemplary schematic flow diagram 400 depicting operation method steps for a client to request and receive data from a server, according to an embodiment of the present invention; FIG. 4B depicts a high-level exemplary schematic flow diagram 499 depicting the map step operations of FIG. 4A, according to an embodiment of the present invention; FIG. 5A also depicts a high-level exemplary schematic flow diagram 500 depicting operation method steps for the client to request and receive data from the server, according to an embodiment of the present invention; FIG. 5B depicts a high-level exemplary schematic flow diagram 599 depicting the map step operations of FIG. 5A, according to an embodiment of the present invention; FIG. 6 also depicts a high-level exemplary schematic flow diagram 600 depicting operation method steps for the client to request and receive data from the server, according to an embodiment of the present invention; FIG. 7 depicts a high-level exemplary schematic flow diagram 700 depicting operation method steps for the client to request and receive data from the server, according to an embodiment of the present invention; FIG. 8A also depicts a high-level exemplary schematic flow diagram 800 depicting operation method steps for the client to request and receive data from the server, according to an embodiment of the present invention; FIG. 8B depicts a high-level exemplary schematic flow diagram 599 depicting the map step operations of FIG. 8A, according to an embodim