[go: up one dir, main page]

CN113411231A - CORBA middleware communication delay performance optimization method - Google Patents

CORBA middleware communication delay performance optimization method Download PDF

Info

Publication number
CN113411231A
CN113411231A CN202110661523.0A CN202110661523A CN113411231A CN 113411231 A CN113411231 A CN 113411231A CN 202110661523 A CN202110661523 A CN 202110661523A CN 113411231 A CN113411231 A CN 113411231A
Authority
CN
China
Prior art keywords
server
communication
client
packet
communication delay
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.)
Pending
Application number
CN202110661523.0A
Other languages
Chinese (zh)
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.)
CETC 20 Research Institute
Original Assignee
CETC 20 Research Institute
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 CETC 20 Research Institute filed Critical CETC 20 Research Institute
Priority to CN202110661523.0A priority Critical patent/CN113411231A/en
Publication of CN113411231A publication Critical patent/CN113411231A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明提供了一种CORBA中间件通信时延性能优化方法,使用关键字oneway修饰客户端和服务端之间的通信接口,使该接口变为单向操作,即客户端发出请求后,CORBA中间件将调用请求转发给服务端应用进行处理,而客户端不需要等服务器端的应答,立即返回执行后续处理,通过计算丢包率和错包率验证该实现方法的可靠性。本发明在保证可靠传输的前提下,能够简化通信流程,提高通信效率,降低通信时延,此外,该方法实现简单,与操作系统实时性无关,而且与传输的数据类型无关,服务端收到的数据无丢包,无错包,通信可靠性有保障,该方法能够简化通信流程,降低通信时延。

Figure 202110661523

The invention provides a CORBA middleware communication delay performance optimization method. The keyword oneway is used to modify the communication interface between the client and the server, so that the interface becomes a one-way operation, that is, after the client sends a request, the CORBA intermediate The software forwards the call request to the server-side application for processing, and the client does not need to wait for the server-side response, and immediately returns to perform subsequent processing. The reliability of the implementation method is verified by calculating the packet loss rate and packet error rate. On the premise of ensuring reliable transmission, the present invention can simplify the communication process, improve the communication efficiency, and reduce the communication delay. In addition, the method is simple to implement, has nothing to do with the real-time performance of the operating system, and has nothing to do with the type of data transmitted, and the server receives the There is no packet loss, no error packets, and guaranteed communication reliability. The method can simplify the communication process and reduce the communication delay.

Figure 202110661523

Description

CORBA middleware communication delay performance optimization method
Technical Field
The invention relates to the field of radio middleware, in particular to a plurality of technologies such as middleware, an object-oriented development mode, an Interface Definition Language (IDL), a soft bus and the like. The invention utilizes the keyword oneway to modify the communication interface between the client and the server, can simplify the information interaction process of the CORBA middleware, and reduces the communication delay of the middleware on the basis of ensuring reliable transmission.
Background
CORBA middleware is an object-oriented middleware standard promulgated by the Object Management Group (OMG), a common service between operating systems and application software. The core of CORBA is an Object Request Broker (ORB), which encodes/decodes the message communicated between the client and the server to generate a format independent of the programming language, and completes the sending and receiving of the message through the default communication mechanism of ethernet, so that the client does not need to consider the physical location, implementation details and other contents of the server object, and can play a role of a soft bus shielding the differences of the processor, the operating system and the programming language. These characteristics allow CORBA to be adopted by the SCA specification and applied to software radio systems.
Due to the introduction of the middleware, the communication delay among the components in the software radio system is invisibly increased, and the communication efficiency of the software radio system is directly determined by the performance of the CORBA communication delay, so that how to reduce the CORBA middleware communication delay is the research focus of the invention.
At present, in the aspect of middleware time delay optimization, part of researchers adopt a thread pool, a priority mechanism and a global scheduling service to strengthen the management and control of system resources, and the method focuses on optimizing an operating system instead of optimizing a middleware communication process and is not suitable for an operating system with poor real-time performance, such as Linux; part of researchers adopt other communication mechanisms (such as RapidIO and the like) to realize CORBA middleware communication, the method is complex to realize, and the CORBA middleware based on non-Ethernet is not widely applied; some researchers have adopted simple types as much as possible for transmitted data from the perspective of encoding and decoding to improve the encoding and decoding rate, but the method is not suitable for application scenarios with more complex data transmission.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a CORBA middleware communication delay performance optimization method. In order to reduce the communication delay of the middleware, improve the operating efficiency of a software radio system and meet the requirement of high real-time performance, the invention analyzes the working principle of CORBA and provides a middleware communication delay performance optimization method based on keyword oneway.
The invention uses the keyword oneway to modify the communication interface between the client and the server, so that the interface becomes unidirectional operation, namely after the client sends a request, the CORBA middleware forwards the call request to the server for processing, and the client does not need to wait for the response of the server and immediately returns to execute the subsequent processing, thereby simplifying the communication flow and having more efficient information exchange. However, the reliability of the unidirectional operation cannot be guaranteed, and the reliability of the implementation method is verified by calculating the packet loss rate and the packet error rate.
The technical scheme adopted by the invention for solving the technical problem comprises the following steps:
[ step 1] define oneway operation;
modifying an interface for completing data communication between the client and the server by using the keyword oneway, and deleting the custom exception to obtain an IDL file;
step 2, verifying the feasibility of the implementation method;
mapping the IDL file into a required language by using an IDL interface generator to generate a corresponding root code file and a corresponding frame file; adding test codes in the root code file and the frame file, and compiling to generate an executable file;
running an executable file, starting a test thread, calling a communication interface to start testing, and recording GIOP (group operation protocol) messages of communication between a client and a server;
if the server does not send the Response message in the GIOP message to the client and the Response _ flags field of the Request message in the GIOP message is 00, the operation is an oneway operation, the realization method is feasible, and step 3 is executed; otherwise, executing step 1;
step 3, verifying the reliability of the implementation method;
the reliability is verified by calculating the packet loss rate and the packet error rate, and the specific steps are as follows:
starting a testing thread, calling a communication interface between a client and a server for N times, and counting the number N of received data packets at the server1And calculating packet loss rate LNCalculated as follows:
LN=(N-N1)/N*100% (1)
comparing whether the length of the data packet received by the server is equal to the length of the data packet sent by the client, comparing whether the content of the data packet received by the server is equal to the content of the data packet sent by the client, if the length is equal and the content is equal, the packet is a correct packet, otherwise, the packet is an error packet, and counting the number N of the error packets2Calculating the packet error rate WNCalculated as follows:
WN=N2/N*100% (2)
if there is no packet loss (i.e. L)N0%) and no error packets (i.e., W)N0%), indicating a reliable transmission, step 4 is performed; otherwise, skipping to execute the step 1;
step 4, calculating the communication time delay;
starting a test thread, calling a communication interface between a client and a server M times, and recording the time t for starting to call the communication interface1Recording the interface end time t after M times of calling2Calculating the communication time delay according to the formula (3):
DM=(t2-t1)/M (3)
obtaining a communication delay DM
In step 2, the languages include C, C + + and Java, and the IDL file is mapped to a corresponding language, and the C + + language is adopted in the present invention.
In order to improve the accuracy, the calling is required for multiple times, and the value range of N in the step 3 is N not less than 10000.
In order to improve the accuracy, the calling is required for multiple times, and the value range of M in the step 4 is M not less than 10000.
The method has the advantages that the communication interfaces of the client side and the server side of the middleware are modified by using the oneway keyword, so that the communication flow can be simplified, the communication efficiency is improved, and the communication time delay is reduced on the premise of ensuring reliable transmission.
The invention adopts the keyword oneway to modify the interfaces of the data communication between the client and the server, and deletes the custom exception, because CORBA adopts the default Ethernet TCP/IP protocol as the bottom layer transmission mechanism, the data received by the server has no packet loss and no error packet, and the communication reliability is ensured.
Drawings
FIG. 1 is a diagram of a one-way call.
Fig. 2 is a schematic diagram of a two-way call.
Fig. 3 is a schematic diagram illustrating message interaction between oneway operation client and server GIOP.
Fig. 4 is a schematic diagram of message interaction between the twoway operation client and the GIOP service end.
Fig. 5 shows the oneway operation Request message contents.
Fig. 6 shows the contents of the twoway action Request message.
Fig. 7 is a diagram illustrating middleware communication delay.
Fig. 8 is a diagram comparing 10000 oneway and twoway communication delays for calling the communication interface.
Detailed Description
The invention is further illustrated with reference to the following figures and examples.
The invention provides a middleware communication time delay optimization method based on keyword oneway, and takes omniORB as an example for testing and verification, wherein omniORB is a CORBA middleware product with wide application.
oneway is a key defined in the IDL specification that indicates that the operation is unidirectional. Fig. 1 and 2 are schematic diagrams of a one-way call and a two-way call. Compared with bidirectional calling, after the client side with unidirectional calling sends a request, the CORBA middleware forwards the calling request to the server side application for processing, and the client side does not need to wait for the response of the server side and immediately returns to execute subsequent processing, so that the transmission efficiency of information can be improved by using oneway keyword modification operation. However, if the unidirectional operation is executed, the client does not know whether the operation is normally called, and the reliability cannot be ensured.
[ step 1] define oneway operation
The invention defines a simple interface with the function name of pushPacket. The interface only realizes data transmission from the client to the server and has no other functions, the input parameter of the function is transmission test data, and the self-defined exception is ERROR _ BAD _ SIZE.
According to the IDL specification, the interface defaults to non-oneway operation (namely towway), adds oneway keywords in front of the pushPacket, and deletes self-defined exception to obtain an IDL file of the oneway operation.
[ step 2] verification of the feasibility of the method
The IDL file is mapped into a C + + language to generate a corresponding root code file and a corresponding frame file; adding test codes in the root code file and the frame file, and compiling to generate an executable file; and running the executable file, starting a test thread, calling a communication interface, and recording GIOP (group operation protocol) messages of communication between the client and the server.
Fig. 3 and 4 are schematic diagrams of message interaction between the oneway operation and the twoway operation client and the server GIOP. For the twoway operation, the client and server communicate as follows.
1) The client sends a LocateRequest message to the server;
2) after receiving the LocateRequest message, the server sends a LocateRely message to the client, and confirms that the appointed object request is accepted;
3) the client sends a Request message to the server, calls a communication interface and starts communication;
4) and the Response message sent by the server to the client represents whether the calling is successful or not.
For the oneway operation, the LocateRequest and LocateReply messages communicated between the client and the server are identical to towway, the Response _ flags field of the Request message is different from towway, and the biggest difference is that the oneway operation server does not send a Response message to the client.
Request messages of oneway operation and towway operation as shown in fig. 5 and 6, it is known from the frame format that the response _ flags field of the message indicates whether the operation is one oneway operation. oneway operation is 00 and twoway operation is 03, conforming to the frame format definition. The result shows that the implementation method for modifying the communication interface by using oneway is feasible.
[ step 3] verification of the reliability of the implementation method
Since the user-defined exception ERROR _ BAD _ SIZE is deleted, the reliability of the implementation method is verified by calculating the packet loss rate and the packet ERROR rate. The packet loss rate and the packet error rate can be calculated according to the equations (1) and (2), respectively.
The test results are shown in table 1, where table 1 is statistics of packet loss rate and packet error rate 10000 times by calling oneway operation interface.
Byte number/KB Packet loss rate Packet error rate
1 0% 0%
3 0% 0%
5 0% 0%
7 0% 0%
When N is 10000, data with different lengths (1KB, 3KB, 5KB, and 7KB) is transmitted, and there is no packet loss or no packet error. The N value is changed, and data with different lengths (1KB, 3KB, 5KB and 7KB) is sent, and the conclusion is the same. The result shows that the implementation method for modifying the communication interface by using oneway has no packet loss and no error packet, because the bottom layer adopts the communication protocol of TCP/IP, the calling of the operation is ensured to be reliable transmission.
Step 4, calculating the communication time delay. The middleware communication delay refers to the time required for the client and the server to complete a communication process (i.e., call a pushPacket interface), as shown in fig. 7. The communication delay can be calculated according to equation (3).
As shown in fig. 8, when M is 10000, data (for example, 1KB) with the same length is transmitted, and the communication interface is decorated with the keyword oneway, so that the communication delay can be effectively reduced. The same conclusion is reached by changing the data length (3KB, 5KB, 7KB) of the transmitted data. The result shows that the implementation method for modifying the communication interface by using oneway can reduce the communication delay by nearly 60 percent.

Claims (4)

1.一种CORBA中间件通信时延性能优化方法,其特征在于包括下述步骤:1. a CORBA middleware communication delay performance optimization method is characterized in that comprising the following steps: [步骤1]定义oneway操作;[Step 1] Define the oneway operation; 使用关键字oneway修饰客户端和服务端间完成数据通信的接口,并删去自定义异常,得到IDL文件;Use the keyword oneway to modify the interface between the client and the server to complete data communication, and delete the custom exception to get the IDL file; [步骤2]验证实现方法的可行性;[Step 2] Verify the feasibility of the implementation method; 利用IDL接口生成器将IDL文件映射为所需的语言,生成对应的根码文件和框架文件;在根码文件和框架文件中添加测试代码,编译生成可执行文件;Use the IDL interface generator to map the IDL file to the required language, and generate the corresponding root code file and framework file; add test code to the root code file and the framework file, and compile and generate executable files; 运行可执行文件,启动测试线程,调用通信接口开始测试,记录客户端和服务端通信的GIOP消息;Run the executable file, start the test thread, call the communication interface to start the test, and record the GIOP message communicated between the client and the server; 如果服务端不向客户端发送GIOP消息中的Response消息,而且GIOP消息中的Request消息的response_flags字段为00,则表明该操作为oneway操作,表明该实现方法可行,执行步骤3;否则,执行步骤1;If the server does not send the Response message in the GIOP message to the client, and the response_flags field of the Request message in the GIOP message is 00, it indicates that the operation is a oneway operation, indicating that the implementation method is feasible, and execute step 3; otherwise, execute step 3 1; [步骤3]验证实现方法的可靠性;[Step 3] Verify the reliability of the implementation method; 通过计算丢包率和错包率验证可靠性,具体步骤为:The reliability is verified by calculating the packet loss rate and packet error rate. The specific steps are: 启动测试线程,调用客户端与服务端通信接口N次,在服务端统计收到的数据包个数N1,并计算丢包率,丢包率LN按下式计算:Start the test thread, call the communication interface between the client and the server N times, count the number of received data packets N 1 on the server, and calculate the packet loss rate. The packet loss rate L N is calculated as follows: LN=(N-N1)/N*100% (1)L N =(NN 1 )/N*100% (1) 比较服务端收到的数据包长度是否与客户端发送的数据包长度相等,比较服务端收到的数据包内容是否与客户端发送的数据包内容相同,如果长度相等且内容相同,则该包为正确包,否则该包为错误包,统计错误包个数N2,计算错包率,错包率WN按下式计算:Compare whether the length of the data packet received by the server is equal to the length of the data packet sent by the client, and compare whether the content of the data packet received by the server is the same as the content of the data packet sent by the client. is a correct packet, otherwise the packet is an error packet, count the number of error packets N 2 , calculate the error packet rate, and the error packet rate W N is calculated as follows: WN=N2/N*100% (2)W N =N 2 /N*100% (2) 如果无丢包且无错包,表明是可靠传输,执行步骤4;否则跳转执行步骤1;If there is no packet loss and no error packets, it indicates that the transmission is reliable, and go to step 4; otherwise, skip to step 1; [步骤4]计算通信时延;[Step 4] Calculate the communication delay; 启动测试线程,调用客户端与服务端通信接口M次,记录开始调用通信接口的时间t1,记录调用M次后接口结束时间t2,计算通信时延,通信时延按式(3)计算:Start the test thread, call the communication interface between the client and the server M times, record the time t 1 when the communication interface starts to be called, record the end time t 2 of the interface after calling M times, and calculate the communication delay. The communication delay is calculated according to formula (3). : DM=(t2-t1)/M (3)D M =(t 2 -t 1 )/M (3) 得到通信时延DMThe communication delay DM is obtained. 2.根据权利要求1所述的一种CORBA中间件通信时延性能优化方法,其特征在于:步骤2中,所述语言包括C、C++和Java,将IDL文件映射为对应的语言。2 . The method for optimizing the communication delay performance of CORBA middleware according to claim 1 , wherein in step 2, the languages include C, C++ and Java, and the IDL files are mapped to corresponding languages. 3 . 3.根据权利要求1所述的一种CORBA中间件通信时延性能优化方法,其特征在于:步骤3中N的取值范围为N≥10000。3 . The method for optimizing the communication delay performance of CORBA middleware according to claim 1 , wherein the value range of N in step 3 is N≧10000. 4 . 4.根据权利要求1所述的一种CORBA中间件通信时延性能优化方法,其特征在于:步骤4中M的取值范围为M≥10000。4 . The method for optimizing the communication delay performance of CORBA middleware according to claim 1 , wherein the value range of M in step 4 is M≧10000. 5 .
CN202110661523.0A 2021-06-15 2021-06-15 CORBA middleware communication delay performance optimization method Pending CN113411231A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110661523.0A CN113411231A (en) 2021-06-15 2021-06-15 CORBA middleware communication delay performance optimization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110661523.0A CN113411231A (en) 2021-06-15 2021-06-15 CORBA middleware communication delay performance optimization method

Publications (1)

Publication Number Publication Date
CN113411231A true CN113411231A (en) 2021-09-17

Family

ID=77684134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110661523.0A Pending CN113411231A (en) 2021-06-15 2021-06-15 CORBA middleware communication delay performance optimization method

Country Status (1)

Country Link
CN (1) CN113411231A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1122644A1 (en) * 2000-01-14 2001-08-08 Sun Microsystems, Inc. A method and system for dynamically dispatching function calls from a first execution environment to a second execution environment
CN1879082A (en) * 2003-11-12 2006-12-13 株式会社Ntt都科摩 Method and apparatus for composing software
CN101094392A (en) * 2007-06-26 2007-12-26 南京联创网络科技有限公司 Method for video monitoring system to implement Topo map of network devices on web
US20110320521A1 (en) * 2010-06-24 2011-12-29 Sap Ag User Interface Communication
CN111541662A (en) * 2020-04-15 2020-08-14 赞同科技股份有限公司 Communication method, device, system and equipment based on binary communication protocol

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1122644A1 (en) * 2000-01-14 2001-08-08 Sun Microsystems, Inc. A method and system for dynamically dispatching function calls from a first execution environment to a second execution environment
CN1879082A (en) * 2003-11-12 2006-12-13 株式会社Ntt都科摩 Method and apparatus for composing software
CN101094392A (en) * 2007-06-26 2007-12-26 南京联创网络科技有限公司 Method for video monitoring system to implement Topo map of network devices on web
US20110320521A1 (en) * 2010-06-24 2011-12-29 Sap Ag User Interface Communication
CN111541662A (en) * 2020-04-15 2020-08-14 赞同科技股份有限公司 Communication method, device, system and equipment based on binary communication protocol

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
吕浩,刘文科: "一种CORBA中间件通信时延性能优化方法", 《现代导航》 *
张志伟等: "分布对象中间件异步通讯机制的研究与实现", 《计算机科学》 *

Similar Documents

Publication Publication Date Title
CN114189889B (en) Wireless communication artificial intelligence processing method and device
US9703595B2 (en) Multi-core system with central transaction control
CN100389572C (en) A system and method for remotely invoking communication components
US6327624B1 (en) Communication of objects including Java bytecodes between 3270 logical units including Java virtual machines
CN110134534B (en) System and method for optimizing message processing for big data distributed system based on NIO
US12034604B2 (en) MQTT protocol simulation method and simulation device
CN112738216B (en) Equipment adaptation method, device, equipment and computer readable storage medium
US20210326192A1 (en) System and method for reactive messaging client for use with a microservices environment
CN113791758B (en) Service arrangement localization execution system and method thereof
CN117135156B (en) Edge cluster nano-tube method, system, computer readable storage medium and electronic equipment based on publish/subscribe message protocol
JP2009123201A (en) Server-processor hybrid system and method for processing data
CN109067754B (en) Communication method and system for request terminal and server terminal
CN112395339B (en) Intersystem data access verification method, device, computer equipment and storage medium
CN113411231A (en) CORBA middleware communication delay performance optimization method
CN112433870A (en) Data calling method and device, computer readable storage medium and electronic equipment
CN117407445B (en) Data storage method, system and storage medium for Internet of Vehicles data platform
CN118555305A (en) Message transmission method, device, equipment, storage medium and program product
CN118509474A (en) Data encoding method and device, electronic equipment and storage medium
CN116366700A (en) A command transmission method, device, equipment and medium
CN113556247B (en) Multi-layer parameter distributed data transmission method, device and readable medium
WO2020220272A1 (en) Method and system for changing resource state, terminal, and storage medium
CN116668520A (en) Gateway-based service arrangement method, system, equipment and storage medium
CN118158027A (en) GraphQL-based front-end gateway, data access method and storage medium
CN115525707A (en) Data generation method and device, electronic equipment and storage medium
CN114721944A (en) Open platform application program interface online debugging system and method based on gateway

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210917