[go: up one dir, main page]

CN103034545B - Communication means between communications framework based on ACE and method and functional module - Google Patents

Communication means between communications framework based on ACE and method and functional module Download PDF

Info

Publication number
CN103034545B
CN103034545B CN201210529682.6A CN201210529682A CN103034545B CN 103034545 B CN103034545 B CN 103034545B CN 201210529682 A CN201210529682 A CN 201210529682A CN 103034545 B CN103034545 B CN 103034545B
Authority
CN
China
Prior art keywords
functional module
configuration file
ace
module
communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201210529682.6A
Other languages
Chinese (zh)
Other versions
CN103034545A (en
Inventor
罗辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Feixun Data Communication Technology Co Ltd
Original Assignee
Shanghai Feixun Data Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201210529682.6A priority Critical patent/CN103034545B/en
Publication of CN103034545A publication Critical patent/CN103034545A/en
Application granted granted Critical
Publication of CN103034545B publication Critical patent/CN103034545B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses the communication means between a kind of communications framework based on ACE and method and functional module.This communications framework is included successively by bottom-up: operating system layer, ACE layer, podium level and application layer.Application layer includes the set of functional module;Podium level includes finger daemon and subprocess.The configuration file of finger daemon analytical capabilities module place process;Subprocess configuration file based on process carries out configuring with promoter process, and the configuration file of analytical capabilities module is to activate functional module, thus the communication being managed collectively between functional module by podium level.Because podium level the most directly participates in the data interaction between functional module, the most unified COM1 generating subprocess and informing purpose functional module, this avoid and use the intermediate server higher to memory space and processing speed requirement.Functional module need not be concerned about to be how to carry out data interaction to each other simultaneously, and therefore avoiding the communication failure rate caused because difference write by code increases.<!--1-->

Description

Communication framework and method based on ACE and communication method between function modules
Technical Field
The invention relates to data communication, in particular to an ACE (adaptive communication environment) -based communication method, a framework and a communication method among functional modules.
Background
In a modular programming method, a large program is generally divided into a plurality of functional modules according to functions, each functional module is a code set, and a plurality of functional modules can be combined to form a program segment, i.e. a function, by writing and debugging. In the same program, each functional module cannot be operated independently and must be matched with each other, so that data interaction and mutual calling among the functional modules are required. However, different functional modules may be written by different persons, and the writing level and style of programs are different among persons, which tends to increase the communication failure rate among the functional modules, thereby causing the programs to fail to execute their functions, and also causing difficulty in debugging, testing and maintenance. These problems are exacerbated when there are more functional modules within the program.
Furthermore, when the functional modules needing data interaction are located in different programs, in the inter-program communication process for realizing data interaction between application programs, if the application programs are loaded in the same terminal, the data interaction can be realized only through a certain channel; however, it is much more complicated if the application is loaded in a different terminal. Firstly, the programs can be realized only through a protocol between networks; secondly, different operating systems may be loaded in different terminals, for example, some terminals adopt a Windows operating system, and some terminals adopt a UNIX/Linux operating system, so that during the implementation of the functions of the application program, inter-process communication needs to be realized by crossing the operating systems.
Currently, JAVA and ace (adaptive communication environment) methods are commonly used in the industry to implement inter-process communication across operating systems. Among them, JAVA generally employs ACE if it needs to cross operating systems in the field of network management and application servers because of efficiency problems in handling binary and large capacity. Although the problem of cross-operating system communication can be solved by adopting the ACE, because each process may be located in different terminals or operating systems, the writing style and tools of codes are not uniform, so that the communication among the processes is easy to break down, and the debugging and solving difficulty after the break down is large.
In addition, there is also a method of using an intermediate server, such as a MTC server (machine type communications server), through which data that needs to be interacted with is forwarded, and programs do not know how the data is transmitted among themselves, nor do programs directly transmit the data among themselves. Although the method can avoid the operating system, the requirements on the storage space and the processing speed of the intermediate server are higher, and the processing method is more complex.
Disclosure of Invention
The invention aims to solve the technical problem of providing an ACE (adaptive communication environment) -based communication method, an ACE-based communication framework and an inter-functional-module communication method aiming at the defect that communication among functional modules is prone to failure in the prior art.
The technical scheme adopted by the invention for solving the technical problems is as follows: an ACE-based communication framework is provided, comprising in order from bottom up: an operating system layer, an ACE layer, a platform layer, and an application layer; wherein,
the application layer comprises a collection of functional modules;
the platform layer comprises a daemon process and a subprocess; the daemon process is used for analyzing a configuration file of a process where the functional module is located; the subprocess is used for configuring based on the configuration file of the process where the functional module is located so as to start the subprocess, analyzing the configuration file of the functional module, and activating the functional module based on the configuration file of the functional module, so that the communication among the functional modules is uniformly managed through the platform layer.
In an ACE-based communication framework according to an embodiment of the invention,
the configuration file of the process where the functional module is located comprises an IP and a port;
and the sub-process adopts the IP and the port as a communication port during the configuration.
In an ACE-based communication framework according to an embodiment of the invention,
the configuration file of the functional module comprises the ID of the functional module and a corresponding dynamic library;
the sub-process is used to load the dynamic library into its process space to activate the functional module.
The invention also provides an ACE based communication method, which comprises the following steps:
s110, the daemon process analyzes the configuration file of the process where the functional module is located;
s120, configuring the sub-process based on the configuration file of the process in which the functional module is located so as to start the sub-process;
s130, the sub-process analyzes the configuration file of the functional module to activate the functional module based on the configuration file of the functional module, so that the communication between the functional modules is uniformly managed through the platform layer.
In an ACE-based communication method according to an embodiment of the present invention,
when the configuration file of the process in which the functional module is located includes an IP and a port, in step S120, the sub-process uses the IP and the port as a communication port during the configuration.
In the ACE-based communication method according to the embodiment of the present invention, when the configuration file of the function module itself includes the ID of the function module and a corresponding dynamic library, in step S130, the sub-process loads the dynamic library into its process space to activate the function module.
The invention also provides a communication method between the functional modules, which comprises the following steps:
s210, the source function module sends a data transmission notice to the platform layer;
s220, the platform layer searches a subprocess where a target function module is located and a communication port of the subprocess;
and S230, based on the communication port of the subprocess where the destination functional module is located, the source functional module directly transmits data to the destination functional module.
In the communication method between functional modules according to an embodiment of the present invention,
in step S210, the source function module further sends the ID of the destination function module to the platform layer;
in step S220, the platform layer searches for the sub-process where the destination function module is located and the communication port of the sub-process according to the ID of the destination function module.
In the communication method between functional modules according to the embodiment of the invention, the platform layer is located between the operating system layer and the ACE layer.
In the communication method between functional modules according to the embodiment of the present invention, before the step S210, the method further includes the steps of:
s201, the platform analyzes a configuration file of a process where a function module is located; respectively configuring the sub-processes corresponding to the functional modules based on the configuration files of the processes where the functional modules are located so as to start the sub-processes; and the subprocess analyzes the configuration file of the functional module to activate the functional module.
The invention has the following beneficial effects: because the platform layer does not directly participate in the data interaction among the functional modules, the platform layer only performs unified configuration on the processes of the functional modules, so that the functional modules perform point-to-point direct data interaction according to a unified communication port, and the use of an intermediate server with higher requirements on storage space and processing speed is avoided. In addition, because the platform layer uniformly generates and manages the subprocess of the functional module, the functional module only needs to care about the specific function of the functional module and does not need to care about how data interaction is carried out between the functional module and the functional module, and therefore the coding of the functional module is simplified. Meanwhile, because the communication among the functional modules is uniform, the increase of the communication fault rate caused by the difference of code writing is avoided, and the debugging, testing, maintaining and fault positioning processes are simplified.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 illustrates a schematic structural diagram of an ACE-based communication framework in accordance with an embodiment of the present invention;
FIG. 2 illustrates a logical block diagram of the platform layer of FIG. 1 in accordance with an embodiment of the present invention;
FIG. 3 illustrates a flow chart for implementing an ACE-based communication method according to an embodiment of the present invention using the above communication framework;
fig. 4 shows a flow chart of a method of communication between functional modules according to an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Fig. 1 shows a schematic structural diagram of an ACE-based communication framework according to an embodiment of the present invention, and as shown in fig. 1, the communication framework sequentially includes, from bottom to top: an operating system layer, an ACE layer, a platform layer, and an application layer. The operating system layer includes, but is not limited to, Windows, Linux, and Unix. The application layer includes a collection of functional modules whose data interaction between the functional modules is at least partially through the ACE layer to enable data communication across operating systems. The data interaction among the functional modules at least partially passes through the platform layer, so that the communication among the functional modules can be uniformly managed through the platform layer, and the functional modules only need to care about the implementation of own specific functions and do not need to care about how the data interaction is carried out among the functional modules.
In particular, the functional modules may be located in the same program segment or in different program segments. The program segments may be loaded on different terminals or may be loaded on the same terminal. Wherein, the terminals may have different operating systems. In the process of implementing the above program segments, a plurality of program segments may share one process, each program segment may correspond to one process, or each program segment may have a plurality of processes.
For this purpose, a configuration file of the process in which the function module is located may be preset, and the IP and port (port) of the process are set in the configuration file. For example, in the configuration file of the first process, the IP of the configuration process is 172.16.161.249, and the port is 11000; the process includes two functional modules, namely a functional module "access" and a functional module "security", wherein the "access" and the "security" are names (names) of the functional modules. In the configuration file, one process comprises a plurality of functional modules, so that the functional module deployment and the code separation are realized, namely, the code does not need to be rewritten according to different deployments, and only the configuration file needs to be modified correspondingly.
In the configuration file of the second process, the IP of the configuration process 1 is 172.16.161.249, and the port is 11000; process 2 has an IP of 172.16.161.249 and a port of 12000. Wherein, the process 1 only comprises a functional module with the name of "access"; process 2 includes only one function called "security".
Fig. 2 is a logical block diagram of the platform tier of fig. 1, which includes a daemon process and a sub-process, as shown in fig. 2, according to an embodiment of the present invention. The daemon process analyzes the configuration file of the process where the functional module is located; the subprocess is configured based on the configuration file of the process where the functional module is located to start the subprocess, and the configuration file of the functional module is analyzed to activate the functional module based on the configuration file of the functional module, so that the communication between the functional modules is uniformly managed through the platform layer.
Fig. 3 shows a flow chart for implementing an ACE-based communication method according to an embodiment of the invention using the above communication framework, which communication method will be described in steps below.
S110, the daemon process analyzes the configuration file of the process where the functional module is located. Specifically, the daemon in the platform layer obtains the IP address and port of the sub-process that the daemon needs to pull up by analyzing the configuration file of the process in which the function module is located (referred to as the configuration file of the process for short), for example, by analyzing the configuration file of the second process, the daemon obtains that the IP of the sub-process 1 that needs to pull up is 172.16.161.249, the port is 11000, the IP of the sub-process 2 is 172.16.161.249, and the port is 12000. And after the analysis is finished, transmitting the obtained configuration file (including IP and port) of the process and the name of the functional module under the process to the sub-process.
And S120, configuring the sub-process based on the configuration file of the process in which the functional module is located to start the sub-process. Specifically, when the configuration file of the process includes an IP and a port, the sub-process uses the IP and the port as communication ports in the above configuration process. Still taking the configuration file of the second process as an example, at this time, the IP of sub-process 1 configured according to the configuration file of the process is 172.16.161.249, the port is 11000, the IP of sub-process 2 is 172.16.161.249, and the port is 12000.
S130, the subprocess analyzes the configuration file of the functional module to activate the functional module based on the configuration file of the functional module, so that the communication between the functional modules is uniformly managed through the platform layer. Specifically, after the sub-process is started or pulled up in step S120, the sub-process already knows the function modules it includes from the daemon process, so the configuration file of the function module itself (simply referred to as the configuration file of the function module) may include only the name, ID and corresponding dynamic library of the function module. For example, in the configuration file of the function module, the ID of the function module with the name "access" is set to be 1, and the corresponding dynamic library is "librocess"; the ID of the function module with the name "security" is set to 2, and the corresponding dynamic library is "libsecurity". It should be noted that, for the entire platform layer, the IDs of the function modules are assigned in a unified manner, one function module corresponds to one ID, and no duplication or sharing occurs between the IDs. At this point, the sub-process loads the dynamic library into its process space to activate the function module. For example, the sub-process 1 can activate the function module "access" after loading the dynamic library "liberty" into its process space. Because the promoter process and the activation function module are unified through the platform layer, the communication among the function modules can be managed uniformly through the platform layer.
To further illustrate the above ACE-based communication framework and method, fig. 4 shows a method for communication between function modules according to an embodiment of the present invention, in which the function module to be transmitted is set as a source function module, and the function module to receive data is set as a destination function module, and the method for transmitting data from the source function module to the destination function module will be described in steps below.
In step S201, the platform analyzes a configuration file of a process in which the function module is located; respectively configuring sub-processes corresponding to the functional modules based on the configuration files of the processes in which the functional modules are located to start the processes; the sub-process parses the configuration file of the functional module itself to activate the functional module. This step may be implemented, for example, using the ACE-based communication method described above through the ACE-based communication framework described above, to which reference is made in part or in whole to the above description of the ACE-based communication framework and communication method. Once this step is completed, the launched sub-process may then be used in subsequent steps.
Subsequently, in step S210, the source functional module sends a data transfer notification to the platform layer, informing the platform of the event that the data is ready to be sent and the destination functional module in the event. Preferably, the source function module also sends the ID of the destination function module to the platform layer.
In step S220, the platform layer searches for a sub-process where the destination functional module is located and a communication port of the sub-process. Wherein, the communication port comprises an IP address and a port of the subprocess. Preferably, the platform layer searches the sub-process where the destination functional module is located and the communication port of the sub-process according to the received ID of the destination functional module. Since the function modules correspond one-to-one to their IDs for the platform layer, the result of looking up the function modules by IDs is necessarily unique. Still taking the configuration file of the second process as an example, if the ID of the destination simulation function module is notified to be 2, the name of the function module is found to be "security", and the function module is located in the sub-process 2, the IP of the sub-process 2 is 172.16.161.249, and the port is 12000. The method for searching by adopting the ID simplifies the searching process while ensuring the searching accuracy.
And S230, directly transmitting the data to the destination functional module by the source functional module based on the communication port of the subprocess where the destination functional module is located. Still taking the example in step S220 as an example, the platform layer notifies the source function module of the IP and the port of the destination function module, and the source function module directly transmits the data to the destination function module with ID 2 in the sub-process having the IP and the port, thereby completing the data communication between the function modules.
It can be seen from the above that the platform layer does not directly participate in data interaction between the functional modules, and the platform layer only performs unified configuration on the subprocess where each functional module is located, and informs the source functional module of the subprocess where the destination functional module is located and the communication port where the subprocess is located. This avoids the use of intermediate servers that require high memory space and processing speed. Because the platform layer uniformly generates and manages the subprocess, the functional modules only need to care about the specific functions of the functional modules, and do not need to care about how data interaction is carried out among the functional modules, so that the coding of the functional modules is simplified. Meanwhile, because the unified communication among the functional modules is realized, the increase of the communication fault rate caused by the difference of code writing is avoided, and the debugging, testing, maintaining and fault positioning processes are simplified.
It will be understood that modifications and variations can be made by persons skilled in the art in light of the above teachings and all such modifications and variations are intended to be included within the scope of the invention as defined in the appended claims.

Claims (6)

1. An ACE-based communication framework comprising, in order from the bottom layer upwards: an operating system layer, an ACE layer, a platform layer, and an application layer; wherein,
the application layer comprises a collection of functional modules, and a plurality of or one functional module is arranged in the same process;
the platform layer comprises a daemon process and a subprocess; the daemon process is used for analyzing a configuration file of a process where the functional module is located; the subprocess is used for configuring based on the configuration file of the process where the functional module is located so as to start the subprocess, analyzing the configuration file of the functional module, and activating the functional module based on the configuration file of the functional module, so that the communication among the functional modules is uniformly managed through the platform layer.
2. The ACE based communication framework of claim 1,
the configuration file of the process where the functional module is located comprises an IP and a port;
and the sub-process adopts the IP and the port as a communication port during the configuration.
3. The ACE-based communication framework of claim 1 or 2,
the configuration file of the functional module comprises the ID of the functional module and a corresponding dynamic library;
the sub-process is used to load the dynamic library into its process space to activate the functional module.
4. An ACE based communication method, comprising the steps of:
s110, the daemon process analyzes a configuration file of a process where a functional module is located, and an IP address and a port of a subprocess which needs to be pulled up by the daemon process are obtained;
s120, configuring the sub-process based on the configuration file of the process in which the functional module is located so as to start the sub-process;
s130, the subprocess analyzes the configuration file of the functional module to activate the functional module based on the configuration file of the functional module, so that the communication between the functional modules is uniformly managed through a platform layer.
5. The ACE-based communication method according to claim 4, wherein when the configuration file of the process in which the function module is located includes IP and port, in the step S120, the sub-process adopts the IP and the port as communication ports in the configuration.
6. The ACE-based communication method according to claim 4 or 5, wherein when the configuration file of the function module itself includes the ID of the function module and a corresponding dynamic library, the sub-process loads the dynamic library to its process space to activate the function module in the step S130.
CN201210529682.6A 2012-12-10 2012-12-10 Communication means between communications framework based on ACE and method and functional module Expired - Fee Related CN103034545B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210529682.6A CN103034545B (en) 2012-12-10 2012-12-10 Communication means between communications framework based on ACE and method and functional module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210529682.6A CN103034545B (en) 2012-12-10 2012-12-10 Communication means between communications framework based on ACE and method and functional module

Publications (2)

Publication Number Publication Date
CN103034545A CN103034545A (en) 2013-04-10
CN103034545B true CN103034545B (en) 2016-08-03

Family

ID=48021468

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210529682.6A Expired - Fee Related CN103034545B (en) 2012-12-10 2012-12-10 Communication means between communications framework based on ACE and method and functional module

Country Status (1)

Country Link
CN (1) CN103034545B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103399541B (en) * 2013-07-22 2016-04-06 苏州有色金属研究院有限公司 The means of communication of Aluminum Strip Rolling process control systems
CN105468465A (en) * 2015-12-28 2016-04-06 深圳市科漫达智能管理科技有限公司 ACE based inter-process communication system and method
CN106815086B (en) * 2017-01-13 2020-04-14 邦彦技术股份有限公司 Communication control device based on Loongson platform
CN111901677B (en) * 2020-07-24 2022-08-02 海信视像科技股份有限公司 Method for uniformly controlling process starting and display equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739300A (en) * 2008-11-18 2010-06-16 中兴通讯股份有限公司 Method and system for inter-process communication of multimedia terminal
CN102137123A (en) * 2010-01-25 2011-07-27 腾讯科技(北京)有限公司 Device and method for realizing process-to-process communication of different application programs on mobile terminal
CN102722377A (en) * 2012-06-28 2012-10-10 上海美琦浦悦通讯科技有限公司 Network video application processing system based on adaptive communication environment (ACE) framework

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739300A (en) * 2008-11-18 2010-06-16 中兴通讯股份有限公司 Method and system for inter-process communication of multimedia terminal
CN102137123A (en) * 2010-01-25 2011-07-27 腾讯科技(北京)有限公司 Device and method for realizing process-to-process communication of different application programs on mobile terminal
CN102722377A (en) * 2012-06-28 2012-10-10 上海美琦浦悦通讯科技有限公司 Network video application processing system based on adaptive communication environment (ACE) framework

Also Published As

Publication number Publication date
CN103034545A (en) 2013-04-10

Similar Documents

Publication Publication Date Title
US11256539B2 (en) Task processing method, apparatus, and system based on distributed system
CN107241315B (en) Access method, device and computer-readable storage medium for bank gateway interface
CN108572845B (en) Upgrading method of distributed micro-service cluster and related system
CN113220431B (en) Cross-cloud distributed data task scheduling method, device and storage medium
CN113051245A (en) Method, device and system for migrating data
CN106953746A (en) Clustered node upgrade-system and method
CN109254765B (en) Timing task management method, device, computer equipment and storage medium
CN114244717A (en) Configuration method and device of virtual network card resources, computer equipment and medium
CN112346980B (en) Software performance testing method, system and readable storage medium
CN103034545B (en) Communication means between communications framework based on ACE and method and functional module
CN112860282A (en) Upgrading method and device of cluster plug-in and server
CN115328752B (en) Cluster simulation method and system for Kubernetes control plane test
CN106708573B (en) System and method for Hadoop cluster automatic installation
EP3724776A1 (en) Method, function manager and arrangement for handling function calls
CN113542387A (en) System publishing method, device, electronic equipment and storage medium
CN104951346A (en) Process management method for embedded system as well as system
CN108965403A (en) O&amp;M monitors establishment of connection method and terminal device
CN113934552A (en) Method and device for determining function code, storage medium and electronic device
CN111459510A (en) Cross-network operating system installation method and device, electronic equipment and medium
CN112256384A (en) Service set processing method and device based on container technology and computer equipment
CN111796906A (en) Container management method, device, equipment and storage medium
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
CN114697334B (en) Method and device for executing scheduling task
CN116820988A (en) High availability test method, device, equipment and medium for distributed middleware system
CN108574712B (en) Method and device for creating container service cluster

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
PP01 Preservation of patent right

Effective date of registration: 20180313

Granted publication date: 20160803

PP01 Preservation of patent right
PD01 Discharge of preservation of patent

Date of cancellation: 20210313

Granted publication date: 20160803

PD01 Discharge of preservation of patent
PP01 Preservation of patent right

Effective date of registration: 20210313

Granted publication date: 20160803

PP01 Preservation of patent right
PD01 Discharge of preservation of patent

Date of cancellation: 20240313

Granted publication date: 20160803

PD01 Discharge of preservation of patent
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160803

CF01 Termination of patent right due to non-payment of annual fee