[go: up one dir, main page]

CN109428861A - Network communication method and equipment - Google Patents

Network communication method and equipment Download PDF

Info

Publication number
CN109428861A
CN109428861A CN201710757697.0A CN201710757697A CN109428861A CN 109428861 A CN109428861 A CN 109428861A CN 201710757697 A CN201710757697 A CN 201710757697A CN 109428861 A CN109428861 A CN 109428861A
Authority
CN
China
Prior art keywords
parameter
data block
stored
read
reading
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
CN201710757697.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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710757697.0A priority Critical patent/CN109428861A/en
Publication of CN109428861A publication Critical patent/CN109428861A/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/01Protocols
    • H04L67/133Protocols for remote procedure calls [RPC]
    • 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/56Provisioning of proxy services
    • 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/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The purpose of the application is to provide a kind of network communication method and equipment, when the application serializes, the only parameter information in processing request, do not copy data block, data block is directly quoted from the original storage location of data block, it generates the discontinuous data of multistage to be used for transmission, avoids data copy.Correspondingly, when unserializing, only needing processing parameter information for the byte stream for having chunk data, not copying data block, directly quoted from the original storage location of interior data block to data block, avoid data copy.For write request and read request, the application can be reduced the data copy of client communication agency and server-side communication agent, and number of data blocks is more in message, and data volume is bigger, and the number of the data copy of saving is more, can be obviously improved network I/O performance.

Description

Network communication method and equipment
Technical field
This application involves computer field more particularly to a kind of network communication method and equipment.
Background technique
Remote procedure call (RPC, Remote Procedure Call), using client (Client)/server-side (Server) mode.The content of communication between Client and Server is message (Message), is usually convenient for business processing Architectural entities.
As shown in Figure 1, typical RPC process is as follows:
(1) Client, which is called, initiates RPC request to Client stub (client communication agency) with local method of calling (rpc call);
(2) Client stub (client communication agency) receive calling after by request message sequence be melted into it is continuous sheet of Byte stream (bundle Args), to facilitate tcp to transmit;
(3) Client stub finds address of service, and is sent message by network service (Network Service) (send) server-side (Server) corresponding Server stub (server-side communication agent) is arrived;
(4) after Server stub receives message, antitone sequence dissolves request content (unbundle Args) from byte stream;
(5) Server stub calls local server-side (Server) according to the request content that antitone sequence dissolves, and processing is asked Ask (local call);
(6) local server-side executes request and processing result (local return) is returned to Server stub and makees For response;
(7) Server stub will return the result sequence chemical conversion byte stream (bundle ret vals), return to client Corresponding Client stub (client communication agency);
(8) Client stub receives response message, and carries out unserializing (unbundle to the response message ret vals);
(9) response message is sent to Client (rpc after carrying out unserializing (unbundle ret vals) Return), Client obtains final result i.e. response message.
In above process, before sending message, to be byte stream to message sequence, be used for tcp (Transmission Control Protocol transmission control protocol) transmission;After receiving (receive) message, byte stream unserializing is used for Business processing.Specifically, message serialize and the process of unserializing is as follows:
During message sequence, successively parameter information (params) is encoded, and is formed with data block (data) Continuous sheet of byte stream is transmitted for tcp and is used.It needs exist for copying data block, data block is more, copies more. In message as shown in Figure 2, there are two data block (data), shared to copy twice.For writing IO (input and output) request, When Client (client) has transmission message sequence, because client will write data to client, ginseng is had in write request Number information and data, so having data copy (memcpy), for example, thering is Data1, Data2 as shown in Figure 2 to copy;And Server When (server-side) replys write response serializing, because only replying write-in as a result, only having parameter information not count in return information According to so no data copies, for example, without the copy of Data1, Data2 as shown in Figure 2;For reading IO (input and output) request, When Client sends message sequence, because only having parameter information not have data in write request, no data is copied, for example, There is no the copy of Data1, Data2 as shown in Figure 2;And Server (server-side) is replied when reading response sequence, because to reply The data read, so parameter information and data are had in return information, so having data copy, for example, having as shown in Figure 2 Data1, Data2 copy.
Correspondingly, during message unserializing, parameter information is successively decoded from byte stream, and by data block copy To suitable position, it to be used for business processing.Likewise, data block is more, copy more.As shown in figure 3, being to receive disappearing for Fig. 2 The process of unserializing is carried out after breath.For writing IO (input and output) request, Server (server-side) receives write request antitone sequence When change, because having parameter information and data in write request, there is data copy (memcpy), for example, having as shown in Figure 3 Data1, Data2 copy;For reading IO (input and output) request, when Client (client) receives response unserializing, because The data read are received, so parameter information and data are had in the return information received, so have data copy, for example, There are Data1, Data2 as shown in Figure 3 to copy.
When containing more data in above scheme, in message, especially IO size (inputoutput data amount) biggish reading The expense of write request, data copy (memcpy) can not be ignored.In IO critical path, there are data at Client and Server two Copy, at least data copy is primary (depending on number of data blocks) again at every place, seriously consumes cpu (processor) and memory (memory) resource, drain performance are write delay and are increased, IOPS (Input/Output Operations Per Second), i.e., The number per second being written and read) it reduces.
Summary of the invention
The purpose of the application is to provide a kind of network communication method and equipment, solves in existing remote procedure call The big problem of the expense of data copy.
According to the one aspect of the application, the network communication method of client communication agency a kind of is provided, wherein the party Method includes:
Request message is received from client and is stored in first position, and the request message includes parameter and data block;
After reading the parameter from the first position and handled, it is stored in the second position;
The data block is read from the first position and from the parameter after the second position reading process, and send To server-side communication agent.
Further, in the network communication method of above-mentioned client communication agency, request message is received from client and is deposited It is stored in first position, the request message includes parameter and data block, comprising:
Write request message is received from client and is stored in the first position in memory, and the write request message includes not compiling The write request parameter and uncoded write request data block of code;
After reading the parameter from the first position and handled, it is stored in the second position, comprising:
After reading write request parameter from the first position in memory and encoded, the second being stored in memory is added It sets.
Further, in the network communication method of above-mentioned client communication agency, the number is read from the first position According to block and from the parameter after the second position reading process, comprising:
According to the original order of required parameter and requested data block in the request message, successively from the second position Read requests parameter, from the first position read requests data block.
Further, in the network communication method of above-mentioned client communication agency, the ginseng is read from the first position After counting and being handled, it is stored in the second position, comprising:
From the first position read requests parameter and handled;
The information addition of the first position of parameter and data block in memory is stored in the second position.
Further, in the network communication method of above-mentioned client communication agency, the number is read from the first position According to block and from the parameter after the second position reading process, comprising:
From the second position, the information of the first position of the parameter and data block in memory is read;
According to the information of the first position, the data block is read from the first position.
Further, in the network communication method of above-mentioned client communication agency, the method, further includes:
Request message is received from client and is stored in the third place, and the request message includes parameter;
From the third place reading parameter and after being handled, it is stored in the 4th position;
The parameter is read from the 4th position, and is sent to server-side communication agent.
Further, in the network communication method of above-mentioned client communication agency, the ginseng is read from the 4th position Number, and be sent to after server-side communication agent, further includes:
The response message for corresponding to the parameter is received from server-side communication agent, and is stored in the 5th position, wherein institute Stating response message includes parameter and data block;
After reading the parameter from the 5th position and handled, it is stored in the 6th position;
From the 5th position read block and from the parameter after the 6th position reading process, and it is sent to client End.
Further, in the network communication method of above-mentioned client communication agency, from the 5th position read block and Parameter after the 6th position reading process, and it is sent to client, comprising:
According to the original order of parameter and data block in response message, successively after the six, the 5th position reading process Parameter and data block.
Further, in the network communication method of above-mentioned client communication agency, the response message is communicated by server-side Agency receives from server-side, and based on receiving that treated from server-side communication agent, parameter generates the sound to the server-side Answer message.
Further, in the network communication method of above-mentioned client communication agency, the ginseng is read from the 5th position After counting and being handled, it is stored in the 6th position, comprising:
The parameter is read from the 5th position and is handled;
Respectively by the information of treated the 5th position of parameter and data block in memory, it is stored in described 6th It sets.
Further, in the network communication method of above-mentioned client communication agency, from the 5th position read block and Parameter after the 6th position reading process, comprising:
From the 6th position, the information of parameter and data block after reading process in the 5th position;
According to the information of the 5th position, the data block is read from the 5th position.
According to the another side method of the application, a kind of network communication method of server-side communication agent, this method are also provided Include:
It is acted on behalf of from client communication and receives request message and be stored in first position, the request message includes parameter sum number According to block;
After reading the parameter from the first position and handled, it is stored in the second position;
The data block is read from the first position and from the parameter after the second position reading process, and send To server-side.
Further, it in the network communication method of above-mentioned server-side communication agent, is acted on behalf of from client communication and receives request Message is simultaneously stored in first position, and the request message includes parameter and data block, comprising:
It is acted on behalf of from client communication and receives write request message and be stored in the first position in memory, the write request message Including the write request parameter and uncoded write request data block after coding;
After reading the parameter from the first position and handled, it is stored in the second position, comprising:
After reading the write request parameter after encoding from the first position in memory and be decoded, addition is stored in memory The second position.
Further, in the network communication method of above-mentioned server-side communication agent, the number is read from the first position According to block and from the parameter after the second position reading process, comprising:
According to the original order of parameter and data block in the request message, successively from memory the 8th, first position Parameter and data block after reading process.
Further, in the network communication method of above-mentioned server-side communication agent, the ginseng is read from the first position After counting and being handled, it is stored in the second position, comprising:
Parameter is read from the first position and is decoded;
Treated parameter and data block are stored in the second position in the information of the first position respectively.
Further, in the network communication method of above-mentioned server-side communication agent, the number is read from the first position According to block and from the parameter after the second position reading process, and it is sent to server-side, comprising:
From the second position, the information of parameter and data block after reading process in the first position;
According to the information of the first position, the data block is read from the first position.
Further, in the network communication method of above-mentioned server-side communication agent, the method, further includes:
It is acted on behalf of from client communication and receives request message and be stored in the third place, the request message includes parameter;
From the reading parameter of the third place and after being handled, it is stored in the 4th position;
From the parameter after the 4th position reading process and it is sent to server-side.
Further, in the network communication method of above-mentioned server-side communication agent, after the 4th position reading process Parameter and be sent to after server-side, further includes:
The response message for corresponding to treated the parameter is received from server-side, and is stored in the 5th position, the sound Answering message includes parameter and data block;
After reading response parameter from the 5th position and handled, it is stored in the 6th position;
Parameter is read from the 5th position read block and from the 6th position, and is sent to client communication agency.
Further, in the network communication method of above-mentioned server-side communication agent, from the 5th position read block and Parameter is read from the 6th position, comprising:
According to the original order of parameter and data block in the response message, parameter successively is read from the six, the five positions And data block, and it is sent to client communication agency.
Further, in the network communication method of above-mentioned server-side communication agent, the response message is based on by server-side Receiving that treated from server-side communication agent, parameter generates.
Further, in the network communication method of above-mentioned server-side communication agent, response ginseng is read from the 5th position After counting and being handled, it is stored in the 6th position, comprising:
Parameter is read from the 5th position and is handled;
Respectively by the information of treated the 5th position of parameter and data block in memory, it is stored in the 6th position.
Further, in the network communication method of above-mentioned server-side communication agent, from the 5th position read block and Parameter is read from the 6th position, comprising:
Information from parameter after the 6th position reading process and data block in the 5th position;
According to the information of the 5th position, from the 5th position read block.
According to the another side of the application, a kind of client communication agency is also provided, which includes:
First request reception device, for receiving request message from client and being stored in first position, the request disappears Breath includes parameter and data block;
First request code device is stored in the after reading the parameter from the first position and being handled Two positions;
First send-request unit, for reading the data block from the first position and being read from the second position The parameter that takes that treated, and it is sent to server-side communication agent.
Further, in above-mentioned client communication agency, the first request reception device, for being write from client reception Request message is simultaneously stored in the first position in memory, and the write request message includes uncoded write request parameter and uncoded Write request data block;
The first request code device, for reading write request parameter from the first position in memory and being encoded Afterwards, the second position being stored in memory is added.
Further, in above-mentioned client communication agency, further includes:
Second request reception device, for receiving request message from client and being stored in the third place, the request disappears Breath includes parameter;
Second request code device is stored in the after reading the parameter from the third place and being handled Four positions;
Second send-request unit reads the parameter from the 4th position, and is sent to server-side communication agent.
Further, in above-mentioned client communication agency, the communication agent further includes
First response reception device, for receiving the response message for corresponding to the parameter from server-side communication agent, and It is stored in the 5th position, wherein the response message includes parameter and data block;
First response decoding apparatus is stored in the after reading the parameter from the 5th position and being handled Six positions;
First response sending device, for from the 5th position read block and after the 6th position reading process Parameter, and be sent to client.
According to the another side of the application, a kind of server-side communication agent is also provided, which includes:
First request reception device, for acting on behalf of reception request message from client communication and being stored in first position, institute Stating request message includes parameter and data block;
First request decoding apparatus is stored in the after reading the parameter from the first position and being handled Two positions;
First send-request unit, for reading the data block from the first position and being read from the second position The parameter that takes that treated, and it is sent to server-side.
Further, in above-mentioned server-side communication agent, the first request reception device, for being connect from client communication agency It receives write request message and is simultaneously stored in the first position in memory, the write request message includes write request parameter after coding and not The write request data block of coding;
First send-request unit for the write request parameter after reading coding from the first position in memory and is solved After code, the second position being stored in memory is added.
Further, in above-mentioned server-side communication agent, the communication agent, further includes:
Second request reception device, for acting on behalf of reception request message from client communication and being stored in the third place, institute Stating request message includes parameter;
Second request decoding apparatus, for being stored in the 4th from the reading parameter of the third place and after being handled Position;
Second send-request unit, for from the parameter after the 4th position reading process and being sent to server-side.
Further, in above-mentioned server-side communication agent, the communication agent, further includes:
First response reception device, for receiving the response message for corresponding to treated the parameter from server-side, and It is stored in the 5th position, the response message includes parameter and data;
First response code device is stored in for reading response parameter from the 5th position and after being handled Six positions;
First response sending device, for reading parameter from the 5th position read block and from the 6th position, concurrently It send to client communication and acts on behalf of.
According to the another side of the application, a kind of equipment based on calculating is also provided, comprising:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the place when executed Manage device:
Request message is received from client and is stored in first position, and the request message includes parameter and data block;
After reading the parameter from the first position and handled, it is stored in the second position;
The data block is read from the first position and from the parameter after the second position reading process, and send To server-side communication agent.
According to the another side of the application, a kind of equipment based on calculating is also provided, comprising:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the place when executed Manage device:
It is acted on behalf of from client communication and receives request message and be stored in first position, the request message includes parameter sum number According to block;
After reading the parameter from the first position and handled, it is stored in the second position;
The data block is read from the first position and from the parameter after the second position reading process, and send To server-side.
According to the another side of the application, a kind of computer readable storage medium is also provided, being stored thereon with computer can hold Row instruction, wherein the computer executable instructions make processor when being executed by processor:
Request message is received from client and is stored in first position, and the request message includes parameter and data block;
After reading the parameter from the first position and handled, it is stored in the second position;
The data block is read from the first position and from the parameter after the second position reading process, and send To server-side communication agent.
According to the another side of the application, a kind of computer readable storage medium is also provided, being stored thereon with computer can hold Row instruction, wherein the computer executable instructions make processor when being executed by processor:
It is acted on behalf of from client communication and receives request message and be stored in first position, the request message includes parameter sum number According to block;
After reading the parameter from the first position and handled, it is stored in the second position;
The data block is read from the first position and from the parameter after the second position reading process, and send To server-side.
Compared with prior art, when the application Data Serialization, only the parameter information in processing request, does not copy data Block directly quotes data block from the original storage location of data block, generates the discontinuous data of multistage and is used for transmission, Avoid data copy.Correspondingly, only needing processing parameter information when data unserializing, not copying data block, from interior data block Original storage location data block is directly quoted, avoid data copy.For write request and read request, the application is equal It can be reduced the data copy of client communication agency and server-side communication agent, number of data blocks is more in message, data volume (Size) bigger, the number of the data copy (memcpy) of saving is more, can be obviously improved network I/O (input and output) property Energy.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 shows existing RPC process schematic;
Fig. 2 shows existing message sequence process schematics;
Fig. 3 shows existing message unserializing process schematic;
Fig. 4 shows the message sequence process schematic according to one embodiment of the application;
Fig. 5 shows the message unserializing process schematic according to one embodiment of the application;
Fig. 6 shows the system module figure according to one embodiment of the application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawing.
In a typical configuration of this application, terminal, the equipment of service network and trusted party include one or more Processor (CPU), input/output interface, network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or Any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, computer Readable medium does not include non-temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
According to the one aspect of the application, a kind of network communication side of client communication agency (client stub) is provided Method, this method comprises:
Step S01 receives request message from client and is stored in first position, and the request message includes parameter sum number According to block;
Step S02 is stored in the second position after reading the parameter from the first position and handled;
Step S03 reads the data block from the first position and from the ginseng after the second position reading process Number, and it is sent to server-side communication agent.
When the application Data Serialization, only the parameter information in processing request, does not copy data block, from the original of data block Data block is directly quoted in storage location, the discontinuous data of multistage is generated and is used for transmission, avoid data copy.Phase It answers, when data unserializing, only needs processing parameter information, do not copy data block, from the original storage location pair of interior data block Data block is directly quoted, and data copy is avoided.For write request and read request, the application can be reduced client communication The data copy with server-side communication agent is acted on behalf of, number of data blocks is more in message, and data volume (Size) is bigger, the number of saving Number according to copy (memcpy) is more, can be obviously improved network I/O (input and output) performance.
In one embodiment of network communication method of the client communication agency (client stub) of the application, this method packet It includes:
Step S11 receives write request message from client and is stored in the first position in memory, the write request message Including uncoded write request parameter and uncoded write request data block;
Step S12, after reading uncoded write request parameter from the first position in memory and encoded, addition storage The second position in memory;
Step S13, respectively from second and first position in memory, write request parameter after reading coding and uncoded Write request data block, and it is sent to server-side communication agent (server stub).Specifically, in the present embodiment, client communication When agency's serializing, the write request parameter field in request message need only be encoded, according to write request parameter field sequence Size storage allocation after change adds the second position being stored in memory after being encoded the write request parameter in memory, And to write request data block, without copy function, write request data block is directly quoted from memory.As shown in figure 4, serializing Afterwards, one 4 memories are shared, wherein buffer1 and buffer3 is newly assigned, the encoding stream of write request parameter is stored, Buffer2 and buffer4 is the write request data block not serialized in write request message.Tcp supports transmission multi-disc discontinuous buffer.For write IO request, Client sends the serialization process of write request message, avoids data block copy, reduce Delay.
In one embodiment of network communication method of the client communication agency (client stub) of the application, from described the It reads the data block and from the parameter after the second position reading process in one position, comprising:
According to the original order of required parameter and requested data block in the request message, successively from the second position Read requests parameter, from the first position read requests data block.
In one embodiment of network communication method of the client communication agency (client stub) of the application, step S13, Write request parameter and uncoded write request data block after reading coding from second and first position in memory respectively, packet It includes:
According in the write request message uncoded write request parameter and uncoded write request data block it is original Sequentially, write request parameter after successively reading coding from the second position in the memory, from the first position in the memory Uncoded write request data block is read, and is sent to server-side communication agent, in order to which server-side communication agent is subsequent as early as possible Recover the content in write request message.
In one embodiment of network communication method of the client communication agency (client stub) of the application,
In one embodiment of network communication method of the client communication agency (client stub) of the application, from described the After one position is read the parameter and handled, it is stored in the second position, comprising:
From the first position read requests parameter and handled;
The information addition of the first position of parameter and data block in memory is stored in the second position.
In one embodiment of network communication method of the client communication agency (client stub) of the application, step S12, After reading uncoded write request parameter from the first position in memory and encoded, the second being stored in memory is added It sets, comprising:
Uncoded write request parameter is read from the first position in memory and is encoded;
The information of the first position of write request parameter and uncoded write request data block in memory after coding is added Add the second position being stored in memory, it is subsequent that the write request parameter after encoding, root can be read from the second position in memory It is not necessarily to according to the first position of uncoded write request data block in memory quickly to read uncoded write request data block Write request data block is copied in coding.
In one embodiment of network communication method of the client communication agency (client stub) of the application, from described the It reads the data block and from the parameter after the second position reading process in one position, comprising:
From the second position, the information of the first position of the parameter and data block in memory is read;
According to the information of the first position, the data block is read from the first position.
In one embodiment of network communication method of the client communication agency (client stub) of the application, step S13, Respectively from second and first position in memory, write request parameter and uncoded write request data block after reading coding, packet It includes:
The second position from the memory, write request parameter and uncoded write request data block after reading coding exist The information of first position in memory;
According to the information of the first position in the memory, the write request data are read from the first position in memory Block.Specifically, connecting an embodiment, the present embodiment will be including the write request parameter and uncoded write request data block after coding Behind the second position that the first position addition deposited is stored in memory, when sending, reads and compile from the second position in memory Code after write request parameter and read from memory according to the first position of write request data block stored in memory in memory The uncoded write request data block, finally by the write request parameter after the coding read and the write request not encoded Data block is sent to server-side communication agent, entire cataloged procedure without in write request data block copy memory the second position or Other positions, only first position in memory exists uncoded write request data block, does not need in the prior art will be In memory two at position exist.
In one embodiment of the application, the network communication method of the client communication agency, further includes:
Request message is received from client and is stored in the third place, and the request message includes parameter;
From the third place reading parameter and after being handled, it is stored in the 4th position;
The parameter is read from the 4th position, and is sent to server-side communication agent.
In one embodiment of the application, the network communication method of the client communication agency, further includes:
Step S14 receives read request message from client and is stored in the third place in memory, the read request message Including read request parameter;
Step S15 adds the 4th position being stored in memory after being encoded the read request parameter in memory;
Step S16, the read request parameter after reading coding from the 4th position in memory, and it is sent to server-side communication generation Reason.Specifically, it does not include data block that the read request message, which only includes read request parameter, so not being related to data in this implementation The problem of block copy, is stored in memory as long as adding after the read request parameter in memory is encoded, is sent to server-side Communication agent also only be coding after read request parameter.
In one embodiment of network communication method of herein described client communication agency, received from server-side communication agent Corresponding to the response message of the parameter, and it is stored in the 5th position, wherein the response message includes parameter and data block;
After reading the parameter from the 5th position and handled, it is stored in the 6th position;
From the 5th position read block and from the parameter after the 6th position reading process, and it is sent to client End.
In one embodiment of network communication method of herein described client communication agency, step S16, from the in memory The read request parameter after coding is read in four positions, and is sent to after server-side communication agent, further includes:
Step S17 receives the reading response message of the read request parameter after corresponding to the coding from server-side communication agent, And it is stored in the 5th position in memory, wherein the response message of reading includes the reading response parameter and uncoded after coding Read response data block;
Step S18, reading response parameter after reading the coding from the 5th position in memory and after being decoded, addition It is stored in the 6th position in memory;
Step S19 reads decoded reading response parameter and uncoded reading from the six, the 5th positions in memory respectively Response data block, and it is sent to client.Specifically, connecting an embodiment, server-side communication agent receives the reading after coding Read request parameter after coding can be decoded, obtain original read request parameter, then ask original reading by required parameter It asks parameter to be sent to server-side processing, generates reading response message after the completion of server-side processing and be sent to server-side communication agent, At this point, reading response message includes reading response parameter and reading response data block, then, server-side communication agent will be read in response message Reading response parameter carry out editorial afterword, by after coding reading response parameter and uncoded reading response data block be sent to client and lead to Letter agency, client communication agency receive reading response parameter and uncoded reading number of responses after encoding from server-side communication agent According to block and the 5th position that is stored in memory, then, the reading after client communication agency will encode described in memory responds ginseng Number adds the 6th position being stored in memory after being decoded, finally, client communication agency can be from the 6th in memory Position reads decoded reading response parameter and reads uncoded reading response data block from the 6th position in memory, and sends To client, entire decoding process does not need to read the copy of response data block.
In the present embodiment, when client communication acts on behalf of unserializing, what is received from server-side communication agent is continuous sheet of Byte stream, client communication agency, which successively decodes, to read response parameter and adds the 6th position that is stored in memory, without With the uncoded reading response data block at the 5th position in copy memory, and not compiling in memory (buffer) is directly quoted The reading response data block of code.As shown in figure 5, uncoded reading response data block 1 (Data1) and uncoded reading response data block 2 (Data2) are quoted respectively from the uncoded reading response data block 1 at the 5th position for receiving and being stored in memory (Data1) and uncoded reading response data block 2 (Data2), for read I O request, client communication agency communicates in server-side When agency receives reading response message progress unserializing, data copy is avoided.
In one embodiment of network communication method of herein described client communication agency, from the 5th position read block And from the parameter after the 6th position reading process, and client is sent to respectively from the six, the 5th positions in memory It reads decoded reading response parameter and reads response data block, comprising:
According to the original order of parameter and data block in response message, successively after the six, the 5th position reading process Parameter and data block.
In one embodiment of network communication method of herein described client communication agency, step S19, respectively from memory The six, the 5th positions read decoded readings response parameter and uncoded reading response data block, and be sent to client, packet It includes:
According to read response message in coding after readings response parameter and it is uncoded reading response data block original order, Decoded reading response parameter and uncoded reading response data block successively are read from the six, the 5th positions in memory, concurrently It send to client, in order to which subsequent client recovers rapidly the content read in response message.
In one embodiment of network communication method of herein described client communication agency, the response message, by servicing Communication agent is held to receive from server-side, parameter generates the server-side based on receiving that treated from server-side communication agent Institute's response message.
In one embodiment of network communication method of herein described client communication agency, the reading response message, by taking End communication agent be engaged in from server-side reception, the server-side is based on the decoded read request received from server-side communication agent Parameter generates the reading response message.
In one embodiment of network communication method of herein described client communication agency, institute is read from the 5th position After stating parameter and being handled, it is stored in the 6th position, comprising:
The parameter is read from the 5th position and is handled;
Respectively by the information of treated the 5th position of parameter and data block in memory, it is stored in described 6th It sets.
In one embodiment of network communication method of herein described client communication agency, step S18, from the in memory After five positions are read the reading response parameter after the coding and are decoded, the 6th position being stored in memory is added, comprising:
Reading response parameter after reading the coding from the 5th position in memory is simultaneously decoded;
Respectively by decoded reading response parameter and the uncoded letter for reading the 5th position of response data block in memory Breath adds the 6th position being stored in memory, so that subsequent successively can read decoded reading from the 6th position in memory Response parameter, and according to the information of reading response data block the 5th position in memory stored in memory, from the in memory The uncoded reading response data block is read in five positions, without copying in decoding to write request data block.
In one embodiment of network communication method of herein described client communication agency, from the 5th position read block And from the parameter after the 6th position reading process, comprising:
From the 6th position, the information of parameter and data block after reading process in the 5th position;
According to the information of the 5th position, the data block is read from the 5th position.
In one embodiment of network communication method of herein described client communication agency, step S19, respectively from memory The six, the 5th positions read decoded reading response parameter and uncoded reading response data block, comprising:
From the 6th position in the memory, reads decoded reading response parameter and uncoded reading response data block exists The information of the 5th position in memory;
According to the information of the 5th position in the memory, the uncoded reading is read from the 5th position in memory and is rung Answer data block.Specifically, connecting an embodiment, decoded reading response parameter and uncoded reading response data block can be existed The information of the 5th position in memory adds the 6th position being stored in memory, when sending, successively from the 6th in memory Decoded reading response parameter is read in position, and the 5th position according to reading response data block stored in memory in memory Information reads the uncoded reading response data block from the 5th position in memory, and the decoded reading read is rung Parameter and uncoded reading response data block is answered to be sent to client, without copying in decoding to write request data block.
According to the another side of the application, a kind of network communication method of server-side communication agent is also provided, this method comprises:
It is acted on behalf of from client communication and receives request message and be stored in first position, the request message includes parameter sum number According to block;
After reading the parameter from the first position and handled, it is stored in the second position;
The data block is read from the first position and from the parameter after the second position reading process, and send To server-side.
The network communication method of the server-side communication agent of the embodiment of the application, comprising:
Step S21 is acted on behalf of from client communication and is received write request message and be stored in the first position in memory, described to write Request message includes the write request parameter and uncoded write request data block after coding;
Step S22, after reading the write request parameter after encoding from the first position in memory and be decoded, addition storage The second position in memory;
Step S23, respectively from memory the 8th, first position, read decoded write request parameter and uncoded Write request data block, and it is sent to server-side.
Specifically, what is received from client communication agency is continuous sheet of word when server-side communication agent unserializing Throttle the 6th position being stored in memory, and server-side communication agent successively decodes write request parameter and is stored in memory First position, and uncoded write request data block do not have to copy, directly in reference memory (buffer) at the 6th position not The write request data block of coding.As shown in figure 5, uncoded write request data block 1 (Data1) and uncoded write request data Block 2 (Data2) is quoted respectively to be received the write request data block 1 (Data1) at the first position being stored in memory and does not compile certainly The write request data block 2 (Data2) of code.For write IO request, Server avoids number when receiving write request message antitone sequence According to copy.
The network communication method of the server-side communication agent of the embodiment of the application, described in the reading of the first position Data block and from the parameter after the second position reading process, comprising:
According to the original order of parameter and data block in the request message, successively from memory the 8th, first position Parameter and data block after reading process.
The network communication method of the server-side communication agent of the embodiment of the application, step S23, respectively from memory 8th, first position read decoded write request parameter and uncoded write request data block, and are sent to server-side, packet It includes:
According in the write request message encode after write request parameter and uncoded write request data block it is original suitable Sequence, successively from memory the 8th, first position read decoded write request parameter and uncoded write request data block, and It is sent to server-side, recovers write request message middle-end content rapidly in order to which server-side is subsequent.
The network communication method of the server-side communication agent of the embodiment of the application, described in the reading of the first position Parameter and after being handled, is stored in the second position, comprising:
Parameter is read from the first position and is decoded;
Treated parameter and data block are stored in the second position in the information of the first position respectively.
The network communication method of the server-side communication agent of the embodiment of the application, step S22, from first in memory After position is read the write request parameter after encoding and is decoded, the second position being stored in memory is added, comprising:
The write request parameter after encoding is read from the first position in memory and is decoded;
The letter of first position by decoded write request parameter and uncoded write request data block in memory respectively Breath adds the second position being stored in memory, successively asks from the second position decoded write of reading in memory so as to subsequent Parameter is sought, and the information of the first position according to the write request data block of the second position storage in memory in memory, from interior The uncoded write request data block is read in first position in depositing, and entire decoding process is not necessarily to data block copy.
The network communication method of the server-side communication agent of the embodiment of the application, described in the reading of the first position Data block and from the parameter after the second position reading process, and it is sent to server-side, comprising:
From the second position, the information of parameter and data block after reading process in the first position;
According to the information of the first position, the data block is read from the first position.
The network communication method of the server-side communication agent of the embodiment of the application, step S23, respectively from memory 8th, first position read decoded write request parameter and uncoded write request data block, comprising:
From the second position in memory, decoded write request parameter and uncoded write request data block are read in memory In first position information;
According to the information of the first position in the memory, the uncoded write request number is read from the first position According to block.Specifically, an embodiment is connected, it can be by decoded write request parameter and uncoded write request data block in memory In first position the second position that is stored in memory of information addition after, when sending, successively from the second in memory Set and read decoded write request parameter, and according to the write request data block of the second position storage in memory in memory the The information of one position reads the uncoded write request data block from the 7th in memory, then will read decoded Write request parameter and uncoded write request data block are sent to server-side, and entire decoding process is not necessarily to data block copy.
The network communication method of the server-side communication agent of the embodiment of the application, the method, further includes:
It is acted on behalf of from client communication and receives request message and be stored in the third place, the request message includes parameter;
From the reading parameter of the third place and after being handled, it is stored in the 4th position;
From the parameter after the 4th position reading process and it is sent to server-side.
The network communication method of the server-side communication agent of the embodiment of the application, the method, further includes:
Step S24, the third position acting on behalf of the read request message after receiving coding from client communication and being stored in memory It sets, the read request message after the coding includes the read request parameter after coding;
Step S25, from the read request parameter after the reading coding of the third place in memory and after being decoded, addition is deposited It is stored in the 4th position in memory;
Step S26 reads decoded read request parameter from the 4th position in memory and is sent to server-side.Specifically , in the present embodiment, the read request message after the coding only includes the read request parameter after coding, without data block, so It is not involved in the problems, such as that decoded read request parameter is also only sent to server-side by data block copy, server-side communication agent.
The network communication method of the server-side communication agent of the embodiment of the application, from the 4th position reading process Rear parameter is simultaneously sent to after server-side, further includes:
The response message for corresponding to treated the parameter is received from server-side, and is stored in the 5th position, the sound Answering message includes parameter and data block;
After reading response parameter from the 5th position and handled, it is stored in the 6th position;
Parameter is read from the 5th position read block and from the 6th position, and is sent to client communication agency.
The network communication method of the server-side communication agent of the embodiment of the application, step S26, from the 4th in memory It reads decoded read request parameter and is sent to after server-side in position, further includes:
Step S27 receives the reading response message for corresponding to the decoded read request parameter from server-side, and is stored in The 5th position in memory, the reading response message include uncoded reading response parameter and uncoded reading response data block;
Step S28, after reading uncoded reading response parameter from the 5th position in memory and encoded, addition storage The 6th position in memory;
Step S29, reading response parameter and uncoded reading after reading coding from the six, the five positions in memory respectively are rung Data block is answered, and is sent to client communication agency.Specifically, in the client communication agent side, the client communication Agency receives read request message from client and is stored in the third place in memory, and the read request message includes read request ginseng Number, client communication agent side are added after being encoded the read request parameter of the third place in memory and are stored in memory 4th position, and read the read request parameter after encoding from the 4th position in memory and be sent to server-side communication agent, so It is followed by an embodiment, server-side communication agent is acted on behalf of the read request message after receiving coding from client communication and is stored in interior In the first position deposited, second be stored in memory is added after the read request parameter of the first position in memory is decoded Position reads decoded read request parameter from the second position in memory and is sent to server-side, services to decoded reading Required parameter carries out processing and generates reading response message and be sent to server-side communication agent, and the reading response message includes reading response Parameter and reading response data block, then in the present embodiment, server-side communication agent is received from server-side to be read response message and stores It the 5th position in memory need only be to the reading response parameter field read in response message when server-side communication agent serializes It is encoded, according to reading the size storage allocation after response parameter field sequence and the 6th position that is stored in memory, and To response data block is read, without copy function, quoted directly from the 5th position in memory.As shown in figure 4, after serializing, One shares 4 memories, and wherein buffer1 and buffer3 is newly assigned, storage read response parameter encoding stream, buffer2 and Buffer4 is the reading response data block for reading not serialize in response message.Tcp can support the transmission discontinuous buffer of multi-disc. For read I O request, Server replys the serialization process for reading response message, avoids data copy, reduce delay.
The network communication method of the server-side communication agent of the embodiment of the application, from the 5th position read block with And parameter is read from the 6th position, comprising:
According to the original order of parameter and data block in the response message, parameter successively is read from the six, the five positions And data block, and it is sent to client communication agency.
The network communication method of the server-side communication agent of the embodiment of the application, step S29, respectively from memory Read reading response parameter and uncoded reading response data block after encoding in six, the five positions, comprising:
According to read response message in uncoded reading response parameter and it is uncoded read response data block original order, Reading response parameter and uncoded reading response data block after successively reading coding from 12,11 positions in memory, concurrently It send to client communication and acts on behalf of, consequently facilitating client communication agency recovers rapidly the content read in response message.
The network communication method of the server-side communication agent of the embodiment of the application, the response message, by server-side Based on receiving that treated from server-side communication agent, parameter is generated.
The network communication method of the server-side communication agent of the embodiment of the application, the reading response message, by servicing End group is generated in the decoded read request parameter received from server-side communication agent.
The network communication method of the server-side communication agent of the embodiment of the application reads from the 5th position and responds Parameter and after being handled, is stored in the 6th position, comprising:
Parameter is read from the 5th position and is handled;
Respectively by the information of treated the 5th position of parameter and data block in memory, it is stored in the 6th position.
The network communication method of the server-side communication agent of the embodiment of the application, step S28, from the 5th in memory Read request parameter after the reading coding of position and after being decoded, adds the 6th position being stored in memory, comprising:
Read request parameter after the reading coding of the 5th position in memory is simultaneously decoded;
Respectively by the letter of the 5th position of reading response parameter and uncoded reading response data block in memory after coding Breath adds the 6th position that is stored in memory, consequently facilitating it is subsequent successively read coding from the 6th position in memory after Response parameter, and the information of reading response data block the 5th position in memory according to the 6th position storage in memory are read, The uncoded reading response data block is read from the 5th position in memory, entire cataloged procedure is not necessarily to data block copy.
The network communication method of the server-side communication agent of the embodiment of the application, from the 5th position read block with And parameter is read from the 6th position, comprising:
Information from parameter after the 6th position reading process and data block in the 5th position;
According to the information of the 5th position, from the 5th position read block.
The network communication method of the server-side communication agent of the embodiment of the application, step S29, respectively from memory Read reading response parameter and uncoded reading response data block after encoding in six, the five positions, comprising:
Reading response parameter and uncoded reading response data block after reading coding from the 6th position in memory is in memory In the 5th position information;
According to the information of the 5th position in the memory, uncoded reading number of responses is read from the 5th position in memory According to block.Specifically, connect an embodiment, by after coding reading response parameter and it is uncoded read response data block in memory the Behind the 6th position that the information addition of five positions is stored in memory, when sending, successively read from the 6th position in memory Reading response parameter after coding, and reading response data block the 5th position in memory according to the 6th position storage in memory Information, it is after reading uncoded the readings response data block from the 5th position in memory, the reading after the coding read is loud Parameter and uncoded reading response data block is answered to be sent to client communication agency, entire cataloged procedure is not necessarily to data block copy.
In the following, being further explained in detail by one concrete application embodiment of the application to the application:
In a storage system, machine A is client, and machine B is server-side.Machine B for storing data, machine A It sends RPC and reads and writes data to machine B.
The message format definition that A is sent to the write request of B is as follows.
In this message, commonly referred to as disk_id, data_length, offset are parameter field, are to indicate data attribute 's.
B is sent to the message format definition of the write response of A:
In production system, there are also a lot of other parameter fields in above-mentioned message format.To put it more simply, assuming that A will be in B Disk 2 offset 500 at write 10 byte datas.Request message is as follows:
std::string str(10,'a');
WriteRequest request;
Request.disk_id=2;
Request.data_length=10;
Request.set_offset=500;
Request.data=str;
Existing common practice is a continuous character string for character string after serializing request message (request) 1, data has been copied once, and the ASCII character of character string 1 is following two row:
8' b'2' 002'16' 020'10' n'24' 030'-12' 364'3' 003'34' " ' 10' n' // this line It is the serializing of the parameter field after coding as a result, length is 9 bytes
97'a'97'a'97'a'97'a'97'a'97'a'97'a'97'a'97'a'97'a' // this line is uncoded The serializing of data block field is as a result, length is 10 bytes
And the way of the application is, be two character strings is respectively character string 2 and 3, data word after serializing request Section does not copy, wherein
The ASCII character of character string 2 has a line: 8' b'2' 002'16' 020'10' n'24' 030'-12' 364'3' 003'34' " ' 10' n' // this line is the serializing of the parameter field after coding as a result, length is 9 bytes
String characters string 13 directly quotes uncoded data block field.
According to the another side of the application, a kind of client communication agency 1 is also provided, wherein the communication agent includes:
First request reception device, for receiving request message from client and being stored in first position, the request disappears Breath includes parameter and data block;
First request code device is stored in the after reading the parameter from the first position and being handled Two positions;
First send-request unit, for reading the data block from the first position and being read from the second position The parameter that takes that treated, and it is sent to server-side communication agent.
In the client communication agency of one embodiment of the application, the first request reception device, for being terminated from client It receives write request message and is simultaneously stored in the first position in memory, the write request message includes uncoded write request parameter and not The write request data block of coding;
The first request code device, for reading write request parameter from the first position in memory and being encoded Afterwards, the second position being stored in memory is added.
As shown in fig. 6, the communication agent includes: in the client communication agency of one embodiment of the application
Write request reception device 11, for receiving write request message from client 3 and being stored in the first position in memory, The write request message includes uncoded write request parameter and uncoded write request data block;
Write request code device 12, for reading uncoded write request parameter from the first position in memory and being compiled After code, the second position being stored in memory is added;
Write request sending device 13, the write request parameter respectively from second and first position in memory, after reading coding With uncoded write request data block, and it is sent to the write request reception device 21 of server-side communication agent.Specifically, this implementation In example, when client communication agency serializes, the write request parameter field in request message need only be encoded, be asked according to writing Size storage allocation after asking parameter field to serialize, addition is stored in memory after the write request parameter in memory is encoded In the second position without copy function, write request data block is directly quoted from memory and to write request data block.Such as Shown in Fig. 4, after serializing, one shares 4 memories, and wherein buffer1 and buffer3 is newly assigned, stores write request parameter Encoding stream, buffer2 and buffer4 are the write request data blocks not serialized in write request message.Tcp supports transmission multi-disc Discontinuous buffer.For write IO request, Client sends the serialization process of write request message, avoids data block and copy Shellfish reduces delay.
In the client communication agency of one embodiment of the application, the write request sending device 13, for being write according to described The original order of uncoded write request parameter and uncoded write request data block in request message, successively from the memory In the second position read the write request parameter after coding, read uncoded write request number from the first position in the memory According to block, in order to the subsequent content recovered in write request message as early as possible of server-side communication agent.
In the client communication agency of one embodiment of the application, the write request code device 12, for from memory It reads uncoded write request parameter and is encoded in first position;By the write request parameter and uncoded write request after coding The information of the first position of data block in memory adds the second position being stored in memory, it is subsequent can be from the in memory The write request parameter after coding is read in two positions, according to the first position of uncoded write request data block in memory, comes fast Fast reading takes uncoded write request data block, without copying in coding to write request data block.
In the client communication agency of one embodiment of the application, write request sending device 13, for from the memory The second position, the letter of the first position of write request parameter and uncoded write request data block in memory after reading coding Breath;According to the information of the first position in the memory, the write request data block is read from the first position in memory.Specifically , connect an embodiment, the present embodiment by after coding write request parameter and uncoded write request data block in memory Behind the second position that first position addition is stored in memory, when sending, after reading coding from the second position in memory Write request parameter and according to the first position of write request data block stored in memory in memory read from memory it is described not The write request data block of coding, finally by the write request parameter after the coding read and the write request data block not encoded It is sent to server-side communication agent, entire cataloged procedure is without the second position or other positions in write request data block copy memory It sets, only first position in memory exists uncoded write request data block, does not need in the prior art will be in memory Two at position exist.
In the client communication agency of one embodiment of the application, the communication agent, further includes:
Second request reception device, for receiving request message from client and being stored in the third place, the request disappears Breath includes parameter;
Second request code device is stored in the after reading the parameter from the third place and being handled Four positions;
Second send-request unit reads the parameter from the 4th position, and is sent to server-side communication agent.
As shown in fig. 6, in the client communication agency of one embodiment of the application, the communication agent, further includes:
Read request reception device 14, for receiving read request message from client and being stored in the third place in memory, The read request message includes read request parameter;
Read request code device 15 is stored in memory for adding after being encoded the read request parameter in memory 4th position;
Read request sending device 16 for the read request parameter after reading coding from the 4th position in memory, and is sent To the read request reception device 24 of server-side communication agent.Specifically, the read request message only includes read request in this implementation Parameter does not include data block, so not being involved in the problems, such as data block copy, as long as depositing adding after the read request parameter in memory It is stored in memory, be sent to server-side communication agent is also only read request parameter.
In the client communication agency of one embodiment of the application, the communication agent 1 further include:
First response reception device, for receiving the response message for corresponding to the parameter from server-side communication agent, and It is stored in the 5th position, wherein the response message includes parameter and data block;
First response decoding apparatus is stored in the after reading the parameter from the 5th position and being handled Six positions;
First response sending device, for from the 5th position read block and after the 6th position reading process Parameter, and be sent to client.
As shown in fig. 6, in the client communication agency of one embodiment of the application, the communication agent 1 further include:
Response reception device 17 is read, for receiving from the reading of server-side communication agent response sending device 29 corresponding to described The reading response message of read request parameter after coding, and the 5th position being stored in memory, wherein the reading response message packet Reading response parameter and uncoded reading response data block after including coding;
Response decoding apparatus 18 is read, is gone forward side by side for the reading response parameter after reading the coding from the 5th position in memory After row decoding, the 6th position being stored in memory is added;
Response sending device 19 is read, for reading decoded reading response ginseng from the six, the 5th positions in memory respectively Several and uncoded reading response data block, and it is sent to client 3.Specifically, connecting an embodiment, server-side communication agent is connect Read request parameter after coding, can be decoded, obtain original read request parameter, so by the read request parameter after receiving coding Server-side processing is sent by original read request parameter afterwards, is generated after the completion of server-side processing and is read response message and be sent to clothes Business end communication agent, at this point, reading response message includes reading response parameter and reading response data block, then, server-side communication agent After the reading response parameter read in response message is encoded, by the reading response parameter and uncoded reading response data after coding Block be sent to client communication agency, client communication agency from server-side communication agent receive coding after reading response parameter and Uncoded the 5th position reading response data block and being stored in memory, then, client communication agency will be described in memory Reading response parameter after coding adds the 6th position being stored in memory after being decoded, finally, client communication agency can Response data is read to read decoded reading response parameter from the 6th position in memory and read from the 6th position in memory Block, and it is sent to client, entire decoding process does not need to read the copy of response data block.
In the present embodiment, when client communication acts on behalf of unserializing, what is received from server-side communication agent is continuous sheet of Byte stream, client communication agency, which successively decodes, to read response parameter and adds the 6th position that is stored in memory, without With the uncoded reading response data block at the 5th position in copy memory, and not compiling in memory (buffer) is directly quoted The reading response data block of code.As shown in figure 5, uncoded reading response data block 1 (Data1) and uncoded reading response data block 2 (Data2) are quoted respectively from the uncoded reading response data block 1 at the 5th position for receiving and being stored in memory (Data1) and uncoded reading response data block 2 (Data2), for read I O request, client communication agency communicates in server-side When agency receives reading response message progress unserializing, data copy is avoided.
In the client communication agency of one embodiment of the application, response sending device 19 is read, for according to reading response message In coding after reading response parameter and the uncoded original order for reading response data block, successively from the 6th, the in memory Decoded reading response parameter and uncoded reading response data block are read in five positions, and are sent to client, in order to subsequent visitor Family end recovers rapidly the content read in response message.
In the client communication agency of one embodiment of the application, the reading response message, by server-side communication agent from clothes Business end receives, and the server-side generates the reading based on the decoded read request parameter received from server-side communication agent and rings Answer message.
In the client communication agency of one embodiment of the application, the reading responds decoding apparatus 18, for from memory It reads the reading response parameter after the coding and is decoded in 5th position;Respectively by decoded reading response parameter and uncoded Reading response data block the 5th position in memory information, the 6th position being stored in memory is added, so that subsequent can Decoded reading response parameter successively is read from the 6th position in memory, and is existed according to reading response data block stored in memory The information of the 5th position in memory reads the readings response data block from the 5th position in memory, without when decoding pair Write request data block is copied.
In the client communication agency of one embodiment of the application, the reading responds sending device 19, is used for from the memory In the 6th position, read and decoded read response parameter and uncoded response data block the 5th position in memory of reading Information;According to the information of the 5th position in the memory, the uncoded reading response is read from the 5th position in memory Data.Specifically, can be by the 5th position of decoded reading response parameter and uncoded reading response data block in memory Information add the 6th position that is stored in memory, when sending, successively read from the 6th position in memory decoded Response parameter, and the information of the 5th position according to reading response data block stored in memory in memory are read, from memory The uncoded reading response data block is read in 5th position, and by the decoded reading response parameter read and uncoded It reads response data block and is sent to client, without being copied in decoding to write request data block.
According to the another side of the application, a kind of server-side communication agent 2 is also provided, which includes:
First request reception device, for acting on behalf of reception request message from client communication and being stored in first position, institute Stating request message includes parameter and data block;
First request decoding apparatus is stored in the after reading the parameter from the first position and being handled Two positions;
First send-request unit, for reading the data block from the first position and being read from the second position The parameter that takes that treated, and it is sent to server-side.
In the server-side communication agent of one embodiment of the application, the first request reception device was used for from client communication generation Reason receives write request message and is stored in the first position in memory, and the write request message includes the write request parameter after coding With uncoded write request data block;
First send-request unit for the write request parameter after reading coding from the first position in memory and is solved After code, the second position being stored in memory is added.
As shown in fig. 6, in the server-side communication agent of one embodiment of the application, which includes:
Write request reception device 21, the write request sending device 13 for acting on behalf of from client communication receive write request message And it is stored in the first position in memory, the write request message includes the write request parameter and uncoded write request after coding Data block;
Write request decoding apparatus 22 for the write request parameter after reading coding from the first position in memory and is solved After code, the second position being stored in memory is added;
Write request sending device 23, for respectively from memory the 8th, first position, read decoded write request ginseng Several and uncoded write request data block, and it is sent to server-side 4.Specifically, when server-side communication agent unserializing, from visitor What family end communication agent received is the 6th position that continuous sheet of byte stream is stored in memory, and server-side communication agent is successively It decodes write request parameter and is stored in the first position in memory, and uncoded write request data block, do not have to copy, directly Quote the uncoded write request data block in memory (buffer) at the 6th position.As shown in figure 5, uncoded write request number It is quoted respectively according to block 1 (Data1) and uncoded write request data block 2 (Data2) and receives first be stored in memory certainly Set the write request data block 1 (Data1) and uncoded write request data block 2 (Data2) at place.For write IO request, Server When receiving write request message antitone sequence, data copy is avoided.
In the server-side communication agent of one embodiment of the application, write request sending device 23, for according to the write request In message encode after write request parameter and uncoded write request data block original order, successively from memory the 8th, Decoded write request parameter and uncoded write request data block are read in first position, in order to the subsequent rapid recovery of server-side Write request message middle-end content out.
In the server-side communication agent of one embodiment of the application, the write request decoding apparatus 22, for from memory It reads the write request parameter after encoding and is decoded in first position;It by decoded write request parameter and uncoded writes respectively The information of the first position of requested data block in memory adds the second position that is stored in memory, so as to it is subsequent successively from Read decoded write request parameter, and the write request data according to the second position storage in memory in the second position in memory The information of the first position of block in memory reads the uncoded write request data block from the first position in memory, whole A decoding process is not necessarily to data block copy.
In the server-side communication agent of one embodiment of the application, the write request sending device 23, for from memory The letter of the first position of decoded write request parameter and uncoded write request data block in memory is read in the second position Breath;According to the information of the first position in the memory, the uncoded write request data block is read from the first position. Specifically, can be by the information of the first position of decoded write request parameter and uncoded write request data block in memory After adding the second position being stored in memory, when sending, decoded write successively is read from the second position in memory and is asked Parameter is sought, and the information of the first position according to the write request data block of the second position storage in memory in memory, from interior The 7th in depositing reads the uncoded write request data block, then will read decoded write request parameter and uncoded Write request data block be sent to server-side, entire decoding process is not necessarily to data block copy.
In the server-side communication agent of one embodiment of the application, the communication agent, further includes:
Second request reception device, for acting on behalf of reception request message from client communication and being stored in the third place, institute Stating request message includes parameter;
Second request decoding apparatus, for being stored in the 4th from the reading parameter of the third place and after being handled Position;
Second send-request unit, for from the parameter after the 4th position reading process and being sent to server-side.
As shown in fig. 6, in the server-side communication agent of one embodiment of the application, the communication agent, further includes:
Read request reception device 24, the read request sending device 16 for acting on behalf of from client communication receive the reading after coding Request message is simultaneously stored in the third place in memory, and the read request message after the coding includes the read request ginseng after coding Number;
Read request decoding apparatus 25 for the read request parameter after encoding from the reading of the third place in memory and carries out After decoding, the 4th position being stored in memory is added;
Read request sending device 26, for reading decoded read request parameter from the 4th position in memory and being sent to Server-side 4.Specifically, the read request message after the coding only includes the read request parameter after coding in the present embodiment, do not have Data block, so not being involved in the problems, such as data block copy, server-side communication agent also only sends decoded read request parameter To server-side.
In the server-side communication agent of one embodiment of the application, the communication agent, further includes:
First response reception device, for receiving the response message for corresponding to the parameter from server-side communication agent, and It is stored in the 5th position, wherein the response message includes parameter and data block;
First response decoding apparatus is stored in the after reading the parameter from the 5th position and being handled Six positions;
First response sending device, for from the 5th position read block and after the 6th position reading process Parameter, and be sent to client.
As shown in fig. 6, in the server-side communication agent of one embodiment of the application, the communication agent, further includes:
Response reception device 27 is read, for receiving the reading sound for corresponding to the decoded read request parameter from server-side 4 The 5th position answering message, and being stored in memory, the reading response message include uncoded reading response parameter and uncoded Reading response data block;
Response code device 28 is read, for reading uncoded reading response parameter from the 5th position in memory and being compiled After code, the 6th position being stored in memory is added;
Response sending device 29 is read, for the reading response parameter after reading coding from the six, the five positions in memory respectively With uncoded reading response data block, and be sent to client communication agency reading response reception device 17.Specifically, described Client communication agent side, the client communication agency receive read request message from client and are stored in the third in memory Position, the read request message include read request parameter, and client communication agent side is by the read request of the third place in memory Parameter adds the 4th position being stored in memory after being encoded, and asks from the reading that the 4th position in memory is read after encoding It seeks parameter and is sent to server-side communication agent, then connect an embodiment, server-side communication agent is acted on behalf of from client communication It receives the read request message after encoding and is stored in the first position of memory, by the read request parameter of the first position in memory The second position being stored in memory is added after being decoded, and reads decoded read request parameter from the second position in memory And it is sent to server-side, service handle to decoded read request parameter generating and reads response message and be sent to server-side to lead to Letter agency, the reading response message include reading response parameter and reading response data block, and then in the present embodiment, server-side communicates generation Managing the 5th position for receiving reading response message from server-side and being stored in memory need only when server-side communication agent serializes The reading response parameter field read in response message is encoded, according in the size distribution after reading response parameter field sequence The 6th position in memory is deposited and is stored in, and to response data block is read, without copy function, directly from the 5th in memory Set place's reference.As shown in figure 4, one shares 4 memories, and wherein buffer1 and buffer3 is newly assigned after serializing, storage The encoding stream of response parameter is read, buffer2 and buffer4 are the reading response data blocks for reading not serialize in response message.Tcp can Support the transmission discontinuous buffer of multi-disc.For read I O request, Server replys the serialization process for reading response message, avoids Data copy, reduces delay.
In the server-side communication agent of one embodiment of the application, response sending device 29 is read, for according to reading response message In uncoded reading response parameter and it is uncoded read response data block original order, successively from 12, ten in memory Reading response parameter and uncoded reading response data block after encoding are read in one position, and are sent to client communication agency, from And the content read in response message is recovered rapidly convenient for client communication agency.
In the server-side communication agent of one embodiment of the application, the reading response message is based on by server-side from server-side The decoded read request parameter that communication agent receives generates.
In the server-side communication agent of one embodiment of the application, the reading responds code device 28, for the in memory It reads the read request parameter after encoding and is decoded in five positions;Respectively by the reading response parameter and uncoded reading after coding The information of the 5th position of response data block in memory adds the 6th position that is stored in memory, consequently facilitating it is subsequent according to The reading response parameter after coding is read in secondary the 6th position from memory, and is responded according to the reading of the 6th position storage in memory The information of the 5th position of data block in memory reads the uncoded reading response data from the 5th position in memory Block, entire cataloged procedure are not necessarily to data block copy.
In the server-side communication agent of one embodiment of the application, the reading responds sending device 29, for from memory Read the reading response parameter and the uncoded information for reading the 5th position of response data block in memory after coding in 6th position; According to the information of the 5th position in the memory, uncoded reading response data block is read from the 5th position in memory.Tool Body, an embodiment is connected, by the 5th position of reading response parameter and uncoded reading response data block in memory after coding The 6th position that is stored in memory of information addition after, when sending, after successively reading coding from the 6th position in memory Reading response parameter, and the letter of reading response data block the 5th position in memory according to the 6th position storage in memory Reading after the coding read after reading the uncoded reading response data block from the 5th position in memory, is responded ginseng by breath Several and uncoded reading response data block is sent to client communication agency, and entire cataloged procedure is not necessarily to data block copy.
According to the another side of the application, a kind of equipment based on calculating is also provided, comprising:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the place when executed Manage device:
Request message is received from client and is stored in first position, and the request message includes parameter and data block;
After reading the parameter from the first position and handled, it is stored in the second position;
The data block is read from the first position and from the parameter after the second position reading process, and send To server-side communication agent.
According to the another side of the application, a kind of equipment based on calculating is also provided, wherein include:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the place when executed Manage device:
It is acted on behalf of from client communication and receives request message and be stored in first position, the request message includes parameter sum number According to block;
After reading the parameter from the first position and handled, it is stored in the second position;
The data block is read from the first position and from the parameter after the second position reading process, and send To server-side.
According to the another side of the application, a kind of computer readable storage medium is also provided, being stored thereon with computer can hold Row instruction, wherein the computer executable instructions make processor when being executed by processor:
Request message is received from client and is stored in first position, and the request message includes parameter and data block;
After reading the parameter from the first position and handled, it is stored in the second position;
The data block is read from the first position and from the parameter after the second position reading process, and send To server-side communication agent.
According to the another side of the application, a kind of computer readable storage medium is also provided, being stored thereon with computer can hold Row instruction, wherein the computer executable instructions make processor when being executed by processor:
It is acted on behalf of from client communication and receives request message and be stored in first position, the request message includes parameter sum number According to block;
After reading the parameter from the first position and handled, it is stored in the second position;
The data block is read from the first position and from the parameter after the second position reading process, and send To server-side.
In conclusion the application, when Data Serialization, only the parameter information in processing request, does not copy data block, from number According to directly being quoted in the original storage location of block to data block, generates the discontinuous data of multistage and be used for transmission, avoid Data copy.Correspondingly, only needing processing parameter information when data unserializing, not copying data block, from the original of interior data block Storage location directly quotes data block, avoids data copy.For write request and read request, the application be can be reduced Client communication is acted on behalf of and the data copy of server-side communication agent, and number of data blocks is more in message, and data volume (Size) is more Greatly, the number of the data copy (memcpy) of saving is more, can be obviously improved network I/O (input and output) performance.
Obviously, those skilled in the art can carry out various modification and variations without departing from the essence of the application to the application Mind and range.In this way, if these modifications and variations of the application belong to the range of the claim of this application and its equivalent technologies Within, then the application is also intended to include these modifications and variations.
It should be noted that the application can be carried out in the assembly of software and/or software and hardware, for example, can adopt With specific integrated circuit (ASIC), general purpose computer or any other realized similar to hardware device.In one embodiment In, the software program of the application can be executed to implement the above steps or functions by processor.Similarly, the application Software program (including relevant data structure) can be stored in computer readable recording medium, for example, RAM memory, Magnetic or optical driver or floppy disc and similar devices.In addition, hardware can be used to realize in some steps or function of the application, example Such as, as the circuit cooperated with processor thereby executing each step or function.
In addition, a part of the application can be applied to computer program product, such as computer program instructions, when its quilt When computer executes, by the operation of the computer, it can call or provide according to the present processes and/or technical solution. And the program instruction of the present processes is called, it is possibly stored in fixed or moveable recording medium, and/or pass through Broadcast or the data flow in other signal-bearing mediums and transmitted, and/or be stored according to described program instruction operation In the working storage of computer equipment.Here, including a device according to one embodiment of the application, which includes using Memory in storage computer program instructions and processor for executing program instructions, wherein when the computer program refers to When enabling by processor execution, method and/or skill of the device operation based on aforementioned multiple embodiments according to the application are triggered Art scheme.
It is obvious to a person skilled in the art that the application is not limited to the details of above-mentioned exemplary embodiment, Er Qie In the case where without departing substantially from spirit herein or essential characteristic, the application can be realized in other specific forms.Therefore, no matter From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and scope of the present application is by appended power Benefit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent elements of the claims Variation is included in the application.Any reference signs in the claims should not be construed as limiting the involved claims.This Outside, it is clear that one word of " comprising " does not exclude other units or steps, and odd number is not excluded for plural number.That states in device claim is multiple Unit or device can also be implemented through software or hardware by a unit or device.The first, the second equal words are used to table Show title, and does not indicate any particular order.

Claims (34)

1. a kind of network communication method of client communication agency, wherein this method comprises:
Request message is received from client and is stored in first position, and the request message includes parameter and data block;
After reading the parameter from the first position and handled, it is stored in the second position;
The data block is read from the first position and from the parameter after the second position reading process, and be sent to clothes Business end communication agent.
2. request message is received from client and is stored in first position according to the method described in claim 1, wherein, it is described Request message includes parameter and data block, comprising:
Write request message is received from client and is stored in the first position in memory, and the write request message includes uncoded Write request parameter and uncoded write request data block;
After reading the parameter from the first position and handled, it is stored in the second position, comprising:
After reading write request parameter from the first position in memory and encoded, the second position being stored in memory is added.
3. according to the method described in claim 1, wherein, the data block is read from the first position and from described second Parameter after the reading process of position, comprising:
According to the original order of required parameter and requested data block in the request message, successively read from the second position Required parameter, from the first position read requests data block.
4. method according to claim 1 or 3, wherein after reading the parameter from the first position and handled, It is stored in the second position, comprising:
From the first position read requests parameter and handled;
The information addition of the first position of parameter and data block in memory is stored in the second position.
5. according to the method described in claim 4, wherein, the data block is read from the first position and from described second Parameter after the reading process of position, comprising:
From the second position, the information of the first position of the parameter and data block in memory is read;
According to the information of the first position, the data block is read from the first position.
6. according to the method described in claim 1, wherein, the method, further includes:
Request message is received from client and is stored in the third place, and the request message includes parameter;
From the third place reading parameter and after being handled, it is stored in the 4th position;
The parameter is read from the 4th position, and is sent to server-side communication agent.
7. according to the method described in claim 6, wherein, reading the parameter from the 4th position, and be sent to server-side After communication agent, further includes:
The response message for corresponding to the parameter is received from server-side communication agent, and is stored in the 5th position, wherein the sound Answering message includes parameter and data block;
After reading the parameter from the 5th position and handled, it is stored in the 6th position;
From the 5th position read block and from the parameter after the 6th position reading process, and it is sent to client.
8. according to the method described in claim 7, wherein, being read from the 5th position read block and from the 6th position Parameter that treated, and it is sent to client, comprising:
According to the original order of parameter and data block in response message, successively from the ginseng after the six, the 5th position reading process Several and data block.
9. the response message is received by server-side communication agent from server-side according to the method described in claim 7, wherein, Based on receiving that treated from server-side communication agent, parameter generates the response message to the server-side.
10. method according to claim 7 or 8, wherein read the parameter from the 5th position and handled Afterwards, it is stored in the 6th position, comprising:
The parameter is read from the 5th position and is handled;
Respectively by the information of treated the 5th position of parameter and data block in memory, it is stored in the 6th position.
11. according to the method described in claim 10, wherein, being read from the 5th position read block and from the 6th position The parameter that takes that treated, comprising:
From the 6th position, the information of parameter and data block after reading process in the 5th position;
According to the information of the 5th position, the data block is read from the 5th position.
12. a kind of network communication method of server-side communication agent, wherein this method comprises:
It is acted on behalf of from client communication and receives request message and be stored in first position, the request message includes parameter and data Block;
After reading the parameter from the first position and handled, it is stored in the second position;
The data block is read from the first position and from the parameter after the second position reading process, and be sent to clothes Business end.
13. according to the method for claim 12, wherein acted on behalf of from client communication and receive request message and be stored in first Position, the request message include parameter and data block, comprising:
It is acted on behalf of from client communication and receives write request message and be stored in the first position in memory, the write request message includes Write request parameter and uncoded write request data block after coding;
After reading the parameter from the first position and handled, it is stored in the second position, comprising:
Write request parameter after reading coding from the first position in memory and after being decoded, addition are stored in the in memory Two positions.
14. according to the method for claim 12, wherein read the data block from the first position and from described the Parameter after two position reading process, comprising:
According to the original order of parameter and data block in the request message, successively from memory the 8th, first position read Parameter that treated and data block.
15. method described in 2 or 14 according to claim 1, wherein read the parameter from the first position and handled Afterwards, it is stored in the second position, comprising:
Parameter is read from the first position and is decoded;
Treated parameter and data block are stored in the second position in the information of the first position respectively.
16. according to the method for claim 15, wherein read the data block from the first position and from described the Parameter after two position reading process, and it is sent to server-side, comprising:
From the second position, the information of parameter and data block after reading process in the first position;
According to the information of the first position, the data block is read from the first position.
17. according to the method for claim 12, wherein the method, further includes:
It is acted on behalf of from client communication and receives request message and be stored in the third place, the request message includes parameter;
From the reading parameter of the third place and after being handled, it is stored in the 4th position;
From the parameter after the 4th position reading process and it is sent to server-side.
18. according to the method for claim 17, wherein from the parameter after the 4th position reading process and be sent to clothes It is engaged in after end, further includes:
The response message for corresponding to treated the parameter is received from server-side, and is stored in the 5th position, and the response disappears Breath includes parameter and data block;
After reading response parameter from the 5th position and handled, it is stored in the 6th position;
Parameter is read from the 5th position read block and from the 6th position, and is sent to client communication agency.
19. according to the method for claim 18, wherein read ginseng from the 5th position read block and from the 6th position Number, comprising:
According to the original order of parameter and data block in the response message, parameter sum number successively is read from the six, the five positions According to block, and it is sent to client communication agency.
20. according to the method for claim 18, wherein the response message is based on communicating generation from server-side by server-side Reason receives that treated, and parameter generates.
21. method described in 8 or 19 according to claim 1, wherein read response parameter from the 5th position and handled Afterwards, it is stored in the 6th position, comprising:
Parameter is read from the 5th position and is handled;
Respectively by the information of treated the 5th position of parameter and data block in memory, it is stored in the 6th position.
22. according to the method for claim 21, wherein read ginseng from the 5th position read block and from the 6th position Number, comprising:
Information from parameter after the 6th position reading process and data block in the 5th position;
According to the information of the 5th position, from the 5th position read block.
23. a kind of client communication agency, wherein the communication agent includes:
First request reception device, for receiving request message from client and being stored in first position, the request message packet Include parameter and data block;
First request code device is stored in second after reading the parameter from the first position and being handled It sets;
First send-request unit, for reading the data block from the first position and from second position reading place Parameter after reason, and it is sent to server-side communication agent.
24. communication agent according to claim 23, wherein the first request reception device, for being terminated from client It receives write request message and is simultaneously stored in the first position in memory, the write request message includes uncoded write request parameter and not The write request data block of coding;
The first request code device adds after reading write request parameter from the first position in memory and being encoded Add the second position being stored in memory.
25. communication agent according to claim 23, wherein further include:
Second request reception device, for receiving request message from client and being stored in the third place, the request message packet Include parameter;
Second request code device is stored in the 4th after reading the parameter from the third place and being handled It sets;
Second send-request unit reads the parameter from the 4th position, and is sent to server-side communication agent.
26. communication agent according to claim 25, wherein the communication agent further includes
First response reception device, for receiving the response message for corresponding to the parameter from server-side communication agent, and stores In the 5th position, wherein the response message includes parameter and data block;
First response decoding apparatus is stored in the 6th after reading the parameter from the 5th position and being handled It sets;
First response sending device, for from the 5th position read block and from the ginseng after the 6th position reading process Number, and it is sent to client.
27. a kind of server-side communication agent, wherein the communication agent includes:
First request reception device, it is described to ask for acting on behalf of reception request message from client communication and being stored in first position Seeking message includes parameter and data block;
First request decoding apparatus is stored in second after reading the parameter from the first position and being handled It sets;
First send-request unit, for reading the data block from the first position and from second position reading place Parameter after reason, and it is sent to server-side.
28. communication agent according to claim 27, wherein the first request reception device was used for, from client communication generation Reason receives write request message and is stored in the first position in memory, and the write request message includes the write request parameter after coding With uncoded write request data block;
First send-request unit for the write request parameter after reading coding from the first position in memory and is decoded Afterwards, the second position being stored in memory is added.
29. communication agent according to claim 27, wherein the communication agent, further includes:
Second request reception device, it is described to ask for acting on behalf of reception request message from client communication and being stored in the third place Seeking message includes parameter;
Second request decoding apparatus, for being stored in the 4th position from the reading parameter of the third place and after being handled;
Second send-request unit, for from the parameter after the 4th position reading process and being sent to server-side.
30. communication agent according to claim 29, wherein the communication agent, further includes:
First response reception device for receiving the response message for corresponding to treated the parameter from server-side, and stores In the 5th position, the response message includes parameter and data;
First response code device is stored in the 6th after reading response parameter from the 5th position and being handled It sets;
First response sending device for reading parameter from the 5th position read block and from the 6th position, and is sent to Client communication agency.
31. a kind of equipment based on calculating, wherein include:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the processing when executed Device:
Request message is received from client and is stored in first position, and the request message includes parameter and data block;
After reading the parameter from the first position and handled, it is stored in the second position;
The data block is read from the first position and from the parameter after the second position reading process, and be sent to clothes Business end communication agent.
32. a kind of equipment based on calculating, wherein include:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the processing when executed Device:
It is acted on behalf of from client communication and receives request message and be stored in first position, the request message includes parameter and data Block;
After reading the parameter from the first position and handled, it is stored in the second position;
The data block is read from the first position and from the parameter after the second position reading process, and be sent to clothes Business end.
33. a kind of computer readable storage medium, is stored thereon with computer executable instructions, wherein the computer is executable Instruction makes the processor when being executed by processor:
Request message is received from client and is stored in first position, and the request message includes parameter and data block;
After reading the parameter from the first position and handled, it is stored in the second position;
The data block is read from the first position and from the parameter after the second position reading process, and be sent to clothes Business end communication agent.
34. a kind of computer readable storage medium, is stored thereon with computer executable instructions, wherein the computer is executable Instruction makes the processor when being executed by processor:
It is acted on behalf of from client communication and receives request message and be stored in first position, the request message includes parameter and data Block;
After reading the parameter from the first position and handled, it is stored in the second position;
The data block is read from the first position and from the parameter after the second position reading process, and be sent to clothes Business end.
CN201710757697.0A 2017-08-29 2017-08-29 Network communication method and equipment Pending CN109428861A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710757697.0A CN109428861A (en) 2017-08-29 2017-08-29 Network communication method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710757697.0A CN109428861A (en) 2017-08-29 2017-08-29 Network communication method and equipment

Publications (1)

Publication Number Publication Date
CN109428861A true CN109428861A (en) 2019-03-05

Family

ID=65503627

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710757697.0A Pending CN109428861A (en) 2017-08-29 2017-08-29 Network communication method and equipment

Country Status (1)

Country Link
CN (1) CN109428861A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112367294A (en) * 2020-10-13 2021-02-12 成都精灵云科技有限公司 Network communication method between multiple hosts adapting to edge computing architecture
CN114915659A (en) * 2021-02-09 2022-08-16 腾讯科技(深圳)有限公司 Network request processing method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2587380A1 (en) * 2011-10-28 2013-05-01 Software AG Runtime environment and method for non-invasive monitoring of software applications
CN103795632A (en) * 2012-10-31 2014-05-14 华为技术有限公司 Data message transmission method, related equipment and system
CN104135496A (en) * 2013-05-02 2014-11-05 华中科技大学 Method and device of RPC (Remote Procedure Call) data transmission under homogeneous environment
CN104239125A (en) * 2014-09-28 2014-12-24 北京奇艺世纪科技有限公司 Object processing method, distributive file system and client device
CN105095294A (en) * 2014-05-15 2015-11-25 中兴通讯股份有限公司 Method and device for managing heterogeneous copy in distributed storage system
CN106155833A (en) * 2015-03-31 2016-11-23 华为技术有限公司 A kind of method and apparatus of asynchronous remote copy
CN106445676A (en) * 2015-08-05 2017-02-22 杭州海康威视系统技术有限公司 Distributed data calculation-based task allocation method and task allocation apparatus

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2587380A1 (en) * 2011-10-28 2013-05-01 Software AG Runtime environment and method for non-invasive monitoring of software applications
CN103795632A (en) * 2012-10-31 2014-05-14 华为技术有限公司 Data message transmission method, related equipment and system
CN104135496A (en) * 2013-05-02 2014-11-05 华中科技大学 Method and device of RPC (Remote Procedure Call) data transmission under homogeneous environment
CN105095294A (en) * 2014-05-15 2015-11-25 中兴通讯股份有限公司 Method and device for managing heterogeneous copy in distributed storage system
CN104239125A (en) * 2014-09-28 2014-12-24 北京奇艺世纪科技有限公司 Object processing method, distributive file system and client device
CN106155833A (en) * 2015-03-31 2016-11-23 华为技术有限公司 A kind of method and apparatus of asynchronous remote copy
CN106445676A (en) * 2015-08-05 2017-02-22 杭州海康威视系统技术有限公司 Distributed data calculation-based task allocation method and task allocation apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112367294A (en) * 2020-10-13 2021-02-12 成都精灵云科技有限公司 Network communication method between multiple hosts adapting to edge computing architecture
CN114915659A (en) * 2021-02-09 2022-08-16 腾讯科技(深圳)有限公司 Network request processing method and device, electronic equipment and storage medium
CN114915659B (en) * 2021-02-09 2024-03-26 腾讯科技(深圳)有限公司 Network request processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109902274B (en) Method and system for converting json character string into thraft binary stream
US8914631B2 (en) Performing secure and non-secure communication over the same socket
CN103179133B (en) Based on the client of entity class and the method for server communication
CN102546612B (en) Remote procedure call implementation method based on remote direct memory access (RDMA) protocol in user mode
CN110413650B (en) Method, device, equipment and storage medium for processing service data
CN105141603B (en) Communication data transmission method and system
CN105450712B (en) A kind of data transmission method and device
RU2008116715A (en) STATICALLY TESTED ALLOWED INTER-PROCESS EXCHANGE ISOLATED PROCESSES
CN106330833A (en) Communication method, client and server based on Internet content adaptation protocol
CN109428861A (en) Network communication method and equipment
CN105933325A (en) Kernel mode RPC (Remote Procedure CALL) communication acceleration method based on NFSoRDMA (Network File System over Remote Direct Memory Access)
CN113238856B (en) RDMA-based memory management method and device
CN112953547A (en) Data processing method, device and system
CN118152154B (en) Communication control method, system and readable storage medium based on shared memory development
CN112954068A (en) RDMA (remote direct memory Access) -based data transmission method and device
CN104993906B (en) A kind of method and system of message transmission
CN118555305A (en) Message transmission method, device, equipment, storage medium and program product
CN113760986A (en) Data query method, device, equipment and storage medium
CN103731424A (en) Network data transmitting method, device and system
CN118012351A (en) Data read-write order keeping method and device based on remote storage protocol, electronic equipment and storage medium
CN117714543A (en) Method for realizing data sharing between platforms based on cache
CN110727391A (en) Transaction data storage method and device, blockchain system, medium and electronic device
CN109616156B (en) A kind of gene sequencing data storage method and device
CN115760538A (en) Data conversion circuit, method, electronic device and computer readable storage medium
CN111163100A (en) Data structure, communication method, device, storage medium and equipment

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

Application publication date: 20190305

WD01 Invention patent application deemed withdrawn after publication