CN105391804A - Remote invocation method capable of reducing transmission flow - Google Patents

Remote invocation method capable of reducing transmission flow Download PDF

Info

Publication number
CN105391804A
CN105391804A CN201510942214.5A CN201510942214A CN105391804A CN 105391804 A CN105391804 A CN 105391804A CN 201510942214 A CN201510942214 A CN 201510942214A CN 105391804 A CN105391804 A CN 105391804A
Authority
CN
China
Prior art keywords
client
rmi
server
server end
stream
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
CN201510942214.5A
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.)
Xuan Cai Interactive Network Science And Technology Ltd
Original Assignee
Xuan Cai Interactive Network Science And Technology 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 Xuan Cai Interactive Network Science And Technology Ltd filed Critical Xuan Cai Interactive Network Science And Technology Ltd
Priority to CN201510942214.5A priority Critical patent/CN105391804A/en
Publication of CN105391804A publication Critical patent/CN105391804A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • G06F9/548Object oriented; Remote method invocation [RMI]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

Provided is a remote invocation method capable of reducing transmission flow. After a client is connected to a server through a control chain, RMI object information is obtained; the RMI object information is subjected to flow-saving serialization, and then, is transmitted to the server; and the server obtains original object information through deserialization to finish remote invocation. According to the method, by reducing the serialized flow, project information of a project where the object locates is not carried, thereby reducing use of network bandwidth and enabling the interaction speed of the client and the server to be improved by many times. Besides, for any place where the RMI method is adopted, the purpose of reducing the flow can be reached without making any modification in the method level.

Description

A kind of remote invocation method reducing delivery flow rate
Technical field
The invention belongs to network communication field, especially in method call process, reduce the processing method of flow, specifically a kind of remote invocation method reducing delivery flow rate.
Background technology
At present, JavaRMI (RMI RemoteMethodInvocation) is a kind of mechanism, the method on the object in another Java Virtual Machine of object reference that can allow on certain Java Virtual Machine.This remote interface can must be realized with any object that the method is called.
After Client is connected to Server by Quality Initiative, obtain RMI object information [IP, PORT, ObjId], connected this [IP:Port] by Data-Link, send request and obtain the response of object corresponding to ObjID.
Transfer of data in all RMI, needs the serializing carrying out object, is delivered to server end, and server end can arrive original object information by unserializing.
RMI, when client end and server end carry out transfer of data, needs parameter to carry out serializing, and then at Internet Transmission, the size of this block serializing stream, directly affects the interactive speed of client and server end.
Summary of the invention
The object of the invention is to take many problems for method call flow in process, propose a kind of remote invocation method reducing delivery flow rate.
Technical scheme of the present invention is:
A kind of remote invocation method reducing delivery flow rate, after client Client is connected to server end Server by Quality Initiative, obtain RMI object information, RMI object information is carried out to the serializing of province's flow, be delivered to server end, server end can arrive original object information by unserializing, completes far call.
The present invention specifically comprises the following steps:
(1), client sends service request by IP and port to RMI server end;
(2), after RMI received server-side to the request of client, the IP of return service device end, the object ID of data transmission port and server end;
(3), client receives the IP that service end returns, and after data transmission port and object ID, can generate the local agent object of a RMI and local counterfoil Stub in client this locality;
(4), RMI client initiates corresponding request instruction by local agent object toward the RMI of server end, simultaneously can the method parameter of correspondence, and method name imports local agent object into;
(5), local agent object Stub by reflex mechanism, call invoke method, obtain the method parameter+method name of request object;
(6), after local agent object Stub gets the method parameter of corresponding object, first can obtain the channel C hannelConnection be connected with remote service end, then obtain the object output stream of this interface channel;
(7), get object output stream after, the serializing object method of local agent object reference JDK, changes into stream and writes in the object output stream that the 6th step gets by the method parameter sequence of the object got before;
(8), the information of object output stream in step (7) is sent to server end by client, after server receives request, first by the unserializing of JDK, stream unserializing is become corresponding requesting method parameter, then server end calls corresponding requesting method and carries out Business Processing;
(9), after server end method Business Processing terminates, result is changed into stream by JDK sequence, returns to RMI client, client is again by unserializing, and stream is read as corresponding result, then release connection, completes a RMI step.
Beneficial effect of the present invention:
RMI is when client end and server end carry out transfer of data, parameter is needed to carry out serializing, then at Internet Transmission, the size of this block serializing stream, directly affect the interactive speed of client and server end, when conventional process serializing stream, RMI is except carrying out serializing by the method parameter of object, also the engineering information of this object place project can be returned, these information include local classpath, local jar wraps path etc. information, these information are all the information of client local path, these information are utterly useless for our business, after but serializing is complete, but a large amount of bandwidth is occupied.The inventive method, by reducing the size of serializing stream, does not carry the engineering information of object place project, thus reduces the use of the network bandwidth, and the interactive speed that client and server is held promotes several times.In addition, the place of any use RMI method, without the need to making any amendment at method layer, can reach the object reducing flow.
Accompanying drawing explanation
Fig. 1 is structural representation of the present invention.
Embodiment
Below in conjunction with drawings and Examples, the present invention is further illustrated.
As shown in Figure 1, a kind of remote invocation method reducing delivery flow rate, after client Client is connected to server end Server by Quality Initiative, obtain RMI object information, RMI object information is carried out to the serializing of province's flow, be delivered to server end, server end can arrive original object information by unserializing, completes far call.The present invention specifically comprises the following steps:
(1), client sends service request by IP and port to RMI server end;
(2), after RMI received server-side to the request of client, the IP of return service device end, the object ID of data transmission port and server end;
(3), client receives the IP that service end returns, and after data transmission port and object ID, can generate the local agent object of a RMI and local counterfoil Stub in client this locality;
(4), RMI client initiates corresponding request instruction by local agent object toward the RMI of server end, simultaneously can the method parameter of correspondence, and method name imports local agent object into;
(5), local agent object Stub by reflex mechanism, call invoke method, obtain the method parameter+method name of request object;
(6), after local agent object Stub gets the method parameter of corresponding object, first can obtain the channel C hannelConnection be connected with remote service end, then obtain the object output stream of this interface channel;
(7), get object output stream after, the serializing object method of local agent object reference JDK, changes into stream and writes in the object output stream that the 6th step gets by the method parameter sequence of the object got before;
(8), the information of object output stream in step (7) is sent to server end by client, after server receives request, first by the unserializing of JDK, stream unserializing is become corresponding requesting method parameter, then server end calls corresponding requesting method and carries out Business Processing;
(9), after server end method Business Processing terminates, result is changed into stream by JDK sequence, returns to RMI client, client is again by unserializing, and stream is read as corresponding result, then release connection, completes a RMI step.
During concrete enforcement:
In the RMI communication process shown in Fig. 1, amendment the 3rd step sequence required parameter, original parameter comprises engineering information two parts of method parameter and object place project.The network packet analysis of client and the server transfer of data captured by network packet capturing is found, starting a few row is normal object serialization information, also has main frame ip.Major part is all some jar bag of the local project of client, the information of local classpath below, about 80% of the whole data flow that these information occupy, owing to being client local path information, server is held, utterly useless, if can remove these, so bandwidth usage will significantly reduce.
Therefore, get rid of the classPath serializing stream accounting for 80% size, the large young pathbreaker of whole serializing parameter stream reduces 4-5 doubly.
The part that the present invention does not relate to prior art that maybe can adopt all same as the prior art is realized.

Claims (2)

1. one kind can be reduced the remote invocation method of delivery flow rate, after it is characterized in that client Client is connected to server end Server by Quality Initiative, obtain RMI object information, RMI object information is carried out to the serializing of province's flow, be delivered to server end, server end can arrive original object information by unserializing, completes far call.
2. the remote invocation method reducing delivery flow rate according to claim 1, is characterized in that it specifically comprises the following steps:
(1), client sends service request by IP and port to RMI server end;
(2), after RMI received server-side to the request of client, the IP of return service device end, the object ID of data transmission port and server end;
(3), client receives the IP that service end returns, and after data transmission port and object ID, can generate the local agent object of a RMI and local counterfoil Stub in client this locality;
(4), RMI client initiates corresponding request instruction by local agent object toward the RMI of server end, simultaneously can the method parameter of correspondence, and method name imports local agent object into;
(5), local agent object Stub by reflex mechanism, call invoke method, obtain the method parameter+method name of request object;
(6), after local agent object Stub gets the method parameter of corresponding object, first can obtain the channel C hannelConnection be connected with remote service end, then obtain the object output stream of this interface channel;
(7), get object output stream after, the serializing object method of local agent object reference JDK, changes into stream and writes in the object output stream that the 6th step gets by the method parameter sequence of the object got before;
(8), the information of object output stream in step (7) is sent to server end by client, after server receives request, first by the unserializing of JDK, stream unserializing is become corresponding requesting method parameter, then server end calls corresponding requesting method and carries out Business Processing;
(9), after server end method Business Processing terminates, result is changed into stream by JDK sequence, returns to RMI client, client is again by unserializing, and stream is read as corresponding result, then release connection, completes a RMI step.
CN201510942214.5A 2015-12-16 2015-12-16 Remote invocation method capable of reducing transmission flow Pending CN105391804A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510942214.5A CN105391804A (en) 2015-12-16 2015-12-16 Remote invocation method capable of reducing transmission flow

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510942214.5A CN105391804A (en) 2015-12-16 2015-12-16 Remote invocation method capable of reducing transmission flow

Publications (1)

Publication Number Publication Date
CN105391804A true CN105391804A (en) 2016-03-09

Family

ID=55423634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510942214.5A Pending CN105391804A (en) 2015-12-16 2015-12-16 Remote invocation method capable of reducing transmission flow

Country Status (1)

Country Link
CN (1) CN105391804A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105763619A (en) * 2016-03-31 2016-07-13 广州华多网络科技有限公司 Method and device for communication of client and server
CN108234670A (en) * 2018-01-31 2018-06-29 北京中安智达科技有限公司 A kind of distributed remote call method based on zookeeper and netty
CN109873831A (en) * 2019-03-14 2019-06-11 珠海天燕科技有限公司 A kind of method and system of data transmission
CN110958218A (en) * 2019-10-16 2020-04-03 平安国际智慧城市科技股份有限公司 Data transmission method based on multi-network communication and related equipment
CN112367376A (en) * 2020-10-28 2021-02-12 常州微亿智造科技有限公司 Method for realizing mutual communication framework between micro services under industrial Internet of things
CN114710541A (en) * 2022-01-28 2022-07-05 赛纳生物科技(北京)有限公司 Method for transmitting sequencing data

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102495757A (en) * 2011-11-15 2012-06-13 深圳市融创天下科技股份有限公司 Optimization method applicable to JAVA remote invocation object transfer and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102495757A (en) * 2011-11-15 2012-06-13 深圳市融创天下科技股份有限公司 Optimization method applicable to JAVA remote invocation object transfer and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
戴亮等: "一种新的基于序列化的Java RMI方法", 《计算机工程》 *
王莉红等: "基于Java-RMI技术的移动代理系统设计", 《计算机工程与设计》 *
闫钧华等: "基于Java的分布式测控系统任务调度研究", 《系统工程与电子技术》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105763619A (en) * 2016-03-31 2016-07-13 广州华多网络科技有限公司 Method and device for communication of client and server
CN105763619B (en) * 2016-03-31 2019-07-05 广州欢聚时代信息科技有限公司 The method and device that client and server-side are communicated
CN108234670A (en) * 2018-01-31 2018-06-29 北京中安智达科技有限公司 A kind of distributed remote call method based on zookeeper and netty
CN109873831A (en) * 2019-03-14 2019-06-11 珠海天燕科技有限公司 A kind of method and system of data transmission
CN109873831B (en) * 2019-03-14 2021-07-23 珠海天燕科技有限公司 Data transmission method and system
CN110958218A (en) * 2019-10-16 2020-04-03 平安国际智慧城市科技股份有限公司 Data transmission method based on multi-network communication and related equipment
CN112367376A (en) * 2020-10-28 2021-02-12 常州微亿智造科技有限公司 Method for realizing mutual communication framework between micro services under industrial Internet of things
CN114710541A (en) * 2022-01-28 2022-07-05 赛纳生物科技(北京)有限公司 Method for transmitting sequencing data

Similar Documents

Publication Publication Date Title
CN105391804A (en) Remote invocation method capable of reducing transmission flow
CN110139165B (en) Method for realizing one port bearing multiple stream protocols by stream media reverse proxy service
CN108234149B (en) Network request management method and device
CN104427286B (en) A kind of method and system carrying out video calling
CN108234190B (en) A kind of management method and system regarding networked devices
WO2016210109A1 (en) Mechanisms to support adaptive constrained application protocol (coap) streaming for internet of things (iot) systems
JP2015529044A (en) Method and apparatus for distributing transfer characteristic information of multimedia data
CN101094389B (en) Method for downloading video, video server, and monitoring center system
CN104468656A (en) Mobile data downloading method, mobile data downloading system, mobile data uploading method and mobile data uploading system
CN102917212A (en) 3G (The 3rd Generation Telecommunication) wireless video monitoring implementation method and 3G wireless video monitoring system based on RTP (Real Time Protocol) and RTSP (Real Time Streaming Protocol)
CN109302578A (en) A kind of method and system logging in conference terminal and video conference
CN109376086B (en) Netty-based performance test platform and communication method thereof
CN108011776A (en) A kind of system and method for realizing real time monitoring cloud computing host resource operation information
CN106658388A (en) Bluetooth gateway
CN101552735A (en) Pluggable information bus device based on subscribing mode and realizing method thereof
CN106063190B (en) A kind of method, relevant apparatus and the system of file reparation
CN106302432A (en) A kind of communicator based on car networking and control method
CN103248679A (en) Network message passing method
CN106412027A (en) Server message push method and system
CN107846328B (en) Network rate real-time statistical method based on concurrent lock-free ring queue
CN103533001A (en) Communication method and communication system based on HTTP multi-proxy, and intermediate proxy server
CN102281179A (en) VPN tunnel relay acceleration technology
CN106936615A (en) A kind of message processing method and device
CN109167965A (en) A kind of method and apparatus of data processing
WO2015085531A1 (en) Method, device and system for improving qos

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160309