Information processing apparatus and method for controlling communication between containers and processes therein
By introducing communication units and storage units into the information processing device, the isolation problem of communication between the container and the host process is solved, a safe and reliable communication path is achieved, the complexity and security risks of embedded applications are reduced, and the program quality and manageability are improved.
Patent Information
- Application Number
- CN202110346123.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-04-08
- Filing Date
- 2021-03-31
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2041-03-31
AI Technical Summary
When building embedded applications using container-based virtualization technology, communication between the container and host processes requires reduced isolation to achieve hardware control. However, existing methods may lead to file deletion or OS setting changes, causing problems. In addition, the control hardware processes of the embedded system are not containerized, resulting in communication complexity and security risks.
By introducing a communication unit into an information processing device, including receiving, obtaining and sending units, using a storage unit to store the communication method, controlling the communication between the container and the process based on the received sending source and destination information, and adopting communication method conversion and destination address conversion, the security and reliability of the communication path are ensured.
It achieves secure and reliable communication between the container and the host process, reduces erroneous file writing and storage failures, improves program quality and manageability, prevents program complexity and malicious code intrusion, and enhances debugging observability.
Smart Images

Figure CN113496030B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an information processing device and a method for controlling communication between a container and a process in the information processing device. Background Art
[0002] An application is composed of one or more processes, called programs. Generally speaking, a single application rarely consists of a single process, and in most cases, processes are divided among each role. Therefore, communication between multiple processes is essential for running a single application. There are various methods for communicating between processes, including sockets and pipes, shared memory, message queues, etc., and processes running on the same machine communicate via the functions of the operating system (OS).
[0003] On the other hand, a technology called container-based virtualization has become more common. Container-based virtualization is a technology that runs a package that encapsulates an executable file of a process called a container and an environment (such as a library) in which the executable file runs in a virtual space that is isolated from the space in which typical processes run. Using such container-based virtualization, the server industry is tending to use containers to build systems for applications that are typically composed of groups of typical non-isolated processes. In the technology described in Japanese Patent Laid-Open No. 2016-173741, inter-process communication for typical process collaboration is replaced by inter-container communication, and inter-container communication is performed via network communication.
[0004] As mentioned above, when using container-based virtualization technology in server applications, essentially all processes can be containerized. On the other hand, when using container-based virtualization technology in embedded applications, processes that control hardware, which are unique to embedded systems, are typically not containerized and are configured as processes on the host. This is because containers (virtual machines) are isolated from the host, and it is essentially impossible to control the host's hardware from the container.
[0005] There are indeed methods that enable hardware control by reducing the isolation of the container and accessing the host. However, in container-based virtualization of the layer below the OS that is not virtualized, when accessing the host, files used by other containers may be accidentally deleted, OS settings may be changed, etc., and problems may arise. Therefore, this method is not desirable. Therefore, when building embedded applications using container-based virtualization technology, processes running on the host and processes running on the container coexist, making inter-process communication across the container and the host necessary.
[0006] However, in order to perform inter-process communication between the container and the host, a method of enabling access from the container to the host (in other words, a method of reducing the above-mentioned isolation) is necessary. However, since this may cause problems as described above, it is desirable not to generate a container with low isolation for each generated application, if possible. Summary of the Invention
[0007] An aspect of the present invention is to eliminate the above-mentioned problems of the conventional technology.
[0008] A feature of the present invention is to provide a technology capable of suppressing problems caused in inter-process communication from a container to a host and consolidating communication responsibilities.
[0009] According to a first aspect of the present invention, there is provided an information processing device, which includes at least one container constructed via container-based virtualization technology and at least one process constructed on a host as a physical machine, the information processing device including a controller comprising at least one processor and at least one memory, the controller being configured to serve as: a first storage unit, storing a communication method in association with a container or process of a sending source and a container or process of a sending destination; a communication unit, controlling communication between the container and the process, wherein the communication unit includes: a receiving unit, receiving data from the container or process of the sending source, the data including sending source information indicating the sending source, sending destination information indicating the container or process of the sending destination, and communication data; a first obtaining unit, referring to the first storage unit and obtaining a communication method for the communication data based on the sending source information and the sending destination information received by the receiving unit; and a sending unit, sending the communication data to the container or process of the sending destination according to the communication method obtained by the first obtaining unit.
[0010] According to a second aspect of the present invention, there is provided a method for controlling communication between a container and a process in an information processing device, the information processing device comprising at least one container constructed via container-based virtualization technology, at least one process constructed on a host serving as a physical machine, and a storage unit, the storage unit storing a communication method in association with a container or process of a sending source and a container or process of a sending destination, the method comprising: receiving data from a container or process of a sending source, the data comprising sending source information indicating the sending source, sending destination information indicating a container or process of a sending destination, and communication data; based on the sending source information and the sending destination information received in the receiving, referring to the storage unit and obtaining a communication method for the communication data; and sending the communication data to the container or process of the sending destination according to the communication method obtained in the obtaining.
[0011] Further features of the present invention will become apparent from the following description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
[0013] Figure 1 is a block diagram for describing a hardware configuration of an image forming apparatus according to a first example of the present invention.
[0014] Figure 2 is a block diagram for describing the configuration of firmware for operating the image forming apparatus according to the first example.
[0015] Figure 3 is a functional block diagram for describing a functional configuration of a communication container according to the first example.
[0016] Figure 4A and Figure 4B is a diagram illustrating an example of the configuration of a communication method conversion table according to the first example.
[0017] Figure 5 is a diagram illustrating an example of communication destination information according to the first example.
[0018] Figure 6 is a flowchart for describing communication from a container to a host process in the image forming apparatus according to the first example.
[0019] Figure 7 is a flowchart for describing communication from a host process to a container in the image forming apparatus according to the first example.
[0020] Figure 8 is a sequence diagram for describing the flow of processing when a user uses a remote UI to print data stored in an image forming apparatus according to the first example.
[0021] Figure 9 is a flowchart for describing communication from a container to a host process in an image forming apparatus according to a second example.
[0022] Figure 10 is a flowchart for describing a communication process from a host process to a container in an image forming apparatus according to a second example. DETAILED DESCRIPTION
[0023] Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the following examples are not intended to limit the scope of the present invention, and that not all combinations of aspects described in the following examples are necessarily required for the problem-solving means according to the present invention. Furthermore, the following examples will be described using an image forming apparatus of a multifunction peripheral as an example of an information processing apparatus according to the present invention.
[0024] First, container-based virtualization will be described, as this understanding will be important when describing the examples. Container-based virtualization is a technology that runs a package in a virtual space isolated from a typical process running on a physical machine via the functionality of Linux (registered trademark), which encapsulates an executable file of a process called a container and the environment (e.g., a library) in which the executable file runs. Containers running in an isolated space in this manner are called virtual machines. Moreover, the physical machine running the container is called a host, and the process running on the host is called a host process. A specific example of a platform based on container virtualization is Docker (registered trademark). Alternatively, the functionality of Linux (registered trademark) can be used to create a platform. The platform based on container virtualization can be changed without departing from the essence of the present invention.
[0025] First example
[0026] Figure 1 1 is a block diagram for describing the hardware configuration of an image forming apparatus 101 according to a first example of the present invention. In the first example, the image forming apparatus 101 is a multifunction peripheral provided with a printer function, a scanner function, a data communication function, etc. However, the present invention is not limited to multifunction peripherals.
[0027] The image forming apparatus 101 includes a controller 102, a scanner 108, a printer 110, a FAX unit 112, a console unit 114, a finisher 116, and a NIC 118. NIC stands for network interface card. The image forming apparatus 101 may also be provided with other hardware. The scanner 108 optically reads the image of a document and outputs it as a digital image. The printer 110 outputs (prints) sheets, etc. based on the image data. The FAX unit 112 sends and receives digital image data via a telephone line, etc. The console unit 114 receives operations on the image forming apparatus 101 from the user and is provided with a touch panel or hard keys for displaying the processing status. The finisher 116 performs processing such as ejecting sheets, sorting, stapling, punching, cutting, etc. on sheets output from the sheet ejection unit of the printer 110 of the image forming apparatus 101. The NIC 118 connects the image forming apparatus 101 to a communication network LAN.
[0028] The controller 102 controls all operations of the image forming apparatus 101 to realize a printer function, a scanner function, and the like. The controller 102 includes a scanner interface (I / F) 107 for connection to the scanner 108, a printer I / F 109 for connection to the printer 110, and a FAX I / F 111 for connection to the FAX unit 112. The controller 102 is further provided with a console unit I / F 113 for connection to the console unit 114, a finisher I / F 115 for connection to the finisher 116, and a network I / F 117 for connection to the NIC 118. The NIC 118 is connected to the computer 119 via a LAN and receives information from the computer 119.
[0029] Further, the controller 102 is provided with a central processing unit (hereinafter referred to as a CPU 103) that executes software for operating the image forming apparatus 101; a RAM 104 that is a memory for storing data and the like for computation by the CPU 103; a ROM 105 that is a memory for storing firmware executed by the CPU 103; a storage device 106 for long-term data storage; and the like.
[0030] Examples of executable functions of the image forming apparatus 101 will be described below.
[0031] Copy function
[0032] Image data obtained by reading a document according to the scanner 108 is stored in the storage device 106 and printed using the printer 110.
[0033] Image transmission function
[0034] Image data obtained by reading a document according to the scanner 108 is transmitted to the computer 119 connected to the network via the NIC 118.
[0035] Image storage function
[0036] Image data obtained by reading a document according to the scanner 108 is stored in the storage device 106 and transmitted or printed as needed.
[0037] Image print function
[0038] For example, a page description language transmitted from the computer 119 connected to the network is analyzed and printed via the printer 110.
[0039] The console unit 114 is connected to the controller 102; is provided with a touch panel, a power saving button, a copy button, a cancel button, a reset button, a ten-key numeric keypad, a user mode key, and the like; and provides a user I / F (UI).
[0040] Figure 2 is a block diagram for describing a configuration of the firmware 201 for operating the image forming apparatus 101 according to the first example.
[0041] The CPU 103 of the image forming apparatus 101 performs various functions in accordance with the content of the firmware 201. The firmware 201 includes the container control module 203 and the communication container 202. The firmware 201 further includes application containers 221 to 225 each including an application 216 to 220 containerized by a container-based virtualization technology, which are executable by the image forming apparatus 101. The firmware 201 further includes control modules 204 to 209 that control hardware of the image forming apparatus 101 and device drivers 210 to 215.
[0042] For example, the copy application 216 is software for realizing a copy function of the image forming apparatus 101, and the copy container 221 is the containerized copy application 216. In a similar manner, the FAX container 222 is the containerized FAX application 217, and the print container 223 is the containerized print application 218. Also, the remote UI container 224 is the containerized remote UI application 219, and the web browser container 225 is the containerized web browser application 220. When the application containers 221 to 225 operate the hardware of the image forming apparatus 101, the application containers 221 to 225 communicate with the control modules 204 to 209 via the communication container 202.
[0043] The scanner control module 204 controls the scanner 108 using control functions provided by the scanner driver 210. In a similar manner, the print control module 205 controls the printer 110 using control functions provided by the printer driver 211. Also, the FAX control module 206 controls the FAX unit 112 using control functions provided by the FAX driver 212. The console unit control module 207 controls the console unit 114 using control functions provided by the console unit driver 213. The trimmer control module 208 controls the trimmer 116 using control functions provided by the trimmer driver 214. The network control module 209 controls the NIC 118 using control functions provided by the network driver 215.
[0044] The communication container 202 and the application containers 221 to 225 are managed by the container control module 203 in terms of activation, completion, stop, and the like.
[0045] In the first example, the control module that centrally controls containers, such as the container control module 203, is used. However, in other examples, the container control module 203 can not be provided, and activation, completion, stop, and the like of each application container can be separately performed. Also, Figure 2The number and types of processes shown are merely examples and are not intended to limit the scope of applicability of the present invention.
[0046] Figure 3 is a functional block diagram for describing the functional configuration of the communication container 202 according to the first example.
[0047] The communication container 202 includes a communication method conversion module 301, a destination address conversion module 302, a communication method conversion table 303, and communication target information 304. Note that in the first example, the communication container 202 is a container. However, as long as the communication method conversion and destination address conversion described below can be performed, a different configuration may be adopted.
[0048] The communication method conversion module 301 refers to the communication method conversion table 303 based on the transmission source information and destination information and changes the communication method. Furthermore, the communication method conversion module 301 converts the data format according to the change in communication method. The destination address conversion module 302 obtains the details used in the communication method converted by the communication method conversion module 301 from the communication target information 304. For example, when executing message queue communication, the destination address conversion module 302 obtains the message key, etc. In the first example, an embedded system is used, so the communication method conversion table 303 and communication target information 304 of the communication container 202 are known information. However, a system that can dynamically add and delete information may also be used.
[0049] Figure 4A and Figure 4B is a diagram illustrating an example of the configuration of the communication method conversion table 303 according to the first example.
[0050] The communication method conversion table 303 is a table for deriving the communication information 403 from the sending source information 401 and the destination information 402, and as indicated in the figure, the communication information 403 is associated with the sending source information 401 and the destination information 402 and stored. Note that the table is stored in the storage device 106, for example. Herein, the sending source information 401 and the destination information 402 are information such as a container ID, a process ID, a container name, a process name, and the like. Moreover, the communication information 403 is information of a communication method used in the communication from the communication container 202 to the containers 221 to 225 or the control modules (host processes) 204 to 209 indicated by the destination information 402. For example, in the case of communication from the copy container 221 to the scanner control module 204, information called socket communication is obtained. Moreover, for a path where communication such as from the copy container 221 to the FAX control module 206 is not performed, information indicating that it is not used (not used) is recorded. Note that in Figure 4A and Figure 4BIn the context of "Sockets," "Shared Memory" refers to creating a memory area on the server that can be accessed from other processes or containers and communicating via this memory area. "Message Queues" refer to communication via messages placed on queues.
[0051] Notice, Figure 4A The communication method conversion table 303 is illustrated in the case where the transmission source information 401 corresponds to the application containers 221 to 225 and the destination information 402 corresponds to the host processes 204 to 209. Figure 4B The communication method conversion table 303 is illustrated in a case where the transmission source information 401 corresponds to the host processes 204 to 209 and the destination information 402 corresponds to the application containers 221 to 225 .
[0052] The communication information 403 is information indicating a communication method used in communication from the communication container 202 to the containers 221 to 225 or the host processes 204 to 209 indicated by the destination information 402. Figure 4B As shown in FIG, in the case where the destination information 402 indicates a container, network communication is basically expected. In the case where all communication combinations use network communication, all communications may be converted to network communication and may not be stored. Figure 4B Communication method conversion table shown in .
[0053] Note that the communication from the transmission source to the communication container 202 is not particularly limited and can be freely selected without departing from the spirit of the present invention.
[0054] Figure 5 is a diagram illustrating an example of the communication target information 304 according to the first example.
[0055] Communication destination information 304 is used to obtain destination content 503 from transmission source 501 and destination 502. Destination content 503 can be obtained in various formats to accommodate communication between multiple processes. Note that destination content 503 can be embedded in communication method conversion table 303 and can be obtained all at once when converting communication information 403.
[0056] For example, Figure 4A As seen in FIG, the transmission from the copy container 221 to the scanner control module 204 is a socket communication. Thus, the content 503 of the destination indicates the path to the socket, for example, " / path / to / socket.sock". Moreover, as Figure 4A As seen in FIG, the transmission from the FAX container 222 to the FAX control module 206 is to the shared memory. Thus, the content 503 of the destination indicates the shared memory address. In addition, as Figure 4AAs seen in FIG, the transmission from the remote UI container 224 to the print control module 205 is message queue. Thus, the content 503 of the destination indicates the message queue key information (msgKey).
[0057] Figure 6 is a flowchart for describing communication from a container to a host process in the image forming apparatus 101 according to the first example.
[0058] When communicating from a container to a host process via the communication container 202, first, in step S601, the source container sends the following information to the communication container 202: source information 401, destination information 402, and the actual data to be sent. In this way, the communication container 202 receives the data. Note that a configuration in which the source information 401 is not included in this data configuration but is instead obtained when the communication container 202 establishes communication is also possible.
[0059] Next, the process advances to step S602, and the communication container 202 refers to the communication method conversion table 303 based on the data received in step S601 and determines the communication method.
[0060] Then, the process proceeds to step S603, and the communication container 202 refers to, for example, the transmission source information 401 and the destination information 402. Figure 5 The communication object information 304 of the destination is obtained and the content 503 of the destination is obtained. Next, the process advances to step S604, and the communication container 202 sends the communication data to the destination address corresponding to the content 503 of the destination (host process) obtained in step S603. In this way, communication from the container to the host process can be achieved.
[0061] Figure 7 is a flowchart for describing communication from a host process to a container in the image forming apparatus 101 according to the first example.
[0062] When communication is established from a host process to a container via the communication container 202, the source process first transmits the following information to the communication container 202: source information 401, destination information 402, and the actual data to be sent. In this manner, the communication container 202 receives the data. Note that a configuration in which source information 401 is not included in this data configuration but is instead obtained when the communication container 202 establishes communication is also possible.
[0063] Next, the process proceeds to step S702, and the communication container 202 refers to the communication method conversion table 303 based on the data received in step S701 and determines the communication method. Figure 6 The processing is the same as step S602 in .
[0064] Then, the process proceeds to step S703, and the communication container 202 refers to, for example, the transmission source information 401 and the destination information 402. Figure 5 The communication target information 304 is obtained and the contents 503 of the destination (container) are obtained. Next, the process advances to step S704, and the communication container 202 sends the communication data to the destination address corresponding to the contents 503 of the communication target container obtained in step S703. In this way, communication from the host process to the container can be achieved.
[0065] Figure 8 is a sequence diagram for describing the flow of processing when a user uses the remote UI to print data stored in the image forming apparatus 101 according to the first example.
[0066] The user uses the computer 119 to access the image forming apparatus 101 from an external network and uses the remote UI application (App) 219. At this stage, first, in step S801, the user uses the computer 119 to perform a print operation. Consequently, in step S802, the computer 119 transmits operation information to the image forming apparatus 101 via the network. Then, in step S803, the NIC 118 of the image forming apparatus 101 receives the operation information transmitted in step S802. Next, in step S803, the network control module 209 is notified of the received operation information.
[0067] Next, in step S804, the network control module 209 generates data for transmitting the notified operation information to the remote UI app 219. Then, in step S805, the network control module 209 transmits the operation information to the communication container 202. Note that the data generated in step S804 is configured as follows: transmission source information 401, destination information 402, and actual data information to be transmitted. Specifically, in step S804, the network control module 209 generates data including the network control module 209 ID, the remote UI container 224 ID, print operation information, the location of the print data, and so on. Regarding the transmission source information 401, a configuration can be employed in which the transmission source information 401 is not included in this data configuration but is instead obtained when the communication container 202 establishes communication. Furthermore, the protocol can be in any format as long as it includes the data configuration.
[0068] Next, in step S806, the communication container 202 determines the communication method. The communication method is determined by referring to the communication method conversion table 303. Next, processing proceeds to step S807, and the communication container 202 performs destination address conversion. The communication target information 304 is used in the destination address conversion process. Specifically, the communication method from the network control module 209 to the remote UI container 224 is network communication. Therefore, the IP address, container ID, and other information of the destination container are obtained from the communication target information 304 and set for the destination address.
[0069] Thereafter, in step S808, the communication container 202 transmits the operation information to the remote UI App 219. The operation information is the operation information received in step S805.
[0070] Next, in step S809, the remote UI app 219 analyzes the operation information received in step S808. Then, in step S810, the remote UI app 219 transmits the print information to the print app 218. Consequently, in step S811, the print app 218 interprets the print information. Then, in step S812, the print app 218 generates data for communicating with the communication container 202. As described above, this data configuration includes: transmission source information 401, destination information 402, and the actual data to be transmitted. Specifically, it includes: the ID of the print container 223, the process ID of the print control module 205, and the print information. Then, in step S813, the print app 218 transmits the print control information generated in step S812 to the communication container 202.
[0071] In this manner, in step S814, the communication container 202 determines the communication method. Here, the transmission source is the print container 223, the destination is the print control module 205, and the communication method is socket communication. Then, in step S815, the destination address is converted. Specifically, the communication method from the print container 223 to the print control module 205 is socket communication. Therefore, the path to the print control module 205 (i.e., the destination) and other information are obtained from the communication target information 304 and set for the destination address.
[0072] Thereafter, in step S816, the communication container 202 transmits the print control information to the print control module 205. Consequently, in step S817, the print control module 205 retrieves the print data stored in the storage device 106. Then, in step S818, the print control module 205 controls the printer 110 to print according to the print data. As a result, in step S819, the product created by the printer 110 can be provided to the user.
[0073] According to the above first example, when the embedded application is constructed, the access authority to the host is not granted to the plurality of containers. This makes it possible to reduce or prevent problems such as writing on a wrong file, memory data failure, and the like, contributing to improvement of quality.
[0074] Moreover, because the communication roles are pooled, it is possible to prevent the program from becoming complex, which leads to improved manageability. Furthermore, the advantage of limiting the access path is that it improves program debugging observability.
[0075] Second Example
[0076] In the above first example, the communication is reliably established. However, in practice, depending on the state during operation, problems such as the object process or the container not being activated, the container or the process being invaded by malicious code, and the like can occur. Thus, a configuration including a retry mechanism or a mechanism for preventing access from non-objects can be employed.
[0077] Figure 9 is a flowchart for describing the communication from the container to the host process in the image forming apparatus 101 according to the second example. Note that, in Figure 9 , the steps that perform the same processing as in the flowchart of Figure 6 above are given the same reference numerals, and the description thereof is omitted.
[0078] First, in step S901, it is determined whether the communication container 202, which is a key component of the communication, is in a running state (operation state). In the case where it is determined that the communication container 202 is not in a running state, the processing advances to step S902, in which the communication container 202 is run (activated) or a process that performs the running control (for example, the container control module 203) is notified, and the processing advances to step S901. In the case where it is determined that the communication container 202 is in a running state, the processing advances to step S903. Figure 9 In , step S902 is performed by the container. Thus, it is possible to install other paths that are able to run from one container to another container (for example, docker.sock for communication with the Docker daemon dockerd in the case of Docker). Moreover, alternatively, a configuration in which all the containers are able to communicate with only the container control module 203 is conceivable.
[0079] In step S903, it is determined whether there is destination information (host process) in the communication method conversion table 303. In the case where there is no destination information in the communication method conversion table 303, the processing advances to step S907, in which the communication failure is notified to the source container, and the processing ends. Steps S903 and S907 contribute to improvement of the quality of the software by preventing unauthorized access.
[0080] Furthermore, in step S903, if it is determined that the destination information exists in the communication method conversion table 303, the process proceeds to step S904, and it is determined whether the destination process is activated. If it is determined that the destination process is not activated, the process proceeds to step S905, and the destination process is kicked (activated) or a process capable of start control is notified, and the process proceeds to step S904.
[0081] Next, in steps S603 and S604, the communication container 202 obtains the destination content 503 and sends the communication data to the obtained destination address. This enables communication from the container to the host process. The process then proceeds to step S906, where the communication completes and the source container is notified of the successful communication. This distinguishes it from the failure in step S907.
[0082] If the communication container 202 is not activated when communicating from the container to the host process, the container waits for activation before sending data to the communication container 202. Furthermore, if the destination process is not activated, the communication container 202 waits for that process to activate before sending data. This helps prevent the process from being compromised by malicious code due to the inactivity of the target process.
[0083] Figure 10 is a flowchart for describing the communication processing from the host process to the container in the image forming apparatus 101 according to the second example. Figure 10 In the above, execute Figure 7 and 9 The same processing steps in the flowchart are given the same reference numerals, and description thereof is omitted.
[0084] In step S1001, it is determined whether the destination container is activated. In the case where it is determined in step S1001 that the destination container is not activated, the process proceeds to step S1002, and the destination container is run (activated) or a process capable of execution control is notified, and the process proceeds to step S1001. Figure 10 In the example, step S1002 is executed by the host process. Therefore, it is conceivable that a path for communication with the container control module 203 is provided. Then, in step S1003, the host process at the source of the transmission is notified of the completion of the transmission. On the other hand, in step S1004, the host process at the source of the transmission is notified of the failure of the communication.
[0085] According to the second example, in addition to the advantages of the first example, when the destination process or destination container is not activated, data is sent after the process or container is activated, which helps prevent the container or process from being invaded by malicious code.
[0086] Other embodiments
[0087] The embodiments of the present invention may also be implemented by a computer that reads and executes computer-executable instructions (e.g., one or more programs) recorded on a storage medium (which may also be more fully referred to as a "non-transitory computer-readable storage medium") to perform the functions of one or more of the above-described embodiments and / or includes one or more circuits (e.g., application-specific integrated circuits (ASICs)) for performing the functions of one or more of the above-described embodiments, and by a method performed by a computer of the system or device, for example, by reading and executing computer-executable instructions from a storage medium to perform the functions of one or more of the above-described embodiments and / or controlling one or more circuits to perform the functions of one or more of the above-described embodiments. The computer may include one or more processors (e.g., a central processing unit (CPU), a microprocessing unit (MPU)), and may include a network of separate computers or separate processors to read and execute computer-executable instructions. Computer-executable instructions may be provided to the computer, for example, from a network or storage medium. The storage medium may include, for example, a hard disk, a random access memory (RAM), a read-only memory (ROM), a storage device of a distributed computing system, an optical disk (such as a compact disk (CD), a digital versatile disk (DVD), or a Blu-ray disk (BD)). TM ), flash memory devices, memory cards, etc.
[0088] Other embodiments
[0089] The embodiments of the present invention can also be implemented by the following method, that is, providing software (program) that performs the functions of the above-mentioned embodiments to a system or device through a network or various storage media, and the computer or central processing unit (CPU) or microprocessing unit (MPU) of the system or device reads and executes the program.
[0090] While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
Claims
1. An information processing device capable of running at least one container built using container-based virtualization technology and at least one process built on a host machine that is a physical machine, the information processing device comprising: Communication unit, which controls the communication between the container and the process; as well as a first storage unit storing a plurality of communication methods, wherein each communication method is stored in association with a container or process of a transmission source and a container or process of a transmission destination, and each communication method is used for communication from the communication unit to the transmission destination container or process, Wherein, the communication unit includes: a receiving unit that receives data from a container or process of a transmission source, the data including transmission source information indicating the transmission source, transmission destination information indicating a container or process of a transmission destination, and communication data; a first obtaining unit that refers to the first storage unit and obtains a communication method of the communication data used for communication from the communication unit to the transmission destination container or process indicated by the transmission destination information, based on the transmission source information and the transmission destination information received by the receiving unit; and A sending unit sends the communication data to the container or process of the sending destination according to the communication method obtained by the first obtaining unit.
2. The information processing apparatus according to claim 1, further comprising: a second obtaining unit for obtaining content of the transmission destination in association with the transmission source information and the transmission destination information; The sending unit sends the communication data to a destination address corresponding to the content of the sending destination.
3. The information processing apparatus according to claim 2, further comprising: A second storage unit stores the content of the transmission destination in association with the transmission source information and the transmission destination information, The second obtaining unit refers to the second storage unit and obtains the content of the transmission destination.
4. The information processing device according to claim 1, wherein: The communication method includes at least one of socket communication, message queue, communication via a memory area, or network communication. The information processing device according to claim 1 , wherein: In a case where the transmission destination information indicates a container, the communication method is network communication. The information processing apparatus according to claim 3 , wherein: In the case where the communication method is socket communication, the content is a path to the socket, in the case where the communication method is a message queue, the content is a message key, and in the case where the communication method is communication via a memory area, the content is an address of the memory area.
7. The information processing apparatus according to claim 1, wherein: In a case where the communication unit is not activated when the container and the process send data to the communication unit, the communication unit is activated.
8. The information processing apparatus according to claim 1, wherein: When the communication unit further transmits data from the container to the process, in a case where the process of the transmission destination is not activated, the process of the transmission destination is activated.
9. The information processing apparatus according to claim 1, wherein: When the communication unit further transmits data from the process to the container, in a case where the container of the transmission destination is not activated, the container of the transmission destination is activated.
10. The information processing apparatus according to claim 1, wherein: When the first obtaining unit cannot obtain the communication method of the communication data, the communication unit notifies a transmission source corresponding to the transmission source information of a communication failure and does not perform transmission based on the data received by the receiving unit.
11. A method for controlling communication between a container and a process in an information processing device, the information processing device being capable of running at least one container constructed via container-based virtualization technology and at least one process constructed on a host machine that is a physical machine, and comprising a communication unit that controls communication between the container and the process, and a storage unit that stores a plurality of communication methods, wherein each communication method is stored in association with a source container or process and a destination container or process, and each communication method is used for communication from the communication unit to the destination container or process, the method comprising: receiving data from a container or process of a transmission source, the data including transmission source information indicating the transmission source, transmission destination information indicating a container or process of a transmission destination, and communication data; referring to the storage unit and obtaining a communication method for the communication data used for communication from the communication unit to the transmission destination container or process indicated by the transmission destination information based on the transmission source information and the transmission destination information received in the reception; as well as The communication data is transmitted to the container or process of the transmission destination according to the communication method obtained in the obtaining.
Citation Information
Patent Citations
Method and apparatus for cross-process communication, and computer storage medium
US20130227587A1