# US 2019/0317846 A1 · Application interaction method, apparatus, and system, and physical machine

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

- Number: US 2019/0317846 A1
- Document ID: US20190317846A1
- Status: Published application
- Kind: A1
- Application number: 16/455,313
- Filed: 2019-06-27
- Published: 2019-10-17
- Earliest claimed: 2016-12-30
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Xiaoxu LIU; Kai ZHENG
- Web page: https://patentgrep.com/patent/US20190317846A1

## CPC

- G06F 9/547: {Remote procedure calls [RPC]; Web services}
- G06F 8/60: Software deployment
- G06F 9/445: Program loading or initiating (bootstrapping G06F9/4401; security arrangements for program loading or initiating G06F21/57)
- G06F 9/54: Interprogram communication
- G06F 9/544: {Buffers; Shared memory; Pipes}
- G06F 9/546: {Message passing systems or structures, e.g. queues}
- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Embodiments of the present invention provide an application interaction method, apparatus, and system. The method includes: receiving, by a transmission configuration module, a first instruction, where the first instruction includes an identifier of a first application and an identifier of a second application; determining, by the transmission configuration module, deployment information of the first application and deployment information of the second application based on the first instruction; determining, by the transmission configuration module, an information transmission mode between the first application and the second application based on the deployment information of the first application, the deployment information of the second application, and a transmission mode selection policy; and using, by the first application, the transmission mode to transmit information to the second application.

## Claims

### Claim 1

An application interaction method, comprising:
receiving a first instruction having an identifier of a first application and an identifier of a second application;
determining deployment information of the first application and deployment information of the second application based on the first instruction, wherein the deployment information of the first application comprises a location of a first node in which the first application is located, and the deployment information of the second application comprises a location of a second node in which the second application is located;
determining a transmission mode between the first application and the second application based on the deployment information of the first application, the deployment information of the second application, and a transmission mode selection policy, wherein the transmission mode selection policy comprises a correspondence between the deployment information of the first application and the transmission mode and a correspondence between the deployment information of the second application and the transmission mode, or the transmission mode selection policy comprises a correspondence between the transmission mode and a deployment relationship between the first application and the second application, and the deployment relationship between the first application and the second application comprises a relationship between the location of the first node and the location of the second node; and
transmitting information to the second application using the transmission mode.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the first instruction is a query instruction used to query for the deployment information of the first application and the deployment information of the second application, or the query instruction is used to query for the deployment relationship between the first application and the second application, or the query instruction is used to query for the transmission mode between the first application and the second application.

### Claim 3 (depends on 2)

The method according to claim 2, further comprising:
receiving the query instruction using a first interface function of a socket, wherein content of a function library called by the first interface function is set to being used to process a connection instruction or a write instruction delivered by the first application into the query instruction, and send the query instruction for processing to determine the transmission mode, the connection instruction indicates that the first application requests to establish a connection to the second application, and the write instruction indicates that the first application instructs to write, into a first storage unit, information that is to be transmitted to the second application.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the first instruction is a connection instruction or a write instruction delivered by the first application, the connection instruction indicates that the first application requests to establish a connection to the second application, and the write instruction indicates that the first application instructs to write, into a first storage unit, information that is to be transmitted to the second application.

### Claim 5 (depends on 4)

The method according to claim 4, further comprising:
receiving the connection instruction or the write instruction using a first interface function of a socket, wherein content of a function library called by the first interface function is set to being used to send the connection instruction or the write instruction delivered by the first application, for processing to determine the transmission mode.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the location of the first node in which the first application is located comprises network information of the first application, network information of the first node, or address information of the node in which the first application is located, and wherein the location of the second node in which the second application is located comprises network information of the second application, network information of the second node, or address information of the node in which the second application is located.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the transmission mode comprises one of the Transmission Control Protocol/Internet Protocol (TCP/IP), the User Datagram Protocol (UDP), remote direct memory access (RDMA), memory sharing, and interprocess communication (Domain_Socket).

### Claim 8 (depends on 1)

The method according to claim 1, wherein the first node is a first container, and the second node is a second container; and wherein the method further comprises:
when the first container and the second container are located in a same physical machine and the first container and the second container belong to a same pod, determining, that the transmission mode for information transmission between the first application and the second application is memory sharing; or
when the first container and the second container are located in a same physical machine and the first container and the second container belong to different pods, determining, that the transmission mode for information transmission between the first application and the second application is interprocess communication (Domain_Socket).

### Claim 9 (depends on 1)

The method according to claim 1, further comprising:
configuring, by the first application, an interface function of socket based on the transmission mode; and
using, by the first application, the transmission mode to transmit the information to the second application using the configured interface function of the socket.

### Claim 10

A physical machine, wherein the physical machine is used for application interaction, and the physical machine comprises a processor, a memory, and a communications interface; the processor, the memory, and the communications interface are connected by using a bus; the communications interface is configured to execute a program in the memory to send information to or receive information from another device; and the processor is configured to perform a method, wherein the method comprises:
receiving a first instruction having an identifier of a first application and an identifier of a second application;
determining deployment information of the first application and deployment information of the second application based on the first instruction, wherein the deployment information of the first application comprises a location of a first node in which the first application is located, and the deployment information of the second application comprises a location of a second node in which the second application is located;
determining a transmission mode between the first application and the second application based on the deployment information of the first application, the deployment information of the second application, and a transmission mode selection policy, wherein the transmission mode selection policy comprises a correspondence between the deployment information of the first application and the transmission mode and a correspondence between the deployment information of the second application and the transmission mode, or the transmission mode selection policy comprises a correspondence between the transmission mode and a deployment relationship between the first application and the second application, and the deployment relationship between the first application and the second application comprises a relationship between the location of the first node and the location of the second node; and
transmitting information to the second application using the transmission mode.

### Claim 11 (depends on 10)

The physical machine according to claim 10, wherein the method further comprises:
receiving, the first instruction by using a first interface function of a socket, wherein content of a function library called by the first interface function is set to being used to process a connection instruction or a write instruction delivered by the first application into the first instruction, and send the first instruction for processing to determine the transmission mode, the connection instruction indicates that the first application requests to establish a connection to the second application, and the write instruction indicates that the first application instructs to write, into a first storage unit, information that is to be transmitted to the second application.

### Claim 12 (depends on 10)

The physical machine according to claim 10, wherein the method further comprises:
receiving the first instruction using a first interface function of a socket, wherein content of a function library called by the first interface function is set to being used to send the first instruction delivered by the first application, for processing to determine the transmission mode.

### Claim 13 (depends on 10)

The physical machine according to claim 10, wherein the transmission mode comprises one of the Transmission Control Protocol/Internet Protocol (TCP/IP), the User Datagram Protocol (UDP), remote direct memory access (RDMA), memory sharing, and interprocess communication (Domain_Socket).

### Claim 14 (depends on 10)

The physical machine according to claim 10, wherein the first node is a first container and the second node is a second container; and the method further comprises:
when the first container and the second container are located in a same physical machine and the first container and the second container belong to a same pod, determining that the transmission mode for information transmission between the first application and the second application is memory sharing; or
when the first container and the second container are located in a same physical machine and the first container and the second container belong to different pods, determining that the transmission mode for information transmission between the first application and the second application is interprocess communication (Domain_Socket).

### Claim 15 (depends on 10)

The physical machine according to claim 10, wherein the method further comprises:
configuring, by the first application, an interface function of a socket based on the transmission mode; and
using, by the first application, the transmission mode to transmit the information to the second application using the configured function of the socket.

### Claim 16

A non-transitory computer-readable medium storing computer instructions for application interaction, which when executed by one or more processors, cause the one or more processors to perform a method, the method comprising:
receiving a first instruction having an identifier of a first application and an identifier of a second application;
determining deployment information of the first application and deployment information of the second application based on the first instruction, wherein the deployment information of the first application comprises a location of a first node in which the first application is located, and the deployment information of the second application comprises a location of a second node in which the second application is located;
determining a transmission mode between the first application and the second application based on the deployment information of the first application, the deployment information of the second application, and a transmission mode selection policy, wherein the transmission mode selection policy comprises a correspondence between the deployment information of the first application and the transmission mode and a correspondence between the deployment information of the second application and the transmission mode, or the transmission mode selection policy comprises a correspondence between the transmission mode and a deployment relationship between the first application and the second application, and the deployment relationship between the first application and the second application comprises a relationship between the location of the first node and the location of the second node; and
transmitting information to the second application using the transmission mode.

### Claim 17 (depends on 16)

The medium according to claim 16, wherein the method further comprises:
receiving the first instruction using a first interface function of a socket, wherein content of a function library called by the first interface function is set to being used to process a connection instruction or a write instruction delivered by the first application into the first instruction, and send the first instruction for processing to determine the transmission mode, the connection instruction indicates that the first application requests to establish a connection to the second application, and the write instruction indicates that the first application instructs to write, into a first storage unit, information that is to be transmitted to the second application.

### Claim 18 (depends on 16)

The medium according to claim 16, wherein the method further comprises:
receiving the first instruction using a first interface function of a socket, wherein content of a function library called by the first interface function is set to being used to send the first instruction delivered by the first application, for processing to determine the transmission mode.

### Claim 19 (depends on 16)

The medium according to claim 16, wherein the transmission mode comprises one of the Transmission Control Protocol/Internet Protocol (TCP/IP), the User Datagram Protocol (UDP), remote direct memory access (RDMA), memory sharing, and interprocess communication (Domain_Socket).

### Claim 20 (depends on 16)

The medium according to claim 16, wherein the first node is a first container; and the second node is a second container; and wherein the method further comprises:
when the first container and the second container are located in a same physical machine and the first container and the second container belong to a same pod, determining that the transmission mode for information transmission between the first application and the second application is memory sharing; or
when the first container and the second container are located in a same physical machine and the first container and the second container belong to different pods, determining: that the transmission mode for information transmission between the first application and the second application is interprocess communication (Domain_Socket).
