CN108287723B - Application interaction method and device, physical machine and system - Google Patents

Application interaction method and device, physical machine and system Download PDF

Info

Publication number
CN108287723B
CN108287723B CN201611264191.8A CN201611264191A CN108287723B CN 108287723 B CN108287723 B CN 108287723B CN 201611264191 A CN201611264191 A CN 201611264191A CN 108287723 B CN108287723 B CN 108287723B
Authority
CN
China
Prior art keywords
application
information
transmission
node
instruction
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201611264191.8A
Other languages
Chinese (zh)
Other versions
CN108287723A (en
Inventor
柳晓旭
郑凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201611264191.8A priority Critical patent/CN108287723B/en
Priority to PCT/CN2017/105888 priority patent/WO2018120988A1/en
Priority to EP17885988.0A priority patent/EP3557412B1/en
Publication of CN108287723A publication Critical patent/CN108287723A/en
Priority to US16/455,313 priority patent/US10866846B2/en
Application granted granted Critical
Publication of CN108287723B publication Critical patent/CN108287723B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects

Abstract

The embodiment of the invention provides an application interaction method, a device and a system, wherein the method comprises the following steps: the transmission configuration module receives a first instruction, wherein the first instruction comprises an identifier of a first application and an identifier of a second application; the transmission configuration module determines deployment information of the first application and deployment information of the second application according to the first instruction; the transmission configuration module determines a transmission mode of information between the first application and the second application according to the deployment information of the first application, the deployment information of the second application and a transmission mode selection strategy, and the first application transmits the information to the second application by using the transmission mode. Therefore, the corresponding transmission mode can be determined according to the deployment information of the application, and the information transmission between the applications is more efficient.

Description

Application interaction method and device, physical machine and system
Technical Field
The invention relates to the field of communication, in particular to an application interaction method, an application interaction device, a physical machine and a system.
Background
The interaction of information between applications of a computer is often involved. For example, a task of a computer may be decomposed into a plurality of subtasks, which may be deployed to a plurality of applications for execution, and communication between the plurality of applications may be possible. For example, these applications may be described using a software system architecture such as Client/Server (C/S). The Client and the Server refer to applications in such a framework, and specifically, the applications serve as application request services of the Client (Client), and the applications serve as the Server to provide services for the applications serving as the Client (Client). Thus, a plurality of applications can be deployed on the same or different physical devices, and the advantages of the hardware environment where the Client and the Server are located are fully utilized. Obviously, the Server and the Client need to exchange information through communication.
Nowadays, virtualization technology, microservice application architecture and other technologies are used in application deployment, and the deployment relationship between applications becomes more complex and changes more frequently. In the prior art, the setting of the transmission mode of the information between the applications is single and fixed, the requirement of information transmission between the applications cannot be met, and the performance of information transmission between the applications is influenced.
Disclosure of Invention
In view of this, embodiments of the present invention provide an application interaction method, an application interaction device, and a terminal, which can enable a transmission manner of information between applications to better match a deployment manner of the applications, thereby improving performance of information transmission.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
in a first aspect, a method for application interaction, the method comprising: the transmission configuration module receives a first instruction, wherein the first instruction comprises an identifier of a first application and an identifier of a second application; the transmission configuration module determines deployment information of the first application and deployment information of the second application according to the first instruction, wherein the deployment information of the first application comprises the position of a first node where the first application is located, and the deployment information of the second application comprises the position of a second node where the second application is located; the transmission configuration module determines a transmission mode of information between the first application and the second application according to deployment information of the first application, deployment information of the second application and a transmission mode selection policy, wherein the transmission mode selection policy includes deployment information of the first application, deployment information of the second application and a corresponding relation of the transmission modes, or the transmission mode selection policy includes a deployment relation between the first application and the second application and a corresponding relation of the transmission modes, and the deployment relation between the first application and the second application includes a relation between a position of the first node and a position of the second node; and the first application transmits information to the second application by using the transmission mode.
In this way, the transmission mode of the information more suitable for the two applications to be communicated is selected for the two applications to be communicated through the transmission mode selection strategy and the determined deployment relationship of the two applications to be communicated, or through the transmission mode selection strategy and the determined deployment information of the two applications to be communicated. Therefore, the information transmission mode can be more flexibly adapted to the application needing communication so as to improve the performance of information transmission.
It should be understood that a node in this document is a device or apparatus running an operating system and capable of communicating, and may be a logical node, such as a virtual machine, a container, or other apparatus having the above functions.
An application identifier is information that can indicate the application, and may be, for example, identity information of the application, such as an ID, address information of the application, such as an IP address, a network segment where the application is located, and network information of the application, such as a port number of the application. Of course, a combination of the above-mentioned information is also possible, as long as the combination or the information included in the identifier can distinguish the application from other applications.
In an implementation manner of the first aspect, the transmission method selection policy includes a deployment relationship between the first application and the second application and a corresponding relationship between the transmission methods, and the method further includes determining, by the transmission configuration module, a deployment relationship between the first application and the second application according to deployment information of the first application and deployment information of the second application.
In an implementation manner of the first aspect, the first instruction is a query instruction, where the query instruction is used to query deployment information of the first application and deployment information of the second application, or the query instruction is used to query a deployment relationship between the first application and the second application, or the query instruction is used to query a transmission manner between the first application and the second application.
In an implementation manner of the first aspect, the receiving, by the transmission configuration module, a first instruction includes:
the transmission configuration module receives the query instruction through a first interface function of a Socket, wherein the content of a function library called by the first interface function is set to be used for processing a connection instruction or a write instruction issued by the first application into the query instruction, and sending the query instruction to the transmission configuration module for processing so as to determine the transmission mode, the connection instruction represents that the first application requests to establish connection with the second application, and the write instruction represents that the first application indicates that information to be transmitted to the second application is written into a first storage unit.
In an implementation manner of the first aspect, the first instruction is a connection instruction or a write instruction issued by the first application, where the connection instruction indicates that the first application requests to establish connection with the second application, and the write instruction indicates that the first application instructs to write information to be transmitted to the second application into a first storage unit.
In an implementation manner of the first aspect, the receiving, by the transmission configuration module, a first instruction includes:
the transmission configuration module receives the connection instruction or the write instruction through a first interface function of a Socket, and the content of a function library called by the first interface function is set to be used for sending the connection instruction or the write instruction issued by the first application to the transmission configuration module for processing so as to determine the transmission mode.
Of course, the transmission configuration module may receive the query command through other API interfaces, but the function of the API interface is similar to that of the first interface. For example not through a default protocol port. However, with the adoption of a self-created interface or the change of the existing interface, the processing procedure of issuing the connection request to the first application in the prior art needs to be changed by programming the first application and the operating system where the first application is located, so that the connection request is processed by the transmission configuration module to determine the appropriate transmission mode.
It should be understood that the first application issues the connection instruction or the write instruction, in which case the interface function or other interface needs to be able to process the connection instruction or the write instruction into the query instruction, so as to facilitate the use of the transmission configuration module. Thus, the transmission configuration module has single function and light weight, and needs no complex processing procedure, while the improvement of API is relatively complex.
In an implementation manner of the first aspect, the determining, by the transmission configuration module according to the first instruction, deployment information of the first application and deployment information of the second application includes: the transmission configuration module obtains deployment information of the first application from a second memory according to the identification of the first application;
the transmission configuration process obtains the deployment information of the second application from a third memory according to the identifier of the second application, wherein the third memory is the same as or different from the second memory; or, in a case that the deployment information of the second application is not stored in the third memory, the transmission configuration process obtains the deployment information of the second application from a global configuration node according to the identifier of the second application.
That is, the transport configuration module may need to obtain information from the global configuration node. Therefore, the transmission configuration module does not need to manage the deployment information of all the applications in the application range of the method, the distributed deployment information management method enables the updating, management and interaction of the deployment information to be simpler and more convenient, and saves storage resources.
In an implementation manner of the first aspect, a location of a first node where the first application is located includes network information of the first application or network information of the first node or address information of a node where the first application is located, and a location of a second node where the second application is located includes network information of the second application or network information of the second node or address information of a node where the first application is located.
In an implementation manner of the first aspect, the transmission manner includes one of transmission control protocol/internet protocol TCP/IP, user datagram protocol UDP, full-name remote direct data access RDMA, shared memory, and interprocess communication (Domain _ Socket).
In an implementation manner of the first aspect, the determining, by the transmission configuration module according to the deployment information of the first application, the deployment information of the second application, and the transmission manner selection policy, a transmission manner for transmitting information between the first application and the second application includes: under the condition that the first container and the second container are located in the same physical machine and belong to the same POD, the transmission configuration module determines that a transmission mode for transmitting information between the first application and the second application is a shared memory; and when the first container and the second container are the same physical machine and belong to different PODs, the transmission configuration module determines that a transmission mode for transmitting information between the first application and the second application is interprocess communication (Domain _ Socket).
That is, in the case where both the first node and the second node are containers, the business relationship of the two applications may also be considered.
In an implementation manner of the first aspect, the transmission manner is transmission using a TCP/IP protocol, and the method further includes: the first node encapsulates the connection request into a link establishment request by using the TCP/IP protocol; the first node sends the link establishment request to the second application; the first application receives a response message from the second application, wherein the response message is a TCP/IP message; correspondingly, the information transmission between the first application and the second application through the transmission mode includes: the first application communicates information with the second application using the TCP/IP protocol.
It should be understood that, after the transmission mode determined by the transmission configuration module, the connection instruction or the write instruction corresponding to the first instruction may be further allocated to an interface corresponding to the corresponding transmission mode for processing, for example, to be sent to a target device (e.g., an I/O device, a storage device, etc.), or to be sent to a target node.
In an implementation manner of the first aspect, the transmitting, by the first application, information to the second application using the transmission manner includes: the first application configures an interface function in the socket according to the transmission mode returned by the transmission configuration module; and the first application transmits information to the second application by using the transmission mode through a configured second interface function in the Socket.
Therefore, the first application can use the interface corresponding to the transmission mode in the subsequent interaction with the second application without being decided by the transmission configuration module. Of course, since the first application supports multiple interfaces, the first application should configure the corresponding interface according to the returned transmission mode.
It is to be understood that the transferred information may be information subsequently transferred to the second application after the write instruction or the connect instruction. The write command or the connection command may also be the write command or the connection command, because, in view of the overall process, the write command or the connection command is issued by the first application to the second application through the interface corresponding to the transmission mode.
In one implementation form of the first aspect, the method further comprises: the first application sends a second instruction to the transmission configuration module, wherein the second instruction comprises deployment information of the first application; the transmission configuration module stores the deployment information of the first application in the second memory; the transmission configuration module sends deployment information of the first application to the global configuration node.
Thus, the global configuration node is maintained with information of the first application.
In a second aspect, an embodiment of the present invention provides an apparatus for application interaction, where the apparatus includes a transmission configuration module and an instruction delivery module, where the transmission configuration module is configured to receive a first instruction, and the first instruction includes an identifier of a first application and an identifier of a second application; the transmission configuration module is configured to determine deployment information of the first application and deployment information of the second application according to the first instruction, where the deployment information of the first application includes a position of a first node where the first application is located, and the deployment information of the second application includes a position of a second node where the second application is located; the transmission configuration module is configured to determine a transmission manner of information between the first application and the second application according to the deployment information of the first application, the deployment information of the second application, and a transmission manner selection policy, where the transmission manner selection policy includes a corresponding relationship between the deployment information of the first application, the deployment information of the second application, and the transmission manner, or the transmission manner selection policy includes a corresponding relationship between the deployment relationship between the first application and the second application, and the transmission manner, and the deployment relationship between the first application and the second application includes a relationship between a location of the first node and a location of the second node; the instruction transmission module is used for transmitting the information to be transmitted to the second application by the first application by using the transmission mode.
In a third aspect, an embodiment of the present invention provides a physical machine, where the physical machine is used for application interaction, and the physical machine includes a processor, a memory, and a transceiver, where the processor, the memory, and a communication interface are connected through a bus, the communication interface is used to send and receive information to and from other devices by executing a program in the memory, and the processor is used to execute the method according to the various implementations of the first aspect by executing instructions in the memory.
Since the second aspect and the third aspect are apparatuses corresponding to the first aspect, please refer to descriptions of various implementations of the first aspect, and detailed descriptions, and advantageous effects of the second aspect and the third aspect are not repeated here.
In a fourth aspect, an embodiment of the present invention provides an application interaction method, where the method includes: the second application receives a connection instruction or a data packet from the first application, wherein the connection instruction represents that the first application requests to establish connection with the second application; the second application determines a transmission mode corresponding to the connection instruction or the data packet; and the second application transmits information with the first application through the transmission mode.
In an implementation manner of the fourth aspect, in an aspect that the second application determines a transmission manner corresponding to the connection instruction or the data packet, the method specifically includes that the second application parses the connection instruction or the data packet to determine the transmission manner corresponding to the connection instruction or the data packet.
In an implementation manner of the fourth aspect, in an aspect that the second application determines a transmission manner corresponding to the connection instruction or the data packet, the method specifically includes determining, by a transmission control module, a transmission manner between the first application and the second application according to the connection instruction or the data packet and a transmission manner selection policy, where the connection instruction or the data packet includes an identifier of the first application and an identifier of the second application, the transmission manner selection policy includes deployment information of the first application, deployment information of the second application, and a correspondence relationship between the transmission manners, or the transmission manner selection policy includes a deployment relationship between the first application and the second application and a correspondence relationship between the transmission manners, and the deployment relationship between the first application and the second application includes a deployment relationship between a location of the first node and a location of the second node And the second application determines the transmission mode corresponding to the connection instruction or the data packet through a transmission control module.
In the aspect that the second application determines the transmission mode corresponding to the connection instruction or the data packet, the method specifically includes the second application analyzing the connection instruction or the data packet to determine the transmission mode corresponding to the connection instruction or the data packet.
In one implementation form of the fourth aspect, the method further comprises: the second application sends deployment information of the second application to a second transmission configuration module, wherein the deployment information comprises at least one of the position of the second node and the network information of the second node; and the second transmission configuration module stores the deployment information of the second application locally.
In one implementation form of the fourth aspect, the method further comprises: and the second transmission configuration module transmits the deployment information of the second application to a global configuration node.
In a fifth aspect, the embodiments of the present invention provide a physical machine, where the physical machine is used for application interaction, the physical machine includes a processor, a memory, and a transceiver, the processor, the memory, and a communication interface are connected through a bus, the communication interface is used for sending and receiving information to and from other devices by executing a program in the memory, and the processor is used for executing the method of the first aspect in various implementations by executing instructions in the memory.
Since the fourth aspect is a method for opposite ends of the first aspect, and the fifth aspect is a device corresponding to the fourth aspect, for various relevant descriptions and beneficial effects, please refer to descriptions of various implementations of the first aspect, which will not be repeated here.
A sixth aspect is a physical machine, where the physical machine includes a hardware layer, a first node running on the hardware layer, and a transmission configuration module, where the first node runs a first application, and the first node is a virtual machine or a container running on the hardware layer, where the transmission configuration module is configured to receive a first instruction, and the first instruction includes an identifier of the first application and an identifier of a second application; determining deployment information of the first application and deployment information of the second application according to the first instruction, wherein the deployment information of the first application comprises the position of a first node where the first application is located, and the deployment information of the second application comprises the position of a second node where the second application is located; determining a transmission mode of information between the first application and the second application according to 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 the deployment information of the first application, the deployment information of the second application and a corresponding relation of the transmission modes, or the transmission mode selection policy comprises the deployment relation between the first application and the second application and a corresponding relation of the transmission modes, and the deployment relation between the first application and the second application comprises a relation between the position of the first node and the position of the second node; the first node is configured to transmit information to the second application using the transmission mode.
Since the sixth aspect is a device of the method in the first aspect in a virtualized scenario, please refer to descriptions of various implementations of the first aspect, and the description will not be repeated here.
In a seventh aspect, an embodiment of the present invention provides an application interaction system, where the system includes a first node, a second node, and a global configuration node, the global configuration node is used for storing deployment information of a plurality of applications running in the application interaction system, the first node runs a first application, the second node runs a second application, the deployment information comprises the position of the node where the application is located, wherein the first node is configured to send a query request to the global configuration node according to a connection instruction or a write instruction of the first application, the connection instruction represents that the first application requests to establish connection with the second application, the writing instruction represents that the first application indicates to write information to be transferred to the second application into a first storage unit, and the query request is used for querying deployment information of the second application; the global configuration node is used for sending the queried deployment information of the second application to the first node according to the query request; the first node is configured to determine a transmission manner of information between the first application and the second application according to deployment information of the first application, deployment information of the second application, and a transmission manner selection policy, where the transmission manner selection policy includes deployment information of the first application, deployment information of the second application, and a correspondence relationship of the transmission manner, or the transmission manner selection policy includes a deployment relationship between the first application and the second application and a correspondence relationship of the transmission manner, and the deployment relationship between the first application and the second application includes a relationship between a location of the first node and a location of the second node; the first node is configured to send a link establishment request or a data packet to the second node, where the link establishment request is obtained by processing the connection instruction according to the transmission mode, and the data packet is obtained according to the transmission mode and the write instruction; the second node determines the transmission mode according to the received link establishment request or the data packet; and the first node and the second node transmit information through the transmission mode.
In an implementation manner of the seventh aspect, the first node is further configured to send deployment information of the first application to the global configuration node, so as to register the deployment information of the first application at the global configuration node.
In an implementation manner of the seventh aspect, the second node is further configured to send deployment information of the second application to the global configuration node, so as to register the deployment information of the second application at the global configuration node.
In an implementation manner of the seventh aspect, the location of the first node where the first application is located includes network information of the first application or network information of the first node or address information of the node where the first application is located, and the location of the second node where the second application is located includes network information of the second application or network information of the second node or address information of the node where the first application is located.
In an implementation manner of the seventh aspect, the transmission manner includes one of transmission control protocol/internet protocol TCP/IP, user datagram protocol UDP, full-name remote direct data access RDMA, shared memory, and interprocess communication (Domain _ Socket).
Since the seventh aspect is a system corresponding to the method of the first aspect and the fourth aspect, please refer to the descriptions of the various implementations of the first aspect and the fourth aspect, and the description thereof will not be repeated here.
In an eighth aspect, a storage medium is provided for storing an application program to perform the method of any implementation manner of the first aspect or the fourth aspect.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic diagram of a system networking provided by an embodiment of the invention;
FIG. 2 is an interaction diagram of an application interaction system according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a transmission configuration module according to an embodiment of the present invention processing received information;
fig. 4 is a flowchart of an application interaction method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of interaction between server, Ea and Client in a C/S scenario according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of an apparatus for application interaction according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a physical machine according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another physical machine according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiment of the present invention.
The following are some technical terms related to the embodiments of the present invention:
a node, in this document, is a device or apparatus running an operating system and capable of performing communication, and may be a logical node, such as a virtual machine, a container, or another apparatus having the above functions.
That is to say, in a virtualization scenario, strictly speaking, a node where an application is located may include multiple nodes, and may be one of a container bearing the application, a virtual machine bearing the container, and a physical machine bearing the virtual machine or the container. For example, an application is in a container, the container is in a virtual machine, and the virtual machine is in a physical machine, so that the container, the virtual machine in which the container is located, and the physical machine in which the virtual machine is located are all nodes in which the application is located. But in general the node where the application is located refers to the container, i.e. the node directly carrying the application. Of course, some scenarios may also refer to the virtual machine where the container is located, and other scenarios may refer to the physical machine where the virtual machine is located. The granularity of consideration of the node where the application is located is determined by considering the scene in the transmission mode selection strategy, wherein the granularity is detailed to the level of a container or a virtual machine, or only considering the hardware environment (namely a physical machine) depending on the application. For example, if it is only necessary to determine whether two applications are in the same local area network or the same data center or the same trusted domain, etc., it is not necessary to specifically specify the container or virtual machine in which the application is located. If the position relation between the virtual machines is considered, such as a cloud scene, the node where the application is located should be accurate to at least the virtual machines. If the analysis is more detailed, e.g., the business relationships between applications are further subdivided, then the node at which the application resides should be accurate to the container (if the application is within the container).
The identifier of an application, an identifier of an application is information that may indicate the application, and may be, for example, identity information of the application, such as an ID, address information of the application, such as an IP address, a network segment where the application is located, and network information of the application, such as a port number of the application. Of course, a combination of the above-mentioned information may be possible as long as the application can be distinguished from other applications by the combination or the information included in the identifier.
The deployment of the application can take various forms, and at present, the networking of the communication system is more and more complex, wherein a plurality of network devices (such as servers, gateways, etc.) can be included, and the plurality of network devices can also provide services for a plurality of terminals, and the network devices and the terminals can run the application. The TCP/IP (Transmission Control Protocol/Internet Protocol) Protocol is a commonly used communication Protocol, and can ensure that the TCP/IP Protocol can ensure reliable error-free end-to-end Transmission of user data in a complex network environment. Therefore, information interaction between applications at present also often uses the TCP/IP protocol. The Terminal in the embodiment of the present invention may be a Mobile Terminal (Mobile Terminal), for example, a Mobile device such as a Mobile phone, a tablet computer, a motion camera, a notebook computer, and the like, which is portable, wearable, or vehicle-mounted, or some devices such as a computer and a server which can access a communication network
However, the deployment relationship is very variable between applications that need to communicate. The following lists several typical deployments of applications that need to communicate with each other: deploying the virtual machines in different virtual machines in the same physical machine; deploying in the same container of the same host (the host refers to a physical machine or a virtual machine); deploying in different containers of the same host; fourthly, different hosts are deployed in the same trusted domain; fifthly, deploying different hosts in different trusted domains. Of course, the deployment scenario of applications that need to communicate with each other is not limited to the above example. Where a host refers to a physical machine or virtual machine in which an application resides. A trusted domain may be understood as a collection of devices that mutually consider data of each other to be secure, and may be a local area network, which is provided with a firewall. Specifically, the connection established and the information interaction performed between the devices in the lan are considered that the information source and the connection are secure, that is, trusted, and the information interaction between the devices in the lan and the devices outside the lan is considered that the information security outside the lan is unknown, and the information security outside the lan is considered to be insecure, that is, untrusted. For example, a physical machine in a Data Center (DC) belongs to a trusted domain. But may also be a group of devices in some other domain where network security is trusted.
As can be seen from the above scenarios, the deployment manner of the application will directly determine the reliability of network transmission. For example, the reliability of the scenes is good, the security of the other end can be determined at one end of the connection deployed in the scenes, network transmission delay and packet loss do not exist, and if transmission is still performed by using a TCP/IP protocol, a large amount of redundancy needs to be processed, so that the transmission efficiency is reduced, and the processing resources of the data packets are wasted. And fourthly, the scene is a high-reliability lossless network, and higher guarantee can be provided for the network and the transmission reliability, so that the TCP/IP protocol used in the domain is redundant. The scene is a wide area network universal network, the network environment is complex, network attenuation and packet loss can exist, and transmission is suitable by using a TCP/IP protocol. Therefore, the TCP/IP protocol is not always suitable for information transfer between applications in different deployment scenarios. On the other hand, other transmission technologies have also been studied in the industry for the characteristics of various application deployment scenarios, so as to improve the transmission performance. For example, a virtual switching technology based on a shared Memory may be used in the scenario (i), an RDMA (Remote Direct Memory Access) technology may be used in the scenario (ii), and compared with a TCP/IP protocol, the processing delay at the data server end in network transmission may be reduced.
However, there is an alternative relationship between multiple transmission technologies, applications deployed on nodes often change, and applications need to communicate with different applications in the course of performing different tasks; on the other hand, these applications also have their own life cycles, and will run or end running according to the user's operation or the received task. Therefore, most of the prior art analyzes the deployment information of the application by the user, and then the user sets the transmission protocol to select different transmission protocols, thereby greatly increasing the burden of the user and limiting the application of various transmission protocols.
A schematic diagram of a system to which the application interaction method of the embodiment of the present invention is applicable is described below with reference to fig. 1, and it should be understood that two DCs are schematically drawn in fig. 1 for convenience of illustration.
In this scenario, deployment modes of micro-service applications are very diverse, where DC1 and DC2 are two data centers, which can be understood as two local subnets, and multiple physical machines, which can be servers or terminals or network communication devices that can run applications, can be deployed in both of the two data centers, and for convenience of illustration, only three physical machines in DC1 and one physical machine in DC2 are shown in fig. 1. In the DC1, 2 virtual machines run on the physical machine 1, a container 11 and a container 12 run in the virtual machine 11, an application 111 and an application 112 run in the container 11, an application 113 run in the container 12, a container 13 and an application 123 run in the virtual machine 12, and an application 121 and an application 122 run in the container 13. The physical machine 2 in the DC1 has a virtual machine 21 running thereon, and the virtual machine 21 has a container 21 and a container 22 running thereon, wherein the container 21 has an application 211 and an application 212 running thereon, and the container 22 has an application 213 running thereon. The physical machine 3 in the DC1 has a container 31 and a container 32 running thereon, an application 311 and an application 312 running in the container 31, and an application 313 running in the container 32. In DC2 there is running a physical machine 4 in which an application 411 is running.
Fig. 1 illustrates a case where a virtual machine runs on a physical machine, and a container and an application run in the virtual machine, which is very common in a current cloud scenario, in which a user is allowed to rent hardware devices (e.g., servers) of some vendors and use their hardware resources to support their own needs, because different hardware resources required by different users are different, one hardware device may be rented to multiple users for use, and on the other hand, the hardware device vendor still manages the hardware resources, so that multiple virtual machines can be virtualized on the server, and each user uses different virtual machines, each virtual machine having an independent operating system. And the manufacturer can set the authority of the user, so that the user cannot directly install the application in the operating system of the physical machine. The possibility exists that DC1 and DC2 may need to access each other from application to application. For example, in the above architecture, the application 211 provides database access and operation services for MySQL database applications on a node. The application 112 provides web services to users of the wide area network for the webServer servers that the users access. The application 111 is a webServer server traffic control application, and is used for controlling traffic between the webServer server and each user. The application 113 and the application 313 are agents deployed on different physical machines for providing agent services, such as filtering and identifying user data in particular. The application 411 is a web client running on a physical machine in another local area network, the application 112 and the application 113 are located on different virtual machines of the same physical machine, and network communication between the two applications belongs to a scene (c). The application 111 and the application 112 are located in the same container of the same physical machine, and the network communication between the two applications belongs to a scene (c). The application 113 and the application 311 are deployed on different physical machines in the same data center, and network communication between the two applications belongs to a scenario (r). The application 311 and the application 313 are deployed in different local area networks, and network communication between the two applications belongs to a scene c.
The embodiment of the application interaction method selects a transmission mode more suitable for information of two applications to be communicated through a transmission mode selection strategy and the determined deployment relationship of the two applications to be communicated or through the transmission mode selection strategy and the determined deployment information of the two applications to be communicated. Therefore, the information transmission mode can be flexibly adapted to the application needing communication so as to improve the information transmission performance. The method relates to a transmission configuration module and a global configuration node which are deployed for realizing the method. The function of the transmission configuration module includes determining the transmission mode of the connection by processing the obtained first instruction. Specifically, the first instruction may be a connection request issued by an application to establish a connection to an opposite end (the opposite end refers to the other end of the connection to be established), or a write instruction sent by an application to transmit data to a storage unit (for example, a memory, an I/O device, or the like), or may also be a query instruction generated according to the connection instruction or the write instruction through processing of an API interface layer. In some cases, the transmission configuration module needs to request information from the global configuration node to determine the transmission mode of the connection. It should be understood that, in the C/S architecture, generally, the end that initiates the connection request is also the end that requests the service, and for the client, the end that receives the connection request is also the end that provides the service, and for the server.
It should be understood that the transport configuration module is a name of functionality, and the function of the transport configuration module may be implemented by a thread, a process, a container, a virtual machine, or other structures capable of implementing the function of the module, and the embodiment of the present application is described by taking a process as an example.
It should be understood that the deployment information of one application may be used to determine the location of the node where the application is located, where the location may be an actual physical location, a network location in a communication network, or information that can determine the location relationship of the node where the two applications are located according to the deployment information of the two applications. Or the deployment information of an application is the identity information of the application, such as an ID or a number, for example, in a scenario of a software-defined network, a transmission method selection policy may be designed and pre-stored by a user, where the transmission method selection policy includes the identity information of two applications to be communicated and a correspondence between transmission methods of the two applications, which is also feasible.
The contents of different deployment information need to be matched with the contents of the corresponding transmission mode selection policy to implement the method described in the present application. The deployment information may include at least one of the following types of information: 1. address information of the node where the application is located. Such as at least one of virtual machine address information, container address information, and physical machine address information where the application is located. The address information may be a physical address (Mac address), or an IP address, or geographical location information of an actual node (e.g., a machine location of a machine room in a data center of a city). 2. The identity information of the application and the node where the application is located. Such as an identification of the application, an identification (e.g., ID) of the node at which the application is located, etc. 3. The application and network information of the node where the application is located. For example, at least one of address information (e.g., IP address) monitored by the application, port information monitored by the application, information of a port used by the application, an IP address, a subnet mask, a gateway address, network segment information where a virtual machine or container is located, a vlan ID corresponding to the application (e.g., vlan ID of the virtual machine or container where the application is located), a vlan address corresponding to the application (e.g., vlan address of the virtual machine or container where the application is located), and the like. For example, in a cloud scenario or a virtualization scenario, the address or the location of the node cannot be perceived, but the location of the node where the application is located may be determined by the network information of the application and the node where the application is located, and the identity information of the application or the node where the application is located.
In another implementation manner, the deployment information of the application may further include service information of the application, so that a service relationship between nodes where the two applications are located can be determined according to the deployment information of the two applications. Such as POD information for the container. The POD information of the containers may represent business relations among the containers, that is, business relations among the containers, and the containers belonging to the same POD are used to carry applications that perform the same task or the same type of task. For example, a system Container (POD Container) and a User Container (User Container) may be included in one POD.
It should be understood that, in some implementations, the deployment relationship of the two applications, that is, the location relationship between the nodes where the two applications are located, may be determined from the deployment information of the two applications, and the location relationship of the two nodes is used to represent the location relationship of the two nodes in the communication network. That is, only the relative positions of two nodes need to be determined, without considering the specific positions of the two nodes. Such a positional relationship may also be understood as various deployment scenarios described above, such as different nodes deployed on the same node, the same physical machine, or a virtual machine, different nodes in the same trusted domain, different nodes in different trusted domains, nodes in different local area networks, and so on.
It should be understood that the transmission method selection policy mentioned in the embodiments of the present application includes at least one of the following corresponding relations: the corresponding relation between different deployment relations and transmission modes, and the corresponding relation between the deployment information and the transmission modes of different applications. The corresponding relations between the deployment information and the transmission modes of the application which is easy to change and has a large quantity in the network can be abstracted into the corresponding relations between several deployment relations (or deployment scenes) and the transmission modes by comprising the corresponding relations between different deployment relations and transmission modes. For the transmission configuration module, such a correspondence relationship is easier to maintain, the transmission configuration module is also lighter in weight, and can occupy less storage resources, but the transmission configuration module needs to have a processing capability of determining a deployment relationship between two applications to be interacted based on the queried deployment information of the applications. On the other hand, if the correspondence between the deployment information and the transmission method of different applications is included, more storage resources are required to maintain the correspondence, which is equivalent to establishing the correspondence for every two possible communicating applications. However, it should be understood that such a correspondence relationship may be used in the context of, for example, a software-defined network, that is, a user or an administrator defines a transmission mode between applications in the process of deploying the applications, and stores such a correspondence relationship in a corresponding storage device or storage unit for transmission of a configuration module query or reading. On the other hand, resources of the existing database technology can also support storage of the correspondence, that is, more storage resources are allocated for the correspondence, which can be tolerated in some scenarios.
In one implementation, the transmission mode selection policy is stored in a node where the transmission configuration module is located. In another implementation, the transmission mode selection policy may be stored in a storage unit that can be queried or accessed by the transmission configuration module. For example, the transmission mode selection policy may be in the same node or a different node than the transmission configuration module. That is, the second memory and the third memory, referred to hereinafter, may be in the same virtual machine as the transfer configuration module (at this time, the second memory and the third memory may be considered as virtual storage devices or units); or simply on the same physical machine as the transport configuration module (in which case the second and third memories may be considered physical storage devices or units); even further, it may be on a different physical machine than the transport configuration module, but the transport configuration module has direct access to it remotely.
Alternatively, a default transport selection policy pre-stored in the node may be used. In order to ensure the effect and implementation, the transmission mode included in the default transmission mode selection policy should be supported by the operating system where the application is located. Or the tenant can configure the network according to the needs or transmission scenes. It should be understood that, in order to ensure that a suitable transport is selected during a certain application interaction, the tenant should complete the configuration before the application interaction. The transmission scheme selection policy generally includes a plurality of transmission schemes. Certainly, in the initial state, the pre-stored transmission mode selection policy may have a uniform default initial transmission mode, so that the tenant can modify and add the transmission mode by itself. For example, the transport in the transport selection policy includes at least one of TCP/IP, UDP, RDMA, shared memory, interprocess communication (Domain _ Socket), and other possible communication technologies.
For example, a scheme of a transmission mode selection policy is provided as follows:
1. the method adopts a transmission mode of shared memory for the application with deployment relationship of the same host and the POD (the related container group of the same tenant aiming at the same service is called POD).
2. And the method adopts Domain-socket Domain communication (interprocess communication mode) for the applications with deployment relations for different PODs on different hosts.
3. The application with the deployment relationship of being deployed by different hosts in the same DC (Date Centre data center) adopts the transmission mode of the RDMA transmission channel.
4. For the deployment relationship, multipath mptcp (multipath TCP), QUIC-multipath (multipath transmission of QUIC protocol) is adopted for the cross-DC deployment.
5. The condition that the deployment relationship cannot be identified adopts standard TCP \ IP.
It can be seen that the above example is a corresponding relationship between an inter-application deployment relationship and a transmission mode, and in the above schemes, the inter-application deployment relationship is mainly used for representing a positional relationship between two nodes where applications are located, and a business relationship of the nodes where the applications are located is also considered.
It can be seen that fig. 1 also includes a transmission configuration module and a global configuration node according to the embodiment of the present invention.
As illustrated in fig. 1, the transmission configuration module may run in an Operating System (OS) of a physical machine, may run in an Operating System of a virtual machine, and may even run in a container. It should be noted that although the container does not have an operating system completely independent of the host, the container technology makes the container have an operating system layer (operating system layer) virtualized for the container, and the operating system layer may also be considered as a copy of the operating system of the host where the container is located, so as to provide isolation between the container and the operating system of the host for the application running in the container, and the application in the container may be considered to run in the operating system layer of the container.
For convenience of description, physical machines, virtual machines, containers, and other devices having an operating system and which can communicate may be collectively referred to as nodes.
On the other hand, the embodiments of the present application do not limit the specific manner of deployment of the transmission configuration module in the node. The transmission configuration module does not need to change location or restart frequently after deployment. The transmission configuration module may store deployment information of the application and a transmission mode selection policy based on a storage resource of the node, such as a memory or a hard disk. How to deploy the transmission configuration module in a network, that is, how many nodes the transmission configuration module is operated in and which nodes the transmission configuration module is operated in. The main consideration is the influence of this embodiment on the efficiency of implementing the application interaction method described in this document, that is, the time delay generated in establishing the connection due to the process of determining the transmission mode in executing the application interaction method; and the resources of the operating system occupied by this embodiment. Specifically, the less the transmission configuration modules are distributed in the nodes, the more the deployment information of the application in the node to be managed by each transmission configuration module is, the transmission load between the nodes may be increased, and the time for determining the transmission mode may also be prolonged. For example, the transport configuration module may manage deployment information for applications across nodes, and this collection of information is also the communication between the two applications, which by default uses the TCP/IP protocol. On the other hand, the more the transmission configuration modules are distributed in the node, the larger the occupation of the operating system resource and the hardware resource of the node is, and the overhead of the system is increased. On the other hand, the more the transmission configuration modules are, the more frequent the interaction with the global configuration node is, and since the operation environment of the global configuration node is complex and is usually deployed in the global network, the communication with the transmission configuration modules crosses the local network, the reliability of the local network is also affected by the interaction. Therefore, the deployment of the transmission configuration module can be decided by comprehensively considering the network reliability, the node system overhead and the implementation efficiency of the method.
That is, for example, a transport configuration module may be run on each physical machine that has applications deployed that need to communicate, the transport configuration module managing the physical machine and virtual machines running on the physical machine and applications running in containers. One transmission configuration module can also manage the deployment information of the applications of a plurality of physical machines, namely, a part of the physical machines are operated with the transmission configuration module. Similarly, one transport configuration module may be run on each virtual machine in which an application requiring communication is deployed, or a transport configuration module may be run on a part of the virtual machines. Of course, some transmission processes may be deployed in the virtual machine, some may be deployed in the container, and the like.
For a global configuration node, which is also a node, the node may be a server, and actually using the server is an implementation manner listed in this application, the global configuration node is named after a functionality. The global configuration node stores deployment information of applications running on nodes within a network range that can be covered by the global configuration node (for example, can provide services), and the deployment information can be managed by a process or an application or a container or a virtual machine. That is, the global configuration node may maintain deployment information of applications within a network (e.g., global), and thus, the global configuration node may be any one of a physical machine, a virtual machine, or a container as long as the function can be achieved. The node may be in a global network or in a local network, and when the node is a physical machine, a virtual machine may also be run therein, or a container may also be run, and an application other than management deployment information may also be run on the physical machine. The physical machine may also deploy the transmission configuration module at the same time, or may use the process or the application that maintains the deployment information of the global application as the transmission configuration module on the physical machine. Of course, the global configuration node may be any node within the network. Applications other than those that manage deployment information may also run on the node. In other words, a physical machine may be both a global configuration node and a service node running an application for executing a service. Of course, in general, the global configuration node is not overlapped with the service node, because the storage capacity of the global configuration node is undoubtedly important, which is different from the requirement of the general service node on the processing capacity and the requirement on the hardware.
An application interaction system is described below with reference to fig. 2, where the system includes the above-mentioned global configuration node, a first node running a first application, and a second node running a second application, where the global configuration node is configured to store deployment information of a plurality of applications running in the application interaction system, where the deployment information includes a location of a node where the application is located. The interaction process between the three is shown in fig. 2:
the first node is configured to send an inquiry request to the global configuration node according to a connection instruction or a write instruction of the first application, where the connection instruction indicates that the first application requests to establish connection with the second application, the write instruction indicates that the first application instructs to write information to be transferred to the second application into a first storage unit, and the inquiry request is used to inquire deployment information of the second application.
The global configuration node is used for sending the queried deployment information of the second application to the first node according to the query request.
The first node is configured to determine a transmission method of information between the first application and the second application according to the deployment information of the first application, the deployment information of the second application, and a transmission method selection policy, where the transmission method selection policy includes a corresponding relationship between the deployment information of the first application, the deployment information of the second application, and the transmission method, or the transmission method selection policy includes a corresponding relationship between the deployment relationship between the first application and the second application, and the transmission method, and the deployment relationship between the first application and the second application includes a relationship between a location of the first node and a location of the second node.
The first node is configured to send a link establishment request or a data packet to the second node, where the link establishment request is obtained by processing the connection instruction according to the transmission mode, and the data packet is obtained according to the transmission mode and the write instruction.
And the second node determines the transmission mode according to the received link establishment request or the data packet.
And the first node and the second node transmit information through the transmission mode.
It should be appreciated that the first application may issue a connect command or a write command. The connection instruction represents that the first application requests to establish connection with the second application, and the write instruction represents that the first application writes information to be transferred to the second application into a first storage unit. The connection instruction may include information of the first application and information of the second application. The information to be written by the first application and the identification of the memory location to be written may be included in the write instruction. The information of the first application may include an identification of the first application, which may be any information representing the first application. Such as at least one of an ID, such as a source address, etc. The information of the second application may include an identification of the second application, which may be any information for representing the second application. Such as an ID, such as a destination address, etc. In particular, reference may be made to the foregoing discussion of deployment information.
It should be noted that the second node receives the connection request or the data packet sent by the first node. In one mode, the second node may determine the transmission mode with the first node according to the connection request or the encapsulation format of the data packet. This approach requires connection requests or packets with different transmission formats to have different encapsulation formats. In another mode, the second node may determine information (e.g., an identifier) of the first node according to the connection request or the information of the data packet, and then determine a transmission mode between the first node and the second node through a transmission configuration module in the second node according to the information of the first node and the information of the second node.
It should be appreciated that in one implementation, in the system shown in FIG. 2, deployment information for the second application is not stored in the first physical machine in which the first node is located. In this implementation, the global configuration node is not the same physical machine as the first physical machine, and the first physical machine is not the same physical machine as the second physical machine where the second node is located. However, fig. 2 is only one implementation of the system described above, e.g., although fig. 2 depicts the global configuration node and the second node as two blocks, the global configuration node may be the same physical machine as the second physical machine. In fact, the first node, the second node and the global configuration node may be implemented in two or even in three on one physical machine.
In another implementation, the global configuration node may be on the same physical machine as the first node, or the first node stores deployment information of the second application (for example, the first node and the second node are the same node, or the second application has established a connection with an application in the first node), so that the first node does not need to query the global configuration node for the deployment information of the second application.
In one case, the first node is configured to determine, by using a transmission configuration module running in the first node, a communication mode according to the deployment information of the first application, the deployment information of the second application, and the transmission mode selection policy. The transmission method selection policy includes deployment information of the first application, deployment information of the second application, and a corresponding relationship of the transmission method, or the transmission method selection policy includes a deployment relationship between the first application and the second application and a corresponding relationship of the transmission method, and the deployment relationship between the first application and the second application includes a relationship between a position of the first node and a position of the second node; it should be understood that the first node should have a transmission mode selection policy stored therein.
Therefore, the node where the application requesting to establish the link is located can determine the transmission mode of the two applications to be interacted according to the deployment information and the transmission mode selection strategy of the two applications to be interacted, and thus, a proper transmission mode can be selected more flexibly, so that the selected transmission mode is more matched with the deployment conditions of the two applications, the transmission performance such as the efficiency of data transmission is improved, and the waste of unnecessary transmission resources and the reduction of the efficiency of data transmission in the process of transmitting information due to the fact that an improper transmission mode is used are avoided.
It should be understood that the deployment information of the application maintained on the global configuration node is sent to the global configuration node by the nodes within the coverage of the global configuration node. In this way, the global configuration node is registered with information of applications running in the nodes within the coverage area. In one implementation, a node with a transmission configuration module sends deployment information of an application obtained by the transmission configuration module to a global configuration node.
That is, the first node is further configured to send the deployment information of the first application to the global configuration node, so as to register the deployment information of the first application at the global configuration node. The second node is further configured to send deployment information of the second application to the global configuration node, so as to register the deployment information of the second application in the global configuration node.
In this way, the first physical machine and the second physical machine only need to know the deployment information of the applications in the nodes corresponding to the first physical machine and the second physical machine, and the burden of maintaining the deployment information is reduced. And the first physical machine and the second physical machine send the deployment information of the application to the global configuration node, so that the management is facilitated, and the real-time performance of the deployment information of the application is ensured.
Various terms and corresponding technical details involved in describing the application interaction system, including but not limited to transmission methods, deployment information, transmission method selection strategies, and the like, may refer to the foregoing description and are not repeated herein.
It can be considered that the global configuration node and the transport configuration module mentioned hereinafter constitute a system for managing deployment information of applications in a network. It should be understood that, in a system to which the method described in the embodiment of the present application is applied, the transmission configuration module and the global configuration node are in terms of maintaining deployment information of the application. There is no clear material difference. It should be understood that the global configuration node does not require to store all actual deployment information of applications in a certain networking system, or all deployment information of applications in a network covered by the global configuration node, for example, some system applications do not need to communicate. On the other hand, there may be one or more global configuration nodes in a network system, and each global configuration node manages deployment information of applications on a part of nodes in the network.
As described above, the function of the transmission configuration module includes obtaining a first instruction, and by processing the first instruction, the transmission configuration module can determine the transmission mode of the connection. The first instruction may be the connection instruction or the write instruction described above, or may be a query instruction generated according to the connection instruction or the write instruction, where the query instruction is used to query the deployment information of the source end and the peer end. The above function can be achieved because the transmission configuration module determines the deployment information of the source end and the opposite end application related to the connection request according to the information in the connection request, and even determines the deployment relationship of the source end and the opposite end application according to the deployment information, so as to determine the transmission mode according to the deployment information of the source end and the opposite end and the transmission mode selection policy, or the deployment relationship and the transmission mode selection policy. This requires that the transmission configuration module can obtain the deployment information of the applications of the source terminal and the peer terminal.
With reference to fig. 3, a process of registering a running application with a transmission configuration module and determining a transmission mode by the transmission configuration module after obtaining a connection request in an implementation manner will be described below. It should be understood that fig. 3 is only a schematic diagram. It should be understood that the process of registering a running application with the transport configuration module, whether the source end and the peer end need to complete (actually, it is not clear during the registration process whether the running application will be a connection initiator or a connection requester), can determine a corresponding connection party in the process of establishing a connection involving the application. For example, as described above in the embodiments of the present application, in the case where the deployment relationship of two applications establishing a connection cannot be determined, the TCP/IP protocol is used by default. That is, in order to implement the method of the embodiment of the present application, the registration of the application information related to the interaction should be performed before the application initiates the connection request. That is, under the C/S architecture, both servers and clients need to register.
As shown in fig. 3, the running application is registered with the transmission configuration module, specifically, the registration is completed by sending the deployment information of the application to the transmission configuration module, and the deployment information, as described above, may include at least one of address information of the node where the application is located, identity information of the application and the node where the application is located, and network information and location information of the application and the node where the application is located. In one case, the deployment information may also describe that the application further includes service information of a node where the application is located. The embodiment of the present application does not limit the specific form of the deployment information. And the transmission configuration module stores the mapping relation between the identification of the application and the deployment information of the application so as to complete registration. For example, the mapping relationship may be an application information table. The identifier of the application is used to indicate the application, and is generally some common form for establishing a connection by the application, for example, the identifier may be an ID of the application, a source address corresponding to the application, or a port corresponding to the application.
On the other hand, after the transmission configuration module obtains a first instruction, the deployment information of the application and the deployment information of the application at the opposite end are found according to the information of the application and the information of the application at the opposite end connected (for example, the identifiers of the two applications, the destination address of the application at the opposite end, and the like, which are not limited in this embodiment of the present application). Thus, the transmission configuration module can select the strategy according to the configuration information and the preset transmission mode; or determining the deployment relationship between the application and the opposite-end application according to the configuration information, and determining the transmission mode of the connection according to the deployment relationship and a preset transmission mode selection strategy. In one implementation, the deployment information of the application of the peer needs to be queried for the global configuration node. The transmission configuration module may store the obtained deployment information of the peer application in a third memory (which may be located in a node where the transmission process is located or a physical machine corresponding to the node), so as to facilitate next use. In an implementation manner, the transmission configuration module may also return the determined transmission manner to the application issuing the connection request.
It should be understood that the stored information related to the transmission configuration module, such as the deployment information of the application, the preset storage policy, and the like, may be stored in the second storage and the third storage, and the second storage and the third storage may be the same or different storages. For example, the second storage is used to store deployment information of an application on the same node or the same physical machine as the configuration module, and the third storage is used to store deployment information of an application on another node, and the like. The second memory and the third memory are storage devices or storage units accessible by the transfer configuration module. For example, the second memory may be at the same node as the transport configuration module or at a different node of the same physical machine or at another physical machine directly remotely accessible to the transport configuration module, similar to the third memory. For further description of the relationship between the location of the stored deployment information and the location of the transport configuration module, please refer to the above related contents. The specific forms of the second storage and the third storage are not limited in this document, for example, the second storage and the third storage may be in a cache corresponding to the transmission configuration module, or in a hard disk, or may be stored in a local storage space that is accessible by the transmission configuration module of another transmission configuration module.
It should be further noted that the Application transmits the configuration module through an API (Application Programming Interface) to implement information interaction. For example, the API may be an interface function of a socket suite. The socket function includes a function socket (), and in a general technique, the socket () is the first function in the set of functions. The API can be developed by a user or improved on the basis of the existing API. In the prior art, no transmission configuration module is arranged, and the application can naturally not interact with the transmission configuration module through an interface function. Therefore, one way to implement this is to rewrite the Socket interface functions and use redefined APIs. However, such a method is not compatible with the API in the prior art, and is not applicable to the existing application version, and if the existing application version is required to support the redefined API, the application is modified or the user who needs to operate the application is required to encode the application, which is obviously inconvenient and increases a large amount of development cost.
Thus, in one implementation, the function library corresponding to this socket function of the socket may be rewritten without changing the form of the interface function. Specifically, the content in the function library may be rewritten, or the interface function of the socket is redirected (redirect) to the rewritten function library (i.e. the interface function jumps to the storage location where the rewritten function library is located). For example, the rewritten function library may be overwritten on the function library corresponding to the original socket function, or the rewritten function library may be stored in an operating system directory with a higher loading level, so that the interface function calls the code in the rewritten function library during the execution process to implement a function different from the original function. Thus, for the application, the interface function used is unchanged, but the improved library of interface function calls changes the function of the interface function, i.e. the connection request is handed over to the transport configuration module for processing.
In addition, since the transmission configuration module determines a suitable transmission mode so that the connection request can be continuously issued through the interface of the protocol corresponding to the transmission mode, the node in the embodiment of the present application needs to support interfaces of multiple transmission protocols, that is, an interface for implementing multiple transmission modes is configured. Because the application is deployed and operated, secondary development and maintenance of programmers are inevitably involved, or interfaces possibly supported by different versions of the application are different in form, or interfaces in some nodes are not standardized interfaces, in one implementation manner, in order to isolate differences of the multiple interfaces for the application of the application layer, so that development of the application program of the upper-layer application becomes simpler and faster, an interface adaptation layer can be arranged in a socket of the application, for example, an interface of different technologies can be connected with an interface of a uniform form specifically through a function pointer.
It should be understood that the socket and interface adaptation layer of an application can be considered part of the underlying code of the application. That is, the socket function of the application is the function of the application bottom layer, and those skilled in the art will understand that the application is unaware of the call to the function of the application bottom layer. Functionally, the socket, the function library corresponding to the socket, and the above mentioned optional interface adaptation layer may also be regarded as a module for determining a transmission manner proposed in the embodiment of the present application, that is, an instruction delivery module mentioned in the following apparatus. For example, the instruction passing module may be referred to as an nSocket module.
The embodiment of the present application further provides an application interaction method, which is described below with reference to the process of interaction between the first application and the second application in fig. 4. Fig. 4 corresponds to an embodiment in which the first application and the transport configuration module are on one physical machine. Where the method uses terminology previously described, reference is made to the preceding description. Such as identification, transport configuration module, first instructions, deployment information, deployment relationships, interface functions, and transport selection policies, among others.
S401, the transmission configuration module receives a first instruction, wherein the first instruction comprises an identifier of a first application and an identifier of a second application.
Please refer to the above description of the identifiers.
In one implementation, the first instruction is a query instruction, where the query instruction is used to query deployment information of the first application and deployment information of the second application, or the query instruction is used to query a deployment relationship between the first application and the second application, or the query instruction is used to query a transmission manner between the first application and the second application.
That is, the query instruction only needs to enable the transmission configuration module to determine the transmission mode between the two applications, but the information that the query instruction itself may use for querying is information related to the transmission mode.
Accordingly, the transmission configuration module receives a first instruction comprising:
the transmission configuration module receives the query instruction through a first interface function of a Socket, wherein the content of a function library called by the first interface function is set to be used for processing a connection instruction or a write instruction issued by the first application into the query instruction, and sending the query instruction to the transmission configuration module for processing so as to determine the transmission mode, the connection instruction represents that the first application requests to establish connection with the second application, and the write instruction represents that the first application indicates that information to be transmitted to the second application is written into a first storage unit.
Of course, the transmission configuration module may receive the query command through other API interfaces, but the function of the API interface is similar to that of the first interface. For example not through a default protocol port. However, with the adoption of a self-created interface or the change of the existing interface, the processing procedure of issuing the connection request to the first application in the prior art needs to be changed by programming the first application and the operating system where the first application is located, so that the connection request is processed by the transmission configuration module to determine the appropriate transmission mode.
It should be understood that the connection instruction or the write instruction is issued by the first application, in which case the interface function or other interface needs to be able to process the connection instruction or the write instruction into a query instruction, so as to facilitate the use of the transmission configuration module. Thus, the transmission configuration module has single function and light weight, and needs no complex processing procedure, while the improvement of API is relatively complex.
In another implementation manner, the first instruction is a connection instruction or a write instruction issued by the first application, the connection instruction indicates that the first application requests to establish connection with the second application, and the write instruction indicates that the first application instructs to write information to be transferred to the second application into a first storage unit.
Accordingly, the transmission configuration module receives a first instruction comprising: the transmission configuration module receives the connection instruction or the write instruction through a first interface function of a Socket, and the content of a function library called by the first interface function is set to be used for sending the connection instruction or the write instruction issued by the first application to the transmission configuration module for processing so as to determine the transmission mode.
It should be understood that, in the above two implementations, the form of the first interface function is the same as that of one interface function in the prior art, but the content of the function library called by the interface function is rewritten, and for a specific implementation, please refer to the foregoing. Thus, the upper layer application, such as the first application, does not sense the change of the interface, and the upper layer application does not need to change the adaptive interface. The form of this first interface function is the same as the form of the interface function of the prior art, but the function has changed. For example, the interface function is still connect (). Therefore, on one hand, the method is compatible with the interface function of the existing socket, on the other hand, for the first application and the user using the first application, the method cannot sense the change of the processing of the connection request, and is more convenient to use and wider in applicability.
Of course, in an implementation, the transmission configuration module may also receive the connection instruction or the write instruction through another API interface, but the function of the API interface is similar to that of the first interface. For example not through a default protocol port. However, with the adoption of a self-created interface or the change of the existing interface, the processing procedure of issuing the connection request to the first application in the prior art needs to be changed by programming the first application and the operating system where the first application is located, so that the connection request is processed by the transmission configuration module to determine the appropriate transmission mode.
It should be understood that the connection instruction or the write instruction is issued by the first application, in this case, the interface is equivalent to just performing forwarding, and the transmission configuration module receives the connection instruction or the write instruction, and the transmission configuration module needs to be able to process the connection instruction or the write instruction into a query operation so as to determine the transmission mode. Thus, the functions of the transmission configuration module are diversified, certain instruction conversion and analysis capabilities are required, and the improvement of the API is relatively simple.
For example, the connection instruction includes an ID of the first application or a source address corresponding to the first application, and an ID of the second application or a destination address corresponding to the second application. The write instruction may include an identifier of the first application, data to be written, and a target address (which may be of the second application or of the IO device), and the detailed description of the connection instruction and the write instruction refers to the foregoing. On the other hand, for a write command, even in a shared memory manner, data is stored in a storage unit, a first application indicates an address of the storage unit through some information or structure (e.g., a pointer), and the pointer is transferred to a second application, so that the second application reads the data according to the pointer, thereby completing information sharing between the first application and the second application, and then the data transmitted in the write command is the information or structure (e.g., the pointer).
It should be understood that the issuing of the connection command by the first application may be in a scenario where the default transmission mode of the first application is TCP/IP. The first application issues the write command, which may be in a scenario where the default transmission mode of the first application is UDP or a mode of sharing a memory.
S403: the transmission configuration module determines deployment information of the first application and deployment information of the second application according to the first instruction, wherein the deployment information of the first application comprises the position of a first node where the first application is located, and the deployment information of the second application comprises the position of a second node where the second application is located.
It should be understood that the first node where the first application is located generally refers to a node directly carrying the application, but if the policy only considering the granularity of the physical machine in the transmission mode selection policy, the first node may also be the physical machine where the application is located.
In one implementation, the transmission configuration module obtains deployment information of the first application from a second storage according to the identifier of the first application; the transmission configuration process obtains the deployment information of the second application from a third memory according to the identifier of the second application, wherein the third memory is the same as or different from the second memory; or, in a case that the deployment information of the second application is not stored in the third memory, the transmission configuration process obtains the deployment information of the second application from a global configuration node according to the identifier of the second application.
For a description of the second memory and the third memory, please refer to the foregoing.
That is, the transport configuration module may need to obtain information from the global configuration node. Therefore, the transmission configuration module does not need to manage the deployment information of all the applications in the application range of the method, the distributed deployment information management method enables the updating, management and interaction of the deployment information to be simpler and more convenient, and saves storage resources.
The present application does not limit the specific interaction method between the transmission configuration module and the global configuration node, and various existing technologies may be used, for example, by sending a query request. Reference is made to the above description regarding the processing of the transport configuration module and the interaction with the global configuration node.
S405: and the transmission configuration module determines the transmission mode of the information between the first application and the second application according to the deployment information of the first application, the deployment information of the second application and a transmission mode selection strategy.
The transmission mode selection strategy comprises the deployment information of the first application, the deployment information of the second application and the corresponding relation of the transmission modes.
Or the transmission method selection policy includes a deployment relationship between the first application and the second application and a correspondence between the transmission methods, where the deployment relationship between the first application and the second application includes a relationship between a position of the first node and a position of the second node.
Specifically, the transmission mode selection policy is stored in a storage unit corresponding to the transmission configuration module, for example, the aforementioned second storage and third storage, or other storage units. In the transmission method selection policy, there are many corresponding relationships that may be included, and the specific form of the corresponding relationship is not limited in this embodiment of the application, and may be, for example, a table. The foregoing may be referred to for the description of the transmission configuration module and the transmission mode selection policy.
The location of the first node where the first application is located includes network information of the first application or network information of the first node or address information of the node where the first application is located, and the location of the second node where the second application is located includes network information of the second application or network information of the second node or address information of the node where the first application is located. It should be understood that, in different scenarios, the granularity of consideration for the node where the application is located is different, especially after the virtualization scenario is involved, therefore, in different transmission mode selection policies, the first node may correspond to different granularities (which may be one of a container carrying the first application, a virtual machine carrying the container, and a physical machine carrying the virtual machine or the container), and then the location of the first node may be a variety of different parameters, and the second node is similar, for a specific description, please refer to the foregoing.
The transmission mode comprises one of transmission control protocol/internet protocol TCP/IP, user datagram protocol UDP, full-name remote direct data access RDMA, shared memory and interprocess communication (Domain _ Socket).
Therefore, the location relationship between the first node and the second node included in the deployment relationship may also be in various granularities, for example, the location relationship between the physical machine and the physical machine, the location relationship between the virtual machines, and the like. The particular granularity may vary according to different scenarios and requirements. The business relationship of the two nodes can be further included. The more the granularity is considered, the more the types of the corresponding relation which usually includes the deployment relation and the transmission mode in the preset transmission mode selection strategy are, so as to select the most suitable transmission mode. It should be understood that what the deployment relationship is to store should be negotiated or set in advance in the system using the method.
Specifically, in an implementation manner, the determining, by the transmission configuration module, a transmission manner for transmitting information between the first application and the second application according to the deployment information of the first application, the deployment information of the second application, and a transmission manner selection policy includes:
under the condition that the first container and the second container are located in the same physical machine and belong to the same POD, the transmission configuration module determines that a transmission mode for transmitting information between the first application and the second application is a shared memory; when the first container and the second container are the same physical machine and belong to different PODs, the transmission configuration module determines that a transmission mode for transmitting information between the first application and the second application is interprocess communication (Domain _ Socket).
It should be understood that, after the transmission mode determined by the transmission configuration module, the connection instruction or the write instruction corresponding to the first instruction may be further allocated to an interface corresponding to the corresponding transmission mode for processing, for example, to be sent to a target device (e.g., an I/O device, a storage device, or the like), or to be sent to a target node.
For example, if the transmission mode determined by the transmission configuration module is transmission using a TCP/IP protocol, according to the TCP/IP protocol, the connection instruction is used by a node (where the node is deployed on a first physical machine) where the first application is located to use the TCP/IP protocol, and the connection instruction is encapsulated into a link establishment request, and the link establishment instruction is sent to the second application, that is, sent to a second physical machine where the second application is located.
In one implementation, the second application, upon receiving the link establishment request, also sends a response message to the first application, where the response message is a TCP/IP message. That is, the second application determines the transmission method used by the connection according to the format of the received link establishment request, and returns a response message using the same communication protocol as the link establishment request. The TCP/IP protocol is also used to subsequently transfer information, such as traffic data, between the first application and the second application.
S407: and the first application transmits information to the second application by using the transmission mode.
It is to be understood that the transferred information may be information subsequently transferred to the second application after the write instruction or the connect instruction. The write command or the connection command may also be the write command or the connection command, because, in view of the overall process, the write command or the connection command is issued by the first application to the second application through the interface corresponding to the transmission mode.
In one embodiment, the transfer configuration module returns the determined transfer mode to the first application. Therefore, the first application can use the interface corresponding to the transmission mode in the subsequent interaction with the second application without decision by the transmission configuration module. Of course, since the first application supports multiple interfaces, the first application should configure the corresponding interface according to the returned transmission mode. In one implementation, if an interface is a socket, the first application configures an interface function in the socket according to the transmission mode returned by the transmission configuration module; and the first application sends information to the second application through a configured second interface function in the Socket in the transmission mode.
It should be understood that the interface functions for sending and receiving information (mainly interactive data and instructions) in a socket are different due to different transmission modes. Therefore, the first application can determine the interface function corresponding to the sending and receiving information according to the returned transmission mode. The second interface function is the determined function for transmitting information.
Thus, by changing the processing flow of the connection request of the application and using the transmission configuration module to process the first instruction, the transmission mode of the two applications to be interacted can be determined according to the deployment information and the transmission mode selection strategy of the two applications to be interacted, and then the information is transmitted by using the transmission mode. Therefore, the appropriate transmission mode can be selected more flexibly, the transmission performance such as the data transmission efficiency and the like is improved, and the waste of unnecessary transmission resources and the reduction of the data transmission efficiency in the information transmission process caused by the improper use of the transmission mode are avoided.
It should be understood that the first application may also register its deployment information with the transport configuration module, so that the transport configuration module may manage it, for example, store the corresponding relationship between the identifier of the first application and the deployment information. This can be used in determining the transport mode of other connections involving the first application. Further, the transmission configuration module may also send the deployment information to the global configuration node, and the transmission configuration modules distributed in the plurality of nodes and the global configuration node may form a system for managing the application deployment information. It should be understood that the communication between transport configuration modules within the system, and between transport configuration modules and global configuration nodes, uses the TCP/IP protocol by default.
On the other hand, in the method according to the embodiment of the present application, the second application may also send the deployment information of the second application to the transmission configuration module corresponding to the second application, and the transmission configuration module corresponding to the second application may specifically be a node of the second application or a transmission configuration module on a physical machine where the node of the second application is located, so that the transmission configuration module corresponding to the second application manages the deployment information of the second application (for example, stores the deployment information in a corresponding storage unit). And further, the transmission configuration module corresponding to the second application sends the deployment information of the second application to the global configuration node. For further explanation, reference is made to the above section relating to deployment information of the first application.
It should be understood that, since a plurality of applications are deployed on one node, the method and system in the embodiments of the present application may also be used in a scenario of multi-transmission mode parallel transmission, that is, a plurality of applications may use different transmission modes to communicate with an opposite terminal in parallel on one node, which can better utilize resources of multiple transmission paths, reduce resource contention on an original default path, and thus can support more applications to communicate in parallel.
It should be understood that, in the embodiment corresponding to fig. 4, the socket, the interface function in the socket, and the function library corresponding to the interface function are also part of the instruction passing module (i.e., the nSocket module) mentioned above.
For other descriptions (for example, descriptions of the terms or scenes referred to above) of the embodiment corresponding to fig. 4, please refer to the above description, and further description is omitted here.
The process of two applications interacting is described below from the perspective of the C/S architecture in conjunction with FIG. 5. One application is called client and is the initiating end of the connection, and the other application is called server and is the opposite end of the initiating end. FIG. 5 illustrates an interactive process in which the default transport mode is TCP/IP. And FIG. 5 draws Ea of the client and the server together, because the deployment relationship between the client and the server is not known, FIG. 5 can be understood as an abstraction, and the interaction between the client and the server and the module with Ea function. It should be understood that fig. 5 is a schematic illustration only,
for example, for a query task initiated by a user, the decomposition of the query statement and the data display can be completed by using an application client arranged at a terminal; if the data is stored in the data management center, tasks such as data query and the like need to be completed through a query process arranged on a server of the data management center, and if the data is stored locally in the terminal, the data query task is processed through a read-write process running on an operating system of the terminal. In this example, the application client disposed in the terminal is a client, and the query process or the read-write process is a server.
It can also be understood from the above example that clients and servers are actually divided according to roles of applications in executing a certain task, one client may correspond to different servers in different tasks, and an application as a client in one task may be a server in another task.
In an implementation manner, it can be considered that the nSocket module and the Ea module implement a function of determining a transmission manner, where the nSocket module is the instruction transfer module mentioned above, and includes the above-mentioned redirected socket interface function to be called by the application, a function library Lib _ nsock (an interface function for providing socket for the application) corresponding to the redirected socket interface function, and an interface adaptation layer. The Ea module is the transport configuration module described above. The Ea of the server and the client belong to the Ea system, which is the system for managing the application deployment information described above.
The following description specifically describes the process of interacting between server and client and Ea to realize communication when the default transmission mode is TCP/IP protocol. In the process, the redirected socket interface function is used, but the function name of the socket interface function is not changed, the socket function still conforms to the general standard, and the server and the client cannot sense the change of the interface function in the communication process, in other words, the server and the client do not need to be improved to be compatible with the redirected socket interface function.
The transport configuration module may manage configuration information for the application. In the running state, the server calls the function socket () and the bind () in the redirected socket to complete the registration on Ea corresponding to the server, for example, the bind () may send the deployment information of the server to Ea. Specifically, the server binds a port (port) through function bind (), and collects deployment information of the server, and the deployment information can enable the Ea system to determine the deployment relationship between the server and the client to be communicated. For a description of the deployment information, please refer to the above description. For example, the deployment information of the server may include at least one of ID information, an IP address, a physical machine address where the server is located, a virtual machine address, a container address, a monitored IP address, information of a bound port, and the like, and specific implementation and combination modes are not limited; the deployment information of the client may include at least one of ID information, IP address, physical machine address where the client is located, virtual machine address, container address, information of used port, and the like, and the specific implementation and combination manner is not limited.
The client also completes registration on the Ea corresponding to the client in a similar way. The server enters a state of monitoring the link establishment message through a function listen () in the socket, and in the state, the server can monitor a certain IP address and a port, and can receive a link establishment request from other applications. The client uses a function connect () in the socket to issue a link establishment request, the link establishment request comprises a source address and a destination address of a link to be established, the function of the link establishment request has been changed due to the redirection of the function connect (), the function connect () enables the link establishment request to be forwarded to the Ea module for processing, the link establishment request can be understood as the function connect () is converted into a query request for querying the deployment relationship to be processed by the Ea module, the Ea module determines the deployment relationship between the client and the server according to the query request (for example, the Ea module can query the deployment information of the server according to the destination address, specifically query the local deployment information or request the deployment information to a central deployment node, the link establishment request is sent by the client, the Ea module can also determine the deployment information of the client according to the relevant information of the client in the link establishment request), and selects a transmission mode of management according to the deployment relationship and the Ea transmission mode selection policy, and the client sends a link establishment request encapsulated by a transmission protocol to the server by using the determined transmission mode. It should be understood that, different transmission modes and different establishment requests are used, and the client encapsulates the information in the link establishment request by using the determined transmission mode and then sends the encapsulated information. For example, in this embodiment, if the determined transmission mode is TCP/IP transmission, the link establishment request is a TCP/IP packet. The server analyzes the format of the received link establishing request to determine the transmission mode to be used by the connection, or determines the transmission mode through a transmission configuration module corresponding to the server according to the information of the client in the link establishing request. For example, in this embodiment, the server may send a response message according to the link establishment request to establish a connection (via () function of the socket).
So far, both the client and the server define the transmission mode of the connection, and the client determines the send () and recv () cluster interface functions that conform to the transmission mode, for example, redirects the content corresponding to the send () and recv () cluster interface functions that support the default transmission mode to the content that supports the determined transmission mode, wherein the send () and recv () cluster interface functions are used for receiving and sending data in the transmission process after the connection is established. Similarly, after receiving the chain establishment initiated by the client, the nSocket module of the server identifies the optimal transmission method, redirects the send () and recv () cluster functions of the server, and selects an interface function suitable for the transmission mode of the link to realize the link.
It should be understood that the send () cluster function includes a plurality of functions for performing the send function, wherein the specific form of the function may be send. Similarly, the recv () cluster function includes a plurality of functions for performing a receiving function, wherein the specific form of the function may be recv.
It should be understood that, the above-described process includes the process of processing the link establishment command at the Ea module to determine the transmission mode, and the connection establishment process may be slower than the default transmission mode used in the prior art, but on one hand, the application program does not care about the transmission performance at the link establishment stage, and on the other hand, because the proper transmission mode is determined, the transmission performance (specifically, the efficiency of data transmission, avoiding unnecessary waste of network resources, etc.) of the data transmission process after the link establishment is better than that of the improper transmission mode.
In another implementation manner, the following detailed description explains a process in which, when a default transmission manner is UDP (User Datagram Protocol), a server, a client and Ea interact with each other to determine an appropriate transmission manner, and implement communication using the transmission manner. The process is similar to the case where the default transmission mode is TCP protocol, and the description of the system is not repeated here, and please refer to the above. However, in the case that UDP is a default transmission mode, only a bind () function is used, and there are no connect () function and a list () function, after a server and a client use the bind () function to register in their respective corresponding transmission configuration modules, the client uses a send () function complying with the UPD protocol for the first time (the send () function has been redirected), and transfers an instruction (which may be a write instruction including data to be written) sent to the server to the Ea module, so that the Ea module determines the transmission mode used for sending the request, so that the client sends the request to the server through the transmission mode. It should be understood that the subsequent interaction between the client and the server will also use the transmission mode, that is, the client will redirect the content in the send () cluster function supporting the UDP protocol to the content corresponding to the transmission mode again according to the determined transmission mode, so as to be used in the subsequent interaction. In addition, similar redirection is performed on the recv () cluster function which supports the UDP protocol as a default, so as to redirect to the content corresponding to the transmission mode, so that the determined transmission mode is used in subsequent interaction. It will be appreciated that in this respect, the connct () function implements a function similar to the bind () function in the TCP protocol. Similarly, the server redirects the contents of the send () cluster function and the recv () cluster function according to the transmission protocol followed by the first received message, so as to use the determined transmission mode in the subsequent interaction. Therefore, the API interface of the socket in the prior art is not changed, the processing flow of the connection request of the application is changed by redirecting the interface function of the socket, specifically, the nsocket module and the Ea module are used for processing the connection request, the transmission mode of the two applications to be interacted can be determined according to the deployment information and the transmission mode selection strategy of the two applications to be interacted, and then the transmission mode is used for transmitting the information, so that the proper transmission mode can be selected more flexibly, the transmission performance such as the efficiency of data transmission is improved, and the waste of unnecessary transmission resources and the reduction of the data transmission efficiency in the information transmission process caused by the improper transmission mode are avoided.
Fig. 6 shows an apparatus 600 for application interaction, which includes a transmission configuration module 601 and an instruction delivery module 602,
the transmission configuration module 601 is configured to receive a first instruction, where the first instruction includes 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 according to the first instruction, wherein the deployment information of the first application comprises the position of a first node where the first application is located, and the deployment information of the second application comprises the position of a second node where the second application is located; determining a transmission mode of information between the first application and the second application according to 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 the deployment information of the first application, the deployment information of the second application and a corresponding relation of the transmission modes, or the transmission mode selection policy comprises the deployment relation between the first application and the second application and a corresponding relation of the transmission modes, and the deployment relation between the first application and the second application comprises a relation between the position of the first node and the position of the second node;
the instruction delivery module 602 is configured to transmit, using the transmission manner, information to be transmitted to the second application by the first application.
In one implementation, the first instruction is a query instruction, where the query instruction is used to query the deployment information of the first application and the deployment information of the second application, or the query instruction is used to query a transmission mode between the first application and the second application.
Correspondingly, in the aspect of receiving the first instruction, the transmission configuration module 601 is configured to receive the query instruction through a first interface function of a Socket, where the content of a function library called by the first interface function is set to be used to process a connection instruction or a write instruction issued by the first application into the query instruction, and send the query instruction to the transmission configuration module for processing to determine the transmission mode, the connection instruction indicates that the first application requests to establish connection with the second application, and the write instruction indicates that the first application instructs to write information to be transferred to the second application into a first storage unit.
In one implementation, the first instruction is a connection instruction or a write instruction issued by the first application, where the connection instruction indicates that the first application requests to establish connection with the second application, and the write instruction indicates that the first application instructs to write information to be transferred to the second application into a first storage unit.
Correspondingly, in the aspect of receiving the first instruction, the transmission configuration module 601 is configured to receive the connection instruction or the write instruction through a first interface function of a Socket, where the content of a function library called by the first interface function is set to be used to send the connection instruction or the write instruction issued by the first application to the transmission configuration module for processing so as to determine the transmission mode.
In one implementation, the apparatus further includes a second storage module and a third storage module, where the third storage module is the same as or different from the second storage module; in the aspect of determining the deployment information of the first application and the deployment information of the second application according to the first instruction, the transmission configuration module 601 is configured to obtain the deployment information of the first application from the second storage module according to the identifier of the first application; the transmission configuration module 601 obtains the deployment information of the second application from the third storage module according to the identifier of the second application, or, in a case that the deployment information of the second application is not stored in the third storage module, the transmission configuration module obtains the deployment information of the second application from a global configuration node according to the identifier of the second application.
In one implementation manner, the location of the first node where the first application is located includes network information of the first application or network information of the first node or address information of the node where the first application is located, and the location of the second node where the second application is located includes network information of the second application or network information of the second node or address information of the node where the first application is located.
And in one implementation, the transmission mode includes one of transmission control protocol/internet protocol TCP/IP, user datagram protocol UDP, full name remote direct data access RDMA, shared memory, and interprocess communication (Domain _ Socket).
In one implementation, the first node is a first container, the second node is a second container, and in terms of determining a transmission manner for transmitting information between the first application and the second application according to the deployment information of the first application, the deployment information of the second application, and a transmission manner selection policy, the transmission configuration module 601 is configured to determine that the transmission manner for transmitting information between the first application and the second application is a shared memory when the first container and the second container are located in the same physical machine and belong to the same POD; and when the first container and the second container are the same physical machine and belong to different PODs, the transmission configuration module determines that a transmission mode for transmitting information between the first application and the second application is interprocess communication (Domain _ Socket).
In one implementation, in an aspect of using the transmission mode to transmit information to be transmitted from the first application to the second application, the instruction delivery module 602 is configured to configure an interface function in the socket according to the transmission mode returned by the transmission configuration module; and transmitting information to the second application by using the transmission mode through a configured second interface function in the Socket.
In one implementation, the transmission configuration module 601 is further configured to receive a second instruction sent by the first application, where the second instruction includes deployment information of the first application; storing deployment information for the first application in the second memory; and sending deployment information of the first application to the global configuration node.
In summary, it can be seen that the apparatus corresponding to fig. 6 corresponds to the method embodiment, and corresponds to the first node in the system embodiment, and the description in the embodiment and the foregoing description may help explain implementation details of the apparatus 600, where the transmission configuration module 601 is the transmission configuration module described above, and the instruction transfer module 602 is the nSocket module described above, so that a change of a processing flow of a connection request of an application is realized through the transmission configuration module 601 and the instruction transfer module 602, a transmission manner of two applications to be interacted may be determined according to deployment information and a transmission manner selection policy of the two applications to be interacted, and information is transmitted by using the transmission manner, so that a suitable transmission manner may be selected more flexibly, transmission performances such as efficiency of data transmission are improved, and information transmission processes caused by using an improper transmission manner are avoided, unnecessary transmission resources are wasted and data transmission efficiency is reduced.
For details of other descriptions of the apparatus shown in fig. 6, please refer to the related description above, and the details are not repeated herein.
Of course, the second node described above may also include a similar transmission configuration module and a similar instruction transmission module, so as to determine the transmission mode between the second application running on the second node and the first application by using the method described above. The second application registers the deployment information of the second application through a transmission configuration module, determines a transmission mode through the transmission configuration module, and receives or sends the information to the first application through an instruction transmission module. Specifically, those skilled in the art can refer to the foregoing description, and further description is omitted here.
On the other hand, a specific implementation form of the apparatus shown in fig. 6 is shown in fig. 7, and the apparatus structure diagram shown in fig. 7 is applicable to the first node, the second node and the full-text deployment node mentioned above. The apparatus includes a processing circuit 702, and a communication interface 704 coupled thereto. In some cases, a storage medium 706 may also be included. Wherein the processing circuit 702 is configured to implement the application interaction method in the foregoing method embodiments by processing code in the storage medium 706. For example, the transmission configuration module, the instruction delivery module mentioned above may be implemented by the processing circuit 702 by processing code in the storage medium 706.
Among other things, the processing circuitry 702 is used to process data, control data access and storage, issue commands, and control other devices to perform operations. The processing circuit 702 may be implemented as one or more processors, one or more controllers, and/or other structures operable to execute programs, etc. The processing circuit 702 may specifically include at least one of a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic component. It is to be understood that the storage medium 704 may be integrated with the processing circuit 702 in the case where the processing circuit 302 is an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic component. A general-purpose processor may include a microprocessor, as well as any conventional processor, controller, microcontroller, or state machine. The processing circuit 702 may also be implemented as a combination of computing components, such as a DSP and a microprocessor.
In one implementation, the apparatus 700 is an intelligent terminal, such as a mobile phone, and the processing circuit of the terminal includes an application processor 709 and a transmission processor 710.
It will be appreciated that the illustration in fig. 7 is only a schematic representation of one implementation, in which case the apparatus has a storage medium (e.g. a memory) that is separate from the processing circuitry 702, the storage medium being connectable to the processing circuitry 702 and the communication interface 704 via a bus. Such as a server, a mobile phone terminal, etc., may be suitable for this case, however, it should be understood that in another implementation, the processing circuit 702 is an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic component, and the storage medium may be integrated with the processing circuit 702, which is different from the implementation shown in the figure, for example, some routers, gateways, some devices in the power system, such as an electric meter, etc., and the embodiment of the present invention is not limited thereto.
The storage medium 706 may include a computer-readable storage medium, such as a magnetic storage device (e.g., hard disk, floppy disk, magnetic strip), an optical storage medium (e.g., Digital Versatile Disk (DVD)), a smart card, a flash memory device, Random Access Memory (RAM), Read Only Memory (ROM), programmable ROM (prom), erasable prom (eprom), registers, and any combination thereof. A storage medium 706 may be coupled to the processing circuit 702 such that the processing circuit 702 can read information and write information to the storage medium 706. In particular, the storage medium 706 may be integrated into the processing circuit 702, or the storage medium 706 and the processing circuit 702 may be separate.
The storage medium 706 may store therein a protocol stack program 720, and deployment information of applications running on the apparatus 700.
The communication interface 704 may include circuitry and/or programming to enable bi-directional communication between the user equipment and one or more wireless network devices (e.g., base stations, servers, etc.). For example, the communication interface 704 may be a transceiver, which may include a set of devices with receive capabilities (e.g., including at least one of a set of interfaces, a set of antennas, and receive circuitry 716), and a set of devices with transmit capabilities (e.g., at least one of another set of interfaces, a set of antennas, and transmit circuitry 718); or a set of devices (e.g., a set of interfaces or a set of antennas) having both receiving and transmitting functions. In one implementation, the communication interface 704 may be coupled to one or more antennas (not shown in fig. 7) and include at least one receive circuit 716 and/or at least one transmit circuit 718.
The apparatus corresponding to fig. 6 may also be implemented by another implementation, for example, a physical machine as illustrated in fig. 8. The physical machine shown in fig. 8 may describe an application interaction device in a virtualized scenario. The physical machine comprises a hardware layer, a first node 801 running on the hardware layer, and a transmission configuration module 802, wherein a first application runs in the first node 801, the first node 801 is a virtual machine or a container running on the hardware layer, wherein,
the transmission configuration module 802 is configured to receive a first instruction, where the first instruction includes 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 according to the first instruction, wherein the deployment information of the first application comprises the position of a first node 801 where the first application is located, and the deployment information of the second application comprises the position of a second node where the second application is located; determining a transmission mode of information between the first application and the second application according to 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 the deployment information of the first application, the deployment information of the second application and a corresponding relation of the transmission modes, or the transmission mode selection policy comprises the deployment relation between the first application and the second application and a corresponding relation of the transmission modes, and the deployment relation between the first application and the second application comprises a relation between the position of the first node 801 and the position of the second node; the first node 801 is configured to transmit information to the second application using the transmission method.
The hardware layer 81 may include a processor 811, a physical memory 812, a hard disk 813, and a network interface device 814, where the processor 811 may be one or multiple; the network interface device 814 may be a network adapter or network card for connecting to any connectable network, such as the Internet, an enterprise network, etc. For example, the hardware layer includes the second memory mentioned hereinafter, or further includes the third memory mentioned hereinafter.
In one implementation, the first instruction is an inquiry instruction, and the inquiry instruction is used to inquire the deployment information of the first application 8011 and the deployment information of the second application, or the inquiry instruction is used to inquire the deployment relationship between the first application 8011 and the second application, or the inquiry instruction is used to inquire the transmission mode between the first application 8011 and the second application.
Correspondingly, the first node 801 further includes an instruction delivery module 8012, where the instruction delivery module 8012 is configured to process a connection instruction or a write instruction issued by the first application 8011 as the query instruction, and send the query instruction to the transmission configuration module 802 for processing to determine the transmission manner, where the connection instruction indicates that the first application 8011 requests to establish a connection with the second application, and the write instruction indicates that the first application 8011 indicates that information to be transmitted to the second application is written in a first storage unit.
In one implementation, in terms of receiving the first instruction, the transmission configuration module 802 is configured to receive the query instruction through the instruction delivery module 8012.
Correspondingly, the first instruction is a connection instruction or a write instruction issued by the first application 8011, the connection instruction indicates that the first application 8011 requests to establish a connection with the second application, and the write instruction indicates that the first application 8011 indicates that information to be transferred to the second application is written in a first storage unit.
In an implementation manner, the first node 801 further includes an instruction transmitting module 8012, where the instruction transmitting module 8012 is configured to send a connection instruction or a write instruction issued by the first application 8011 to the transmission configuration module 802 for processing so as to determine the transmission manner, and in terms of receiving the first instruction, the transmission configuration module 802 is configured to receive the connection instruction or the write instruction through the instruction transmitting module 8012.
In one implementation, in determining deployment information of the first application 8011 and deployment information of the second application according to the first instruction, the transport configuration module 802 is configured to obtain the deployment information of the first application 8011 from a second memory of the hardware layer according to the identifier of the first application 8011; the transmission configuration process obtains the deployment information of the second application from a third memory of the hardware layer according to the identifier of the second application, wherein the third memory is the same as or different from the second memory; or, in a case that the deployment information of the second application is not stored in the third memory, the transmission configuration process obtains the deployment information of the second application from a global configuration node according to the identifier of the second application.
In an implementation manner, the location of the first node 801 where the first application 8011 is located includes network information of the first application 8011, or network information of the first node 801, or address information of the node where the first application 8011 is located, and the location of the second node where the second application is located includes network information of the second application, or network information of the second node, or address information of the node where the first application 8011 is located.
In one implementation, the transmission mode includes one of transmission control protocol/internet protocol TCP/IP, user datagram protocol UDP, full name remote direct data access RDMA, shared memory, and interprocess communication (Domain _ Socket).
In one implementation, the first node 801 is a first container, the second node is a second container, and in a case that the first container and the second container are located in the same physical machine and belong to the same POD, the transmission configuration module 802 determines that the transmission mode of transmitting information between the first application 8011 and the second application is shared memory; in a case where the first container and the second container are the same physical machine and belong to different PODs, the transmission configuration module 802 determines that a transmission mode for transmitting information between the first application 8011 and the second application is inter-process communication (Domain _ Socket).
In one implementation, in terms of the first application 8011 transmitting information to the second application using the transmission method, the first node 801 is configured to configure the instruction passing module 8012 according to the transmission method returned by the transmission configuration module 802; the first node 801 transmits information to the second application by using the transmission method through the configured instruction transmitting module 8012.
In one implementation, the first node 801 is further configured to send a second instruction to the transmission configuration module 802, where the second instruction includes deployment information of the first application 8011; the transfer configuration module 802 is further configured to store deployment information of the first application 8011 in the second memory; the transmission configuration module 802 is further configured to send deployment information of the first application 8011 to the global configuration node.
It should be understood that the transmission configuration module 802 is the aforementioned transmission configuration module and the command transmitting module 8012 is the aforementioned command transmitting module in the embodiment corresponding to fig. 8. It can also be seen that the physical machine corresponding to fig. 8 can implement the method of the foregoing method embodiment. For details of implementation and noun explanation in the corresponding embodiment of fig. 8, please refer to the description of the corresponding content before, which is not repeated herein.
Thus, the change of the processing flow of the connection request of the application is realized through the transmission configuration module 801 and the instruction delivery module 8011, and the transmission mode of the two applications to be interacted can be determined according to the deployment information and the transmission mode selection strategy of the two applications to be interacted, and then the information is transmitted by using the transmission mode, so that the appropriate transmission mode can be selected more flexibly, the transmission performance such as the efficiency of data transmission is improved, and the waste of unnecessary transmission resources and the reduction of the efficiency of data transmission in the process of transmitting the information due to the use of the inappropriate transmission mode are avoided.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Those skilled in the art will appreciate that a communication system may generally include fewer or more components than shown in fig. 2, or include different components than those shown in fig. 2, and fig. 2 illustrates only those components more relevant to the disclosed implementation of an embodiment of the invention. For example, although a first node and a second node are shown in fig. 2, one skilled in the art will appreciate that a communication system may contain a greater number of nodes.
The method, apparatus, and system for application interaction provided by the embodiments of the present invention are described in detail above, and the principles and embodiments of the present invention are described herein by using specific examples, and the description of the embodiments is only used to help understand the method and core ideas of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (22)

1. An application interaction method, the method comprising:
the transmission configuration module receives a first instruction, wherein the first instruction comprises an identifier of a first application and an identifier of a second application;
the transmission configuration module determines deployment information of the first application and deployment information of the second application according to the first instruction, wherein the deployment information of the first application comprises the position of a first node where the first application is located, and the deployment information of the second application comprises the position of a second node where the second application is located;
the transmission configuration module determines a transmission mode of information between the first application and the second application according to deployment information of the first application, deployment information of the second application and a transmission mode selection policy, wherein the transmission mode selection policy includes deployment information of the first application, deployment information of the second application and a corresponding relation of the transmission modes, or the transmission mode selection policy includes a deployment relation between the first application and the second application and a corresponding relation of the transmission modes, and the deployment relation between the first application and the second application includes a relation between a position of the first node and a position of the second node; the transmission mode selection strategy is stored in a node where the transmission configuration module is located, or the transmission mode selection strategy is stored in a storage unit which can be inquired or accessed by the transmission configuration module; a deployment relationship between the first application and the second application is one of: the method comprises the steps of deploying in different virtual machines in the same physical machine, deploying in the same container of the same host, deploying in different containers of the same host, deploying in different hosts in the same trusted domain, and deploying in different hosts in different trusted domains; the host is a physical machine or a virtual machine;
the first application transmits information to the second application by using the transmission mode;
the first instruction is a query instruction, the query instruction is used for querying deployment information of the first application and deployment information of the second application, or the query instruction is used for querying a deployment relationship between the first application and the second application, or the query instruction is used for querying a transmission mode between the first application and the second application;
accordingly, the transmission configuration module receives a first instruction comprising:
the transmission configuration module receives the query instruction through a first interface function of a Socket, wherein the content of a function library called by the first interface function is set to be used for processing a connection instruction or a write instruction issued by the first application into the query instruction, and sending the query instruction to the transmission configuration module for processing so as to determine the transmission mode, the connection instruction represents that the first application requests to establish connection with the second application, and the write instruction represents that the first application indicates that information to be transmitted to the second application is written into a first storage unit.
2. The method of claim 1, wherein the determining, by the transport configuration module according to the first instruction, deployment information of the first application and deployment information of the second application comprises:
the transmission configuration module obtains the deployment information of the first application from a second memory according to the identification of the first application;
the transmission configuration module obtains deployment information of the second application from a third memory according to the identifier of the second application, wherein the third memory is the same as or different from the second memory; or, in a case that the deployment information of the second application is not stored in the third memory, the transmission configuration module obtains the deployment information of the second application from a global configuration node according to the identifier of the second application.
3. The method according to any one of claims 1 or 2, wherein the location of the first node where the first application is located comprises network information of the first application or network information of the first node or address information of the node where the first application is located, and the location of the second node where the second application is located comprises network information of the second application or network information of the second node or address information of the node where the first application is located.
4. The method of any of claims 1 or 2, wherein the transport mode comprises one of transmission control protocol/internet protocol, TCP/IP, user datagram protocol, UDP, RDMA, shared memory, inter-process communication.
5. The method according to any one of claims 1 or 2, wherein the first node is a first container, the second node is a second container, and the determining, by the transmission configuration module, a transmission mode for transmitting information between the first application and the second application according to the deployment information of the first application, the deployment information of the second application, and a transmission mode selection policy includes:
under the condition that the first container and the second container are located in the same physical machine and belong to the same POD, the transmission configuration module determines that a transmission mode for transmitting information between the first application and the second application is a shared memory;
and when the first container and the second container are the same physical machine and belong to different PODs, the transmission configuration module determines that the transmission mode for transmitting information between the first application and the second application is interprocess communication.
6. The method according to any one of claims 1 or 2, wherein the transmitting, by the first application, information to the second application using the transmission mode comprises:
the first application configures an interface function in the socket according to the transmission mode returned by the transmission configuration module;
and the first application transmits information to the second application by using the transmission mode through a configured second interface function in the Socket.
7. The method of claim 2, further comprising:
the first application sends a second instruction to the transmission configuration module, wherein the second instruction comprises deployment information of the first application;
the transmission configuration module stores the deployment information of the first application in the second memory;
and the transmission configuration module sends the deployment information of the first application to a global configuration node.
8. An apparatus for application interaction, the apparatus comprising a transmission configuration module and an instruction delivery module,
the transmission configuration module is used for receiving a first instruction, wherein the first instruction comprises an identifier of a first application and an identifier of a second application;
the transmission configuration module is configured to determine deployment information of the first application and deployment information of the second application according to the first instruction, where the deployment information of the first application includes a position of a first node where the first application is located, and the deployment information of the second application includes a position of a second node where the second application is located;
the transmission configuration module is configured to determine a transmission manner of information between the first application and the second application according to the deployment information of the first application, the deployment information of the second application, and a transmission manner selection policy, where the transmission manner selection policy includes the deployment information of the first application, the deployment information of the second application, and a correspondence relationship between the transmission manners, or the transmission manner selection policy includes the deployment relationship between the first application and the second application, and a correspondence relationship between the transmission manners, and the deployment relationship between the first application and the second application includes a relationship between a location of the first node and a location of the second node; the transmission mode selection strategy is stored in a node where the transmission configuration module is located, or the transmission mode selection strategy is stored in a storage unit which can be inquired or accessed by the transmission configuration module; the deployment relationship between the first application and the second application is one of: the system comprises different hosts, different virtual machines, different hosts and different hosts, wherein the different hosts are deployed in different virtual machines in the same physical machine, in the same container of the same host, in different containers of the same host, in the same trusted domain and in different trusted domains; the host is a physical machine or a virtual machine;
the instruction transmission module is used for transmitting the information to be transmitted to the second application by the first application by using the transmission mode;
the first instruction is a query instruction, and the query instruction is used for querying deployment information of the first application and deployment information of the second application, or the query instruction is used for querying a transmission mode between the first application and the second application;
correspondingly, in the aspect of receiving the first instruction, the transmission configuration module is configured to receive the query instruction through a first interface function of a Socket, where the content of a function library called by the first interface function is set to be used to process a connection instruction or a write instruction issued by the first application into the query instruction, and send the query instruction to the transmission configuration module for processing to determine the transmission mode, the connection instruction indicates that the first application requests to establish connection with the second application, and the write instruction indicates that the first application instructs to write information to be transferred to the second application into a first storage unit.
9. The apparatus of claim 8, further comprising a second storage module and a third storage module, the third storage module being the same or different storage module as the second storage module; in an aspect of determining deployment information of the first application and deployment information of the second application according to the first instruction, the transmission configuration module is configured to obtain the deployment information of the first application from the second storage module according to the identifier of the first application;
the transmission configuration module obtains the deployment information of the second application from the third storage module according to the identifier of the second application, or obtains the deployment information of the second application from a global configuration node according to the identifier of the second application when the deployment information of the second application is not stored in the third storage module.
10. The apparatus according to claim 8 or 9, wherein the location of the first node where the first application is located comprises network information of the first application or network information of the first node or address information of the node where the first application is located, and the location of the second node where the second application is located comprises network information of the second application or network information of the second node or address information of the node where the first application is located.
11. The apparatus of any of claims 8 or 9, wherein the transport comprises one of TCP/IP, UDP, RDMA, shared memory, and interprocess communication.
12. The apparatus according to any one of claims 8 or 9, wherein the first node is a first container, the second node is a second container, and in terms of determining a transmission method for transmitting information between the first application and the second application according to the deployment information of the first application, the deployment information of the second application, and a transmission method selection policy, the transmission configuration module is configured to determine that the transmission method for transmitting information between the first application and the second application is a shared memory in a case where the first container and the second container are located in a same physical machine and belong to a same POD; and when the first container and the second container are the same physical machine and belong to different PODs, the transmission configuration module determines that the transmission mode for transmitting information between the first application and the second application is interprocess communication.
13. The apparatus according to any one of claims 8 or 9, wherein in the aspect of transmitting the information to be transmitted to the second application by the first application using the transmission manner, the instruction transfer module is configured to configure the interface function in the socket according to the transmission manner returned by the transmission configuration module; and transmitting information to the second application by using the transmission mode through a configured second interface function in the Socket.
14. The apparatus according to claim 9, wherein the transmission configuration module is further configured to receive a second instruction sent by the first application, and the second instruction includes deployment information of the first application; storing deployment information for the first application in the second memory; and sending deployment information of the first application to the global configuration node.
15. A physical machine, comprising a hardware layer, a first node running on the hardware layer, and a transport configuration module, wherein a first application runs in the first node, and the first node is a virtual machine or a container running on the hardware layer, wherein,
the transmission configuration module is used for receiving a first instruction, wherein the first instruction comprises 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 according to the first instruction, wherein the deployment information of the first application comprises the position of a first node where the first application is located, and the deployment information of the second application comprises the position of a second node where the second application is located; determining a transmission mode of information between the first application and the second application according to 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 the deployment information of the first application, the deployment information of the second application and a corresponding relation of the transmission modes, or the transmission mode selection policy comprises the deployment relation between the first application and the second application and a corresponding relation of the transmission modes, and the deployment relation between the first application and the second application comprises a relation between the position of the first node and the position of the second node; the transmission mode selection strategy is stored in a node where the transmission configuration module is located, or the transmission mode selection strategy is stored in a storage unit which can be inquired or accessed by the transmission configuration module; the deployment relationship between the first application and the second application is one of: the system comprises different hosts, different virtual machines, different hosts and different hosts, wherein the different hosts are deployed in different virtual machines in the same physical machine, in the same container of the same host, in different containers of the same host, in the same trusted domain and in different trusted domains; the host is a physical machine or a virtual machine;
the first node is used for transmitting information to the second application by using the transmission mode;
the first instruction is a query instruction, the query instruction is used for querying deployment information of the first application and deployment information of the second application, or the query instruction is used for querying a deployment relationship between the first application and the second application, or the query instruction is used for querying a transmission mode between the first application and the second application;
correspondingly, the first node further includes an instruction transfer module, where the instruction transfer module is configured to process a connection instruction or a write instruction issued by the first application into the query instruction, and send the query instruction to the transmission configuration module for processing to determine the transmission manner, where the connection instruction indicates that the first application requests to establish connection with the second application, and the write instruction indicates that the first application instructs to write information to be transferred to the second application into a first storage unit;
in an aspect of receiving the first instruction, the transmission configuration module is configured to receive the query instruction through the instruction delivery module.
16. The physical machine of claim 15, wherein in determining deployment information for the first application and deployment information for the second application according to the first instructions, the transport configuration module is configured to obtain the deployment information for the first application from a second memory of the hardware layer according to an identity of the first application; the transmission configuration module obtains deployment information of the second application from a third memory of the hardware layer according to the identifier of the second application, wherein the third memory is the same as or different from the second memory; or, in a case that the deployment information of the second application is not stored in the third memory, the transmission configuration module obtains the deployment information of the second application from a global configuration node according to the identifier of the second application.
17. The physical machine according to any one of claims 15 or 16, wherein the location of the first node where the first application is located comprises network information of the first application or network information of the first node or address information of the node where the first application is located, and the location of the second node where the second application is located comprises network information of the second application or network information of the second node or address information of the node where the first application is located.
18. The physical machine of any of claims 15 or 16, wherein the transport comprises one of transmission control protocol/internet protocol, TCP/IP, user datagram protocol, UDP, RDMA, shared memory, inter-process communication.
19. The physical machine according to any one of claims 15 or 16, wherein the first node is a first container, the second node is a second container, and in a case that the first container and the second container are located in the same physical machine and belong to the same POD, the transmission configuration module determines that the transmission mode for transmitting information between the first application and the second application is shared memory; and when the first container and the second container are the same physical machine and belong to different PODs, the transmission configuration module determines that the transmission mode for transmitting information between the first application and the second application is interprocess communication.
20. The physical machine according to any one of claims 15 or 16, wherein, in the aspect that the first application uses the transmission means to transmit information to the second application,
the first node is used for configuring the instruction transmission module according to the transmission mode returned by the transmission configuration module;
and the first node transmits information to the second application by using the transmission mode through the configured instruction transmission module.
21. The physical machine of claim 16, wherein the first node is further configured to send a second instruction to the transport configuration module, the second instruction including deployment information for the first application;
the transmission configuration module is further configured to store deployment information of the first application in the second memory;
the transmission configuration module is further configured to send deployment information of the first application to the global configuration node.
22. A physical machine for application interaction, the physical machine comprising a processor, a memory and a transceiver, the processor, the memory and the communication interface being connected via a bus, the communication interface being adapted to send and receive information to and from other devices by executing a program in the memory, the processor being adapted to execute the instructions in the memory to perform the method of any one of claims 1 to 7.
CN201611264191.8A 2016-12-30 2016-12-30 Application interaction method and device, physical machine and system Active CN108287723B (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201611264191.8A CN108287723B (en) 2016-12-30 2016-12-30 Application interaction method and device, physical machine and system
PCT/CN2017/105888 WO2018120988A1 (en) 2016-12-30 2017-10-12 Application interaction method, device, physical machine and system
EP17885988.0A EP3557412B1 (en) 2016-12-30 2017-10-12 Application interaction method, device, physical machine and system
US16/455,313 US10866846B2 (en) 2016-12-30 2019-06-27 Application interaction method, apparatus, and system, and physical machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611264191.8A CN108287723B (en) 2016-12-30 2016-12-30 Application interaction method and device, physical machine and system

Publications (2)

Publication Number Publication Date
CN108287723A CN108287723A (en) 2018-07-17
CN108287723B true CN108287723B (en) 2022-07-12

Family

ID=62706796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611264191.8A Active CN108287723B (en) 2016-12-30 2016-12-30 Application interaction method and device, physical machine and system

Country Status (4)

Country Link
US (1) US10866846B2 (en)
EP (1) EP3557412B1 (en)
CN (1) CN108287723B (en)
WO (1) WO2018120988A1 (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10706005B2 (en) * 2017-12-08 2020-07-07 Vmware, Inc. File system interface for remote direct memory access
PL3534574T3 (en) * 2018-02-28 2020-07-13 Deutsche Telekom Ag Techniques for policy management of multi-connectivity network protocols
CN109101342B (en) * 2018-07-20 2020-07-10 北京百度网讯科技有限公司 Distributed job coordination control method and device, computer equipment and storage medium
CN109032806B (en) * 2018-07-30 2021-05-14 华为技术有限公司 Service scheduling method and device for container
US11818780B2 (en) * 2018-08-10 2023-11-14 Ipcom Gmbh & Co. Kg Communication system link establishment
CN109471736A (en) * 2018-09-14 2019-03-15 叮联信息技术有限公司 Event information uninterruptedly transmits at random and Real-Time Sharing method
CN109491776B (en) * 2018-11-06 2022-05-31 北京百度网讯科技有限公司 Task arranging method and system
US10959137B2 (en) 2019-02-07 2021-03-23 Cisco Technology, Inc. Procedures for interaction between the radio controller and the subordinated base station
CN110311948B (en) * 2019-05-17 2022-07-15 深圳致星科技有限公司 Communication method between container groups and container cloud network system based on same
CN112039824B (en) * 2019-06-03 2022-08-26 上海哔哩哔哩科技有限公司 Communication method, system, device and computer readable storage medium
US11388615B2 (en) * 2019-08-14 2022-07-12 Cisco Technology, Inc. Interaction between radio controller platform and third party applications
CN110519379A (en) * 2019-08-29 2019-11-29 泰康保险集团股份有限公司 Request processing method and equipment based on micro services
CN111835592B (en) * 2020-07-14 2022-09-27 北京百度网讯科技有限公司 Method, apparatus, electronic device and readable storage medium for determining robustness
CN113765867B (en) * 2020-08-12 2023-05-12 北京沃东天骏信息技术有限公司 Data transmission method, device, equipment and storage medium
CN112087332B (en) * 2020-09-03 2022-06-21 哈尔滨工业大学 Virtual network performance optimization system under cloud edge cooperation
CN113923253A (en) * 2021-10-12 2022-01-11 西安万像电子科技有限公司 Virtual machine image transmission method, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1477502A (en) * 2002-08-23 2004-02-25 梁国恩 Socket tool for application layer software
CN101471953A (en) * 2007-12-29 2009-07-01 中国移动通信集团公司 Information transmission method, system and device
CN102103526A (en) * 2011-02-14 2011-06-22 博视联(苏州)信息科技有限公司 Method and system for performing inter-process communication between server and client by service management
CN102137123A (en) * 2010-01-25 2011-07-27 腾讯科技(北京)有限公司 Device and method for realizing process-to-process communication of different application programs on mobile terminal
CN102567121A (en) * 2010-12-07 2012-07-11 中国电信股份有限公司 Method and device for realizing converged communication
US8429675B1 (en) * 2008-06-13 2013-04-23 Netapp, Inc. Virtual machine communication
CN103347077A (en) * 2013-07-03 2013-10-09 曙光信息产业(北京)有限公司 Method and device for data transmission of distributed file system
CN104794095A (en) * 2014-01-16 2015-07-22 华为技术有限公司 Distributed computation processing method and device

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6742050B1 (en) * 1997-03-31 2004-05-25 Intel Corporation Inter-object messaging
US20020161848A1 (en) * 2000-03-03 2002-10-31 Willman Charles A. Systems and methods for facilitating memory access in information management environments
US20070067488A1 (en) * 2005-09-16 2007-03-22 Ebay Inc. System and method for transferring data
KR100877065B1 (en) * 2007-01-12 2009-01-09 삼성전자주식회사 Method and apparatus for deciding a communication protocol
US8739179B2 (en) * 2008-06-30 2014-05-27 Oracle America Inc. Method and system for low-overhead data transfer
US9075643B2 (en) * 2012-01-23 2015-07-07 International Business Machines Corporation Automatically selecting optimal transport protocol in a cloud computing environment
US9921882B2 (en) * 2013-04-17 2018-03-20 Nec Corporation Information processing system, deployment method, processing device, and deployment device
US10180852B2 (en) * 2013-06-04 2019-01-15 Vmware, Inc. High-performance processing in a virtualization environment
US9407725B2 (en) * 2013-06-14 2016-08-02 Dell Products L.P. Generic transcoding service for client-server communication
CN105208056B (en) * 2014-06-18 2020-07-07 腾讯科技(深圳)有限公司 Information interaction method and terminal
US10749985B2 (en) * 2015-05-19 2020-08-18 Amazon Technologies, Inc. Custom communication channels for application deployment
CN105141603B (en) * 2015-08-18 2018-10-19 北京百度网讯科技有限公司 Communication data transmission method and system
CN105279027B (en) * 2015-11-19 2018-09-18 浪潮(北京)电子信息产业有限公司 A kind of virtual machine deployment method and device
CN106227567A (en) * 2016-07-27 2016-12-14 北京金山安全软件有限公司 Method and device for sharing application program and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1477502A (en) * 2002-08-23 2004-02-25 梁国恩 Socket tool for application layer software
CN101471953A (en) * 2007-12-29 2009-07-01 中国移动通信集团公司 Information transmission method, system and device
US8429675B1 (en) * 2008-06-13 2013-04-23 Netapp, Inc. Virtual machine communication
CN102137123A (en) * 2010-01-25 2011-07-27 腾讯科技(北京)有限公司 Device and method for realizing process-to-process communication of different application programs on mobile terminal
CN102567121A (en) * 2010-12-07 2012-07-11 中国电信股份有限公司 Method and device for realizing converged communication
CN102103526A (en) * 2011-02-14 2011-06-22 博视联(苏州)信息科技有限公司 Method and system for performing inter-process communication between server and client by service management
CN103347077A (en) * 2013-07-03 2013-10-09 曙光信息产业(北京)有限公司 Method and device for data transmission of distributed file system
CN104794095A (en) * 2014-01-16 2015-07-22 华为技术有限公司 Distributed computation processing method and device

Also Published As

Publication number Publication date
EP3557412B1 (en) 2023-04-26
CN108287723A (en) 2018-07-17
EP3557412A1 (en) 2019-10-23
WO2018120988A1 (en) 2018-07-05
EP3557412A4 (en) 2020-01-01
US10866846B2 (en) 2020-12-15
US20190317846A1 (en) 2019-10-17

Similar Documents

Publication Publication Date Title
CN108287723B (en) Application interaction method and device, physical machine and system
US11824962B2 (en) Methods and apparatus for sharing and arbitration of host stack information with user space communication stacks
CN111885075B (en) Container communication method, device, network equipment and storage medium
US11812362B2 (en) Containerized router with a disjoint data plane
US11502950B2 (en) Universal customer premise equipment
US10740145B2 (en) Method and system for migration of virtual machines and virtual applications between cloud-computing facilities
US20190319847A1 (en) Cross-regional virtual network peering
US9329894B2 (en) Method and apparatus for extending local area networks between clouds and permanently migrating virtual machines using static network addresses
US8739179B2 (en) Method and system for low-overhead data transfer
US7965714B2 (en) Method and system for offloading network processing
US7751401B2 (en) Method and apparatus to provide virtual toe interface with fail-over
WO2024067338A1 (en) Cloud networking system, secure access method, and device and storage medium
CN115086166B (en) Computing system, container network configuration method, and storage medium
CN111352642B (en) Service equipment and service software upgrading method
CN115134141B (en) Micro-service container cluster cross-network communication system and communication method thereof
US8499023B1 (en) Servlet-based grid computing environment using grid engines and switches to manage resources
Papageorgiou et al. Dynamic M2M device attachment and redirection in virtual home gateway environments
CN115378993B (en) Method and system for supporting namespace-aware service registration and discovery
WO2024037619A1 (en) Cloud computing technology-based virtual instance creation method and cloud management platform
US20240031908A1 (en) Containerized router with a disjoint data plane
CN117675819A (en) Data communication method and device for cloud network
Janovic Integrating ACI with Virtualization and Container Platforms
CN117834704A (en) Communication method and device for cloud multi-core application, computer equipment and storage medium
Villa et al. Sensor network integration by means of a Virtual Private Network protocol

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant