WO2018120988A1 - 一种应用交互方法、装置、物理机及系统 - Google Patents

一种应用交互方法、装置、物理机及系统 Download PDF

Info

Publication number
WO2018120988A1
WO2018120988A1 PCT/CN2017/105888 CN2017105888W WO2018120988A1 WO 2018120988 A1 WO2018120988 A1 WO 2018120988A1 CN 2017105888 W CN2017105888 W CN 2017105888W WO 2018120988 A1 WO2018120988 A1 WO 2018120988A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
node
information
instruction
transmission
Prior art date
Application number
PCT/CN2017/105888
Other languages
English (en)
French (fr)
Inventor
柳晓旭
郑凯
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP17885988.0A priority Critical patent/EP3557412B1/en
Publication of WO2018120988A1 publication Critical patent/WO2018120988A1/zh
Priority to US16/455,313 priority patent/US10866846B2/en

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/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/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/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

Definitions

  • the present invention relates to the field of communications, and more particularly to an application interaction method, apparatus, physical machine, and system.
  • a computer task can be broken down into multiple subtasks that can be deployed to execute on multiple applications, and there may be communication between the multiple applications.
  • these applications can be described by a software system architecture such as client/server (C/S, Client/Server).
  • the client and the server refer to the application in this architecture.
  • the application request service is used as a client, and the application as a server serves the application as a client.
  • Such multiple applications can be deployed on the same or different physical devices to take full advantage of the hardware environment in which the Client and Server reside. Obviously, the communication between the Server and the Client needs to be carried out through communication.
  • the embodiments of the present invention provide an application interaction method, device, and terminal, which can better match the deployment mode of information between applications, thereby improving the performance of information transmission.
  • an application interaction method includes: a transmission configuration module receiving a first instruction, where the first instruction includes an identifier of a first application and an identifier of a second application; and the transmission configuration module is configured according to the first An instruction to determine deployment information of the first application and deployment information of the second application, where the deployment information of the first application includes a location of a first node where the first application is located, and deployment of the second application The information includes a location of the second node where the second application is located; the transmission configuration module determines the first application according to the deployment information of the first application, the deployment information of the second application, and a transmission mode selection policy.
  • the transmission mode selection policy includes deployment information of the first application, deployment information of the second application, and a correspondence between the transmission modes, or
  • the transmission mode selection policy includes a deployment relationship between the first application and the second application, and a correspondence between the transmission modes, a deployment relationship between an application and the second application includes a relationship between a location of the first node and a location of the second node; the first application uses the transmission mode to the second The application transmits information.
  • the two applications to be communicated are more suitable for selection by the transmission mode selection policy and the deployment relationship of the two applications of the determined communication, or by the transmission mode selection policy and the deployment information of the two applications of the determined communication.
  • the nodes in the present application are devices or devices running an operating system and capable of communicating, and may be logical nodes, such as virtual machines, containers, or other devices having the above functions. From a certain perspective, it may also be considered
  • the operating system of the physical machine is a node, and may also be a physical node, that is, a physical machine or a computer including hardware, such as a terminal, a server, or other devices having the above functions.
  • the identifier of an application is information that can represent the application, for example, the identity information of the application, such as an ID, address information of the application, such as an IP address, a network segment where the network segment is located, and the network information of the application, such as the port of the application. number.
  • the identity information of the application such as an ID
  • address information of the application such as an IP address
  • a network segment where the network segment is located such as the network information of the application. number.
  • the network information of the application such as the port of the application. number.
  • the transmission mode selection policy includes a deployment relationship between the first application and the second application, and a correspondence between the transmission modes, where the method further includes The transmission configuration module determines a deployment relationship between the first application and the second application according to the deployment information of the first application and the deployment information of the second application.
  • 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 The query 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.
  • the transmitting configuration module receives the first instruction, including:
  • the transmission configuration module receives the query instruction by using a first interface function of the socket Socket, wherein the content of the function library called by the first interface function is set to be used for the first application Transmitting a connection instruction or a write instruction as the query instruction, and transmitting the query instruction to the transmission configuration module to determine the transmission mode, the connection instruction indicating the first application request and the first The second application establishes a connection, the write instruction indicating that the first application indicates that information to be delivered to the second application is written to the first storage unit.
  • the first instruction is a connection instruction or a write instruction sent by the first application
  • the connection instruction indicates that the first application requests to establish a connection with the second application.
  • the write instruction indicates that the first application indicates that information to be delivered to the second application is written to the first storage unit.
  • the transmitting configuration module receives the first instruction, including:
  • the transmission configuration module receives the connection instruction or the write instruction by using a first interface function of the socket Socket, and the content of the function library called by the first interface function is set to be used for A connection instruction or a write instruction issued by an application is sent to the transmission configuration module to determine the transmission mode.
  • the transport configuration module can also receive the query instruction through other API interfaces, but the function of the API interface is similar to the first interface function. For example, the default protocol port is not passed. If the interface is used, or the existing interface is changed, the processing of the first application and the operating system of the first application needs to be changed, and the processing procedure for sending the connection request to the first application in the prior art is changed. The connection request is processed by the transport configuration module to determine the appropriate transport mode.
  • connection instruction or write instruction issues the above-mentioned connection instruction or write instruction.
  • the interface function or other interface needs to be able to process the connection instruction or the write instruction into a query instruction to facilitate the use of the transmission configuration module.
  • the function of the transmission configuration module is relatively simple, relatively lightweight, and does not require too complicated processing, and the improvement of the API is relatively complicated.
  • the transmission configuration module determines the deployment information of the first application and the deployment information of the second application according to the first instruction, where the transmission configuration module is configured according to the The identifier of the first application, obtaining deployment information of the first application from a second storage;
  • the transmission configuration process obtains deployment information of the second application from a third storage according to the identifier of the second application, where the third storage is the same or different memory as the second storage; or In a case where the deployment information of the second application is not stored in the third storage, the transmission configuration process is based on the identifier of the second application.
  • the office configuration node obtains deployment information of the second application.
  • the distributed deployment information management method makes the update, management and interaction of the deployment information easier and saves storage resources.
  • 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 a node where the first application is located
  • the address information, where 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 a node where the first application is located.
  • the transmission manner includes a transmission control protocol/Internet Protocol, TCP/IP, a User Datagram Protocol (UDP), a full name remote direct data access (RDMA), a shared memory, and an interprocess communication (Domain_Socket).
  • TCP/IP Transmission Control Protocol/Internet Protocol
  • UDP User Datagram Protocol
  • RDMA full name remote direct data access
  • Domain_Socket an interprocess communication
  • the first node is a first container
  • the second node is a second container
  • the transmission configuration module is configured according to the deployment information of the first application, the second The deployment information of the application and the transmission mode selection policy, determining a transmission manner of the information transmitted between the first application and the second application, including: the first container and the second container are located in the same physical machine, and In a case where the first container and the second container belong to the same pod POD, the transmission configuration module determines that the transmission mode of the information transmitted between the first application and the second application is a shared memory; Where a container and the second container are the same physical machine, and the first container and the second container belong to different PODs, the transmission configuration module determines between the first application and the second application
  • the transmission method of the transmission information is inter-process communication (Domain_Socket).
  • the transmission mode is transmitted by using a TCP/IP protocol
  • the method further includes: the first node encapsulates the connection request by using the TCP/IP protocol. a chain request; the first node sends the link establishment request to the second application; the first application receives a response message from the second application, where the response message is a TCP/IP message; Correspondingly, the first application transmits information to the second application by using the transmission mode, and the first application uses the TCP/IP protocol to transmit information with the second application.
  • 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 a target device (such as an I/O device). , storage device, etc.), or send to the target node.
  • a target device such as an I/O device. , storage device, etc.
  • the first application uses the transmission mode to transmit information to the second application, including: the first application is configured according to the transmission manner returned by the transmission configuration module Configuring an interface function in the socket; the first application uses the second interface function in the configured Socket to transmit information to the second application by using the transmission mode.
  • the interface corresponding to the transmission mode can be used without further decision by the transmission configuration module.
  • the first application since the first application supports multiple interfaces, the first application should configure the corresponding interface according to the returned transmission mode.
  • the transmitted information may be information that is subsequently transmitted to the second application after the write command or the connect command.
  • the write command or the connect command may also be sent to the second application through the interface corresponding to the transmission mode.
  • the method further includes: the first application sends a second instruction to the transmission configuration module, where the second instruction includes deployment information of the first application; Transmission configuration module will be the first should The deployment information used is saved in the second memory; the transmission configuration module sends the deployment information of the first application to the global configuration node.
  • 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, where the first instruction includes a first An identifier of the application and an identifier of the second application, where the transmission configuration module is configured to determine, according to the first instruction, deployment information of the first application and deployment information of the second application, where the first application is deployed
  • the information includes a location of the first node where the first application is located, the deployment information of the second application includes a location of the second node where the second application is located, and the transmission configuration module is configured to use, according to the first application
  • the deployment information, the deployment information of the second application, and the transmission mode selection policy determining a transmission manner of information between the first application and the second application, where the transmission mode selection policy includes the first The deployment information of the application, the deployment information of the second application, and the corresponding relationship of the transmission mode, or the transmission mode selection policy includes the first The deployment relationship between the first application and the second application
  • an embodiment of the present invention provides a physical machine, wherein the physical machine is used for application interaction, and the physical machine includes a processor, a memory, and a transceiver, the processor, the memory, and the communication. Inter-interfaces are connected by a bus for transceiving information with other devices by executing a program in the memory, the processor being configured to perform various implementations of the first aspect by executing instructions in the memory method.
  • the second aspect and the third aspect are devices corresponding to the first aspect, various specific implementation manners, related descriptions, and beneficial effects are described in the description of various implementation manners in the first aspect, and are not repeated here.
  • an embodiment of the present invention provides an application interaction method, where the method includes: a second application receives a connection instruction or a data packet from a first application, where the connection instruction indicates that the first application requests to establish a connection with the second application.
  • the second application determines the connection instruction or a transmission mode corresponding to the data packet; and the second application transmits information with the first application by using the transmission mode.
  • the second application determines the connection instruction or the transmission mode corresponding to the data packet, where the method specifically includes: the second application parses the connection instruction or the a data packet to determine the connection instruction or the transmission mode corresponding to the data packet.
  • the method specifically includes: the transmission control module according to the connection instruction or the data a packet and a transmission mode selection policy, determining a transmission mode between the first application and the second application, where the connection instruction or the data packet includes an identifier of the first application and an identifier of the second application
  • the transmission mode selection policy includes the deployment information of the first application, the deployment information of the second application, and the corresponding relationship of the transmission mode
  • the transmission mode selection policy includes the first application and the a deployment relationship between the second application, and a corresponding relationship between the transmission modes, where the deployment relationship between the first application and the second application includes a location of the first node and a location of the second node
  • the relationship between the locations, the second application determines, by the transmission control module, the connection instruction or the transmission mode corresponding to the data packet.
  • the method specifically includes: the second application parsing the connection instruction or the data packet to determine the connection instruction or the The transmission method corresponding to the data packet.
  • the method further includes: the second application sends, to the second transmission configuration module, a configuration module, the deployment information of the second application, where the deployment information includes the second At least one of a location of the node and network information of the second node; the second transmission configuration module transmission configuration module saves deployment information of the second application locally.
  • the method further includes: the second transmission configuration module transmission configuration module sends the deployment information of the second application to the global configuration node.
  • an embodiment of the present invention provides a physical machine, where the physical machine is used for application interaction, where the physical machine includes a processor, a memory, and a transceiver, and the processor, the memory, and the communication interface pass A bus connection for transceiving information with other devices by executing a program in the memory for executing a method of various implementations of the first aspect by executing instructions in the memory.
  • the fourth aspect is the method of the first aspect
  • the fifth aspect is the apparatus corresponding to the fourth aspect. Therefore, for various related descriptions and beneficial effects, refer to the description of various implementation manners of the first aspect, which is not 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 a virtual machine or a container running on the hardware layer, wherein the transmission configuration module is configured to receive the first instruction, where the first instruction includes an identifier of the first application and an identifier of the second application; and determining, according to the first instruction, The deployment information of the first application and the deployment information of the second application, where the deployment information of the first application includes the location of the first node where the first application is located, and the deployment information of the second application includes the location Determining a location of the second node where the second application is located; determining, 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 the transmission mode selection policy a transmission mode of the information, where the transmission mode selection policy includes deployment information of the first application, deployment information of the second application, and a correspondence between the transmission
  • the sixth aspect is a device in the virtualization scenario in the method of the first aspect, various implementation manners, related descriptions, and beneficial effects, refer to the description of various implementation manners in the first aspect, and are not repeated here. .
  • 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, where the global configuration node is configured to store multiple operations running in the application interaction system.
  • the first node is further configured to send deployment information of the first application to the global configuration node, to register the first Application deployment information.
  • the second node is further configured to send deployment information of the second application to the global configuration node, to register the second application in the global configuration node. Deployment information.
  • 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 a node where the first application is located
  • the address information, where 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 a node where the first application is located.
  • the transmission mode includes a transmission control protocol/Internet Protocol, TCP/IP, a User Datagram Protocol (UDP), a full-length remote direct data access (RDMA), a shared memory, and an interprocess.
  • TCP/IP Transmission Control Protocol/Internet Protocol
  • UDP User Datagram Protocol
  • RDMA full-length remote direct data access
  • shared memory shared memory
  • interprocess One of the communication (Domain_Socket).
  • the seventh aspect is the system corresponding to the method of the first aspect and the fourth aspect, various specific implementation manners, related descriptions, and beneficial effects are described in the first aspect and the descriptions of the various implementation manners in the fourth aspect. repeat.
  • a storage medium for storing an application to perform the method of any of the first or fourth aspects.
  • FIG. 1 is a schematic diagram of a system networking provided by an embodiment of the present invention
  • FIG. 2 is a schematic diagram of interaction of an application interaction system according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of processing a received information by a transmission configuration module according to an embodiment of the present invention
  • 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 a server, an Ea, and a client in a C/S scenario according to an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of an apparatus for application interaction according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a physical machine according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of still another physical machine according to an embodiment of the present invention.
  • a node, a node in the present application file is a device or device running an operating system and capable of communicating, and may be a logical node, such as a virtual machine, a container, or other device having the above functions. From a certain perspective, it may also be considered as a physical
  • the operating system of the machine is a node, and may also be a physical node, that is, a physical machine or a computer including hardware, such as a terminal, a server, or other devices having the above functions.
  • an application may include multiple nodes, which may be a container that carries the application, a virtual machine that carries the container, and a physical machine that carries the virtual machine or container.
  • nodes may be a container that carries the application, a virtual machine that carries the container, and a physical machine that carries the virtual machine or container.
  • an application is in a container, and the virtual machine is in a physical machine. Then, the container, the virtual machine where the container is located, and the physical machine where the virtual machine is located are actually the application.
  • the node where it is located But in general, the node where the application is located refers to the container, that is, the node that directly carries the application.
  • the virtual machine where the container is located may also be referred to.
  • the physical machine where the virtual machine is located may be referred to.
  • the granularity of consideration for the node where the application is located is detailed to the container or virtual machine level, or only the hardware environment (ie, physical machine) that the application relies on, which is determined according to the scenario considered in the transmission mode selection policy. For example, if you only need to determine whether two applications are on the same LAN or the same data center or the same trusted domain, you do not need to specify the container or virtual machine where the application is located. If you consider the location relationship between virtual machines, such as a cloud scenario, the node where the application is located should be at least accurate to the virtual machine. If you want to analyze more detailed, for example, to further subdivide the business relationship between the applications, then the node where the application is located should be accurate to the container (if the application is inside the container).
  • the identifier of the application is information indicating the application, for example, the identity information of the application, such as an ID, the address information of the application, such as an IP address, a network segment where the network segment, and the like, the network information of the application, such as The port number of the app.
  • the identity information of the application such as an ID
  • the address information of the application such as an IP address
  • the network information of the application such as The port number of the app.
  • the deployment of the application can take many forms.
  • the communication system networking is more and more complex, and may include multiple network devices (such as servers, gateways, etc.), and the multiple network devices can also serve multiple terminals. These applications can be run on these network devices as well as on the terminal.
  • the TCP/IP (Transmission Control Protocol/Internet Protocol) protocol is a commonly used communication protocol that ensures that the TCP/IP protocol ensures reliable and error-free user data in complex network environments. End-to-end transmission. Therefore, the current information exchange between applications also often uses the TCP/IP protocol.
  • the terminal in the embodiment of the present invention may be a mobile terminal, such as a mobile, wearable, or in-vehicle mobile device such as a mobile phone, a tablet computer, a sports camera, a notebook computer, or some communication network. Computer, server, etc.
  • a mobile terminal such as a mobile, wearable, or in-vehicle mobile device such as a mobile phone, a tablet computer, a sports camera, a notebook computer, or some communication network.
  • the deployment relationship between applications that require communication is very variable.
  • the following is a typical deployment of several applications that need to communicate with each other: 1 deployed in different virtual machines within the same physical machine; 2 deployed in the same container as the host (host refers to the physical machine or virtual machine); 3 deployed in the same host Within different containers; 4 deployed in different hosts within the same trusted domain; 5 deployed in different hosts within different trusted domains.
  • the host refers to the physical machine or virtual machine where the application is located.
  • a trusted domain can be understood as a collection of devices that consider each other's data to be secure, and can be a local area network with a firewall.
  • connection established between the devices in the local area network and the information exchange performed are considered to be that the information source and the connection are secure, that is, trusted, and the devices in the local area network interact with the devices outside the local area network. It is considered that the information security outside the LAN is unknown, and the default is unsafe, that is, it is not trusted.
  • a physical machine in a data center (DC, Data Center) belongs to a trusted domain. It can also be a group of devices in other areas of network security and credibility.
  • the deployment mode of the application will directly determine the reliability of the network transmission.
  • the reliability of the above-mentioned 123 scenario is good.
  • the end of the connection deployed in the above 123 scenario can determine the security of the other end, and there is no network transmission delay and packet loss. If the TCP/IP protocol is still used. Transmission will bring a lot of redundancy to be processed, which will reduce the transmission efficiency and waste the processing resources of the data packet.
  • the 4 scenario is a highly reliable lossless network, which provides high security for network and transmission reliability, which makes the use of TCP/IP protocol in this domain appear somewhat redundant.
  • scenario 5 is a general-purpose network of the WAN, the network environment is complex, and there will be network attenuation and packet loss, and the TCP/IP protocol is more suitable for transmission. suitable. Therefore, in different deployment scenarios, the TCP/IP protocol is not always suitable for information transfer between applications.
  • scenario 1 can use virtual memory based on shared memory
  • scenario 4 can use RDMA (Remote Direct Memory Access) technology. Compared with TCP/IP protocol, it can reduce the processing delay of the data server in network transmission. Time.
  • FIG. 1 A schematic diagram of a system to which the application interaction method of the embodiment of the present invention is applied is described below with reference to FIG. 1. It should be understood that two DCs are schematically illustrated in FIG. 1 for convenience of explanation.
  • DC1 and DC2 are two data centers, which can be understood as two local subnets. Multiple physical machines can be deployed in the two data centers.
  • the plurality of physical machines may be servers or terminals or network communication devices capable of running applications.
  • FIG. There are two virtual machines running on the physical machine 1 in the DC1.
  • the virtual machine 11 runs a container 11 and a container 12, and the container 11 runs an application 111 and an application 112.
  • the container 12 runs an application 113, and the virtual machine 12
  • the virtual machine 21 runs on the physical machine 2 in the DC1.
  • the virtual machine 21 runs a container 21 and a container 22, wherein the container 21 runs an application 211 and an application 212, and the container 22 runs an application 213.
  • the physical machine 3 in the DC 1 runs a container 31 and a container 32 in which an application 311 and an application 312 are running, and an application 313 is run in the container 32.
  • a physical machine 4 is running in DC2, in which an application 411 is running.
  • Figure 1 depicts a virtual machine running on a physical machine running a container and an application in a virtual machine.
  • This situation is very common in current cloud scenarios.
  • users are allowed to lease hardware devices (such as servers) from some vendors.
  • hardware devices such as servers
  • the manufacturer can set the permissions of the user, so that the user cannot directly install the application in the operating system of the physical machine.
  • application 211 is a MySQL database application on a node that provides database access and operational services.
  • the application 112 is a web server server accessed by the user, and provides a web service to the user of the wide area network.
  • the application 111 is a webServer server flow control application for controlling traffic between the web server and each user.
  • Application 113 and application 313 are agents deployed on different physical machines for providing proxy services, such as filtering and identifying user data.
  • 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 the network communication between the two applications belongs to the scenario 13.
  • 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 the scenario 2.
  • the application 113 and the application 311 are deployed on different physical machines in the same data center, and the network communication between the two applications belongs to the scenario 4.
  • the application 311 and the application 313 are deployed in different local area networks, and the network communication between the two applications belongs to the scenario 5.
  • An embodiment of the present application provides a method for applying an interaction, a transmission mode selection policy and a determined deployment relationship of two applications of a communication, or a transmission mode selection policy and a deployment information of two applications of the determined communication, To choose the transmission method that is more suitable for the two applications for the two applications to be communicated. This will make it more flexible
  • the application to be communicated adapts the transmission of information to improve the performance of information transmission.
  • the transmission configuration module and the global configuration node are deployed to implement the method.
  • the function of the transmission configuration module includes determining the transmission mode of the connection by processing the obtained first instruction.
  • the first instruction may be a connection request sent by the application to establish a connection to the peer end (the peer end refers to the other end of the connection to be established), or the application to transmit data to a storage unit (eg, memory, I)
  • the transport 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, the one that normally initiates the connection request is also the end of the requesting service, which is the client, and the end that receives the connection request is also the end that provides the service, which is the server.
  • the transmission configuration module is a functional naming, and its function can be implemented by a thread, a process, a container, a virtual machine, or other structure capable of realizing the function of the module.
  • the embodiment of the present application describes the process as an example.
  • the deployment information of an application may be used to determine the location of the node where the application is located, which may be the actual physical location, or the network location in the communication network, or the deployment information according to the two applications. Determine the location relationship of the nodes where the two applications are located.
  • 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 mode selection policy that can be designed and pre-stored by the user, and the transmission mode selection policy includes communication to be communicated. It is also feasible that the identity information of the two applications and the correspondence between the two applications are transmitted.
  • the deployment information may include at least one of the following types of information: 1. Address information of a node where the application is located. For example, 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 an actual node geographic location information (such as a certain computer room in a data center of a certain city).
  • the application and the identity information of the node where the application is located For example, the identifier of the application, the identifier of the node where the application is located (such as an ID), and the like. 3.
  • the application and the network information of the node where the application is located For example, the address information (such as the IP address) monitored by the application, the port information of the interception, the information of the port used by the application, the IP address, the subnet mask, the gateway address, the network segment information of the virtual machine or the container, and the application.
  • the address information such as the IP address
  • the port information of the interception the information of the port used by the application
  • the IP address the subnet mask
  • the gateway address the network segment information of the virtual machine or the container
  • the application Corresponding vlan ID (for example, the vlan ID of the virtual machine or container where the application is located), the vlan address corresponding to the application (for example, the vlan address of the virtual machine or the container where the application is located), and the like.
  • the address or location of the node is not perceived, but the application may be determined by the application and the network information of the node where the application is located, and the identity information of the application or the node where the application is located. The location of the node where it is located.
  • the deployment information of the application may further include the service information of the application, so that the service relationship between the nodes where the two applications are located may be determined according to the deployment information of the two applications.
  • information such as the POD information of the container.
  • the POD information of the container may reflect the business connection between the containers, that is, the business relationship between 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 tasks.
  • a POD may include a system container (POD Container) and a user container (User Container).
  • the deployment relationship between the two applications may be determined from the deployment information of the two applications, that is, the location relationship between the nodes where the two applications are located, and the location relationship between the two nodes is used to represent two The positional relationship of nodes in the communication network. That is to say, it is only necessary to determine the relative positions of the two nodes without considering the specific positions of the two nodes.
  • This location relationship can also be understood as various deployment scenarios as described above, for example, different nodes deployed on the same node, on the same physical machine, or on a virtual machine, different nodes in the same trusted domain, and different Different nodes in the trusted domain, nodes in different LANs, and so on.
  • the transmission mode selection policy mentioned in the embodiment of the present application includes at least one of the following corresponding relationships: The correspondence between different deployment relationships and transmission modes, and the correspondence between deployment information and transmission modes of different applications.
  • the mapping between different deployment relationships and transmission modes can be used to abstract the mapping between the deployment information and the transmission mode of a large number of applications in the network into several deployment relationships (or deployment scenarios).
  • Correspondence with the transmission method For the transmission configuration module, such a correspondence relationship is more simple to maintain, the transmission configuration module is also more lightweight, and can occupy less storage resources, but the transmission configuration module needs to have deployment information based on the queried application, and determine The processing power of the deployment relationship between the two applications to interact with.
  • mapping between the deployment information and the transmission mode of different applications is included, then more storage resources are needed to maintain the correspondence, because it is equivalent to giving every two possible communications.
  • the application establishes such a correspondence.
  • this correspondence can be used, for example, in a scenario of a software-defined network, that is, a user or an administrator defines a transmission mode between applications and stores the corresponding relationship in the process of deploying an application. In the corresponding storage device or storage unit for transmission configuration module query or read.
  • the resources of the existing database technology can also support the storage of the corresponding relationship, that is, allocate more storage resources for the corresponding relationship, which can be tolerated in some scenarios.
  • the transmission mode selection policy is stored in a node where the transmission configuration module is located.
  • the transmission mode selection policy may be stored in a storage unit that the transmission configuration module can query or access.
  • the transmission mode selection policy is on the same node or a different node as the transmission configuration module. That is, the second memory and the third memory mentioned below may be in the same virtual machine as the transport configuration module (the second memory and the third memory may be considered as virtual storage devices or units at this time); or just with The transmission configuration module is on the same physical machine (the second storage and the third storage may be considered as physical storage devices or units at this time); even, the transmission configuration module may be on a different physical machine, but the transmission configuration module has permission to remotely direct interview.
  • the default transmission mode selection policy pre-stored in the node can be used.
  • the transmission mode included in the default transmission mode selection policy should be supported by the operating system where the application is located. It can also be configured by the tenant according to the needs or transmission scenarios. It should be understood that in order to ensure that a suitable transmission mode during an application interaction is selected, the tenant should complete the configuration before the application interaction.
  • the transmission mode selection strategy a plurality of transmission modes are generally included.
  • the pre-stored transmission mode selection policy may have a unified default initial transmission mode, so that the tenant can modify and add it by itself.
  • the transmission mode in the transmission mode selection policy includes Transmission Control Protocol/Internet Protocol TCP/IP, User Datagram Protocol UDP, Full Remote Data Access RDMA, shared memory, inter-process communication (Domain_Socket), and other possible At least one of communication technologies.
  • the shared-memory transport mode is adopted for applications deployed in the same relationship as the POD (the associated container group of the same tenant for the same service is called POD).
  • Domain-socket domain communication (inter-process communication mode) is adopted for applications in which the deployment relationship is different from the host POD deployment.
  • multi-path mptcp multipath TCP
  • quic-multipath multi-path transmission of QUIC protocol
  • the standard TCP ⁇ IP is used when the deployment relationship is not recognized.
  • the above example is the correspondence between the application deployment relationship and the transmission mode.
  • the relationship between the applications is mainly used to indicate the location relationship between the two applications, and the location relationship between the two applications is also considered.
  • the transport configuration module can run on the operating system (OS, Operating System) of the physical machine, or it can run on the operating system of the virtual machine, or even run in a container.
  • OS Operating System
  • the container technology has a virtualized operating system layer for the container in the container, and the operating system layer can also be considered as A copy of the host's operating system on which the container resides to provide an application running in the container such that the container can be isolated from the host's operating system, and the application in the container can be considered to be running in the container's operating system layer.
  • nodes For convenience of description, physical machines, virtual machines, containers, and other devices having an operating system and capable of communicating may be collectively referred to as nodes.
  • embodiments of the present application do not limit the specific manner in which the transmission configuration module is deployed in a node. There is no need to change locations or reboot frequently after the transport configuration module is deployed.
  • the transmission configuration module can store deployment information of the application and a transmission mode selection policy based on the storage resources 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 run the transmission configuration module and in which nodes the transmission configuration module is run, the application file is not limited, and the implementation scheme can be flexibly set.
  • the main consideration is the impact of the implementation on the efficiency of implementing the application interaction method described in this application file, that is, the process of determining the transmission mode in executing the application interaction method, and generating the connection process. Deferred; and the resources of the operating system occupied by the implementation.
  • the less the transmission configuration module is distributed in the node the more deployment information of the application in the node to be managed by each transmission configuration module increases the transmission load between the nodes, and also prolongs the time for determining the transmission mode.
  • the transport configuration module may manage the deployment information of applications across nodes. This information collection is also the communication between the two applications. This process uses the TCP/IP protocol by default.
  • the more the transmission configuration module is distributed in the node the larger the operating system resources and hardware resources of the node are, and the overhead of the system is increased.
  • the more transmission configuration modules the more frequent interactions with the global configuration nodes. Because the global configuration node is more complex, it is usually deployed in the global network, and the communication between the transmission configuration modules is across the LAN. It also affects the reliability of the LAN. Therefore, the deployment of the transport configuration module can be determined by considering the network reliability, the node system overhead, and the implementation efficiency of the method.
  • a transport configuration module can be run on each physical machine deployed with an application that requires communication, the transport configuration module managing the physical machine and the virtual machines running on the physical machine and the applications running in the container. It is also possible to manage the deployment information of an application of multiple physical machines by one transmission configuration module, that is, the transmission configuration module is run on a part of the physical machine. Similarly, you can run a transport configuration module on each virtual machine where an application that needs to communicate is deployed, or you can run a transport configuration module on a portion of a virtual machine. Of course, some transmission processes can be deployed on virtual machines, and some are deployed in containers.
  • a global configuration node it is also a node.
  • This node can be a server. In fact, using the server is an implementation method listed in this application.
  • the global configuration node is a functional name.
  • the deployment information of the application running on the network-wide nodes that the global configuration node can cover (for example, capable of providing services) is saved on the global configuration node, 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 can maintain deployment information of an application within a network (such as a global network, referred to as the global network). Therefore, as long as the function can be implemented, the global configuration node can be any physical machine or virtual machine or container. .
  • the node can be in the global network or in a local area network.
  • the virtual machine can also be run, or the container can be run.
  • the physical machine can also run applications other than management deployment information.
  • the transport configuration module may also be deployed on the physical machine, or the process or application of the deployment information of the global application may be used as the transmission on the physical machine.
  • Input configuration module may also be any node within the network range. Applications other than those that manage deployment information can also be run on this node.
  • a physical machine can be a global configuration node and a service node running an application for executing services.
  • the global configuration node does not overlap with the service node, because the storage capability is more important for the global configuration node, which is different from the general service node's demand for processing power, and the hardware requirements are different.
  • FIG. 2 An application interaction system is described below in conjunction with FIG. 2, which includes the above-mentioned global configuration node, a first node running a first application and a second node running a second application, the global configuration node being used for Deploying deployment information of a plurality of applications running in the application interaction system, the deployment information including a location of a node where the application is located.
  • the interaction between the three is shown in Figure 2:
  • the first node is configured to send a query request to the global configuration node according to the connection instruction or the write instruction of the first application, where the connection instruction indicates that the first application requests to establish a connection with the second application, where The prescribing instruction indicates that the first application indicates that information to be delivered to the second application is written to the first storage unit, and the query request is used to query deployment information of the second application.
  • the global configuration node is configured to send the queried deployment information of the second application to the first node according to the query request.
  • the first node is configured to determine, according to deployment information of the first application, deployment information of the second application, and a transmission mode selection policy, a manner of transmitting information between the first application and the second application,
  • the transmission mode selection policy includes the deployment information of the first application, the deployment information of the second application, and the corresponding relationship of the transmission mode, or the transmission mode selection policy includes the first application and a deployment relationship between the second application and a corresponding relationship between the transmission modes, where a deployment relationship between the first application and the second application includes a location of the first node and the second node The relationship between the locations.
  • 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 manner, where the data packet is according to the transmission manner And the write command is obtained.
  • the second node determines the transmission mode according to the received link establishment request or the data packet.
  • the first node and the second node transmit information by using the transmission manner.
  • the connection instruction indicates that the first application requests to establish a connection with the second application, and the write instruction indicates that the first application writes information to be delivered to the second application to the first storage unit.
  • the connection instruction may include information of the first application and information of the second application.
  • the write instruction may include information to be written by the first application and an identifier of the storage unit to be written.
  • the information of the first application may include an identifier of the first application, and the identifier may be any information used to represent the first application. Such as at least one of an ID, such as a source address, and the like.
  • the information of the second application may include an identifier of the second application, and the identifier may be any information used to represent the second application. Such as at least one of an ID, such as a destination address, and the like. Specifically, reference may be made to the foregoing discussion of deployment information.
  • the second node receives the connection request or the data packet sent by the first node.
  • 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 method requires connection requests or data packets in different transmission modes to have different encapsulation formats.
  • the second node may determine information (such as an identifier) of the first node according to the connection request or the information of the data packet, and then pass the information according to the first node and the information of the second node to the second node.
  • the transmission configuration module determines the transmission mode between the first node and the second node.
  • FIG. 2 is only one implementation of the system described above.
  • FIG. 2 draws the global configuration node and the second node into two boxes, the global configuration node may be the same physical machine as the second physical machine.
  • the first node, the second node, and the global configuration node can be implemented in two or two physical machines, or even three of them can be on one physical machine.
  • the global configuration node may be on the same physical machine as the first node, or the deployment information of the second application is saved in the first node (for example, the first node and the second node are the same node, Or the second application once established a connection with the application in the first node, then the first node does not need to query the global configuration node for the deployment information of the second application.
  • the first node uses the transmission configuration module running in the first node to determine the manner of communication according to the deployment information of the first application, the deployment information of the second application, and the transmission mode selection policy.
  • the transmission mode selection policy includes the deployment information of the first application, the deployment information of the second application, and the corresponding relationship of the transmission mode, or the transmission mode selection policy includes the first application and a deployment relationship between the second application and a corresponding relationship between the transmission modes, where a deployment relationship between the first application and the second application includes a location of the first node and the second node The relationship between the locations; it should be understood that the transport mode selection strategy should be stored in the first node.
  • the node where the application for requesting the link is located can select the policy according to the deployment information and the transmission mode of the two applications to be interacted, and determine the transmission mode of the two applications to be interacted, so that the appropriate transmission can be selected more flexibly.
  • the selected transmission mode is more matched with the deployment situation of the two applications, thereby improving the transmission performance such as the efficiency of data transmission, and avoiding unnecessary transmission resources in the process of transmitting information caused by using an inappropriate transmission mode. Waste and reduced data transfer efficiency.
  • the deployment information of the application maintained on the global configuration node is sent by the node within the coverage of the global configuration node to the global configuration node. In this way, the information of the application running in the node within the coverage is registered in the global configuration node. In an implementation manner, the node deployed with the transmission configuration module sends the deployment information of the application obtained by the transmission configuration module to the global configuration node.
  • the first node is further configured to send the deployment information of the first application to the global configuration node, so that the deployment information of the first application is registered in the global configuration node.
  • the second node is further configured to send deployment information of the second application to the global configuration node, to register deployment information of the second application at the global configuration node.
  • the first physical machine and the second physical machine only need to know the deployment information of the application in the corresponding node, which reduces the burden of maintaining the deployment information.
  • the first physical machine and the second physical machine send the deployment information of the application to the global configuration node, which is convenient for management and ensures the real-time performance of the application deployment information.
  • the global configuration node and the transmission configuration module mentioned below constitute a system for managing deployment information of applications in the network. It should be understood that in the 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 maintaining deployment information of the application. There is no clear substantive difference. It should be understood that the global configuration node does not require storage of all application deployment information in a certain networking system, or deployment information of all applications in the network covered by the global configuration node, for example, some system applications do not need to communicate. On the other hand, the global configuration node in the embodiment of the present application may have one or more in a network system, and each global configuration node manages deployment information of applications on a part of the nodes in the network.
  • the function of the transmission configuration module includes obtaining a first instruction by which 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, and the query instruction is used to query the deployment information of the source end and the opposite end.
  • the function of the source and the peer application can be determined according to the deployment information, and the deployment configuration module determines the deployment information of the source and the peer application involved in the connection request according to the information in the connection request. Relationship, so that the transmission mode is determined according to the deployment information of the source and the peer and the transmission mode selection policy, or the deployment relationship and the transmission mode selection policy. This requires the transport configuration module to obtain deployment information for the source and peer applications.
  • FIG. 3 is only a schematic diagram. It should be understood that the running application registers the process with the transport configuration module, both the source and the peer need to be completed (in fact, during the registration process, it is not clear whether the running application will be the connection initiator or the connection request).
  • 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 before the application initiates the connection request. In other words, under the C/S architecture, both the server and the client need to be registered.
  • the running application is registered with the transport configuration module, specifically by sending the deployment information of the application to the transport configuration module.
  • the deployment information may include, for example, the address of the node where the application is located.
  • the deployment information may also describe the service information of the application further including the node where the application is located.
  • the specific form of the deployment information is not limited in the embodiment of the present application.
  • the transport configuration module stores the mapping relationship between the identifier of the application and the deployment information of the application to complete the registration.
  • the mapping relationship can be an application information table.
  • the identifier of the application is used to indicate the application, and is generally used in the form of an application to establish a connection, such as an ID of the application, a source address corresponding to the application, or a port corresponding to the application.
  • the transmission configuration module obtains a first instruction
  • the information of the application carried in the first instruction and the information of the application of the peer end of the connection (for example, the identifiers of the two applications, the peer application)
  • the destination address and the like are not limited in the embodiment of the present application, and the deployment information of the application and the deployment information of the application of the peer end are found.
  • the transmission configuration module can select a policy according to the configuration information and the preset transmission mode, or determine the deployment relationship between the application and the peer application according to the configuration information, and select a policy according to the deployment relationship and the preset transmission mode. Determine how the connection is transmitted.
  • the deployment information of the peer application needs to be queried to the global configuration node.
  • the transmission configuration module may store the obtained deployment information of the peer application to the third memory (which may be located at the node where the transmission process is located or the physical machine corresponding to the node) to facilitate the next use. In an implementation manner, the transmission configuration module may also return the determined transmission mode to the application that issues the connection request.
  • the stored information related to the transmission configuration module may be stored in the second memory and the third memory, and the second memory and the third memory may be the same. Or a different memory.
  • the second storage is used to store the deployment information of the application that is the same node or the same physical device as the configuration module
  • the third storage is used to store the deployment information of the application on the other node, which is not limited in this application.
  • the second memory and the third memory are storage devices or storage units that the transport configuration module can access.
  • the second memory may be similar to the transport configuration module at the same node or at different nodes of the same physical machine or other physical machines that may be directly accessed remotely by the transport configuration module.
  • the second memory and the third memory may be in the cache corresponding to the transmission configuration module, or in the hard disk, or may be stored in other transmission configuration module transmission configurations.
  • the module has permission to access the local storage space.
  • the application implements information interaction through an API (Application Programming Interface) transmission configuration module.
  • the API can be an interface function for a set of socket sockets.
  • This set of interface functions includes a function socket().
  • socket() is the first function in this set of functions.
  • the API can be developed by the user or improved based on the existing API. Since the transmission configuration module is not set in the prior art, the application cannot naturally interact with the transmission configuration module through the interface function. Therefore, one way to do this is to rewrite the interface function of the socket Socket and use the redefined API. However, this will be incompatible with the existing API, and it is not applicable to the existing application version. If the existing application version supports the redefinition API, the application or the user who needs to operate the application is required to encode the application. This is obviously inconvenient and adds a lot of development costs.
  • the function library corresponding to the interface function of the socket can be rewritten without changing the form of the interface function.
  • the content in the function library may be rewritten, or the interface function of the socket may be redirected to the rewritten function library (ie, the interface function jumps to the storage location where the rewritten function library is located).
  • the rewritten function library may be overwritten with the function library corresponding to the original socket function, or the rewritten function library may be placed in a higher-level operating system directory, so that the interface function is called during execution.
  • the code in the rewritten function library to achieve a different function than the original.
  • the interface function used does not change, but the improved library called by the interface function changes the function of the interface function, that is, the connection request is handed over to the transport configuration module for processing.
  • the transmission configuration module needs to determine an appropriate transmission mode, so that the connection request can be delivered through the interface of the protocol corresponding to the transmission mode.
  • the node in the embodiment of the present application needs to support multiple transmission protocol interfaces, that is, the configuration. There are interfaces for implementing multiple transmission methods.
  • an interface adaptation layer can be arranged in the socket of the application, for example Specifically, a function pointer can be used to connect interfaces of different technologies with interfaces of a unified form.
  • the socket and interface adaptation layer of the application can be considered part of the underlying code of the application. That is to say, the application's socket function is the application underlying function, and those skilled in the art should understand that the application is not aware of the application of the underlying function.
  • the function library of the socket, the socket, and the optional interface adaptation layer mentioned above can also be regarded as a module for determining the transmission mode proposed in the embodiment of the present application, that is, the following
  • the instruction delivery module mentioned in the device can be referred to as an nSocket module.
  • the embodiment of the present application further provides a method for applying interaction, and the method is described below in conjunction with the process of interaction between the first application and the second application in FIG. 4 .
  • the first application and the transmission configuration module are on a physical machine.
  • identification, transmission configuration module, first instruction, deployment information, deployment relationship, interface function, and transmission mode selection policy, and the like are on a physical machine.
  • the transmission configuration module receives the first instruction, where the first instruction includes an identifier of the first application and an identifier of the second application.
  • 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 the 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.
  • the query instruction can finally make the transmission configuration module 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.
  • the transmission configuration module receives the first instruction, including:
  • the transmission configuration module receives the query instruction by using a first interface function of the socket Socket, wherein the content of the function library called by the first interface function is set to be used for the first application Transmitting a connection instruction or a write instruction as the query instruction, and transmitting the query instruction to the transmission configuration module to determine the transmission mode, the connection instruction indicating the first application request and the first The second application establishes a connection, the write instruction indicating that the first application indicates that information to be delivered to the second application is written to the first storage unit.
  • the transport configuration module can also receive the query instruction through other API interfaces, but the function of the API interface is similar to the first interface function. For example, the default protocol port is not passed. If the interface is used, or the existing interface is changed, the processing of the first application and the operating system of the first application needs to be changed, and the processing procedure for sending the connection request to the first application in the prior art is changed. The connection request is processed by the transport configuration module to determine the appropriate transport mode.
  • connection instruction or write instruction issues the above-mentioned connection instruction or write instruction.
  • the interface function or other interface needs to be able to process the connection instruction or the write instruction into a query instruction to facilitate the use of the transmission configuration module.
  • the function of the transmission configuration module is relatively simple, relatively lightweight, and does not require too complicated processing, and the improvement of the API is relatively complicated.
  • the first instruction is a connection instruction or a write instruction sent by the first application
  • the connection instruction indicates that the first application requests to establish a connection with the second application
  • the writing The instruction indicates that the first application indicates that information to be delivered to the second application is written to the first storage unit.
  • the transmission configuration module receives the first instruction, including: the transmission configuration module receives the connection instruction or the write instruction by using a first interface function of the socket Socket, where the first interface function is called The content of the function library is set to send a connection instruction or a write instruction issued by the first application to the transmission configuration module to determine the transmission mode.
  • the form of the first interface function is the same as that of an interface function in the prior art, but the content of the function library called by the interface function has been rewritten, and the specific implementation manner is See the previous article.
  • the interface change is not perceived, and the upper layer application does not need to make changes to the adaptation interface.
  • the form of the first interface function is the same as the interface function of the prior art, but the function has changed.
  • the interface function is still connect().
  • the interface function of the existing socket can be compatible.
  • the first application and the user who uses the first application it is not aware of any change in the processing of the connection request, and the use is more convenient and applicable. More broad.
  • the transmission configuration module may also receive the connection instruction or the write instruction through other API interfaces, but the function of the API interface is similar to the first interface function. For example, the default protocol port is not passed. If the interface is used, or the existing interface is changed, the processing of the first application and the operating system of the first application needs to be changed, and the processing procedure for sending the connection request to the first application in the prior art is changed.
  • the connection request is processed by the transport configuration module to determine the appropriate transport mode.
  • connection instruction or write instruction sends the above-mentioned connection instruction or write instruction.
  • the interface is only forwarded, and the transmission configuration module receives the connection instruction or the write instruction.
  • the transmission configuration module needs The above connection instruction or write instruction can be processed into a query operation to determine the transmission mode. In this way, the function of the transmission configuration module is more diverse, requires a certain instruction conversion and analysis capabilities, and the improvement of the API is relatively simple.
  • 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 second application corresponding destination address.
  • the write instruction may include the identifier of the first application, the data to be written, and the target address (which may be the second application or the IO device).
  • the specific description of the connection instruction and the write instruction is referred to the foregoing.
  • a write instruction even if the memory is shared, the data is stored in a storage unit, and the first application indicates the address of the storage unit by some information or structure (for example, a pointer), and passes the pointer to the second.
  • the 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 instruction is those information or structures (such as pointers).
  • the first application sends a connection command, which may be in a scenario where the default transmission mode of the first application is TCP/IP.
  • the first application sends a write command, which may be in a scenario where the default transmission mode of the first application is UDP or shared memory.
  • the transmission configuration module determines the deployment information of the first application and the deployment information of the second application according to the first instruction, where the deployment information of the first application includes the first application The location of the node, the deployment information of the second application includes the location of the second node where the second application is located.
  • the first node where the first application is located generally refers to the node that directly carries the application. However, if only the policy of the physical machine granularity is considered in the transmission mode selection policy, it may also be the physical machine where the application is located.
  • the transmission configuration module obtains deployment information of the first application from a second storage according to the identifier of the first application, where the transmission configuration process is based on the identifier of the second application.
  • the third memory obtains deployment information of the second application, the third memory is the same or different memory as the second memory; or 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 the global configuration node according to the identifier of the second application.
  • the distributed deployment information management method makes the update, management and interaction of the deployment information easier and saves storage resources.
  • This application does not limit the specific interaction method between the transmission configuration module and the global configuration node.
  • Various existing technologies can be used, for example, by sending a query request.
  • the transmission configuration module determines, according to the deployment information of the first application, the deployment information of the second application, and a transmission mode selection policy, a transmission manner of information between the first application and the second application.
  • the transmission mode selection policy includes deployment information of the first application, deployment information of the second application, and a correspondence between the transmission modes.
  • the transmission mode selection policy includes a deployment relationship between the first application and the second application, and a corresponding relationship between the transmission mode, and deployment between the first application and the second application.
  • the relationship includes a relationship between a location of the first node and a location of the second node.
  • the transmission mode selection policy is stored in a storage unit corresponding to the transmission configuration module, and may be, for example, the second memory and the third storage mentioned above, or other storage units.
  • the transmission mode selection policy may include There are many kinds of corresponding relationships, and the specific form of the corresponding relationship is not limited in the embodiment, and may be, for example, a table. For a description of the transmission configuration module and the transmission mode selection strategy, refer to the previous section.
  • 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 a node where the first application is located, where the second application is located.
  • the location of the second node 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. It should be understood that the measurement granularity of the node where the application is located in different scenarios is different, especially after the virtualization scenario is involved.
  • the first node may correspond to different granularities (may be carrying the first An application container, a virtual machine hosting the container, and one of the physical machines hosting the virtual machine or the container, wherein the location of the first node may be a plurality of different parameters, and the second node is similar to the specific node.
  • the first node may correspond to different granularities (may be carrying the first An application container, a virtual machine hosting the container, and one of the physical machines hosting the virtual machine or the container, wherein the location of the first node may be a plurality of different parameters, and the second node is similar to the specific node.
  • the transmission mode includes one of a Transmission Control Protocol/Internet Protocol TCP/IP, a User Datagram Protocol UDP, a full name remote direct data access RDMA, a shared memory, and an inter-process communication (Domain_Socket).
  • TCP/IP Transmission Control Protocol/Internet Protocol
  • UDP User Datagram Protocol
  • RDMA full name remote direct data access
  • shared memory shared memory
  • Domain_Socket inter-process communication
  • the location relationship between the first node and the second node included in the deployment relationship may also be multiple granularities, such as a location relationship between a physical machine and a physical machine, and a positional relationship between virtual machines.
  • the specific granularity can be changed according to different scenarios and needs. It is also possible to further include a business relationship of two nodes. The more granular the bandwidth is considered, the more the types of correspondences between the preset transmission mode selection strategy and the deployment relationship and the transmission mode are selected, so as to select the most suitable transmission mode. It should be understood that what content should be stored in the deployment relationship should be negotiated or set up in advance in the system using the method.
  • the first node is a first container
  • the second node is a second container
  • the transmission configuration module is configured according to the deployment information of the first application
  • the second application The deployment information and the transmission mode selection policy determine a transmission manner of the information transmitted between the first application and the second application, including:
  • the transmission configuration module determines the first application and the The transmission mode of the transmission information between the second applications is a shared memory; in a case where the first container and the second container are the same physical machine, and the first container and the second container belong to different PODs
  • the transmission configuration module determines that the transmission mode of the information transmitted between the first application and the second application is inter-process communication (Domain_Socket).
  • 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 a target device (such as an I/O device). , storage device, etc.), or send to the target node.
  • a target device such as an I/O device. , storage device, etc.
  • the transmission configuration module determines that the transmission mode is transmission using the TCP/IP protocol, and according to the TCP/IP protocol, the connection instruction is used by the node where the first application is located (the node is deployed on the first physical machine).
  • the TCP/IP protocol encapsulates the connection instruction as a link establishment request, and sends the link establishment instruction to the second application, that is, to the second physical machine where the second application is located.
  • the second application sends a response packet to the first application, and the response packet is a TCP/IP packet. That is, the second application determines the transmission mode 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 transfer information, such as service data, between the first application and the second application.
  • S407 The first application uses the transmission mode to transmit information to the second application.
  • the transmitted information may be information that is subsequently transmitted to the second application after the write command or the connect command.
  • the write command or the connect command may also be sent to the second application through the interface corresponding to the transmission mode.
  • the transmission configuration module returns a determined transmission mode to the first application.
  • the interface corresponding to the transmission mode can be used without further decision by the transmission configuration module.
  • the first application since the first application supports multiple interfaces, the first application should configure the corresponding interface according to the returned transmission mode.
  • the interface is a socket, and the first application configures an interface function in the socket according to the transmission manner returned by the transmission configuration module; The second interface function in the Socket sends information to the second application by using the transmission mode.
  • the interface functions for transmitting and receiving information are different due to different transmission modes. Therefore, the first application determines the interface function corresponding to the sending and receiving information according to the returned transmission mode.
  • the second interface function described above is the determined function for transmitting information.
  • the two information to be interacted can be determined according to the deployment information and the transmission mode selection policy of the two applications to be interacted.
  • the transmission mode of the application and then use the transmission method to transmit information.
  • it is possible to more flexibly select an appropriate transmission mode improve the transmission performance such as the efficiency of data transmission, and avoid waste of unnecessary transmission resources and data transmission efficiency in the process of transmitting information due to the use of inappropriate transmission methods. The reduction.
  • the first application may also register its own deployment information to the transmission configuration module, so that the transmission configuration module can manage it, for example, the correspondence between the identifier of the first application and the deployment information. This can be used in the process of determining the transmission mode of other connections involving the first application.
  • the transmission configuration module may further send the deployment information to the global configuration node, and the transmission configuration module and the global configuration node distributed in the plurality of nodes may form a system for managing application deployment information. It should be understood that communication between the transport configuration modules within the system, as well as between the transport configuration module and the global configuration node, uses the TCP/IP protocol by default.
  • 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 a transmission configuration module on the physical machine where the node of the second application or 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, in the corresponding storage) In the unit).
  • the transmission configuration module corresponding to the second application further sends the deployment information of the second application to the global configuration node.
  • the method and system in the embodiments of the present application can also be used in a scenario in which multiple transmission modes are transmitted in parallel, that is, multiple applications on one node can use different transmission methods.
  • Parallel communication with the peer end enables better utilization of resources of multiple transmission paths and reduces resource competition on the original default path, thereby enabling more applications to communicate in parallel.
  • socket function in the corresponding embodiment of FIG. 4 the interface function in the socket, and the function library corresponding to the interface function are also part of the instruction delivery module (ie, nSocket module) mentioned above.
  • FIG. 5 depicts the interaction process with the default transmission mode of TCP/IP. And, Figure 5 draws the Ea of the client and the server together, because the deployment relationship between the client and the server is not known, so Figure 5 can be understood as an abstract, interaction between the client and the server and the module with the Ea function. . It should be understood that FIG. 5 is only a schematic diagram.
  • the decomposition of the query statement and the data display can be arranged on the terminal.
  • the application client completes; if the data is stored in the data management center, tasks such as data query need to be completed through a query process arranged on the server of the data management center, and if the data is stored locally in the terminal, the data query task is run through
  • the read and write processes of the terminal operating system are processed.
  • the application client placed in the terminal is the client, and the query process or read-write process is the server.
  • the client and the server are actually divided according to the role of the application in executing a certain task.
  • a client may correspond to different servers in different tasks, and the application as a client in a task is Another task might be as a server.
  • the nSocket module and the Ea module implement the function of determining the transmission mode, wherein the nSocket module is the instruction delivery module mentioned above, including the redirected application to be called by the application mentioned in the foregoing.
  • 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 application deployment information described above.
  • the redirected socket interface function is used, but the function name of the socket interface function is unchanged.
  • This interface function is still in compliance with the general standard, and it is not perceptible to the server and client. Changes in the interface function during communication, in other words, no need to improve the server and client to be compatible with this set of redirected socket interface functions.
  • the transport configuration module manages the configuration information of the application.
  • the server is running, calling the function socket() and bind() in the redirected socket to complete the registration on the Ea corresponding to the server.
  • bind() can send the server deployment information to Ea.
  • the server binds the port (port) through the function bind() and collects the deployment information of the server.
  • the deployment information enables the Ea system to determine the deployment relationship between the server and the client to be communicated.
  • the deployment information of the server may include at least one of the server ID information, the IP address, the physical machine address, the virtual machine address, the container address, the IP address of the intercepted IP, and the information of the bound port.
  • the implementation and the combination mode are not limited; the deployment information of the client may include at least one of the server ID information, the IP address, the physical machine address, the virtual machine address, the container address, and the used port information, etc. Implementation and combination methods are not limited.
  • the client also completes registration in the similar way on the Ea corresponding to the client.
  • the server enters the state of the monitoring link-building message through the function listen() in the socket. In this state, it can listen to an IP address and port, and also the server can receive the chain-building request from other applications.
  • the client uses the function connect() in the socket to issue a link request.
  • the link request includes the source address and destination address of the link to be built. Since the function connect() has been redirected, its function has changed. () causes the link-building request to be forwarded to the Ea module for processing.
  • the function connect() converts the link-building request into a query request for querying the deployment relationship to the Ea module for processing, and the Ea module according to the query request,
  • the deployment relationship between the client and the server is determined.
  • the Ea module can query the deployment information of the server according to the destination address. Specifically, the local deployment information may be queried or the deployment information may be requested from the central deployment node.
  • the link establishment request is sent by the client.
  • the module may also determine the deployment information of the client according to the information about the client in the link establishment request, determine the transmission mode according to the deployment relationship and the transmission mode selection policy managed by the Ea, and the client sends the transmission protocol to the server by using the determined transmission mode. Encapsulated build request.
  • the client will encapsulate and transmit the information in the link establishment request using the determined transmission mode.
  • the link establishment request is a TCP/IP packet.
  • the server parses the format of the received link request to determine the transmission mode to be used by the connection, or the letter of the client through the link establishment request.
  • the transmission mode is determined by the transmission configuration module corresponding to the server.
  • the server may send a response message according to the link establishment request to establish a connection (through the function accept() of the socket).
  • the client and the server both specify 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, the send() and recv() cluster interface functions that support the default transmission mode.
  • the content is redirected to content that supports the determined mode of transmission, where the send() and recv() cluster interface functions are used to send and receive data during the connection process after the connection is established.
  • the nSocket module on the server side identifies the optimal transmission method and redirects the send() and recv() cluster functions on the server side, and also selects the transmission mode suitable for the link. Interface function implementation.
  • the send() cluster function includes a plurality of functions for performing a transmission function, and the specific form of the function may be Send.xx().
  • the recv() cluster function includes a plurality of functions for performing a receiving function, and the specific form of the function may be Recv.xx().
  • connection establishment process may be slower than the default transmission method in the prior art, but, on the one hand, the application Do not care about the transmission performance of the chain-building phase.
  • the transmission performance of the data transmission process after the link is established (such as the efficiency of data transmission, avoiding unnecessary waste of network resources, etc.) Better than using inappropriate transmission methods.
  • the server In another implementation manner, the following specifically describes that in the case that the default transmission mode is UDP (User Datagram Protocol), the server, the client interact with Ea to determine an appropriate transmission mode, and use the transmission. The way to achieve communication. This process is similar to the case where the default transmission mode is TCP. The system is not introduced here. For details, see above. However, in the case of UDP as the default transmission mode, there is only the bind() function without the connect() function and the listen() function. After the server and client use the bind() function to register with their respective transport configuration modules, the client is passed.
  • UDP User Datagram Protocol
  • the first use of the UPD protocol-compliant send() function (the send() function has been redirected), the instruction sent to the server (which can be a write command, including the data to be written) is passed to the Ea module. So that the Ea module determines the transmission mode used to send 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 method, that is, the client will redirect the content in the send() cluster function supporting the UDP protocol to the corresponding one according to the determined transmission mode. The content of the transfer method for use in subsequent interactions.
  • the recv() cluster function that supports the UDP protocol by default to redirect to the content corresponding to the transmission mode, so that the determined transmission mode is used in subsequent interactions.
  • the conncet() function implements a function similar to the bind() function in the TCP protocol.
  • the server redirects the contents of its send() cluster function and recv() cluster function according to the transport protocol that the first received message follows, so that the determined transmission mode is used in subsequent interactions.
  • the API interface of the socket in the prior art is not changed, and the processing procedure 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 to process the connection request.
  • FIG. 6 shows an apparatus 600 for application interaction, the apparatus including 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 the first application and a second application And the deployment information of the first application is determined according to the first instruction, where the deployment information of the first application includes the first node where the first application is located.
  • the deployment information of the second application includes a location of the second node where the second application is located; determining the location according to the deployment information of the first application, the deployment information of the second application, and a transmission mode selection policy a transmission mode of information between the first application and the second application, where the transmission mode selection policy includes deployment information of the first application, deployment information of the second application, and correspondence of the transmission mode Relationship, or the transmission mode selection policy includes a deployment relationship between the first application and the second application, and a correspondence between the transmission modes, between the first application and the second application
  • the deployment relationship includes a relationship between a location of the first node and a location of the second node;
  • the instruction delivery module 602 is configured to transmit information to be transmitted by the first application to the second application by using the transmission manner.
  • 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 the A mode of transmission between the first application and the second application.
  • the transmission configuration module 601 is configured to receive the query instruction by using a first interface function of the socket Socket, where the function library of the first interface function is called The content is set to be used to process a connection instruction or a write instruction issued by the first application as the query instruction, and send the query instruction to the transmission configuration module to determine the transmission mode.
  • the connection instruction indicates that the first application request establishes a connection with the second application
  • the write instruction indicates that the first application indicates that information to be transferred to the second application is written to the first storage unit.
  • the first instruction is a connection instruction or a write instruction sent by the first application
  • the connection instruction indicates that the first application requests to establish a connection with the second application
  • the transmission configuration module 601 is configured to receive the connection instruction or the write instruction by using a first interface function of the socket Socket, where the first interface function is called
  • the content of the function library is set to send a connection instruction or a write instruction issued by the first application to the transmission configuration module to determine the transmission mode.
  • the device further includes a second storage module and a third storage module, where the third storage module is the same or different storage module as the second storage module; And an instruction, where the deployment information of the first application and the deployment information of the second application are determined, the transmission configuration module 601 is configured to obtain, according to the identifier of the first application, the second storage module The deployment information of the first application is obtained by the transmission configuration module 601 according to the identifier of the second application, or the deployment information of the second application is obtained from the third storage module, or is not stored in the third storage module. In the case of the deployment information of the second application, the transmission configuration module obtains the deployment information of the second application from the global configuration node according to the identifier of the second application.
  • 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 a node where the first application is located
  • 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 a node where the first application is located.
  • the transmission mode includes one of a transmission control protocol/Internet Protocol, TCP/IP, User Datagram Protocol (UDP), full name remote direct data access (RDMA), shared memory, and inter-process communication (Domain_Socket).
  • TCP/IP Transmission Control Protocol/Internet Protocol
  • UDP User Datagram Protocol
  • RDMA full name remote direct data access
  • Domain_Socket inter-process communication
  • the first node is a first container
  • the second node is a second container
  • the policy is selected according to deployment information of the first application, deployment information of the second application, and a transmission mode.
  • the transmission configuration module 601 Determining, in the aspect of the transmission mode of the information transmitted between the first application and the second application, the transmission configuration module 601 is configured to locate the first container and the second container in the same physical machine, and Where the first container and the second container belong to the same pod POD, determining that the transmission mode of the information transmitted between the first application and the second application is a shared memory; and in the first container and the If the second container is the same physical machine, and the first container and the second container belong to different PODs, the transmission configuration module determines a transmission manner of the information transmitted between the first application and the second application. For interprocess communication (Domain_Socket).
  • the instruction delivery module 602 is used for the transmission returned by the transmission configuration module, in the aspect of using the transmission mode to transmit information that is to be transmitted by the first application to the second application. And configuring an interface function in the socket; and transmitting, by using the second interface function in the Socket, the information to the second application by using the transmission mode.
  • 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, and deployment of the first application Information is stored in the second memory; and the deployment information of the first application is sent to the global configuration node.
  • the device corresponding to FIG. 6 corresponds to the foregoing method embodiment, and corresponds to the first node in the system embodiment.
  • the description in the foregoing embodiment and the foregoing description may help explain the implementation details of the device 600, where
  • the transmission configuration module 601 is the transmission configuration module described above
  • the instruction delivery module 602 is the nSocket module described above.
  • the processing flow of the connection request of the application is changed. It is possible to select a policy according to the deployment information and transmission mode of the two applications to be interacted, to determine the transmission mode of the two applications to be exchanged, and then use the transmission mode to transmit information, so that the appropriate transmission can be selected more flexibly. In this way, the transmission performance such as the efficiency of data transmission is improved, and the waste of unnecessary transmission resources and the efficiency of data transmission are reduced in the process of transmitting information due to the use of inappropriate transmission methods.
  • the second node described in the foregoing may also include a similar transmission configuration module and an instruction delivery module to determine the second application running on the second node and the first application by using the method described above. transfer method.
  • the second application is to register the deployment information of the second application in a transmission configuration module, the second application determines the transmission mode by using the transmission configuration module, and the second application receives or sends the information to the first application through the instruction delivery module.
  • FIG. 7 a specific implementation form of the apparatus shown in FIG. 6 is shown in FIG. 7.
  • the schematic diagram of the apparatus 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.
  • storage medium 706 may also be included.
  • the processing circuit 702 is configured to implement the application interaction method in the foregoing method embodiment by processing the code in the storage medium 706.
  • the transfer configuration module referred to in the foregoing the instruction transfer module can be implemented by the processing circuit 702 by processing the code in the storage medium 706.
  • processing circuit 702 is used to process data, control data access and storage, issue commands, and control other devices to perform operations.
  • Processing circuitry 702 can be implemented as one or more processors, one or more controllers, and/or other structures that can be used to execute a program or the like.
  • 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.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • storage medium 704 can be integrated with processing circuit 702.
  • General purpose processors can include microprocessing And any conventional processor, controller, microcontroller, or state machine.
  • Processing circuit 702 can also be implemented as a computing component, such as a combination of a DSP and a microprocessor.
  • the device 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.
  • FIG. 7 is only a schematic diagram of an implementation manner.
  • the device has a storage medium (eg, a memory) independent of the processing circuit 702, a storage medium and processing circuit 702, and a communication interface 704. Can be connected via the bus.
  • the processing circuit 702 is an application specific integrated circuit (ASIC), field programmable gate array (FPGA), or other programmable logic component.
  • the storage medium may be integrated with the processing circuit 702, which is different from the one shown in the figure.
  • some routers, gateways, some devices in the power system, such as an electric meter, etc. may adopt such an implementation, and the embodiment of the present invention does not. limited.
  • the storage medium 706 may include a computer readable storage medium such as a magnetic storage device (eg, a hard disk, a floppy disk, a magnetic strip), an optical storage medium (eg, a digital versatile disk (DVD)), a smart card, a flash memory device, a random access memory. (RAM), read only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), registers, and any combination thereof.
  • Storage medium 706 can be coupled to processing circuit 702 such that processing circuit 702 can read information and write information to storage medium 706.
  • storage medium 706 can be integrated into processing circuit 702, or storage medium 706 and processing circuit 702 can be separate.
  • the protocol stack program 720 and the deployment information of the applications running on the device 700 can be stored in the storage medium 706.
  • Communication interface 704 can include circuitry and/or programs to enable two-way communication between a user equipment and one or more wireless network devices (e.g., base stations, servers, etc.).
  • the communication interface 704 can be a transceiver, and the transceiver can include a set of devices having a receiving function (eg, including a set of interfaces, at least one of a set of antennas and receiving circuits 716), and a set of devices having a transmitting function (eg, Another set of interfaces, at least one of a set of antennas and transmit circuitry 718; or a set of devices (eg, a set of interfaces or a set of antennas) that have both receive and transmit functions.
  • communication interface 704 can 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 device corresponding to FIG. 6 can also be implemented by another implementation, such as the physical machine illustrated in FIG.
  • the physical machine shown in FIG. 8 can describe an application interaction device in a virtualization scenario.
  • the physical machine includes a hardware layer, a first node 801 running above the hardware layer, and a transmission configuration module 802.
  • the first node 801 runs a first application, and the first node 801 is running in hardware.
  • a virtual machine or container above the layer where
  • the transmission configuration module 802 is configured to receive a first instruction, where the first instruction includes an identifier of the first application and an identifier of the second application, and determining, according to the first instruction, deployment information of the first application and the second The deployment information of the application, where the deployment information of the first application includes the location of the first node 801 where the first application is located, and the deployment information of the second application includes the location of the second node where the second application is located; Determining, according to the deployment information of the first application, the deployment information of the second application, and the transmission mode selection policy, a transmission mode of information between the first application and the second application, where the transmission mode is selected
  • the policy includes the deployment information of the first application, the deployment information of the second application, and the corresponding relationship of the transmission mode, or the transmission mode selection policy includes the first application and the second application.
  • the deployment relationship between the first application and the second application includes the location and location of the first node 801. The relationship between the position of the second node; the first node 801 using the transmission mode
  • the hardware layer 81 may include a processor 811, a physical memory 812, a hard disk 813, and a network interface device 814.
  • the processor 811 may be one or more.
  • the network interface device 814 may be a network adapter or a network card. Used to connect to any connectable network, such as the Internet, corporate network, etc.
  • the hardware layer includes the second memory mentioned below, or also includes the third memory mentioned below.
  • the first instruction is a query instruction
  • the query instruction is used to query deployment information of the first application 8011 and deployment information of the second application, or the query instruction is used to query a location
  • the deployment relationship between the first application 8011 and the second application is used, or the query instruction is used to query a transmission manner between the first application 8011 and the second application.
  • 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 The query instruction is sent to the transmission configuration module 802 to determine the transmission mode, the connection instruction indicating that the first application 8011 requests to establish a connection with the second application, and the write instruction indicates the first application 8011 Instructing to write information to be delivered to the second application to the first storage unit.
  • 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 The query instruction is sent to the transmission configuration module 802 to determine the transmission mode, the connection instruction indicating that the first application 8011 requests to establish a connection with the second application, and the write instruction indicates the first application 8011 Instructing to write information to be delivered to the second application to the first storage unit.
  • the transmission configuration module 802 is configured to receive the query instruction by using the instruction delivery module 8012 in terms of receiving the first instruction.
  • the first instruction is a connection instruction or a write instruction issued by the first application 8011, and the connection instruction indicates that the first application 8011 requests to establish a connection with the second application, where the write instruction indicates The first application 8011 indicates that information to be delivered to the second application is written to the first storage unit.
  • the first node 801 further includes an instruction delivery module 8012, where the instruction delivery 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. Processing to determine the transmission mode, the transmission configuration module 802 is configured to receive the connection instruction or the write instruction by the instruction delivery module 8012 in terms of receiving the first instruction.
  • the transmission configuration module 802 is configured to use, according to the first application,
  • the identifier of the first application 8011 is obtained from the second storage of the hardware layer;
  • the transmission configuration process obtains the information from the third storage of the hardware layer according to the identifier of the second application
  • Deployment information of the second application the third memory is the same or different memory as the second memory; or in the case where the deployment information of the second application is not stored in the third memory, the transmission The configuration process obtains the deployment information of the second application from the global configuration node according to the identifier of the second application.
  • the location of the first node 801 where the first application 8011 is located includes the network information of the first application 8011 or the network information of the first node 801 or the node where the first application 8011 is located.
  • the address information, where 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 a node where the first application 8011 is located.
  • the transmission mode includes one of a Transmission Control Protocol/Internet Protocol, TCP/IP, User Datagram Protocol (UDP), full name remote direct data access (RDMA), shared memory, and inter-process communication (Domain_Socket).
  • TCP/IP Transmission Control Protocol/Internet Protocol
  • UDP User Datagram Protocol
  • RDMA full name remote direct data access
  • Domain_Socket inter-process communication
  • the first node 801 is a first container
  • the second node is a second container
  • the first container is located in the same physical machine as the second container
  • the first container is In the case that the second container belongs to the same pod POD
  • the transmission configuration module 802 determines that the transmission mode of the transmission information between the first application 8011 and the second application is a shared memory;
  • the transmission configuration module 802 determines transmission between the first application 8011 and the second application.
  • the information transmission method is interprocess communication (Domain_Socket).
  • the first node 801 is configured to use the transmission returned by the transmission configuration module 802 in the aspect that the first application 8011 uses the transmission mode to transmit information to the second application.
  • the method is configured to: the first node 801, by using the configured instruction delivery module 8012, to transmit information to the second application by using the transmission mode.
  • 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, and the transmission configuration module 802 further The deployment information of the first application 8011 is saved in the second storage; the transmission configuration module 802 is further configured to send the deployment information of the first application 8011 to the global configuration node.
  • the transmission configuration module 802 in the embodiment corresponding to FIG. 8 is the transmission configuration module mentioned above, and the instruction delivery module 8012 is the instruction delivery module mentioned above. It can also be seen that the physical machine corresponding to FIG. 8 can implement the method of the foregoing method embodiment.
  • the physical machine corresponding to FIG. 8 can implement the method of the foregoing method embodiment.
  • the processing flow of the connection request of the application is changed, and the two interactions can be determined according to the deployment information and the transmission mode selection policy of the two applications to be interacted.
  • the transmission mode of the application and then the transmission mode is used to transmit information, so that the transmission mode can be selected more flexibly, the transmission efficiency of the data transmission efficiency is improved, and the transmission information is avoided due to the use of the inappropriate transmission mode. In the process, the waste of unnecessary transmission resources and the efficiency of data transmission are reduced.
  • a communication system can generally include fewer or more components than those shown in FIG. 2, or include components that are different from those shown in FIG. 2, and FIG. 2 only shows Embodiments of the disclosed embodiments are more relevant components.
  • FIG. 2 shows Embodiments of the disclosed embodiments are more relevant components.
  • the first node and the second node are shown in FIG. 2, those skilled in the art will appreciate that a communication system can include a greater number of nodes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明实施例提供一种应用交互方法、装置和系统,所述方法包括:传输配置模块接收第一指令,所述第一指令包括第一应用的标识与第二应用的标识;所述传输配置模块根据所述第一指令,确定所述第一应用的部署信息与所述第二应用的部署信息;所述传输配置模块根据所述第一应用的部署信息、所述第二应用的部署信息以及传输方式选择策略,确定所述第一应用与所述第二应用之间信息的传输方式,以及所述第一应用使用所述传输方式,向所述第二应用传输信息。这样,可以根据应用的部署信息确定相应的传输方式,是的应用间的信息传输更加高效。

Description

一种应用交互方法、装置、物理机及系统 技术领域
本发明涉及通信领域,更具体的涉及一种应用交互方法、装置、物理机及系统。
背景技术
计算机的应用之间常常涉及信息的交互。例如,计算机的任务可以分解成多个子任务,该多个子任务可以部署到多个应用上执行,该多个应用间就可能有通信。例如,这些应用可以采用户端/服务器端(C/S,Client/Server)这种软件系统体系结构架构进行描述。其中,客户端和服务器端在这种架构上指的就是应用,具体的,作为客户端(Client)的应用请求服务,作为服务器端(Server)的应用为作为客户端(Client)的应用提供服务。这样多个应用可以部署在相同或者不同的物理设备上,从而充分利用Client和Server所在的硬件环境的优势。显然,Server和Client之间需要通过通信进行信息的交互。
如今,虚拟化技术和微服务应用架构等技术都被使用到应用部署中,应用之间的部署关系变得更加复杂,变动也更加频繁。而现有技术中,应用间信息的传输方式的设置却比较单一和固定,无法满足应用间信息传输的需要,影响了应用之间的信息传输的性能。
发明内容
有鉴于此,本发明实施例提供了一种应用交互方法、装置和终端,能够使应用之间的信息的传输方式更好地匹配应用的部署方式,从而提高信息传输的性能。
为达到上述目的,本申请的实施例采用如下技术方案:
第一方面,一种应用交互方法,该方法包括:传输配置模块接收第一指令,所述第一指令包括第一应用的标识与第二应用的标识;所述传输配置模块根据所述第一指令,确定所述第一应用的部署信息与所述第二应用的部署信息,所述第一应用的部署信息包括所述第一应用所在的第一节点的位置,所述第二应用的部署信息包括所述第二应用所在的第二节点的位置;所述传输配置模块根据所述第一应用的部署信息、所述第二应用的部署信息以及传输方式选择策略,确定所述第一应用与所述第二应用之间信息的传输方式,其中,所述传输方式选择策略包括所述第一应用的部署信息、所述第二应用的部署信息以及所述传输方式的对应关系,或者,所述传输方式选择策略包括所述第一应用与所述第二应用之间的部署关系、以及所述传输方式的对应关系,所述第一应用与所述第二应用之间的部署关系包括所述第一节点的位置与所述第二节点的位置之间的关系;所述第一应用使用所述传输方式,向所述第二应用传输信息。
这样,通过传输方式选择策略以及确定出的通信的两个应用的部署关系,或者通过传输方式选择策略以及确定出的通信的两个应用的部署信息,来为要通信的两个应用选择更适合这两个应用的信息的传输方式。这样就可以更灵活地为需要通信的应用适配信息的传输方式,以提高信息传输的性能。
应理解,本申请文件中的节点是运行有操作系统且可以进行通信的设备或者装置,可以是逻辑节点,例如虚拟机、容器或者其他具有上述功能的装置,从某种角度讲,也可以认为物理机的操作系统是节点,也可以是物理节点,也就是包括硬件的物理机或者计算机,例如终端、服务器或者其他具有上述功能的设备。
一个应用的标识是可以表示该应用的信息,例如可以是该应用的身份信息,如ID,该应用的地址信息,如IP地址,所在网段等,该应用的网络信息,如该应用的端口号。当然,也可是上述多种信息的组合,只要这个组合或者该标识包括的信息可以将该应用于其他应用区分出即可。
在第一方面的一种实现方式中,所述传输方式选择策略包括所述第一应用与所述第二应用之间的部署关系、以及所述传输方式的对应关系,该方法还包括所述传输配置模块根据所述第一应用的部署信息和所述第二应用的部署信息,确定所述第一应用与所述第二应用之间的部署关系。
在第一方面的一种实现方式中,所述第一指令为查询指令,所述查询指令用于查询所述第一应用的部署信息以及所述第二应用的部署信息,或者所述查询指令用于查询所述第一应用与所述第二应用之间的部署关系,或者所述查询指令用于查询所述第一应用与所述第二应用之间的传输方式。
在第一方面的一种实现方式中,所述传输配置模块接收第一指令,包括:
所述传输配置模块通过套接字Socket的第一接口函数,接收所述查询指令,其中,所述第一接口函数所调用的函数库的内容被设置为,用于将所述第一应用下发的连接指令或者写指令处理为所述查询指令,以及将所述查询指令发送给所述传输配置模块处理以确定所述传输方式,所述连接指令表示所述第一应用请求与所述第二应用建立连接,所述写指令表示所述第一应用指示将待向所述第二应用传递的信息写入第一存储单元。
在第一方面的一种实现方式中,所述第一指令为所述第一应用下发的连接指令或者写指令,所述连接指令表示所述第一应用请求与所述第二应用建立连接,所述写指令表示所述第一应用指示将待向所述第二应用传递的信息写入第一存储单元。
在第一方面的一种实现方式中,所述传输配置模块接收第一指令,包括:
所述传输配置模块通过套接字Socket的第一接口函数,接收所述连接指令或者所述写指令,所述第一接口函数所调用的函数库的内容被设置为,用于将所述第一应用下发的连接指令或者写指令发送给所述传输配置模块处理以确定所述传输方式。
当然,传输配置模块也可以通过其他API接口,接收该查询指令,但是该API接口的功能与该第一接口函数类似。例如不通过默认的协议端口。而采用自创的接口,或者改变了现有接口的形式,那么需要通过对第一应用及第一应用所在的操作系统进行编程,改变现有技术中对第一应用下发连接请求的处理过程,使得该连接请求被该传输配置模块处理以确定出合适的传输方式。
应当理解,第一应用下发的是上述的连接指令或者写指令,这种情况下该接口函数或者其他接口需要能够将上述连接指令或者写指令处理成查询指令,以便于传输配置模块的使用。这样,传输配置模块功能就比较单一,比较轻量级,不用太复杂的处理过程,而对API的改进则相对较为复杂。
在第一方面的一种实现方式中,所述传输配置模块根据所述第一指令,确定所述第一应用的部署信息与所述第二应用的部署信息,包括:所述传输配置模块根据所述第一应用的标识,从第二存储器获得所述第一应用的部署信息;
所述传输配置进程根据所述第二应用的标识,从第三存储器获得所述第二应用的部署信息,所述第三存储器为与所述第二存储器相同或不同的存储器;或者在所述第三存储器中未存储所述第二应用的部署信息的情况下,所述传输配置进程根据所述第二应用的标识,从全 局配置节点获得所述第二应用的部署信息。
也就是说该传输配置模块可能需要从全局配置节点获取信息。这样传输配置模块就无需管理该方法适用范围内所有应用的部署信息,这种分布式的部署信息管理方法使得对部署信息的更新、管理和交互都更加简便,也节省存储资源。
在第一方面的一种实现方式中,所述第一应用所在的第一节点的位置包括所述第一应用的网络信息或者所述第一节点的网络信息或者所述第一应用所在节点的地址信息,所述第二应用所在的第二节点的位置包括所述第二应用的网络信息或者所述第二节点的网络信息或者所述第一应用所在节点的地址信息。
在第一方面的一种实现方式中,所述传输方式包括传输控制协议/因特网互联协议TCP/IP、用户数据报协议UDP、全称远程直接数据存取RDMA、共享内存、进程间通信(Domain_Socket)中的一种。
在第一方面的一种实现方式中,所述第一节点为第一容器,所述第二节点为第二容器,所述传输配置模块根据所述第一应用的部署信息、所述第二应用的部署信息以及传输方式选择策略,确定所述第一应用与所述第二应用之间传输信息的传输方式,包括:在所述第一容器与所述第二容器位于同一物理机,并且所述第一容器与所述第二容器属于相同的豆荚POD的情况下,所述传输配置模块确定第一应用与所述第二应用之间传输信息的传输方式为共享内存;在所述第一容器与所述第二容器为同一物理机,并且所述第一容器与所述第二容器属于不同的POD的情况下,所述传输配置模块确定第一应用与所述第二应用之间传输信息的传输方式为进程间通信(Domain_Socket)。
也就是说,在第一节点和第二节点都是容器的情况下,还可以考虑两个应用的业务关系。
在第一方面的一种实现方式下,所述传输方式为使用TCP/IP协议传输,所述方法还包括:所述第一节点使用所述TCP/IP协议,将所述连接请求封装为建链请求;所述第一节点向所述第二应用发送所述建链请求;所述第一应用接收来自所述第二应用的响应报文,所述响应报文为TCP/IP报文;相应的,所述第一应用通过所述传输方式,与所述第二应用传输信息,包括:所述第一应用使用所述TCP/IP协议,与所述第二应用传输信息。
应当理解,传输配置模块确定出的传输方式后,该第一指令对应的连接指令或者写指令,可以进一步被分配到相应传输方式对应的接口进行处理,例如发送到目标设备(如I/O设备,存储设备等),或者向目标节点发送。
在第一方面的一种实现方式中,所述第一应用使用所述传输方式,向所述第二应用传输信息,包括:所述第一应用根据所述传输配置模块返回的所述传输方式,配置所述套接字中的接口函数;所述第一应用通过配置好的所述Socket中的第二接口函数,使用所述传输方式向所述第二应用传输信息。
这样第一应用在后续的与第二应用的交互中,就可以使用该传输方式对应的接口,而无需再由传输配置模块进行决策了。当然,由于第一应用支持多种接口,第一应用应当根据返回的传输方式配置对应的接口。
应理解,该传输的信息可以是在该写指令或者连接指令之后,后续向第二应用传输的信息。也可以是该写指令或者连接指令,因为从整体流程看,该写指令或者连接指令是第一应用通过该传输方式对应的接口向第二应用下发的。
在第一方面的一种实现方式中,所述方法还包括:所述第一应用向所述传输配置模块发送第二指令,所述第二指令包括所述第一应用的部署信息;所述传输配置模块将所述第一应 用的部署信息保存在所述第二存储器中;所述传输配置模块向所述全局配置节点发送所述第一应用的部署信息。
这样,全局配置节点中就维护有了该第一应用的信息。
第二方面,本发明实施例提供一种用于应用交互的装置,所述装置包括传输配置模块和指令传递模块,所述传输配置模块用于接收第一指令,所述第一指令包括第一应用的标识与第二应用的标识;所述传输配置模块用于根据所述第一指令,确定所述第一应用的部署信息与所述第二应用的部署信息,所述第一应用的部署信息包括所述第一应用所在的第一节点的位置,所述第二应用的部署信息包括所述第二应用所在的第二节点的位置;所述传输配置模块用于根据所述第一应用的部署信息、所述第二应用的部署信息以及传输方式选择策略,确定所述第一应用与所述第二应用之间信息的传输方式,其中,所述传输方式选择策略包括所述第一应用的部署信息、所述第二应用的部署信息以及所述传输方式的对应关系,或者,所述传输方式选择策略包括所述第一应用与所述第二应用之间的部署关系、以及所述传输方式的对应关系,所述第一应用与所述第二应用之间的部署关系包括所述第一节点的位置与所述第二节点的位置之间的关系;所述指令传递模块用于使用所述传输方式,传输所述第一应用待向所述第二应用传输的信息。
第三方面,本发明实施例提供一种物理机,其特征在于,所述物理机用于应用交互,所述物理机包括处理器、存储器和收发器,所述处理器、所述存储器和通信接口间通过总线连接,所述通信接口用于通过执行所述存储器中的程序与其他设备收发信息,所述处理器用于通过运行所述存储器中的指令,以执行第一方面各种实现方式的方法。
由于第二方面和第三方面是第一方面对应的装置,故各种具体的实现方式、相关说明以及有益效果,请参见第一方面各种实现方式的叙述,这里不再重复。
第四方面,本发明实施例提供一种应用交互方法,所述方法包括:第二应用接收来自第一应用的连接指令或者数据包,所述连接指令表示第一应用请求与第二应用建立连接;所述第二应用确定所述连接指令或者所述数据包对应的传输方式;所述第二应用通过所述传输方式,与所述第一应用传输信息。
在第四方面的一种实现方式中,在第二应用确定所述连接指令或者所述数据包对应的传输方式的方面,所述方法具体包括,该第二应用解析所述连接指令或者所述数据包,以确定所述连接指令或者所述数据包对应的传输方式。
在第四方面的一种实现方式中,在第二应用确定所述连接指令或者所述数据包对应的传输方式的方面,所述方法具体包括,传输控制模块根据所述连接指令或者所述数据包以及传输方式选择策略,确定所述第一应用和第二应用之间的传输方式,其中,所述连接指令或者所述数据包包括所述第一应用的标识以及所述第二应用的标识,所述传输方式选择策略包括所述第一应用的部署信息、所述第二应用的部署信息以及所述传输方式的对应关系,或者,所述传输方式选择策略包括所述第一应用与所述第二应用之间的部署关系、以及所述传输方式的对应关系,所述第一应用与所述第二应用之间的部署关系包括所述第一节点的位置与所述第二节点的位置之间的关系,该第二应用通过传输控制模块,确定所述连接指令或者所述数据包对应的传输方式。
在第二应用确定所述连接指令或者所述数据包对应的传输方式的方面,所述方法具体包括,该第二应用解析所述连接指令或者所述数据包,以确定所述连接指令或者所述数据包对应的传输方式。
在第四方面的一种实现方式中,所述方法还包括:所述第二应用向第二传输配置模块传输配置模块发送所述第二应用的部署信息,所述部署信息包括所述第二节点的位置与所述第二节点的网络信息中的至少一种;所述第二传输配置模块传输配置模块将所述第二应用的部署信息保存在本地。
在第四方面的一种实现方式中,所述方法还包括:所述第二传输配置模块传输配置模块向全局配置节点发送所述第二应用的部署信息。
在第五方面,本发明实施例提供一种物理机,所述物理机用于应用交互,所述物理机包括处理器、存储器和收发器,所述处理器、所述存储器和通信接口间通过总线连接,所述通信接口用于通过执行所述存储器中的程序与其他设备收发信息,所述处理器用于通过运行所述存储器中的指令,以执行第事方面各种实现方式的方法。
由于第四方面为第一方面对端的方法,第五方面为第四方面对应的装置,故各种相关说明以及有益效果,请参见第一方面各种实现方式的叙述,这里不再重复。
第六方面一种物理机,所述物理机包括硬件层,运行在所述硬件层之上的第一节点以及传输配置模块,所述第一节点中运行有第一应用,所述第一节点为运行在硬件层之上虚拟机或者容器,其中,传输配置模块用于接收第一指令,所述第一指令包括第一应用的标识与第二应用的标识;根据所述第一指令,确定所述第一应用的部署信息与所述第二应用的部署信息,所述第一应用的部署信息包括所述第一应用所在的第一节点的位置,所述第二应用的部署信息包括所述第二应用所在的第二节点的位置;根据所述第一应用的部署信息、所述第二应用的部署信息以及传输方式选择策略,确定所述第一应用与所述第二应用之间信息的传输方式,其中,所述传输方式选择策略包括所述第一应用的部署信息、所述第二应用的部署信息以及所述传输方式的对应关系,或者,所述传输方式选择策略包括所述第一应用与所述第二应用之间的部署关系、以及所述传输方式的对应关系,所述第一应用与所述第二应用之间的部署关系包括所述第一节点的位置与所述第二节点的位置之间的关系;所述第一节点用于使用所述传输方式,向所述第二应用传输信息。
由于第六方面为第一方面所述的方法在虚拟化场景下的一种装置,故各种实现方式,相关说明以及有益效果,请参见第一方面各种实现方式的叙述,这里不再重复。
第七方面,本发明实施例提供一种应用交互系统,所述系统包括第一节点,第二节点和全局配置节点,所述全局配置节点用于存储运行在所述应用交互系统中的多个应用的部署信息,所述第一节点运行有第一应用,所述第二节点运行有第二应用,所述部署信息包括应用所在节点的位置,其中,所述第一节点用于根据所述第一应用的连接指令或者写指令向所述全局配置节点发送查询请求,所述连接指令表示所述第一应用请求与所述第二应用建立连接,所述写指令表示所述第一应用指示将待向所述第二应用传递的信息写入第一存储单元,所述查询请求用于查询所述第二应用的部署信息;所述全局配置节点用于根据所述查询请求向所述第一节点发送查询到的所述第二应用的部署信息;所述第一节点用于根据所述第一应用的部署信息、所述第二应用的部署信息以及传输方式选择策略,确定所述第一应用与所述第二应用之间信息的传输方式,其中,所述传输方式选择策略包括所述第一应用的部署信息、所述第二应用的部署信息以及所述传输方式的对应关系,或者,所述传输方式选择策略包括所述第一应用与所述第二应用之间的部署关系、以及所述传输方式的对应关系,所述第一应用与所述第二应用之间的部署关系包括所述第一节点的位置与所述第二节点的位置之间的关系;所述第一节点用于向所述第二节点发送建链请求或者数据包,所述建链请求是根据所述传输 方式处理所述连接指令得到的,所述数据包是根据所述传输方式以及所述写指令得到的;所述第二节点根据接收到的所述建链请求或者所述数据包,确定所述传输方式;所述第一节点与所述第二节点通过所述传输方式传输信息。
在第七方面的一种实现方式中,所述第一节点还用于,发送所述第一应用的部署信息到所述全局配置节点,以便在所述全局配置节点注册所述所述第一应用的部署信息。
在第七方面的一种实现方式中,所述第二节点还用于,发送所述第二应用的部署信息到所述全局配置节点,以便在所述全局配置节点注册所述第二应用的部署信息。
在第七方面的一种实现方式中,所述第一应用所在的第一节点的位置包括所述第一应用的网络信息或者所述第一节点的网络信息或者所述第一应用所在节点的地址信息,所述第二应用所在的第二节点的位置包括所述第二应用的网络信息或者所述第二节点的网络信息或者所述第一应用所在节点的地址信息。
在第七方面的一种实现方式中,其特征在于,所述传输方式包括传输控制协议/因特网互联协议TCP/IP、用户数据报协议UDP、全称远程直接数据存取RDMA、共享内存、进程间通信(Domain_Socket)中的一种。
由于第七方面是第一方面、第四方面方法对应的系统,故各种具体的实现方式、相关说明以及有益效果,请参见第一方面以及第四方面各种实现方式的叙述,这里不再重复。
第八方面,提供一种存储介质,该存储介质用于存储应用程序,以执行第一方面或者第四方面的任一实现方式中的方法。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例的提供的一个系统组网示意图;
图2为本发明实施例提供一种应用交互系统的交互示意图;
图3为本发明实施例提供的一个传输配置模块对接收的信息进行处理的示意图;
图4为本发明实施例提供的一种应用交互方法的流程图;
图5为本发明实施例提供的一种C/S场景下,server、Ea以及Client之间的交互示意图;
图6为本发明实施例提供的一种用于应用交互的装置结构示意图;
图7为本发明实施例提供的一种物理机的结构示意图;
图8为本发明实施例提供的又一种物理机的结构示意图。
具体实施方式
本发明实施例提供了一种,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。
以下为本发明实施例涉及的一些技术名词:
节点,本申请文件中的节点是运行有操作系统且可以进行通信的设备或者装置,可以是逻辑节点,例如虚拟机、容器或者其他具有上述功能的装置,从某种角度讲,也可以认为物理机的操作系统是节点,也可以是物理节点,也就是包括硬件的物理机或者计算机,例如终端、服务器或者其他具有上述功能的设备。
也就是说,在虚拟化场景下,严格来说,一个应用所在的节点可以包括多个,可以是承载该应用的容器,承载该容器的虚拟机,承载该虚拟机或容器的物理机中的一种。例如一个应用在容器中,该容器在一虚拟机中,该虚拟机在一物理机中,那么,该容器,该容器所在的虚拟机以及该虚拟机所在的物理机,实际上都是该应用所在的节点。但一般来说,该应用所在的节点指的是容器,也就是直接承载该应用的节点。当然,某些场景下也可以指该容器所在的虚拟机,另一些场景下可以指该虚拟机所在的物理机。对于应用所在的节点的考虑的粒度,是细致到容器或虚拟机级别,还是只考虑到应用依托的硬件环境(即物理机),是根据传输方式选择策略中,所考虑的场景来决定的。例如,如果只需要确定两个应用是否在同一个局域网或者同一个数据中心或者同一个可信域等,就无需具体明确该应用所在的容器或虚拟机。如果考虑的是虚拟机之间的位置关系,例如是云化场景,那么该应用所在的节点至少应当精确到虚拟机。如果要分析得更加细致,例如还要进一步细分应用之间的业务关系,那么该应用所在的节点应当精确到容器(如果该应用在容器内)。
应用的标识,一个应用的标识是可以表示该应用的信息,例如可以是该应用的身份信息,如ID,该应用的地址信息,如IP地址,所在网段等,该应用的网络信息,如该应用的端口号。当然,也可是上述多种信息的组合,只要这个组合或者该标识包括的信息可以将该应用于其他应用区分出即可。
应用的部署可以有多种形式,目前,通信系统组网越来越复杂,其中可以包括多个网络设备(例如服务器、网关等),并且,这多个网络设备还可以为多个终端提供服务,这些网络设备以及终端上都可以运行应用。TCP/IP(Transmission Control Protocol/Internet Protocol,传输控制协议/因特网互联协议)协议是通常使用的一种通信协议,它能够保证TCP/IP协议保证了用户数据在复杂网络环境中能够可靠的无差错的进行端到端传输。因此,目前应用之间的信息交互也往往使用TCP/IP协议。本发明实施例中的终端,可以是移动终端(Mobile Terminal),例如手机、平板电脑、运动相机、笔记本电脑等便携式、穿戴式、或者车载的移动设备,也可以是一些能够接入通信网络的计算机、服务器等设备
然而,需要通信的应用之间,部署关系非常多变。以下列举几种需要相互通信的应用的典型部署:①部署在同物理机内的不同虚拟机内;②部署在同宿主(宿主指物理机或者虚拟机)同容器内;③部署在同宿主的不同容器内;④部署在同可信域内的不同宿主;⑤部署在不同的可信域内的不同宿主。当然,需要相互通信的应用的部署场景不局限于上述举例。其中宿主指应用所在的物理机或者虚拟机。可信域可以理解为一个相互间认为对方的数据是安全的设备的集合,可以是局域网,该局域网设有防火墙。具体的,在该局域网内的设备之间建立的连接和进行的信息交互,被认为信息来源和连接是安全的,也就是可信的,而该局域网内的设备与局域网外的设备进行信息交互,则认为局域网外的信息安全性未知,默认为是不安全的,也就是不可信的。例如,处于一个数据中心(DC,Data Center)中的物理机,就属于一个可信域。还可以是其他一些网络安全可信的领域种的一组设备。
由上述的几种场景可见,应用的部署方式将会直接决定网络传输的可靠性。例如,上述的①②③场景的可靠性都较好,在上述的①②③场景中部署的连接的一端可以确定另一端的安全性,并且不存在网络传输时延及丢包,如果依然使用TCP/IP协议传输会带来大量的冗余需要处理,使得传输效率降低,浪费数据包的处理资源。④场景为高可靠无损网络,可以对网络及传输可靠性提供较高保障,这就使得在该域内使用TCP/IP协议显得有些冗余。⑤场景为广域网通用网络,网络环境复杂,并且会存在网络衰减及丢包,使用TCP/IP协议传输较为合 适。因此,在不同的部署场景下,TCP/IP协议并不总是适合应用间的信息传输的。另一方面,业界针对各种应用部署场景的特点,也研究了其他的传输技术,以便提高传输性能。例如场景①可以采用基于共享内存的虚拟交换技术、场景④可以采用RDMA(Remote Direct Memory Access,远程直接数据存取)技术,与TCP/IP协议相比,可以降低网络传输中数据服务器端的处理延时。
然而,多种传输技术之间是替换关系,节点上部署的应用经常变化,并且应用在执行不同的任务的过程中,需要与不同的应用通信;另一方面,这些应用也有自己的生命周期,会根据用户的操作或者接收到的任务运行或者结束运行。故,现有技术大多通过用户去分析应用的部署信息,然后用户设置传输协议的方式去选择不同的传输协议,大大增加了用户的负担,限制了多种传输协议的应用。
以下结合图1,描述本发明实施例的应用交互方法适用的一个系统的示意图,应理解,为了说明方便,图1中示意性地画出了两个DC。
在此场景中,微服务应用的部署方式非常多样化,其中,DC1和DC2是两个数据中心,可以理解为两个局域子网,该两个数据中心中都可以部署多台物理机,该多台物理机可以是服务器或者终端或者可以运行应用的网络通信设备,为了便于说明,图1中只画出了DC1中的三台物理机和DC2中的一台物理机。其中,DC1中的物理机1上运行有2个虚拟机,虚拟机11中运行有容器11和容器12,容器11中运行有应用111和应用112,容器12中运行有应用113,虚拟机12中运行有容器13,和应用123,容器13中运行有应用121和应用122。DC1中的物理机2上运行有虚拟机21,虚拟机21上运行有容器21和容器22,其中容器21中运行有应用211和应用212,容器22中运行有应用213。DC1中的物理机3上运行有容器31和容器32,容器31中运行有应用311和应用312,容器32中运行有应用313。DC2中运行有物理机4,其中运行有应用411。
图1中描述了物理机上运行有虚拟机,虚拟机中运行容器和应用的情况,这种情况在目前的云场景中非常常见,云场景中,允许用户租用一些厂商的硬件设备(如服务器),使用其硬件资源支撑自己的需求,由于不同用户所需的硬件资源不同,则可能一台硬件设备可能租给多个用户使用,而另一方面仍旧由该硬件设备厂商的管理硬件资源,这就可以在服务器上虚拟出多个虚拟机,使各个用户使用不同的虚拟机,各虚拟机有独立的操作系统。并且厂商可以设置用户的权限,使得用户无法直接在物理机的操作系统中安装应用。DC1和DC2不同应用之间都存在需要相互访问的可能性。例如,在上述架构中,应用211为某节点上的MySQL数据库应用,提供数据库访问和操作服务。应用112为用户访问的webServer服务器,提供web服务给广域网的用户。应用111为webServer服务器流量控制应用,用于控制webServer服务器与各用户之间的流量。应用113和应用313是部署在不同物理机上的代理,用于提供代理服务,具体例如过滤和识别用户数据。应用411为运行在另一局域网中的物理机上的一个web客户端,应用112与应用113位于同一台物理机的不同虚拟机上,这两个应用之间的网络通信属于场景①③。应用111与应用112位于同一台物理机的同一容器内,这两个应用之间的网络通信属于场景②。应用113与应用311部署同一个数据中心内的与不同物理机上,这两个应用之间的网络通信属于场景④。应用311和应用313部署在不同局域网中,这两个应用之间的网络通信属于场景⑤。
本申请的实施例提供一种应用交互的方法,通过传输方式选择策略以及确定出的通信的两个应用的部署关系,或者通过传输方式选择策略以及确定出的通信的两个应用的部署信息,来为要通信的两个应用选择更适合这两个应用的信息的传输方式。这样就可以更灵活地为需 要通信的应用适配信息的传输方式,以提高信息传输的性能。其中,涉及到为实现该方法,部署的传输配置模块、以及全局配置节点。传输配置模块的功能包括可以通过处理得到的第一指令,确定出该连接的传输方式。具体的,该第一指令可以是要建立连接的应用向对端(对端指该待建立连接的另一端)下发的连接请求,或者要传输数据的应用向一存储单元(例如内存,I/O设备等)发送的写指令,或者也可以是通过API接口层处理,由根据该连接指令或者写指令生成的查询指令。在一些情况下,该传输配置模块需要向全局配置节点请求信息,才能够确定出该连接的传输方式。应理解,在C/S架构下,一般发起连接请求的一端也是请求服务的一端,为client,接收连接请求的一端也是提供服务的一端,为server。
应理解,传输配置模块是个功能性的命名,其功能可以用线程、进程、容器、虚拟机或者其他能够实现该模块功能的结构来实现,本申请的实施例以进程为例进行描述。
应理解,一个应用的部署信息可以用于确定该应用所在的节点的位置,该位置可以是实际的物理位置,也可以是在通信网络中的网络位置,或者是能够根据两个应用的部署信息确定出这两个应用所在节点的位置关系的信息。或者一个应用的部署信息就是该应用的身份信息,如ID或者编号,例如,在软件定义网络的场景下,可以用户设计并预存的传输方式选择策略,该传输方式选择策略中包括了要通信的两个应用的身份信息和这两个应用之间传输方式的对应关系,那么也是可行的。
不同的部署信息的内容需要配合相应的传输方式选择策略的内容,以实现本申请中描述的方法。部署信息可以包括以下几类信息中的至少一种:1、该应用所在节点的地址信息。例如该应用所在的虚拟机地址信息、容器地址信息和物理机地址信息中的至少一种。该地址信息可以是物理地址(Mac地址),或者是IP地址,或者实际的节点的地理位置信息(如某市某数据中心某号机房某机位)。2.该应用以及该应用所在节点的身份信息。例如该应用的标识、该应用所在的节点的标识(如ID)等。3.该应用以及该应用所在节点的网络信息。例如该应用监听的地址信息(如IP地址)、该监听的端口信息、该应用使用的端口的信息、IP地址、子网掩码、网关地址、虚拟机或容器所在的网段信息、该应用对应的vlan ID(例如该应用所在的虚拟机或容器的vlan ID)、该应用对应的vlan地址(例如该应用所在的虚拟机或容器的vlan地址)等中的至少一个。例如,在云化的场景或者虚拟化场景下,并不能感知节点的地址或者位置,但是可以通过该应用以及该应用所在节点的网络信息,以及该应用或者该应用所在节点的身份信息确定该应用所在节点的位置的。
另一种实现方式下,该应用的部署信息还可以包括该应用的业务信息,从而能够根据两个应用的部署信息确定出这两个应用所在节点的业务关系。例如容器的POD信息等信息。其中,容器的POD信息可以体现容器之间的在业务上的联系,也就是容器之间的业务关系,属于同一POD的容器用于承载执行同一任务或同一类任务的应用。例如,一个POD中可以包括系统容器(POD Container)以及用户容器(User Container)。
应理解,在一些实现方式下,可以从两个应用的部署信息确定出两个应用的部署关系,也就是两个应用所在节点之间的位置关系,该两个节点的位置关系用于表示两个节点在通信网络中的位置关系。也就是说,只需要确定两个节点的相对位置就可以,而无需考虑这两个节点具体的位置。这种位置关系也可以理解为是上文所述的各种不同的部署场景,例如可以是部署在同一节点、同一物理机上或虚拟机上的不同节点,同一可信域中的不同节点,不同可信域中的不同节点,不同局域网中的节点等等。
应理解,本申请的实施例提及的传输方式选择策略,包括以下对应关系中的至少一种: 不同的部署关系和传输方式之间的对应关系,不同的应用的部署信息和传输方式之间的对应关系。包括不同的部署关系和传输方式之间的对应关系,就可以将网络中容易变化,数量繁多的应用的部署信息和传输方式之间的对应关系,抽象为几种部署关系(或者说部署场景)与传输方式之间的对应关系。对传输配置模块来说,这样的对应关系维护起来更加简单,该传输配置模块也更加轻量级,可以较少地占用存储资源,但需要传输配置模块有基于查询到的应用的部署信息,确定出要交互的两个应用之间的部署关系的处理能力。而另一方面,如果包括的是不同的应用的部署信息和传输方式之间的对应关系,那么就需要较多的存储资源来维护这种对应关系,因为相当于要给每两个可能通信的应用都建立这样的对应关系。但是,应当理解,这种对应关系可用于例如软件定义网络的场景,也就是说,用户或者管理员在部署应用的过程中,就定义了应用之间的传输方式,以及将这种对应关系存储在对应的存储设备或者存储单元中以便传输配置模块查询或者读取。另一方面,现有的数据库技术的资源也可以支持这种对应关系的存储,也就是说,为这种对应关系分配较多的存储资源,在一些场景下是可以容忍的。
一种实现方式下,该传输方式选择策略存储在传输配置模块所在的节点中。另一种实现方式下,该传输方式选择策略可以存储在传输配置模块可以查询或者访问得到的存储单元中。例如,该传输方式选择策略与传输配置模块在同一节点或者不同节点。也就是说,下文中提及的第二存储器和第三存储器,可以与传输配置模块在同一虚拟机中(此时可以认为第二存储器和第三存储器是虚拟存储设备或单元);或者只是与该传输配置模块在同一物理机上(此时可以认为第二存储器和第三存储器是物理存储设备或单元);甚至,可以是与该传输配置模块在不同物理机上,但是该传输配置模块有权限远程直接访问。
另一方面,可以使用节点中预先存储的默认的传输方式选择策略。为了保证效果和实施,默认的传输方式选择策略中包括的传输方式应当是应用所在的操作系统支持的。也可以由租户根据需要或传输场景,自行配置。应理解,为了保证选出某一次应用交互过程中合适的传输方式,租户应当在该次应用交互之前完成配置。传输方式选择策略中,一般包括多种传输方式。当然,初始状态中,预存的传输方式选择策略可以有统一的默认初始传输方式,以便租户自行修改和添加。例如,传输方式选择策略中的传输方式,包括传输控制协议/因特网互联协议TCP/IP、用户数据报协议UDP、全称远程直接数据存取RDMA、共享内存、进程间通信(Domain_Socket)以及其他可能的通信技术中的至少一种。
例如,以下提供一种传输方式选择策略的方案:
1.对部署关系为同主机同POD(同一租户针对同一业务的关联容器组称为POD)部署的应用采用共享内存的传输方式。
2.对部署关系为同主机不同POD部署的应用采用Domain-socket域通信(进程间通信方式)。
3.对部署关系为同DC(Date Centre数据中心)内不同主机部署的应用采用RDMA传输通道的传输方式。
4.对部署关系为跨DC部署采用多路径mptcp(多径TCP),quic-multipath(QUIC协议的多径传输)。
5.无法识别部署关系的情况采用标准TCP\IP。
可见,上述的例子是应用间部署关系与传输方式之间的对应关系,以上几种方案中,主要用来表示应用间部署关系的,是两个应用所在节点的位置关系,并且,也兼顾了应用所在 节点的业务关系。
可以看到,图1中也包括了本发明实施例提出的,传输配置模块和全局配置节点。
正如图1中示意的,传输配置模块可以运行在物理机的操作系统(OS,Operating System),也可以运行在虚拟机的操作系统,甚至可以运行在容器中。需要说明的是,虽然容器没有完全独立于寄主的操作系统,但是容器技术却使容器中有虚拟化出的供该容器使用的操作系统层(operating system layer),该操作系统层也可以认为是该容器所在宿主的操作系统的副本,用于提供该容器中运行的应用的使得容器能够与主机的操作系统隔离,容器中的应用可以认为运行在容器的操作系统层中。
为了描述方便,物理机、虚拟机、容器以及其他具有操作系统且可以进行通信的装置,可以统称为节点。
另一方面,本申请的实施例并不限定该传输配置模块在节点中的部署的具体方式。传输配置模块部署后没有必要频繁地改变位置或者重启。传输配置模块可以基于节点的存储资源,如内存或者硬盘等,来存储应用的部署信息,以及传输方式选择策略。在一个组网内如何部署传输配置模块,即在多少个节点中运行该传输配置模块以及在哪些节点中运行该传输配置模块,本申请文件并不限制,可以灵活地设置实施方案。其中,主要考虑的是该实施方案对实现本申请文件中描述的应用交互方法的效率的影响,也就是由于执行该应用交互方法中,确定传输方式的过程,而在建立连接过程中产生的时延;以及该实施方案占用的操作系统的资源。具体的,传输配置模块在节点中分布得越少,每个传输配置模块要管理的节点中的应用的部署信息就越多,会增加节点间的传输负担,也会延长确定出传输方式的时间。例如传输配置模块可能要管理跨节点的应用的部署信息,这种信息收集同样也是两个应用之间的通信,这个过程默认使用TCP/IP协议。而另一方面,传输配置模块在节点中分布得越多,对该节点的操作系统资源和硬件资源占用也就越大,增加系统的开销。另一方面,传输配置模块越多,与全局配置节点的交互就越频繁,由于全局配置节点的运行环境比较复杂,通常部署在全域网,与传输配置模块间的通信跨局域网,故这种交互也会影响局域网的可靠性。因此,可以综合考虑网络可靠性、节点系统开销和方法的实现效率来决定传输配置模块的部署。
也就是说,例如,可以在部署有需要通信的应用的每个物理机运行一个传输配置模块,该传输配置模块管理该物理机以及该物理机上运行的虚拟机以及容器中运行的应用。也可以一个传输配置模块管理多台物理机的应用的部署信息,即一部分物理机上运行有该传输配置模块。类似的,可以在部署有需要通信的应用的每个虚拟机运行一个传输配置模块,也可以一部分虚拟机上运行传输配置模块。当然,也可以有的传输进程部署在虚拟机,有的部署在容器等。
而对于全局配置节点,也是一个节点,这个节点可以是一个服务器,实际上使用服务器是本申请中列举的一种实现方式,该全局配置节点是个功能性的命名。全局配置节点上保存有该全局配置节点所能覆盖(例如能够提供服务)的网络范围内的节点上运行的应用的部署信息,这些部署信息可以由一个进程或者应用或者容器或者虚拟机进行管理。也就是说,全局配置节点可以维护一网络范围内(如全域网,简称全局)的应用的部署信息,因此,只要能够实现这个功能,该全局配置节点可以是任意一个物理机或者虚拟机或者容器。该节点可以在全域网中,也可以在某一局域网中,该节点为物理机时,其中也可以运行虚拟机,也可以运行容器,该物理机上也可以运行除管理部署信息外的应用。该物理机上也可以同时部署传输配置模块,或者可以将该维护全局的应用的部署信息的进程或者应用作为该物理机上的传 输配置模块。当然,该全局配置节点也可以是该网络范围内的任意一个节点。该节点上也可以运行除管理部署信息的应用外的应用。换言之,一个物理机可以即是全局配置节点,又是个运行着用于执行业务的应用的业务节点。当然,一般来说,全局配置节点与业务节点不重合,因为对全局配置节点,无疑存储能力较为重要,这与一般的业务节点对处理能力较为看重的需求不同,对硬件的要求也不同。
以下结合图2描述一种应用交互系统,该系统中包括上述提及的全局配置节点,运行有第一应用的第一节点和运行有第二应用的第二节点,所述全局配置节点用于存储运行在所述应用交互系统中的多个应用的部署信息,所述部署信息包括应用所在节点的位置。图2中展示了这三者之间的交互过程:
所述第一节点用于根据所述第一应用的连接指令或者写指令向所述全局配置节点发送查询请求,所述连接指令表示所述第一应用请求与所述第二应用建立连接,所述写指令表示所述第一应用指示将待向所述第二应用传递的信息写入第一存储单元,所述查询请求用于查询所述第二应用的部署信息。
所述全局配置节点用于根据所述查询请求向所述第一节点发送查询到的所述第二应用的部署信息。
所述第一节点用于根据所述第一应用的部署信息、所述第二应用的部署信息以及传输方式选择策略,确定所述第一应用与所述第二应用之间信息的传输方式,其中,所述传输方式选择策略包括所述第一应用的部署信息、所述第二应用的部署信息以及所述传输方式的对应关系,或者,所述传输方式选择策略包括所述第一应用与所述第二应用之间的部署关系、以及所述传输方式的对应关系,所述第一应用与所述第二应用之间的部署关系包括所述第一节点的位置与所述第二节点的位置之间的关系。
所述第一节点用于向所述第二节点发送建链请求或者数据包,所述建链请求是根据所述传输方式处理所述连接指令得到的,所述数据包是根据所述传输方式以及所述写指令得到的。
所述第二节点根据接收到的所述建链请求或者所述数据包,确定所述传输方式。
所述第一节点与所述第二节点通过所述传输方式传输信息。
应理解,第一应用会下发连接指令或者写指令。连接指令表示所述第一应用请求与所述第二应用建立连接,写指令表示所述第一应用将待向所述第二应用传递的信息写入第一存储单元。该连接指令中可以包括第一应用的信息和第二应用的信息。写指令中可以包括该第一应用待写入的信息以及待写入的存储单元的标识。第一应用的信息可以包括该第一应用的标识,该标识可以是任何用于表示该第一应用的信息。如ID,如源地址等等中的至少一种。该第二应用的信息可以包括该第二应用的标识,该标识可以是任何用于表示该第二应用的信息。如ID,如目的地址等等中的至少一种。具体的,可以参考前文对部署信息的论述。
需要说明的是,第二节点接收到第一节点发送的连接请求或者数据包。一种方式下,第二节点可以根据该连接请求或者数据包的封装格式,来确定与第一节点间的传输方式。这种方式要求不同的传输方式下的连接请求或者数据包具有不同的封装格式。另一种方式下,第二节点可以根据该连接请求或者数据包的信息,确定出第一节点的信息(如标识),再使根据第一节点的信息和第二节点的信息通过第二节点中的传输配置模块,确定出第一节点和第二节点间的传输方式。
应理解,在一种实现方式下,在图2所示的系统中,在第一节点所在的第一物理机中,并未存储第二应用的部署信息。并且在这种实现方式下,全局配置节点与第一物理机不是相 同的物理机,第一物理机与第二节点所在第二物理机不是相同的物理机。但是,图2只是上文中描述的系统的一种实现方式,例如虽然图2将全局配置节点与第二节点画成两个框,但是全局配置节点可以与第二物理机是相同的物理机。实际上,第一节点、第二节点和全局配置节点,从实现上,可以两两在一个物理机上,甚至也可以三者都在一个物理机上。
在另一种实现方式中,全局配置节点可以和第一节点在相同的物理机上,或者,第一节点中保存有第二应用的部署信息(例如第一节点和第二节点是相同的节点,或者第二应用曾经与第一节点中的应用建立过连接),那么,第一节点就无需向全局配置节点查询该第二应用的部署信息。
在一种情况下,该第一节点通过该第一节点中运行的传输配置模块用于根据该第一应用的部署信息、第二应用的部署信息以及传输方式选择策略确定出通信的方式。其中,所述传输方式选择策略包括所述第一应用的部署信息、所述第二应用的部署信息以及所述传输方式的对应关系,或者,所述传输方式选择策略包括所述第一应用与所述第二应用之间的部署关系、以及所述传输方式的对应关系,所述第一应用与所述第二应用之间的部署关系包括所述第一节点的位置与所述第二节点的位置之间的关系;应理解,该第一节点中应存储有传输方式选择策略。
这样,请求建链的应用所在的节点可以根据要交互的两个应用的部署信息和传输方式选择策略,来确定出要交互的两个应用的传输方式,这样,可以更灵活地选择合适的传输方式,使得选择出的传输方式更匹配两个应用的部署情况,从而提高数据传输的效率等传输性能,避免因使用不恰当传输方式而带来的在传输信息过程中,对不必要的传输资源的浪费和数据传输效率的降低。
应理解,在全局配置节点上维护的应用的部署信息,是该全局配置节点所覆盖范围内的节点发送给全局配置节点的。这样,全局配置节点中就注册有该覆盖范围内的节点中运行的应用的信息。在一种实现方式中,是部署有传输配置模块的节点将该传输配置模块获得的应用的部署信息发送给全局配置节点的。
也就是说所述第一节点还用于,发送所述第一应用的部署信息到所述全局配置节点,以便在所述全局配置节点注册所述所述第一应用的部署信息。所述第二节点还用于,发送所述第二应用的部署信息到所述全局配置节点,以便在所述全局配置节点注册所述第二应用的部署信息。
这样,第一物理机和第二物理机只需要知道各自对应的节点中的应用的部署信息即可,减轻了维护部署信息的负担。而第一物理机和第二物理机将应用的部署信息发送给全局配置节点,也方便了管理,保证了应用部署信息的实时性。
在描述该应用交互系统中涉及到的各种名词和相应的技术细节,包括但不限于传输方式、部署信息、传输方式选择策略等等,可以参照前文的描述,这里不再赘述。
可以认为,全局配置节点和下文中提及的传输配置模块构成了一个管理网络中的应用的部署信息的系统。应理解,本申请实施例中描述的方法所适用的系统中,传输配置模块和全局配置节点在维护应用的部署信息方面。并没有明确的实质性区别。应理解,全局配置节点不要求存储实际的某个组网系统中全部的应用部署信息,或者该全局配置节点所覆盖的网络中全部应用的部署信息,例如有些系统应用无需通信。另一方面,本申请实施例中的全局配置节点在一个网络系统中可以有一个或者多个,每个全局配置节点管理该网络中一部分节点上应用的部署信息。
正如上文中所描述的,传输配置模块的功能包括可以得到一第一指令,通过处理该第一指令,该传输配置模块能够确定出该连接的传输方式。该第一指令可以就是上文中所述的连接指令或者写指令,也可以是根据该连接指令或者写指令生成的查询指令,该查询指令用于查询源端和对端的部署信息。而能完成上述功能,是由于传输配置模块根据连接请求中的信息,确定出该连接请求涉及的源端和对端应用的部署信息,甚至可以根据部署信息确定出源端和对端应用的部署关系,从而根据源端和对端的部署信息以及传输方式选择策略,或者部署关系和传输方式选择策略确定传输方式。这就要求该传输配置模块能够获得源端和对端的应用的部署信息。
下面结合图3,来描述一种实现方式下,运行的应用向传输配置模块注册,以及传输配置模块在得到连接请求后,确定出传输方式的过程。应理解,图3只是一个示意图。应理解,运行的应用向传输配置模块注册这个过程,不论源端和对端都需要完成(实际上,在注册过程中,还并不清楚该运行的应用将会是连接发起方还是接收连接请求方),才能够在涉及到该应用的建立连接的过程中去确定出相应的连接方。例如本申请实施例前文所述,在不能确定建立连接的两个应用的部署关系的情况下,默认使用TCP/IP协议。也就是说,为了实现本申请实施例的方法,涉及交互的应用信息的注册,应当在应用发起连接请求之前。也就是说,在C/S架构下,不论server还是client都需要注册。
如图3所示,运行的应用向传输配置模块注册,具体是通过向传输配置模块发送该应用的部署信息来完成,该部署信息正如前文所述的,例如可以包括该应用所在的节点的地址信息、该应用以及该应用所在节点的身份信息和该应用以及该应用所在节点的网络信息位置信息中的至少一种。在一种情况下,部署信息还可以描述该应用的进一步包括该应用所在节点的业务信息。本申请实施例对部署信息的具体形式不做不做限定。传输配置模块将该应用的标识和该应用的部署信息的映射关系存储起来,以完成注册。例如,该映射关系可以是个应用信息表。其中,应用的标识用于表示该应用,一般是应用建立连接所常用的一些形式如可以是应用的ID或者该应用对应的源地址或者该应用对应的端口等,本发明实施例不做限制。
而另一方面,在传输配置模块得到一第一指令后,会根据该第一指令中携带的该应用的信息和该连接的对端的应用的信息(例如两个应用的标识,对端应用的目的地址等,本申请实施例不做限定),查找出该应用的部署信息和对端的应用的部署信息。这样,传输配置模块就可以根据这些配置信息和预设的传输方式选择策略;或者根据这些配置信息确定出该应用与对端应用的部署关系,以及根据部署关系和预设的传输方式选择策略,确定出该连接的传输方式。在一种实现方式下,对端的应用的部署信息需要向全局配置节点查询才能得到。传输配置模块可以将得到的对端应用的部署信息存储到第三存储器(可以位于该传输进程所在的节点或者该节点对应的物理机上),以方便下次使用。在一种实现方式下,传输配置模块也可以将确定出的传输方式返回给下发连接请求的应用。
应理解,上述传输配置模块涉及到的存储的信息,如应用的部署信息,预设的存储策略等,可以存储在第二存储器和第三存储器中,该第二存储器和第三存储器可以是相同或者不同的存储器。例如该第二存储器用于存储与该配置模块同节点或者同物理机的应用的部署信息,该第三存储器用于存储其他节点上应用的部署信息等,本申请文件不做限定。该第二存储器和第三存储器是该传输配置模块可以访问得到的存储设备或者存储单元。例如该第二存储器可以和该传输配置模块在同一节点或者在同一物理机的不同节点或者在该传输配置模块可以直接远程访问的其他物理机,第三存储器类似。进一步的有关存储的部署信息的位置和 传输配置模块的位置之间的关系的说明,请参见上文的相关内容。第二存储器和第三存储器的具体形式本申请文件不做限定,例如第二存储器和第三存储器可以是该传输配置模块对应的缓存中,或者硬盘中,也可以存储在其他传输配置模块传输配置模块有权限访问的本地的存储空间中。
还需要说明的是,应用是通过API(Application Programming Interface,应用程序编程接口)传输配置模块实现信息的交互的。例如,该API可以是一套套接字socket的接口函数。这套接口函数中包括一个函数socket(),一种通用的技术中,socket()是这套函数中的第一个函数。该API可以是用户自行开发的,也可以是在现有的API基础上改进得到的。由于现有技术中,没有设置传输配置模块,应用通过接口函数,也自然无法与传输配置模块进行交互。故,一种实现方法是,改写套接字Socket的接口函数,使用重新定义的API。但是这样会与现有技术的API不兼容,对现有的应用版本不适用,要想让现有的应用版本支持重定义的API,还要修改应用或者需要操作应用的用户对应用进行编码,这显然很不方便,也增加了大量的开发成本。
因此,在一种实现方式下,可以改写套接字的这套接口函数对应的函数库,而不改变接口函数的形式。具体可以是改写函数库中的内容,或者将套接字的接口函数重定向(redirect)到改写后的函数库(即该接口函数跳转到改写后的函数库所在的存储位置)。例如,可以将改写后的函数库覆盖原先套接字函数对应的函数库,或者,将改写后的函数库存放在加载级别更高的操作系统目录中,使接口函数在执行过程中调用的是改写后的函数库中的代码以实现与原先不同的功能。这样,对应用来说,使用的接口函数没有变化,但接口函数调用的改进的库却改变了接口函数的功能,即将连接请求交给传输配置模块处理。
另外,由于传输配置模块要确定出合适的传输方式,以便连接请求可以通过该传输方式对应的协议的接口继续下发,本申请实施例中的节点需要支持多种传输协议的接口,也就是配置有用于实现多种传输方式的接口。由于应用在部署和运行中,难免涉及到程序人员的二次开发和维护,或者,不同应用的版本可能支持的接口形式不同,或者有些节点中的接口不是标准化的接口,故,在一种实现方式下,为了对应用层的应用隔离这多种接口的差异性,使得对上层应用的应用程序的开发变得更加简单和快捷,可以在应用的套接字中布置一个接口适配层,例如具体可以是通过一个函数指针,将不同技术的接口与统一形式的接口连接起来。
应理解,可以认为应用的套接字和接口适配层是应用的底层代码的一部分。也就是说,应用的套接字函数是应用底层的函数,本领域技术人员应明白,对应用底层的函数的调用,应用是不感知的。从功能上,也可以将套接字、套接字对应的函数库以及上文提及的可选的接口适配层视为本申请实施例提出的用于确定传输方式的模块,也就是下文装置中提及的指令传递模块。例如该指令传递模块可以称为nSocket模块。
本申请实施例还提供一种应用交互的方法,以下结合图4中第一应用和第二应用交互的过程,对该方法进行说明。图4对应的实施例中,第一应用和传输配置模块在一台物理机上。在该方法中使用到的前文说明过的名词,请参照前文叙述。例如标识、传输配置模块、第一指令、部署信息、部署关系、接口函数以及传输方式选择策略等等。
S401:传输配置模块接收第一指令,所述第一指令包括第一应用的标识与第二应用的标识。
关于标识的描述请参加前文。
一种实现方式下,所述第一指令为查询指令,所述查询指令用于查询所述第一应用的部署信息以及所述第二应用的部署信息,或者所述查询指令用于查询所述第一应用与所述第二应用之间的部署关系,或者所述查询指令用于查询所述第一应用与所述第二应用之间的传输方式。
也就是说查询指令只要最终可以使传输配置模块确定出两个应用间的传输方式即可,但查询指令本身可能用于查询的信息是与该传输方式相关的信息。
那么相应的,传输配置模块接收第一指令,包括:
所述传输配置模块通过套接字Socket的第一接口函数,接收所述查询指令,其中,所述第一接口函数所调用的函数库的内容被设置为,用于将所述第一应用下发的连接指令或者写指令处理为所述查询指令,以及将所述查询指令发送给所述传输配置模块处理以确定所述传输方式,所述连接指令表示所述第一应用请求与所述第二应用建立连接,所述写指令表示所述第一应用指示将待向所述第二应用传递的信息写入第一存储单元。
当然,传输配置模块也可以通过其他API接口,接收该查询指令,但是该API接口的功能与该第一接口函数类似。例如不通过默认的协议端口。而采用自创的接口,或者改变了现有接口的形式,那么需要通过对第一应用及第一应用所在的操作系统进行编程,改变现有技术中对第一应用下发连接请求的处理过程,使得该连接请求被该传输配置模块处理以确定出合适的传输方式。
应当理解,第一应用下发的是上述的连接指令或者写指令,这种情况下该接口函数或者其他接口需要能够将上述连接指令或者写指令处理成查询指令,以便于传输配置模块的使用。这样,传输配置模块功能就比较单一,比较轻量级,不用太复杂的处理过程,而对API的改进则相对较为复杂。
另一种实现方式下,所述第一指令为所述第一应用下发的连接指令或者写指令,所述连接指令表示所述第一应用请求与所述第二应用建立连接,所述写指令表示所述第一应用指示将待向所述第二应用传递的信息写入第一存储单元。
那么相应的,传输配置模块接收第一指令,包括:所述传输配置模块通过套接字Socket的第一接口函数,接收所述连接指令或者所述写指令,所述第一接口函数所调用的函数库的内容被设置为,用于将所述第一应用下发的连接指令或者写指令发送给所述传输配置模块处理以确定所述传输方式。
应理解,上述两种实现方式下,第一接口函数的形式与现有技术中某一接口函数的形式相同,但是,该接口函数所调用的函数库的内容已被改写,具体的实现方式请参见前文。这样对上层的应用,例如第一应用,就不感知接口的变化,上层应用无需为适配接口做改动。该第一接口函数的形式与现有技术的接口函数形式相同,但功能发生了改变。例如该接口函数仍然是connect()。这样,一方面可以兼容现有的套接字的接口函数,一方面对第一应用和使用第一应用的用户来说,感知不到对该连接请求的处理有什么变化,使用更加方便,适用性更广。
当然,在一种实现方式下,传输配置模块也可以通过其他API接口接收该连接指令或者写指令,但是该API接口的功能与该第一接口函数类似。例如不通过默认的协议端口。而采用自创的接口,或者改变了现有接口的形式,那么需要通过对第一应用及第一应用所在的操作系统进行编程,改变现有技术中对第一应用下发连接请求的处理过程,使得该连接请求被该传输配置模块处理以确定出合适的传输方式。
应当理解,第一应用下发的是上述的连接指令或者写指令,这种情况下,相当于接口只是做了个转发,传输配置模块接收到的也是连接指令或者写指令,该传输配置模块需要能够将上述连接指令或者写指令处理成查询操作,以便于确定出传输方式。这样,传输配置模块功能就较为多样化,需要一定的指令转化和分析能力,而对API的改进则相对较为简单。
例如,该连接指令包括该第一应用的ID或者第一应用对应的源地址,以及该第二应用的ID或者第二应用对应目的地址。而写指令可包括该第一应用的标识,待写入数据以及目标地址(可以是第二应用的也可以是IO设备的),具体的对连接指令以及写指令的描述清参照前文。另一方面,对于写指令,就算是共享内存的方式,数据存储在一个存储单元里,第一应用通过一些信息或者结构(例如指针)指示该存储单元的地址,以及将该指针传递给第二应用,从而使第二应用根据该指针去读取该数据,从而完成第一应用与第二应用间的信息共享,那么,写指令中传输的数据就是那些信息或者结构(如指针)。
应当理解,第一应用下发连接指令,可以是在第一应用默认的传输方式为TCP/IP的场景下。第一应用下发写指令,可以是在第一应用默认的传输方式为UDP,或者共享内存等方式的场景下。
S403:所述传输配置模块根据所述第一指令,确定所述第一应用的部署信息与所述第二应用的部署信息,所述第一应用的部署信息包括所述第一应用所在的第一节点的位置,所述第二应用的部署信息包括所述第二应用所在的第二节点的位置。
应理解,第一应用所在的第一节点,一般是指直接承载该应用的节点,但是,如果传输方式选择策略中只考虑物理机粒度的策略,也可以是该应用所在的物理机。
在一种实现方式下,所述传输配置模块根据所述第一应用的标识,从第二存储器获得所述第一应用的部署信息;所述传输配置进程根据所述第二应用的标识,从第三存储器获得所述第二应用的部署信息,所述第三存储器为与所述第二存储器相同或不同的存储器;或者在所述第三存储器中未存储所述第二应用的部署信息的情况下,所述传输配置进程根据所述第二应用的标识,从全局配置节点获得所述第二应用的部署信息。
有关第二存储器和第三存储器的描述,请参见前文。
也就是说该传输配置模块可能需要从全局配置节点获取信息。这样传输配置模块就无需管理该方法适用范围内所有应用的部署信息,这种分布式的部署信息管理方法使得对部署信息的更新、管理和交互都更加简便,也节省存储资源。
本申请文件并不限制传输配置模块与全局配置节点的具体交互方法,现有的多种技术均可使用,例如可以通过发查询请求的方式。关于传输配置模块的处理过程,以及与全局配置节点的交互,可以参照前文的叙述。
S405:所述传输配置模块根据所述第一应用的部署信息、所述第二应用的部署信息以及传输方式选择策略,确定所述第一应用与所述第二应用之间信息的传输方式。
其中,所述传输方式选择策略包括所述第一应用的部署信息、所述第二应用的部署信息以及所述传输方式的对应关系。
或者,所述传输方式选择策略包括所述第一应用与所述第二应用之间的部署关系、以及所述传输方式的对应关系,所述第一应用与所述第二应用之间的部署关系包括所述第一节点的位置与所述第二节点的位置之间的关系。
具体的,传输方式选择策略存储在该传输配置模块对应的存储单元中,例如可以是前文提到的第二存储器和第三存储器,或者其他存储单元中。该传输方式选择策略中,可以包括 的对应关系有很多种,对应关系的具体形式本申请实施例也不做限制,例如可以是一个表。关于传输配置模块、传输方式选择策略的描述可以参照前文。
其中,所述第一应用所在的第一节点的位置包括所述第一应用的网络信息或者所述第一节点的网络信息或者所述第一应用所在节点的地址信息,所述第二应用所在的第二节点的位置包括所述第二应用的网络信息或者所述第二节点的网络信息或者所述第一应用所在节点的地址信息。应理解,在不同的场景下对应用所在节点的考量粒度不同,尤其是涉及到虚拟化场景后,因此,在不同传输方式选择策略中,第一节点可以对应不同的粒度(可以是承载该第一应用的容器,承载该容器的虚拟机,承载该虚拟机或容器的物理机中的一种),那么第一节点的位置也就可以是多种不同的参数,第二节点类似,具体的说明,请参见前文。
所述传输方式包括传输控制协议/因特网互联协议TCP/IP、用户数据报协议UDP、全称远程直接数据存取RDMA、共享内存、进程间通信(Domain_Socket)中的一种。
因此,部署关系中包括的第一节点和第二节点间的位置关系,也可以是多种粒度的,例如物理机与物理机间的位置关系,虚拟机间的位置关系等。具体粒度是可以根据不同的场景和需求来变化的。还可以进一步包括两个节点的业务关系。考虑的粒度越丰富,预设的传输方式选择策略中往往包括部署关系和传输方式的对应关系的种类越多,以便选出最合适的传输方式。应理解,部署关系要存储哪些内容应当是预先在使用该方法的系统中协商或设置好的。
具体的,一种实现方式下,所述第一节点为第一容器,所述第二节点为第二容器,所述传输配置模块根据所述第一应用的部署信息、所述第二应用的部署信息以及传输方式选择策略,确定所述第一应用与所述第二应用之间传输信息的传输方式,包括:
在所述第一容器与所述第二容器位于同一物理机,并且所述第一容器与所述第二容器属于相同的豆荚POD的情况下,所述传输配置模块确定第一应用与所述第二应用之间传输信息的传输方式为共享内存;在所述第一容器与所述第二容器为同一物理机,并且所述第一容器与所述第二容器属于不同的POD的情况下,所述传输配置模块确定第一应用与所述第二应用之间传输信息的传输方式为进程间通信(Domain_Socket)。
应当理解,传输配置模块确定出的传输方式后,该第一指令对应的连接指令或者写指令,可以进一步被分配到相应传输方式对应的接口进行处理,例如发送到目标设备(如I/O设备,存储设备等),或者向目标节点发送。
例如,所述传输配置模块确定出的传输方式为使用TCP/IP协议传输,那么按照TCP/IP协议,该连接指令会被该第一应用所在的节点(该节点部署在第一物理机上)使用所述TCP/IP协议,将所述连接指令封装为建链请求,以及向所述第二应用发送所述建链指令,也就是向该第二应用所在的第二物理机发送。
在一种实现方式下,第二应用接收到建链请求也要向第一应用发送响应报文,该响应报文为TCP/IP报文。也就是说,第二应用根据接收到的建链请求的格式确定出该连接使用的传输方式,并且会使用与建链请求相同的通信协议返回响应报文。接下来第一应用与第二应用之间传输信息,如业务数据,也会采用该TCP/IP协议。
S407:所述第一应用使用所述传输方式,向所述第二应用传输信息。
应理解,该传输的信息可以是在该写指令或者连接指令之后,后续向第二应用传输的信息。也可以是该写指令或者连接指令,因为从整体流程看,该写指令或者连接指令是第一应用通过该传输方式对应的接口向第二应用下发的。
在一种实施方式下,传输配置模块会向该第一应用返回确定出的传输方式。这样第一应用在后续的与第二应用的交互中,就可以使用该传输方式对应的接口,而无需再由传输配置模块进行决策了。当然,由于第一应用支持多种接口,第一应用应当根据返回的传输方式配置对应的接口。一种实现方式下,接口为套接字,则所述第一应用根据所述传输配置模块返回的所述传输方式,配置所述套接字中的接口函数;所述第一应用通过配置好的所述Socket中的第二接口函数,通过所述传输方式向所述第二应用发送信息。
应理解,由于不同的传输方式下,套接字中用于发送和接收信息(主要是交互的数据和指令)的接口函数不同。故第一应用会根据返回的传输方式,确定出发送和接收信息所对应的接口函数。上述第二接口函数就是确定出的用于发送信息的函数。
这样,通过对应用的连接请求的处理流程的改变,使用传输配置模块来处理第一指令,就可以根据要交互的两个应用的部署信息和传输方式选择策略,来确定出要交互的两个应用的传输方式,再使用该传输方式来传输信息。这样,可以更灵活地选择合适的传输方式,提高数据传输的效率等传输性能,避免因使用不恰当传输方式而带来的在传输信息过程中,对不必要的传输资源的浪费和数据传输效率的降低。
应理解,第一应用还可以将自己的部署信息注册到传输配置模块,这样传输配置模块就可以将其管理起来,例如保存该第一应用的标识与部署信息间的对应关系。这样在确定其他涉及该第一应用的连接的传输方式的过程中就可以使用。进一步的,传输配置模块还可以向全局配置节点发送该部署信息,分布于多个节点的传输配置模块和全局配置节点可以组成一个用于管理应用部署信息的系统。应理解,该系统内的传输配置模块之间,以及传输配置模块和全局配置节点之间的通信,默认使用TCP/IP协议。
另一方面,在本申请实施例所述的方法中,第二应用也可以向与第二应用对应的传输配置模块发送该第二应用的部署信息,与第二应用对应的传输配置模块具体可以是该第二应用的节点或者该第二应用的节点所在的物理机上的传输配置模块,以便该与第二应用对应传输配置模块将该第二应用的部署信息管理起来(如保存在对应的存储单元中)。进一步的该与第二应用对应的传输配置模块向全局配置节点发送所述第二应用的部署信息。其他说明请参照前文有关第一应用的部署信息的部分。
应理解,由于一个节点上部署有多个应用,那么本申请实施例的方法和系统还可以用在多传输方式并行传输的场景,也就是一个节点上可以有多个的应用使用不同的传输方式并行地与对端通信,能够更好地利用多传输路径的资源,减少原默认路径上的资源竞争,从而能够支持更多的应用并行地进行通信。
应理解,图4对应的实施例中的套接字、套接字中的接口函数,接口函数对应的函数库也就是前文所说的指令传递模块(即nSocket模块)的一部分。
关于图4对应的实施例的其他说明(例如对前文涉及到的名词或者场景的描述),请参见前文的记载,这里不再赘述。
下面结合图5,从C/S架构的角度,描述两个应用进行交互的过程。其中,一个应用称为client,为连接的发起端,一个应用称为server,为发起端的对端。图5描述的是默认传输方式为TCP/IP的交互过程。以及,图5将client和server的Ea画在了一起,因为并不知道client和server之间的部署关系,所以,图5可以理解为一个抽象的,client和server和具有Ea功能的模块的交互。应当理解,图5只是示意图,
例如对于用户发起的一个查询任务,查询语句的分解、数据显示可以使用布置在终端的 应用客户端完成;如果该数据存储在数据管理中心,则数据查询等任务需要通过布置在数据管理中心的服务器上的查询进程完成,而如果该数据存储在终端本地,则数据查询任务是通过运行在终端操作系统的读写进程进行处理的。这个例子中,布置在终端的应用客户端就是client,该查询进程或者读写进程就是server。
从上面的例子也可以理解,client和server其实是根据应用在执行某个任务中的角色来划分的,一个client可能在不同的任务中对应不同的server,而在一个任务中作为client的应用在另一个任务中可能就是作为server。
在一种实现方式下,可以认为是nSocket模块和Ea模块实现了确定传输方式的功能,其中,nSocket模块就是前文所说的指令传递模块,包括前文中提到的应用要调用的经过重定向的套接字接口函数、重定向后的套接字接口函数对应的函数库Lib_nSocket(用于为应用提供socket的接口函数)以及接口适配层。Ea模块就是上文所述的传输配置模块。server和client的Ea同属于Ea系统,该Ea系统就是上文所述的用于管理应用部署信息的系统。
以下具体说明在默认传输方式为TCP/IP协议的情况下,server、client与Ea交互,以实现通信的过程。在这个过程中,使用了经过重定向的套接字接口函数,但是套接字接口函数的函数名不变,这套接口函数仍然是符合通用的标准的,则对于server和client并不能感知到通信过程中接口函数的发生的变化,换言之,无需对server和client做改进以兼容这套经过重定向的套接字接口函数。
传输配置模块可以管理应用的配置信息。server在运行状态,调用经过重定向的套接字中的函数socket()以及bind(),完成在该server对应的Ea上的注册,例如可以是bind()将server的部署信息发送给Ea。具体的,server通过函数bind()绑定了端口(port),以及搜集server的部署信息,这些部署信息可以使Ea系统确定出要通信的server和client的部署关系。关于部署信息的描述,请参见前文的记载。例如对server的部署信息可以包括该server的ID信息、IP地址、所在的物理机地址、虚拟机地址、容器地址、监听的IP的地址、绑定的端口的信息等中的至少一种,具体实现及组合方式不做限定;对client的部署信息可以包括该server的ID信息、IP地址、所在的物理机地址、虚拟机地址、容器地址、使用的端口的信息等中的至少一种,具体实现及组合方式不做限定。
client也通过类似的方式在该client对应的Ea上完成注册。server通过套接字中的函数listen()进入监听建链消息的状态,该状态下可以对某IP地址以及端口的监听,也代表server可以接收来自其它应用的建链请求。client使用套接字中的函数connect()下发建链请求,该建链请求包括待建链的源地址和目的地址,由于函数connect()经过了重定向,其功能已发生改变,函数connect()使得该建链请求被转给Ea模块处理,可以理解为该函数connect()将该建链请求转化为一个用于查询部署关系的查询请求给Ea模块处理,Ea模块根据该查询请求,确定出client和server的部署关系(例如Ea模块可以根据目的地址查询出server的部署信息,具体可以是查询本地的部署信息或者向中央部署节点请求部署信息,该建链请求是client发送的,Ea模块也可以根据该建链请求中client的相关信息确定出client的部署信息),根据部署关系和Ea管理的传输方式选择策略确定出传输方式,client使用确定出的传输方式向server发送经过传输协议封装的建链请求。应理解,不同的传输方式,建立请求不同,client会使用确定出的传输方式对该建链请求中的信息进行封装后发送。例如,本实施例中,确定出的传输方式为TCP/IP传输,则该建链请求是TCP/IP报文。server解析接收到的该建链请求的格式,以确定出该连接要使用的传输方式,或者通过该建链请求中client的信 息,通过server对应的传输配置模块确定出该传输方式。例如本实施例中server可以根据该建链请求发送响应消息以建立连接(通过套接字的函数accept())。
至此,client和server都明确了该连接的传输方式,client确定符合该传输方式的send()及recv()簇接口函数,例如将支持默认传输方式的send()及recv()簇接口函数对应的内容重定向到支持确定出的传输方式的内容,其中,send()及recv()簇接口函数用于在建立连接后的传输过程收发数据。类似的,server端的nSocket模块收到client端发起的建链后,识别出最优传输方法并为server端的send()及recv()簇函数做重定向,同样选择适合本条链路的传输方式的接口函数实现。
应理解,send()簇函数包括多个用于执行发送功能的函数,其中的函数的具体形式可以是Send.xx()。类似的,recv()簇函数,包括多个用于执行接收功能的函数,其中的函数的具体形式可以是Recv.xx()。
应当理解,上述描述的过程由于包括了建链指令在Ea模块进行处理以确定传输方式的过程,连接的建立过程可能会比现有技术中使用默认的传输方式慢,但是,一方面,应用程序不关心建链阶段的传输性能,另一方面,由于确定出了合适的传输方式,在建链后的数据传输过程的传输性能(具体如数据传输的效率,避免不必要的网络资源浪费等)好于使用不合适的传输方式。
在另一种实现方式下,以下具体说明在默认传输方式为UDP(User Datagram Protocol,用户数据报协议)的情况下,server、client与Ea交互,以确定出合适的传输方式,以及使用该传输方式实现通信的过程。该过程与默认传输方式为TCP协议的情况类似,这里不再进行系统的介绍,相关内容请参见上文。但是,UDP为默认传输方式的情况下,只有bind()函数而没有connect()函数和listen()函数,在server和client使用bind()函数在各自对应的传输配置模块注册后,client是通过第一次使用的遵从UPD协议的send()函数(该send()函数已经被重定向),将向server发送的指令(该指令可以是写指令,包括要写的数据)转给Ea模块,以使该Ea模块确定出发送该请求使用的传输方式,以便client通过该传输方式将该请求发送给server。应理解,client和server后续的交互也将使用该传输方式,也就是说,client会根据该确定出的传输方式,将支持UDP协议的send()簇函数中的内容再次重定向到对应于该传输方式的内容,以便后续的交互中使用。另外,对默认支持UDP协议的recv()簇函数做类似的重定向,以重定向到对应于该传输方式的内容,以便后续的交互中使用确定出的传输方式。可以理解,在这一方面,该conncet()函数实现的是类似TCP协议中bind()函数的功能。类似的,server根据第一次接收到的报文所遵从的传输协议,对其send()簇函数和recv()簇函数的内容做重定向,以便后续的交互中使用确定出的传输方式。这样,不改变现有技术中套接字的API接口,通过重定向套接字的接口函数,实现对应用的连接请求的处理流程的改变,具体是使用nsocket模块和Ea模块来处理连接请求,就可以根据要交互的两个应用的部署信息和传输方式选择策略,来确定出要交互的两个应用的传输方式,再使用该传输方式来传输信息,这样,可以更灵活地选择合适的传输方式,提高数据传输的效率等传输性能,避免因使用不恰当传输方式而带来的在传输信息过程中,对不必要的传输资源的浪费和数据传输效率的降低。
图6所示的是一种用于应用交互的装置600,该装置包括传输配置模块601和指令传递模块602,
所述传输配置模块601用于接收第一指令,所述第一指令包括第一应用的标识与第二应 用的标识;根据所述第一指令,确定所述第一应用的部署信息与所述第二应用的部署信息,所述第一应用的部署信息包括所述第一应用所在的第一节点的位置,所述第二应用的部署信息包括所述第二应用所在的第二节点的位置;根据所述第一应用的部署信息、所述第二应用的部署信息以及传输方式选择策略,确定所述第一应用与所述第二应用之间信息的传输方式,其中,所述传输方式选择策略包括所述第一应用的部署信息、所述第二应用的部署信息以及所述传输方式的对应关系,或者,所述传输方式选择策略包括所述第一应用与所述第二应用之间的部署关系、以及所述传输方式的对应关系,所述第一应用与所述第二应用之间的部署关系包括所述第一节点的位置与所述第二节点的位置之间的关系;
所述指令传递模块602用于使用所述传输方式,传输所述第一应用待向所述第二应用传输的信息。
一种实现方式下,所述第一指令为查询指令,所述查询指令用于查询所述第一应用的部署信息以及所述第二应用的部署信息,或者所述查询指令用于查询所述第一应用与所述第二应用之间的传输方式。
相应的,在接收第一指令的方面,所述传输配置模块601用于通过套接字Socket的第一接口函数,接收所述查询指令,其中,所述第一接口函数所调用的函数库的内容被设置为,用于将所述第一应用下发的连接指令或者写指令处理为所述查询指令,以及将所述查询指令发送给所述传输配置模块处理以确定所述传输方式,所述连接指令表示所述第一应用请求与所述第二应用建立连接,所述写指令表示所述第一应用指示将待向所述第二应用传递的信息写入第一存储单元。
一种实现方式下,所述第一指令为所述第一应用下发的连接指令或者写指令,所述连接指令表示所述第一应用请求与所述第二应用建立连接,所述写指令表示所述第一应用指示将待向所述第二应用传递的信息写入第一存储单元。
相应的,在接收第一指令的方面,所述传输配置模块601用于通过套接字Socket的第一接口函数,接收所述连接指令或者所述写指令,所述第一接口函数所调用的函数库的内容被设置为,用于将所述第一应用下发的连接指令或者写指令发送给所述传输配置模块处理以确定所述传输方式。
一种实现方式下,所述装置还包括第二存储模块和第三存储模块,所述第三存储模块为与所述第二存储模块相同或不同的存储模块;所述在根据所述第一指令,确定所述第一应用的部署信息与所述第二应用的部署信息的方面,所述传输配置模块601用于根据所述第一应用的标识,从所述第二存储模块获得所述第一应用的部署信息;所述传输配置模块601根据所述第二应用的标识,从所述第三存储模块获得所述第二应用的部署信息,或者在所述第三存储模块中未存储所述第二应用的部署信息的情况下,所述传输配置模块根据所述第二应用的标识,从全局配置节点获得所述第二应用的部署信息。
一种实现方式下,所述第一应用所在的第一节点的位置包括所述第一应用的网络信息或者所述第一节点的网络信息或者所述第一应用所在节点的地址信息,所述第二应用所在的第二节点的位置包括所述第二应用的网络信息或者所述第二节点的网络信息或者所述第一应用所在节点的地址信息。
以及一种实现方式下,所述传输方式包括传输控制协议/因特网互联协议TCP/IP、用户数据报协议UDP、全称远程直接数据存取RDMA、共享内存、进程间通信(Domain_Socket)中的一种。
一种实现方式下,所述第一节点为第一容器,所述第二节点为第二容器,在根据所述第一应用的部署信息、所述第二应用的部署信息以及传输方式选择策略,确定所述第一应用与所述第二应用之间传输信息的传输方式的方面,所述传输配置模块601用于在所述第一容器与所述第二容器位于同一物理机,并且所述第一容器与所述第二容器属于相同的豆荚POD的情况下,确定第一应用与所述第二应用之间传输信息的传输方式为共享内存;以及在所述第一容器与所述第二容器为同一物理机,并且所述第一容器与所述第二容器属于不同的POD的情况下,所述传输配置模块确定第一应用与所述第二应用之间传输信息的传输方式为进程间通信(Domain_Socket)。
一种实现方式下,在使用所述传输方式,传输所述第一应用待向所述第二应用传输的信息的方面,所述指令传递模块602用于所述传输配置模块返回的所述传输方式,配置所述套接字中的接口函数;通过配置好的所述Socket中的第二接口函数,使用所述传输方式向所述第二应用传输信息。
一种实现方式下,所述传输配置模块601还用于接收所述第一应用发送的第二指令,所述第二指令包括所述第一应用的部署信息;将所述第一应用的部署信息保存在所述第二存储器中;以及向所述全局配置节点发送所述第一应用的部署信息。
综上,可以看出,图6对应的装置与上述方法实施例对应,与系统实施例中的第一节点对应,上述实施例中的说明以及前文的说明可以帮助解释装置600的实施细节,其中传输配置模块601就是前文所述的传输配置模块,指令传递模块602就是前文所述的nSocket模块,这样,通过传输配置模块601和指令传递模块602,实现对应用的连接请求的处理流程的改变,就可以根据要交互的两个应用的部署信息和传输方式选择策略,来确定出要交互的两个应用的传输方式,再使用该传输方式来传输信息,这样,可以更灵活地选择合适的传输方式,提高数据传输的效率等传输性能,避免因使用不恰当传输方式而带来的在传输信息过程中,对不必要的传输资源的浪费和数据传输效率的降低。
图6所示的装置的其他说明的细节,请参见前文的相关描述,此处不再赘述。
当然,前文中所述的第二节点,也可以包括类似的传输配置模块和指令传递模块,以采用前文所述的方法,确定出该第二节点上运行的第二应用与第一应用间的传输方式。主要是第二应用在一传输配置模块注册第二应用的部署信息,第二应用通过传输配置模块确定传输方式,以及第二应用通过指令传递模块接收或者发送向第一应用的信息。具体的,本领域技术人员可以参见前文的相关描述,这里不再赘述。
另一方面,图6所示的装置的一种具体实现形式如图7所示,图7所示的装置结构示意图,适用于上文中提及的第一节点、第二节点和全文部署节点。该装置包括处理电路702,以及与其连接的通信接口704。在一些情况下,还可以包括存储介质706。其中,处理电路702用于通过处理存储介质706中的代码,实现前文方法实施例中的应用交互方法。例如,前文中提及的传输配置模块,指令传递模块都可以通过处理电路702通过处理存储介质706中的代码实现。
其中,处理电路702用于处理数据,控制数据访问和存储,发出命令以及控制其它设备执行操作。处理电路702可以被实现为一个或多个处理器,一个或多个控制器和/或可用于执行程序等的其它结构。处理电路702具体可以包括通用处理器,数字信号处理器(DSP),专用集成电路(ASIC),现场可编程门阵列(FPGA)或其它可编程逻辑组件中的至少一种。应理解,在处理电路302为专用集成电路(ASIC),现场可编程门阵列(FPGA)或其它可编程逻辑组件的情况下,存储介质704可以与处理电路702集成在一起。通用处理器可以包括微处理 器,以及任何常规的处理器,控制器,微控制器,或状态机。处理电路702也可以实现为计算组件,例如DSP和微处理器的组合。
在一种实现方式下,该装置700为一种智能终端,如手机,该终端的处理电路包括应用处理器709和传输处理器710。
应理解,图7所示的只是一种实现方式下的示意图,这种情况下,该装置中具有独立于处理电路702存在的存储介质(例如存储器),存储介质与处理电路702以及通信接口704可以通过总线连接。例如服务器、手机终端等都适用这种情况,然而,应理解,在另一种实现方式下,处理电路702为专用集成电路(ASIC),现场可编程门阵列(FPGA)或其它可编程逻辑组件,存储介质可以与处理电路702集成在一起,与图中所示有所区别,例如一些路由器、网关、电力系统中的一些设备如电表等,就可以采取这种实现,本发明实施例不做限定。
存储介质706可以包括计算机可读存储介质,如磁存储设备(例如,硬盘,软盘,磁条),光存储介质(例如,数字多功能盘(DVD)),智能卡,闪存设备,随机存取存储器(RAM),只读存储器(ROM),可编程ROM(PROM),可擦除PROM(EPROM),寄存器,以及它们的任意组合。存储介质706可以耦合到处理电路702以使得处理电路702可读取信息和将信息写入到存储介质706。具体地,存储介质706可以集成到处理电路702,或者存储介质706和处理电路702可以是分开的。
该存储介质706中可以存储协议栈程序720,以及在该装置700上运行的应用的部署信息。
通信接口704可包括电路和/或程序以实现用户设备与一个或多个无线网络设备(例如,基站、服务器等)之间的双向通信。例如通信接口704可以是收发器,收发器可以包括一组具有接收功能的器件(如包括一组接口、一组天线和接收电路716中的至少一个),以及一组具有发送功能的器件(如另一组接口、一组天线和发射电路718中的至少一个);也可以是一组兼具接收功能和发送功能的器件(如一组接口或者一组天线)。一种实现方式下,通信接口704可以耦合到一个或多个天线(图7中未示出),并包括至少一个接收电路716和/或至少一个发射电路718。
图6对应的装置也可以通过另一种实现方式,例如图8示意的物理机来实现。图8所示的物理机,可以描述虚拟化场景下的应用交互装置。所述物理机包括硬件层,运行在所述硬件层之上的第一节点801以及传输配置模块802,所述第一节点801中运行有第一应用,所述第一节点801为运行在硬件层之上虚拟机或者容器,其中,
传输配置模块802用于接收第一指令,所述第一指令包括第一应用的标识与第二应用的标识;根据所述第一指令,确定所述第一应用的部署信息与所述第二应用的部署信息,所述第一应用的部署信息包括所述第一应用所在的第一节点801的位置,所述第二应用的部署信息包括所述第二应用所在的第二节点的位置;根据所述第一应用的部署信息、所述第二应用的部署信息以及传输方式选择策略,确定所述第一应用与所述第二应用之间信息的传输方式,其中,所述传输方式选择策略包括所述第一应用的部署信息、所述第二应用的部署信息以及所述传输方式的对应关系,或者,所述传输方式选择策略包括所述第一应用与所述第二应用之间的部署关系、以及所述传输方式的对应关系,所述第一应用与所述第二应用之间的部署关系包括所述第一节点801的位置与所述第二节点的位置之间的关系;所述第一节点801用于使用所述传输方式,向所述第二应用传输信息。
其中,硬件层81可以包括处理器811、物理内存812、硬盘813以及网络接口设备814,其中处理器811可以是一个,也可以是多个;网络接口设备814可以是网络适配器或网卡, 用于跟任何可连接的网络做连接,例如互联网(Internet)、企业网等。例如硬件层包括下文中提及的第二存储器,或者还包括下文中提及的第三存储器。
一种实现方式下,所述第一指令为查询指令,所述查询指令用于查询所述第一应用8011的部署信息以及所述第二应用的部署信息,或者所述查询指令用于查询所述第一应用8011与所述第二应用之间的部署关系,或者所述查询指令用于查询所述第一应用8011与所述第二应用之间的传输方式。
相应的,所述第一节点801还包括指令传递模块8012,所述指令传递模块8012用于将所述第一应用8011下发的连接指令或者写指令处理为所述查询指令,以及将所述查询指令发送给所述传输配置模块802处理以确定所述传输方式,所述连接指令表示所述第一应用8011请求与所述第二应用建立连接,所述写指令表示所述第一应用8011指示将待向所述第二应用传递的信息写入第一存储单元。
一种实现方式下,在接收第一指令的方面,所述传输配置模块802用于通过所述指令传递模块8012,接收所述查询指令。
相应的,所述第一指令为所述第一应用8011下发的连接指令或者写指令,所述连接指令表示所述第一应用8011请求与所述第二应用建立连接,所述写指令表示所述第一应用8011指示将待向所述第二应用传递的信息写入第一存储单元。
一种实现方式下,所述第一节点801还包括指令传递模块8012,所述指令传递模块8012用于将所述第一应用8011下发的连接指令或者写指令发送给所述传输配置模块802处理以确定所述传输方式,在接收第一指令的方面,所述传输配置模块802用于通过所述指令传递模块8012,接收所述连接指令或者所述写指令。
一种实现方式下,在根据所述第一指令,确定所述第一应用8011的部署信息与所述第二应用的部署信息的方面,所述传输配置模块802用于根据所述第一应用8011的标识,从所述硬件层的第二存储器获得所述第一应用8011的部署信息;所述传输配置进程根据所述第二应用的标识,从所述硬件层的第三存储器获得所述第二应用的部署信息,所述第三存储器为与所述第二存储器相同或不同的存储器;或者在所述第三存储器中未存储所述第二应用的部署信息的情况下,所述传输配置进程根据所述第二应用的标识,从全局配置节点获得所述第二应用的部署信息。
一种实现方式下,所述第一应用8011所在的第一节点801的位置包括所述第一应用8011的网络信息或者所述第一节点801的网络信息或者所述第一应用8011所在节点的地址信息,所述第二应用所在的第二节点的位置包括所述第二应用的网络信息或者所述第二节点的网络信息或者所述第一应用8011所在节点的地址信息。
一种实现方式下,所述传输方式包括传输控制协议/因特网互联协议TCP/IP、用户数据报协议UDP、全称远程直接数据存取RDMA、共享内存、进程间通信(Domain_Socket)中的一种。
一种实现方式下,所述第一节点801为第一容器,所述第二节点为第二容器,在所述第一容器与所述第二容器位于同一物理机,并且所述第一容器与所述第二容器属于相同的豆荚POD的情况下,所述传输配置模块802确定第一应用8011与所述第二应用之间传输信息的传输方式为共享内存;在所述第一容器与所述第二容器为同一物理机,并且所述第一容器与所述第二容器属于不同的POD的情况下,所述传输配置模块802确定第一应用8011与所述第二应用之间传输信息的传输方式为进程间通信(Domain_Socket)。
一种实现方式下,在所述第一应用8011使用所述传输方式,向所述第二应用传输信息的方面,所述第一节点801用于根据所述传输配置模块802返回的所述传输方式,配置所述指令传递模块8012;所述第一节点801通过配置好的所述指令传递模块8012,使用所述传输方式向所述第二应用传输信息。
一种实现方式下,所述第一节点801还用于向所述传输配置模块802发送第二指令,所述第二指令包括所述第一应用8011的部署信息;所述传输配置模块802还用于将所述第一应用8011的部署信息保存在所述第二存储器中;所述传输配置模块802还用于向所述全局配置节点发送所述第一应用8011的部署信息。
应理解,图8对应的实施例中传输配置模块802就是前文提及的传输配置模块,指令传递模块8012就是前文提及的指令传递模块。也可以看出,图8对应的物理机可以实现前文中方法实施例的方法。对图8对应实施例中的实现细节和名词解释,请参见前文对应内容的描述,此处不再赘述。
这样,通过传输配置模块801和指令传递模块8011,实现对应用的连接请求的处理流程的改变,就可以根据要交互的两个应用的部署信息和传输方式选择策略,来确定出要交互的两个应用的传输方式,再使用该传输方式来传输信息,这样,可以更灵活地选择合适的传输方式,提高数据传输的效率等传输性能,避免因使用不恰当传输方式而带来的在传输信息过程中,对不必要的传输资源的浪费和数据传输效率的降低。
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
所属领域的技术人员可以理解一个通信系统通常可包括比图2中所示的部件更少或更多的部件,或者包括与图2中所示部件不同的部件,图2仅仅示出了与本发明实施例所公开的实现方式更加相关的部件。例如,虽然图2中示出了第一节点和第二节点,但所属领域的技术人员可理解成一个通信系统可包含更多数量的节点。
以上对本发明实施例所提供的应用交互的方法、装置及系统进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。

Claims (39)

  1. 一种应用交互方法,其特征在于,所述方法包括:
    传输配置模块接收第一指令,所述第一指令包括第一应用的标识与第二应用的标识;
    所述传输配置模块根据所述第一指令,确定所述第一应用的部署信息与所述第二应用的部署信息,所述第一应用的部署信息包括所述第一应用所在的第一节点的位置,所述第二应用的部署信息包括所述第二应用所在的第二节点的位置;
    所述传输配置模块根据所述第一应用的部署信息、所述第二应用的部署信息以及传输方式选择策略,确定所述第一应用与所述第二应用之间信息的传输方式,其中,所述传输方式选择策略包括所述第一应用的部署信息、所述第二应用的部署信息以及所述传输方式的对应关系,或者,所述传输方式选择策略包括所述第一应用与所述第二应用之间的部署关系、以及所述传输方式的对应关系,所述第一应用与所述第二应用之间的部署关系包括所述第一节点的位置与所述第二节点的位置之间的关系;
    所述第一应用使用所述传输方式,向所述第二应用传输信息。
  2. 根据权利要求1所述的方法,其特征在于,所述第一指令为查询指令,所述查询指令用于查询所述第一应用的部署信息以及所述第二应用的部署信息,或者所述查询指令用于查询所述第一应用与所述第二应用之间的部署关系,或者所述查询指令用于查询所述第一应用与所述第二应用之间的传输方式。
  3. 根据权利要求2所述的方法,所述传输配置模块接收第一指令,包括:
    所述传输配置模块通过套接字Socket的第一接口函数,接收所述查询指令,其中,所述第一接口函数所调用的函数库的内容被设置为,用于将所述第一应用下发的连接指令或者写指令处理为所述查询指令,以及将所述查询指令发送给所述传输配置模块处理以确定所述传输方式,所述连接指令表示所述第一应用请求与所述第二应用建立连接,所述写指令表示所述第一应用指示将待向所述第二应用传递的信息写入第一存储单元。
  4. 根据权利要求1所述的方法,其特征在于,所述第一指令为所述第一应用下发的连接指令或者写指令,所述连接指令表示所述第一应用请求与所述第二应用建立连接,所述写指令表示所述第一应用指示将待向所述第二应用传递的信息写入第一存储单元。
  5. 根据权利要求4所述的方法,所述传输配置模块接收第一指令,包括:
    所述传输配置模块通过套接字Socket的第一接口函数,接收所述连接指令或者所述写指令,所述第一接口函数所调用的函数库的内容被设置为,用于将所述第一应用下发的连接指令或者写指令发送给所述传输配置模块处理以确定所述传输方式。
  6. 根据权利要求1至5任一权利要求所述的方法,其特征在于,所述传输配置模块根据所述第一指令,确定所述第一应用的部署信息与所述第二应用的部署信息,包括:
    所述传输配置模块根据所述第一应用的标识,从第二存储器获得所述第一应用的部署信息;
    所述传输配置进程根据所述第二应用的标识,从第三存储器获得所述第二应用的部署信息,所述第三存储器为与所述第二存储器相同或不同的存储器;或者在所述第三存储器中未存储所述第二应用的部署信息的情况下,所述传输配置进程根据所述第二应用的标识,从全局配置节点获得所述第二应用的部署信息。
  7. 根据权利要求1至6任一权利要求所述的方法,其特征在于,所述第一应用所在的第一节点的位置包括所述第一应用的网络信息或者所述第一节点的网络信息或者所述第一应用 所在节点的地址信息,所述第二应用所在的第二节点的位置包括所述第二应用的网络信息或者所述第二节点的网络信息或者所述第一应用所在节点的地址信息。
  8. 根据权利要求1到7任一权利要求所述的方法,其特征在于,所述传输方式包括传输控制协议/因特网互联协议TCP/IP、用户数据报协议UDP、全称远程直接数据存取RDMA、共享内存、进程间通信(Domain_Socket)中的一种。
  9. 根据权利要求1至8任一权利要求所述的方法,其特征在于,所述第一节点为第一容器,所述第二节点为第二容器,所述传输配置模块根据所述第一应用的部署信息、所述第二应用的部署信息以及传输方式选择策略,确定所述第一应用与所述第二应用之间传输信息的传输方式,包括:
    在所述第一容器与所述第二容器位于同一物理机,并且所述第一容器与所述第二容器属于相同的豆荚POD的情况下,所述传输配置模块确定第一应用与所述第二应用之间传输信息的传输方式为共享内存;
    在所述第一容器与所述第二容器为同一物理机,并且所述第一容器与所述第二容器属于不同的POD的情况下,所述传输配置模块确定第一应用与所述第二应用之间传输信息的传输方式为进程间通信(Domain_Socket)。
  10. 根据权利要求1到9任一所述的方法,其特征在于,所述第一应用使用所述传输方式,向所述第二应用传输信息,包括:
    所述第一应用根据所述传输配置模块返回的所述传输方式,配置所述套接字中的接口函数;
    所述第一应用通过配置好的所述Socket中的第二接口函数,使用所述传输方式向所述第二应用传输信息。
  11. 根据权利要求6到10任一权利要求所述的方法,其特征在于,所述方法还包括:
    所述第一应用向所述传输配置模块发送第二指令,所述第二指令包括所述第一应用的部署信息;
    所述传输配置模块将所述第一应用的部署信息保存在所述第二存储器中;
    所述传输配置模块向所述全局配置节点发送所述第一应用的部署信息。
  12. 一种用于应用交互的装置,其特征在于,所述装置包括传输配置模块和指令传递模块,
    所述传输配置模块用于接收第一指令,所述第一指令包括第一应用的标识与第二应用的标识;
    所述传输配置模块用于根据所述第一指令,确定所述第一应用的部署信息与所述第二应用的部署信息,所述第一应用的部署信息包括所述第一应用所在的第一节点的位置,所述第二应用的部署信息包括所述第二应用所在的第二节点的位置;
    所述传输配置模块用于根据所述第一应用的部署信息、所述第二应用的部署信息以及传输方式选择策略,确定所述第一应用与所述第二应用之间信息的传输方式,其中,所述传输方式选择策略包括所述第一应用的部署信息、所述第二应用的部署信息以及所述传输方式的对应关系,或者,所述传输方式选择策略包括所述第一应用与所述第二应用之间的部署关系、以及所述传输方式的对应关系,所述第一应用与所述第二应用之间的部署关系包括所述第一节点的位置与所述第二节点的位置之间的关系;
    所述指令传递模块用于使用所述传输方式,传输所述第一应用待向所述第二应用传输的信息。
  13. 根据权利要求12所述的装置,其特征在于,所述第一指令为查询指令,所述查询指令用于查询所述第一应用的部署信息以及所述第二应用的部署信息,或者所述查询指令用于查询所述第一应用与所述第二应用之间的传输方式。
  14. 根据权利要求13所述的装置,在接收第一指令的方面,所述传输配置模块用于通过套接字Socket的第一接口函数,接收所述查询指令,其中,所述第一接口函数所调用的函数库的内容被设置为,用于将所述第一应用下发的连接指令或者写指令处理为所述查询指令,以及将所述查询指令发送给所述传输配置模块处理以确定所述传输方式,所述连接指令表示所述第一应用请求与所述第二应用建立连接,所述写指令表示所述第一应用指示将待向所述第二应用传递的信息写入第一存储单元。
  15. 根据权利要求12所述的装置,其特征在于,所述第一指令为所述第一应用下发的连接指令或者写指令,所述连接指令表示所述第一应用请求与所述第二应用建立连接,所述写指令表示所述第一应用指示将待向所述第二应用传递的信息写入第一存储单元。
  16. 根据权利要求15所述的装置,在接收第一指令的方面,所述传输配置模块用于通过套接字Socket的第一接口函数,接收所述连接指令或者所述写指令,所述第一接口函数所调用的函数库的内容被设置为,用于将所述第一应用下发的连接指令或者写指令发送给所述传输配置模块处理以确定所述传输方式。
  17. 根据权利要求12至16任一权利要求所述的装置,其特征在于,所述装置还包括第二存储模块和第三存储模块,所述第三存储模块为与所述第二存储模块相同或不同的存储模块;所述在根据所述第一指令,确定所述第一应用的部署信息与所述第二应用的部署信息的方面,所述传输配置模块用于根据所述第一应用的标识,从所述第二存储模块获得所述第一应用的部署信息;
    所述传输配置模块根据所述第二应用的标识,从所述第三存储模块获得所述第二应用的部署信息,或者在所述第三存储模块中未存储所述第二应用的部署信息的情况下,所述传输配置模块根据所述第二应用的标识,从全局配置节点获得所述第二应用的部署信息。
  18. 根据权利要求12至17任一权利要求所述的装置,其特征在于,所述第一应用所在的第一节点的位置包括所述第一应用的网络信息或者所述第一节点的网络信息或者所述第一应用所在节点的地址信息,所述第二应用所在的第二节点的位置包括所述第二应用的网络信息或者所述第二节点的网络信息或者所述第一应用所在节点的地址信息。
  19. 根据权利要求12到18任一权利要求所述的装置,其特征在于,所述传输方式包括传输控制协议/因特网互联协议TCP/IP、用户数据报协议UDP、全称远程直接数据存取RDMA、共享内存、进程间通信(Domain_Socket)中的一种。
  20. 根据权利要求12至19任一权利要求所述的装置,其特征在于,所述第一节点为第一容器,所述第二节点为第二容器,在根据所述第一应用的部署信息、所述第二应用的部署信息以及传输方式选择策略,确定所述第一应用与所述第二应用之间传输信息的传输方式的方面,所述传输配置模块用于在所述第一容器与所述第二容器位于同一物理机,并且所述第一容器与所述第二容器属于相同的豆荚POD的情况下,确定第一应用与所述第二应用之间传输信息的传输方式为共享内存;以及在所述第一容器与所述第二容器为同一物理机,并且所述第一容器与所述第二容器属于不同的POD的情况下,所述传输配置模块确定第一应用与所述第二应用之间传输信息的传输方式为进程间通信(Domain_Socket)。
  21. 根据权利要求12到20任一所述的装置,其特征在于,在使用所述传输方式,传输所 述第一应用待向所述第二应用传输的信息的方面,所述指令传递模块用于根据所述传输配置模块返回的所述传输方式,配置所述套接字中的接口函数;通过配置好的所述Socket中的第二接口函数,使用所述传输方式向所述第二应用传输信息。
  22. 根据权利要求17到21任一权利要求所述的装置,其特征在于,所述传输配置模块还用于接收所述第一应用发送的第二指令,所述第二指令包括所述第一应用的部署信息;将所述第一应用的部署信息保存在所述第二存储器中;以及向所述全局配置节点发送所述第一应用的部署信息。
  23. 一种物理机,其特征在于,所述物理机包括硬件层,运行在所述硬件层之上的第一节点以及传输配置模块,所述第一节点中运行有第一应用,所述第一节点为运行在硬件层之上虚拟机或者容器,其中,
    传输配置模块用于接收第一指令,所述第一指令包括第一应用的标识与第二应用的标识;根据所述第一指令,确定所述第一应用的部署信息与所述第二应用的部署信息,所述第一应用的部署信息包括所述第一应用所在的第一节点的位置,所述第二应用的部署信息包括所述第二应用所在的第二节点的位置;根据所述第一应用的部署信息、所述第二应用的部署信息以及传输方式选择策略,确定所述第一应用与所述第二应用之间信息的传输方式,其中,所述传输方式选择策略包括所述第一应用的部署信息、所述第二应用的部署信息以及所述传输方式的对应关系,或者,所述传输方式选择策略包括所述第一应用与所述第二应用之间的部署关系、以及所述传输方式的对应关系,所述第一应用与所述第二应用之间的部署关系包括所述第一节点的位置与所述第二节点的位置之间的关系;
    所述第一节点用于使用所述传输方式,向所述第二应用传输信息。
  24. 根据权利要求23所述的物理机,其特征在于,所述第一指令为查询指令,所述查询指令用于查询所述第一应用的部署信息以及所述第二应用的部署信息,或者所述查询指令用于查询所述第一应用与所述第二应用之间的部署关系,或者所述查询指令用于查询所述第一应用与所述第二应用之间的传输方式。
  25. 根据权利要求24所述的物理机,其特征在于,所述第一节点还包括指令传递模块,所述指令传递模块用于将所述第一应用下发的连接指令或者写指令处理为所述查询指令,以及将所述查询指令发送给所述传输配置模块处理以确定所述传输方式,所述连接指令表示所述第一应用请求与所述第二应用建立连接,所述写指令表示所述第一应用指示将待向所述第二应用传递的信息写入第一存储单元。
    在接收第一指令的方面,所述传输配置模块用于通过所述指令传递模块,接收所述查询指令。
  26. 根据权利要求24所述的物理机,其特征在于,所述第一指令为所述第一应用下发的连接指令或者写指令,所述连接指令表示所述第一应用请求与所述第二应用建立连接,所述写指令表示所述第一应用指示将待向所述第二应用传递的信息写入第一存储单元。
  27. 根据权利要求26所述的物理机,其特征在于,所述第一节点还包括指令传递模块,所述指令传递模块用于将所述第一应用下发的连接指令或者写指令发送给所述传输配置模块处理以确定所述传输方式,在接收第一指令的方面,所述传输配置模块用于通过所述指令传递模块,接收所述连接指令或者所述写指令。
  28. 根据权利要求23至27任一权利要求所述的物理机,其特征在于,在根据所述第一指令,确定所述第一应用的部署信息与所述第二应用的部署信息的方面,所述传输配置模块 用于根据所述第一应用的标识,从所述硬件层的第二存储器获得所述第一应用的部署信息;所述传输配置进程根据所述第二应用的标识,从所述硬件层的第三存储器获得所述第二应用的部署信息,所述第三存储器为与所述第二存储器相同或不同的存储器;或者在所述第三存储器中未存储所述第二应用的部署信息的情况下,所述传输配置进程根据所述第二应用的标识,从全局配置节点获得所述第二应用的部署信息。
  29. 根据权利要求23至28任一权利要求所述的物理机,其特征在于,所述第一应用所在的第一节点的位置包括所述第一应用的网络信息或者所述第一节点的网络信息或者所述第一应用所在节点的地址信息,所述第二应用所在的第二节点的位置包括所述第二应用的网络信息或者所述第二节点的网络信息或者所述第一应用所在节点的地址信息。
  30. 根据权利要求23到29任一权利要求所述的物理机,其特征在于,所述传输方式包括传输控制协议/因特网互联协议TCP/IP、用户数据报协议UDP、全称远程直接数据存取RDMA、共享内存、进程间通信(Domain_Socket)中的一种。
  31. 根据权利要求23至27任一权利要求所述的物理机,其特征在于,所述第一节点为第一容器,所述第二节点为第二容器,在所述第一容器与所述第二容器位于同一物理机,并且所述第一容器与所述第二容器属于相同的豆荚POD的情况下,所述传输配置模块确定第一应用与所述第二应用之间传输信息的传输方式为共享内存;在所述第一容器与所述第二容器为同一物理机,并且所述第一容器与所述第二容器属于不同的POD的情况下,所述传输配置模块确定第一应用与所述第二应用之间传输信息的传输方式为进程间通信(Domain_Socket)。
  32. 根据权利要求23到31任一所述的物理机,其特征在于,在所述第一应用使用所述传输方式,向所述第二应用传输信息的方面,
    所述第一节点用于根据所述传输配置模块返回的所述传输方式,配置所述指令传递模块;
    所述第一节点通过配置好的所述指令传递模块,使用所述传输方式向所述第二应用传输信息。
  33. 根据权利要求28到32任一权利要求所述的物理机,其特征在于,所述第一节点还用于向所述传输配置模块发送第二指令,所述第二指令包括所述第一应用的部署信息;
    所述传输配置模块还用于将所述第一应用的部署信息保存在所述第二存储器中;
    所述传输配置模块还用于向所述全局配置节点发送所述第一应用的部署信息。
  34. 一种物理机,其特征在于,所述物理机用于应用交互,所述物理机包括处理器、存储器和收发器,所述处理器、所述存储器和通信接口间通过总线连接,所述通信接口用于通过执行所述存储器中的程序与其他设备收发信息,所述处理器用于通过运行所述存储器中的指令,以执行权利要求1到11所述的方法。
  35. 一种应用交互系统,其特征在于,所述系统包括第一节点,第二节点和全局配置节点,所述全局配置节点用于存储运行在所述应用交互系统中的多个应用的部署信息,所述第一节点运行有第一应用,所述第二节点运行有第二应用,所述部署信息包括应用所在节点的位置,其中,
    所述第一节点用于根据所述第一应用的连接指令或者写指令向所述全局配置节点发送查询请求,所述连接指令表示所述第一应用请求与所述第二应用建立连接,所述写指令表示所述第一应用指示将待向所述第二应用传递的信息写入第一存储单元,所述查询请求用于查询所述第二应用的部署信息;
    所述全局配置节点用于根据所述查询请求向所述第一节点发送查询到的所述第二应用的 部署信息;
    所述第一节点用于根据所述第一应用的部署信息、所述第二应用的部署信息以及传输方式选择策略,确定所述第一应用与所述第二应用之间信息的传输方式,其中,所述传输方式选择策略包括所述第一应用的部署信息、所述第二应用的部署信息以及所述传输方式的对应关系,或者,所述传输方式选择策略包括所述第一应用与所述第二应用之间的部署关系、以及所述传输方式的对应关系,所述第一应用与所述第二应用之间的部署关系包括所述第一节点的位置与所述第二节点的位置之间的关系;
    所述第一节点用于向所述第二节点发送建链请求或者数据包,所述建链请求是根据所述传输方式处理所述连接指令得到的,所述数据包是根据所述传输方式以及所述写指令得到的;
    所述第二节点根据接收到的所述建链请求或者所述数据包,确定所述传输方式;
    所述第一节点与所述第二节点通过所述传输方式传输信息。
  36. 根据权利要求35所述的系统,其特征在于,所述第一节点还用于,发送所述第一应用的部署信息到所述全局配置节点,以便在所述全局配置节点注册所述所述第一应用的部署信息。
  37. 根据权利要求35或36所述的系统,其特征在于,所述第二节点还用于,发送所述第二应用的部署信息到所述全局配置节点,以便在所述全局配置节点注册所述第二应用的部署信息。
  38. 根据权利要求35至37任一权利要求所述的系统,其特征在于,所述第一应用所在的第一节点的位置包括所述第一应用的网络信息或者所述第一节点的网络信息或者所述第一应用所在节点的地址信息,所述第二应用所在的第二节点的位置包括所述第二应用的网络信息或者所述第二节点的网络信息或者所述第一应用所在节点的地址信息。
  39. 根据权利要求35到38任一权利要求所述的系统,其特征在于,所述传输方式包括传输控制协议/因特网互联协议TCP/IP、用户数据报协议UDP、全称远程直接数据存取RDMA、共享内存、进程间通信(Domain_Socket)中的一种。
PCT/CN2017/105888 2016-12-30 2017-10-12 一种应用交互方法、装置、物理机及系统 WO2018120988A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
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 (2)

Application Number Priority Date Filing Date Title
CN201611264191.8 2016-12-30
CN201611264191.8A CN108287723B (zh) 2016-12-30 2016-12-30 一种应用交互方法、装置、物理机及系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/455,313 Continuation US10866846B2 (en) 2016-12-30 2019-06-27 Application interaction method, apparatus, and system, and physical machine

Publications (1)

Publication Number Publication Date
WO2018120988A1 true WO2018120988A1 (zh) 2018-07-05

Family

ID=62706796

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/105888 WO2018120988A1 (zh) 2016-12-30 2017-10-12 一种应用交互方法、装置、物理机及系统

Country Status (4)

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

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190179794A1 (en) * 2017-12-08 2019-06-13 Vmware, Inc. File system interface for remote direct memory access
CN110519379A (zh) * 2019-08-29 2019-11-29 泰康保险集团股份有限公司 基于微服务的请求处理方法及设备

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ES2786632T3 (es) * 2018-02-28 2020-10-13 Deutsche Telekom Ag Técnicas para la gestión de la política de protocolos de red de conectividad múltiple
CN109101342B (zh) * 2018-07-20 2020-07-10 北京百度网讯科技有限公司 分布式作业协调控制方法、装置、计算机设备及存储介质
CN109032806B (zh) * 2018-07-30 2021-05-14 华为技术有限公司 容器的服务调度方法和装置
US11818780B2 (en) * 2018-08-10 2023-11-14 Ipcom Gmbh & Co. Kg Communication system link establishment
CN109471736A (zh) * 2018-09-14 2019-03-15 叮联信息技术有限公司 事件信息不间断随机传递及实时共享方法
CN109491776B (zh) * 2018-11-06 2022-05-31 北京百度网讯科技有限公司 任务编排方法和系统
US10959137B2 (en) 2019-02-07 2021-03-23 Cisco Technology, Inc. Procedures for interaction between the radio controller and the subordinated base station
CN110311948B (zh) * 2019-05-17 2022-07-15 深圳致星科技有限公司 容器/容器组间的通信方法及基于此的容器云网络系统
CN112039824B (zh) * 2019-06-03 2022-08-26 上海哔哩哔哩科技有限公司 通信方法、系统、设备及计算机可读存储介质
US11388615B2 (en) * 2019-08-14 2022-07-12 Cisco Technology, Inc. Interaction between radio controller platform and third party applications
CN111835592B (zh) * 2020-07-14 2022-09-27 北京百度网讯科技有限公司 用于确定健壮性的方法、装置、电子设备及可读存储介质
CN113765867B (zh) * 2020-08-12 2023-05-12 北京沃东天骏信息技术有限公司 一种数据传输方法、装置、设备及存储介质
CN112087332B (zh) * 2020-09-03 2022-06-21 哈尔滨工业大学 一种云边协同下的虚拟网络性能优化系统
CN113923253A (zh) * 2021-10-12 2022-01-11 西安万像电子科技有限公司 一种虚拟机图像传输方法、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1477502A (zh) * 2002-08-23 2004-02-25 梁国恩 一种用于应用层软件的套接字工具
CN102137123A (zh) * 2010-01-25 2011-07-27 腾讯科技(北京)有限公司 实现移动终端上不同应用程序的进程之间通信的装置和方法
CN103347077A (zh) * 2013-07-03 2013-10-09 曙光信息产业(北京)有限公司 分布式文件系统的数据传输方法和装置
US20140372510A1 (en) * 2013-06-14 2014-12-18 Andrew T. Fausak Generic transcoding service for client-server communication

Family Cites Families (18)

* 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 (ko) * 2007-01-12 2009-01-09 삼성전자주식회사 통신 프로토콜 결정 방법 및 장치
CN101471953A (zh) * 2007-12-29 2009-07-01 中国移动通信集团公司 一种信息传送方法、系统及装置
US8429675B1 (en) * 2008-06-13 2013-04-23 Netapp, Inc. Virtual machine communication
US8739179B2 (en) * 2008-06-30 2014-05-27 Oracle America Inc. Method and system for low-overhead data transfer
CN102567121B (zh) * 2010-12-07 2015-10-07 中国电信股份有限公司 实现融合通信的方法和装置
CN102103526A (zh) * 2011-02-14 2011-06-22 博视联(苏州)信息科技有限公司 服务端和客户端间通过服务管理进行进程间通信的方法及系统
US9075643B2 (en) * 2012-01-23 2015-07-07 International Business Machines Corporation Automatically selecting optimal transport protocol in a cloud computing environment
JPWO2014171130A1 (ja) * 2013-04-17 2017-02-16 日本電気株式会社 情報処理システム、配備方法、処理装置、及び、配備装置
US10180852B2 (en) * 2013-06-04 2019-01-15 Vmware, Inc. High-performance processing in a virtualization environment
CN104794095B (zh) * 2014-01-16 2018-09-07 华为技术有限公司 分布式计算处理方法及装置
CN105208056B (zh) * 2014-06-18 2020-07-07 腾讯科技(深圳)有限公司 信息交互的方法及终端
US10749985B2 (en) * 2015-05-19 2020-08-18 Amazon Technologies, Inc. Custom communication channels for application deployment
CN105141603B (zh) * 2015-08-18 2018-10-19 北京百度网讯科技有限公司 通信数据传输方法及系统
CN105279027B (zh) * 2015-11-19 2018-09-18 浪潮(北京)电子信息产业有限公司 一种虚拟机部署方法及装置
CN106227567A (zh) * 2016-07-27 2016-12-14 北京金山安全软件有限公司 一种分享应用程序的方法、装置及电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1477502A (zh) * 2002-08-23 2004-02-25 梁国恩 一种用于应用层软件的套接字工具
CN102137123A (zh) * 2010-01-25 2011-07-27 腾讯科技(北京)有限公司 实现移动终端上不同应用程序的进程之间通信的装置和方法
US20140372510A1 (en) * 2013-06-14 2014-12-18 Andrew T. Fausak Generic transcoding service for client-server communication
CN103347077A (zh) * 2013-07-03 2013-10-09 曙光信息产业(北京)有限公司 分布式文件系统的数据传输方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3557412A4 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190179794A1 (en) * 2017-12-08 2019-06-13 Vmware, Inc. File system interface for remote direct memory access
US10706005B2 (en) * 2017-12-08 2020-07-07 Vmware, Inc. File system interface for remote direct memory access
CN110519379A (zh) * 2019-08-29 2019-11-29 泰康保险集团股份有限公司 基于微服务的请求处理方法及设备

Also Published As

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

Similar Documents

Publication Publication Date Title
WO2018120988A1 (zh) 一种应用交互方法、装置、物理机及系统
US11818647B2 (en) Containerized router with a generic data plane interface
CN111885075B (zh) 容器通信方法、装置、网络设备及存储介质
CN115362662B (zh) 智能网络接口卡的流量管理
US10841226B2 (en) Configuring service load balancers with specified backend virtual networks
US10708082B1 (en) Unified control plane for nested clusters in a virtualized computing infrastructure
US11743182B2 (en) Container networking interface for multiple types of interfaces
US8739179B2 (en) Method and system for low-overhead data transfer
US7965714B2 (en) Method and system for offloading network processing
US20220334864A1 (en) Plurality of smart network interface cards on a single compute node
US7751401B2 (en) Method and apparatus to provide virtual toe interface with fail-over
US10868856B2 (en) Network element and method of running applications in a cloud computing system
EP4307632A2 (en) Containerized router with virtual networking
CN116888940A (zh) 利用虚拟联网的容器化路由器
Papageorgiou et al. Dynamic M2M device attachment and redirection in virtual home gateway environments
WO2024037619A1 (zh) 一种基于云计算技术的虚拟实例创建方法和云管理平台
US20240031908A1 (en) Containerized router with a disjoint data plane
EP4075757A1 (en) A plurality of smart network interface cards on a single compute node
CN117675819A (zh) 用于云网络的数据通信方法和装置
CN117255019A (zh) 用于虚拟化计算基础设施的系统、方法及存储介质
CN118266195A (zh) 用于计算服务扩展位置处的受管第2层连接的虚拟网络接口
CN116846991A (zh) 网络应用数据转发方法及装置

Legal Events

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

Ref document number: 17885988

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2017885988

Country of ref document: EP

Effective date: 20190718