CN106385448A - Method and device for communicating between client and server - Google Patents

Method and device for communicating between client and server Download PDF

Info

Publication number
CN106385448A
CN106385448A CN201610820521.0A CN201610820521A CN106385448A CN 106385448 A CN106385448 A CN 106385448A CN 201610820521 A CN201610820521 A CN 201610820521A CN 106385448 A CN106385448 A CN 106385448A
Authority
CN
China
Prior art keywords
client
service end
socket
communicated
network interface
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
CN201610820521.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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201610820521.0A priority Critical patent/CN106385448A/en
Publication of CN106385448A publication Critical patent/CN106385448A/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/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/22Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Abstract

The invention discloses a method and device for communicating between a client and a server, a connection request transmitted from a distributed storage client to a distributed storage server is received, the quantity of server network cards is acquired; a plurality of socket connections are established on the client and the server through the network cards; and parallel network communication between the client and the server can be realized by adopting the plurality of socket connections. According to the invention, a plurality of network cards are added between the client and the server, a plurality of socket connections can be generated by the same network card, the maximum limit for data transition from single socket connection can be overcome, and data bandwidth between the client and the server is provided. Because of the plurality of socket connections, the data can be distributed to normal connections after the network failure occurs, and the failure rate of the network connection is reduced.

Description

The method and device that a kind of client is communicated with service end
Technical field
The present invention relates to technical field of distributed memory, the side that more particularly to a kind of client is communicated with service end Method and device.
Background technology
When being serviced using distributed storage, communicated by network connection between client and service node, a client It is connected using a socket with a service end, using the communication of full duplex ways of carrying out, the number between client and service end According to bandwidth, the i.e. byte number of synchronization transmission.
Because only one of which socket is connected between client and service end, required according to tcp, each packet one Secondary can only send maximum 1600 bytes, so a time data flow is conditional, thus limiting in certain event section The data volume of data transmit-receive.And in the event of connecting fault, will result in data interaction failure, the experience to client Impact.
Content of the invention
It is an object of the invention to provide the method and device that a kind of client is communicated with service end, to solve existing visitor The problem that between family end and service end, data bandwidth is less, network connection fault rate is higher.
For solving above-mentioned technical problem, the present invention provides a kind of method that client is communicated with service end, including:
Receive the connection request that distributed storage client sends to distributed storage service end, obtain described service end net The quantity of card;
Set up multiple socket by described network interface card in described client and described service end to connect;
Connect the Parallel Communication Network realizing described client and described service end using the plurality of socket.
Alternatively, described multiple socket are set up in described client and described service end by described network interface card connect bag Include:
Described network interface card meets the relation of one-to-one corresponding or one-to-many with described socket between being connected.
Alternatively, the described parallel network realizing described client and described service end using the plurality of socket connection Communication includes:
In transmitting terminal, data distribution is connected to the plurality of socket, it is right in receiving terminal, the plurality of socket to be connected The multiple processes answered merge.
Alternatively, described, multiple socket connections are set up in described client and described service end by described network interface card Also include afterwards:
Using the RSS technology of CPU, between multiple socket are connected, carry out load balance process.
Alternatively, the described parallel network realizing described client and described service end using the plurality of socket connection Communication includes:
When detect present communications connect break down when, data distribution to normal socket is connected and proceeds Data communication.
Present invention also offers the device that a kind of client is communicated with service end, including:
Request receiving module, please for receiving the connection that distributed storage client sends to distributed storage service end Ask, obtain the quantity of described service end network interface card;
Connection establishment module, for setting up multiple socket by described network interface card in described client and described service end Connect;
Communication module, for connecting the parallel net realizing described client and described service end using the plurality of socket Network communicates.
Alternatively, described connection establishment module is specially:Described network interface card is met between being connected with described socket one a pair Should or one-to-many relation module.
Alternatively, described communication module is specially:In transmitting terminal, data distribution is connected to the plurality of socket, connecing Receiving end connects, to the plurality of socket, the module that corresponding multiple processes merge.
Alternatively, also include:
Load balance process module, for set up in described client and described service end by described network interface card multiple After socket connects, using the RSS technology of CPU, between multiple socket are connected, carry out load balance process.
Alternatively, described communication module is specially:When detect present communications connect break down when, data distribution is arrived The module of data communication is proceeded on normal socket connection.
The method and device that client provided by the present invention is communicated with service end, receives distributed storage client The connection request sending to distributed storage service end, obtains the quantity of service end network interface card;By network interface card in client and clothes Business end is set up multiple socket and is connected;Connect the Parallel Communication Network realizing client and service end using multiple socket.This Application increased multiple network interface cards between client and service end, and same network interface card can produce multiple socket and connect, solution The single socket that determined connects the maximum restriction for data transfer, there is provided the data bandwidth between client and service end. And because having multiple socket to connect it is also possible to after network failure occurs, data distribution be connected above to normal, Reduce the fault rate of network connection.
Brief description
For the technical scheme of the clearer explanation embodiment of the present invention or prior art, below will be to embodiment or existing Technology description in required use accompanying drawing be briefly described it should be apparent that, drawings in the following description are only this Some bright embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can also root Obtain other accompanying drawings according to these accompanying drawings.
Fig. 1 is a kind of stream of specific embodiment of the method that client provided by the present invention is communicated with service end Cheng Tu;
Fig. 2 is another kind of specific embodiment of the method that client provided by the present invention is communicated with service end Flow chart;
Fig. 3 is the structured flowchart of the device that client provided in an embodiment of the present invention is communicated with service end;
Fig. 4 is the system architecture schematic diagram of the device that client provided by the present invention is communicated with service end.
Specific embodiment
In order that those skilled in the art more fully understand the present invention program, with reference to the accompanying drawings and detailed description The present invention is described in further detail.Obviously, described embodiment is only a part of embodiment of the present invention, rather than Whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not making creative work premise Lower obtained every other embodiment, broadly falls into the scope of protection of the invention.
A kind of flow chart of the specific embodiment of the method that client provided by the present invention is communicated with service end As shown in figure 1, the method includes:
Step S101:Receive the connection request that distributed storage client sends to distributed storage service end, obtain institute State the quantity of service end network interface card;
In the embodiment of the present invention, client and service end can support multiple physical network cards.
Step S102:Set up multiple socket by described network interface card in described client and described service end to connect;
Specifically, meet the relation of one-to-one corresponding or one-to-many with described socket between described network interface card is connected.
Step S103:Described client is realized using the plurality of socket connection logical with the parallel network of described service end Letter.
The method that client provided by the present invention is communicated with service end, receives distributed storage client to distribution The connection request that formula storage service end sends, obtains the quantity of service end network interface card;Built in client and service end by network interface card Vertical multiple socket connect;Connect the Parallel Communication Network realizing client and service end using multiple socket.The application exists Increased multiple network interface cards between client and service end, and same network interface card can produce multiple socket and connect, and solve list Individual socket connects the maximum restriction for data transfer, there is provided the data bandwidth between client and service end.And because For having multiple socket to connect it is also possible to after network failure occurs, data distribution being connected above to normal, reduces The fault rate of network connection.
On the basis of above-described embodiment, in the method that client provided by the present invention is communicated with service end, institute State to connect using the plurality of socket and realize the Parallel Communication Network of described client and described service end and can be specially:
In transmitting terminal, data distribution is connected to the plurality of socket, it is right in receiving terminal, the plurality of socket to be connected The multiple processes answered merge.
On the basis of any of the above-described embodiment, the method that client provided by the present invention is communicated with service end, Can also be preferably after multiple socket connect in described foundation in described client and described service end by described network interface card Ground includes:
Using the RSS technology of CPU, between multiple socket are connected, carry out load balance process.
Another kind of specific embodiment of the method that client as provided by the present invention in Fig. 2 is communicated with service end Shown in flow chart, the method includes:
Step S201:Receive the connection request that distributed storage client sends to distributed storage service end, obtain institute State the quantity of service end network interface card;
The network interface card quantity of service end after client is connected with service end, can be obtained, then set up to service end multiple Socket connects, it is possible to use whole network interface cards, and can also set up multiple connections inside each network interface card.
Step S202:Set up multiple socket by described network interface card in described client and described service end to connect;
Step S203:Using the RSS technology of CPU, between multiple socket are connected, carry out load balance process.
Step S204:Described client is realized using the plurality of socket connection logical with the parallel network of described service end Letter;
As a kind of preferred implementation, the embodiment of the present invention can further include:
Step S205:When detect present communications connect break down when, data distribution is connected to normal socket On proceed data communication.
Because after having multiple socket to connect it is also possible to solve network failure appearance, can be data distribution to normally Connection above, reduce the fault rate of connection.
The device below client provided in an embodiment of the present invention being communicated with service end is introduced, and is described below The method that communicated with service end with above-described client of the device that communicated with service end of client can be mutual To should refer to.
Fig. 3 is the structured flowchart of the device that client provided in an embodiment of the present invention is communicated with service end, with reference to Fig. 3 The device that client is communicated with service end can include:
Request receiving module 100, for receiving the connection that distributed storage client sends to distributed storage service end Request, obtains the quantity of described service end network interface card;
Connection establishment module 200, multiple for being set up in described client and described service end by described network interface card Socket connects;
Communication module 300, realizes described client with described service end simultaneously for connecting using the plurality of socket Row network service.
Refer to the system architecture schematic diagram of the device that Fig. 4 client provided by the present invention is communicated with service end, Described connection establishment module is specially:Described network interface card meets the relation of one-to-one corresponding or one-to-many with described socket between being connected Module.
On the basis of any of the above-described embodiment, the device that client provided by the present invention is communicated with service end In, described communication module is specially:In transmitting terminal, data distribution is connected to the plurality of socket, in receiving terminal to described many Individual socket connects the module that corresponding multiple processes merge.
On the basis of any of the above-described embodiment, the device that client provided by the present invention is communicated with service end is also May further include:
Load balance process module, for set up in described client and described service end by described network interface card multiple After socket connects, using the RSS technology of CPU, between multiple socket are connected, carry out load balance process.
Preferably, described communication module can be specially:When detect present communications connect break down when, data is divided It is dealt into the module that data communication is proceeded on normal socket connection.
The device that client provided by the present invention is communicated with service end, receives distributed storage client to distribution The connection request that formula storage service end sends, obtains the quantity of service end network interface card;Built in client and service end by network interface card Vertical multiple socket connect;Connect the Parallel Communication Network realizing client and service end using multiple socket.The application exists Increased multiple network interface cards between client and service end, and same network interface card can produce multiple socket and connect, and solve list Individual socket connects the maximum restriction for data transfer, there is provided the data bandwidth between client and service end.And because For having multiple socket to connect it is also possible to after network failure occurs, data distribution being connected above to normal, reduces The fault rate of network connection.
In this specification, each embodiment is described by the way of going forward one by one, and what each embodiment stressed is and other The difference of embodiment, between each embodiment same or similar partly mutually referring to.Fill for disclosed in embodiment For putting, because it corresponds to the method disclosed in Example, so description is fairly simple, referring to method part in place of correlation Illustrate.
Professional further appreciates that, in conjunction with the unit of each example of the embodiments described herein description And algorithm steps, can with electronic hardware, computer software or the two be implemented in combination in, in order to clearly demonstrate hardware and The interchangeability of software, generally describes composition and the step of each example in the above description according to function.These Function to be executed with hardware or software mode actually, the application-specific depending on technical scheme and design constraint.Specialty Technical staff can use different methods to each specific application realize described function, but this realization should Think beyond the scope of this invention.
The step of the method in conjunction with the embodiments described herein description or algorithm can directly be held with hardware, processor The software module of row, or the combination of the two is implementing.Software module can be placed in random access memory (RAM), internal memory, read-only deposit Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, depositor, hard disk, moveable magnetic disc, CD-ROM or technology In known any other form of storage medium in field.
To client provided by the present invention, the method being communicated with service end and device have carried out detailed Jie above Continue.Specific case used herein is set forth to the principle of the present invention and embodiment, and the explanation of above example is only It is to be used to help understand the method for the present invention and its core concept.It should be pointed out that for those skilled in the art For, under the premise without departing from the principles of the invention, the present invention can also be carried out with some improvement and modify, these improve and repair Decorations also fall in the protection domain of the claims in the present invention.

Claims (10)

1. a kind of method that client is communicated with service end is it is characterised in that include:
Receive the connection request that distributed storage client sends to distributed storage service end, obtain described service end network interface card Quantity;
Set up multiple socket by described network interface card in described client and described service end to connect;
Connect the Parallel Communication Network realizing described client and described service end using the plurality of socket.
2. client as claimed in claim 1 is communicated with service end method it is characterised in that described by described net It is stuck in described client and described service end is set up multiple socket and connected inclusion:
Described network interface card meets the relation of one-to-one corresponding or one-to-many with described socket between being connected.
3. client as claimed in claim 2 is communicated with service end method it is characterised in that described using described many Individual socket connection is realized described client and is included with the Parallel Communication Network of described service end:
In transmitting terminal, data distribution is connected to the plurality of socket, in receiving terminal, the plurality of socket is connected corresponding Multiple processes merge.
4. the client as described in any one of claims 1 to 3 is communicated with service end method is it is characterised in that in institute State to set up after multiple socket connect in described client and described service end by described network interface card and also include:
Using the RSS technology of CPU, between multiple socket are connected, carry out load balance process.
5. client as claimed in claim 4 is communicated with service end method it is characterised in that described using described many Individual socket connection is realized described client and is included with the Parallel Communication Network of described service end:
When detect present communications connect break down when, data distribution to normal socket is connected and proceeds data Communication.
6. the device that a kind of client is communicated with service end is it is characterised in that include:
Request receiving module, for receiving the connection request that distributed storage client sends to distributed storage service end, obtains Take the quantity of described service end network interface card;
Connection establishment module, for setting up multiple socket even by described network interface card in described client and described service end Connect;
Communication module, is led to for being connected the parallel network realizing described client and described service end using the plurality of socket Letter.
7. client as claimed in claim 6 is communicated with service end device is it is characterised in that described connection establishment mould Block is specially:Described network interface card meets the module of the relation of one-to-one corresponding or one-to-many with described socket between being connected.
8. the device that client as claimed in claim 7 is communicated with service end is it is characterised in that described communication module has Body is:In transmitting terminal, data distribution is connected to the plurality of socket, in receiving terminal, the plurality of socket is connected and correspond to The module that merges of multiple processes.
9. the device that the client as described in any one of claim 6 to 8 is communicated with service end is it is characterised in that also wrap Include:
Load balance process module, for set up in described client and described service end by described network interface card multiple After socket connects, using the RSS technology of CPU, between multiple socket are connected, carry out load balance process.
10. client as claimed in claim 9 is communicated with service end device is it is characterised in that described communication module It is specially:When detect present communications connect break down when, data distribution to normal socket is connected and proceeds The module of data communication.
CN201610820521.0A 2016-09-13 2016-09-13 Method and device for communicating between client and server Pending CN106385448A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610820521.0A CN106385448A (en) 2016-09-13 2016-09-13 Method and device for communicating between client and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610820521.0A CN106385448A (en) 2016-09-13 2016-09-13 Method and device for communicating between client and server

Publications (1)

Publication Number Publication Date
CN106385448A true CN106385448A (en) 2017-02-08

Family

ID=57936500

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610820521.0A Pending CN106385448A (en) 2016-09-13 2016-09-13 Method and device for communicating between client and server

Country Status (1)

Country Link
CN (1) CN106385448A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107343037A (en) * 2017-06-30 2017-11-10 郑州云海信息技术有限公司 The data transmission method and device of a kind of distributed memory system
CN107562550A (en) * 2017-09-01 2018-01-09 成都瀚蓝科技有限公司 A kind of data distributing method
CN109586965A (en) * 2018-12-04 2019-04-05 郑州云海信息技术有限公司 A kind of network interface card RSS method of automatic configuration, device, terminal and storage medium
CN109819031A (en) * 2019-01-24 2019-05-28 广州虎牙信息科技有限公司 A kind of connection method, device, equipment and storage medium
WO2019148482A1 (en) * 2018-02-05 2019-08-08 Cisco Technology, Inc. Configurable storage server with multiple sockets
CN110198312A (en) * 2019-05-23 2019-09-03 北京华三通信技术有限公司 Message treatment method and device
CN112363676A (en) * 2020-11-18 2021-02-12 无锡江南计算技术研究所 Control method and system based on low access delay distributed storage system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719918A (en) * 2009-11-27 2010-06-02 北京交通大学 Improved multi-joint and multi-path transmission method
CN103634299A (en) * 2013-11-14 2014-03-12 北京邮电大学 Real-time stream media transmission terminal and method based on multi-connection
CN103685480A (en) * 2013-11-29 2014-03-26 云海创想信息技术(无锡)有限公司 Transmission control protocol (TCP) network implementing method and server
CN104539531A (en) * 2014-12-25 2015-04-22 网宿科技股份有限公司 Data transmission method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719918A (en) * 2009-11-27 2010-06-02 北京交通大学 Improved multi-joint and multi-path transmission method
CN103634299A (en) * 2013-11-14 2014-03-12 北京邮电大学 Real-time stream media transmission terminal and method based on multi-connection
CN103685480A (en) * 2013-11-29 2014-03-26 云海创想信息技术(无锡)有限公司 Transmission control protocol (TCP) network implementing method and server
CN104539531A (en) * 2014-12-25 2015-04-22 网宿科技股份有限公司 Data transmission method and device

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107343037A (en) * 2017-06-30 2017-11-10 郑州云海信息技术有限公司 The data transmission method and device of a kind of distributed memory system
CN107343037B (en) * 2017-06-30 2020-07-07 郑州云海信息技术有限公司 Data transmission method and device of distributed storage system
CN107562550A (en) * 2017-09-01 2018-01-09 成都瀚蓝科技有限公司 A kind of data distributing method
WO2019148482A1 (en) * 2018-02-05 2019-08-08 Cisco Technology, Inc. Configurable storage server with multiple sockets
CN110352590A (en) * 2018-02-05 2019-10-18 思科技术公司 Configurable storage server with multiple slots
US11966350B2 (en) 2018-02-05 2024-04-23 Cisco Technology, Inc. Configurable storage server with multiple sockets
CN109586965A (en) * 2018-12-04 2019-04-05 郑州云海信息技术有限公司 A kind of network interface card RSS method of automatic configuration, device, terminal and storage medium
CN109819031A (en) * 2019-01-24 2019-05-28 广州虎牙信息科技有限公司 A kind of connection method, device, equipment and storage medium
CN110198312A (en) * 2019-05-23 2019-09-03 北京华三通信技术有限公司 Message treatment method and device
CN110198312B (en) * 2019-05-23 2021-12-24 北京华三通信技术有限公司 Message processing method and device
CN112363676A (en) * 2020-11-18 2021-02-12 无锡江南计算技术研究所 Control method and system based on low access delay distributed storage system

Similar Documents

Publication Publication Date Title
CN106385448A (en) Method and device for communicating between client and server
CN107277416A (en) television terminal and control method
KR20150030243A (en) Multiple protocol tunneling using time division operations
US20090109864A1 (en) Network card testing system
CN103077148B (en) A kind of host communication method of Based PC IE and main frame
US10256639B2 (en) Reverse power supply management method, apparatus and system
WO2010112809A8 (en) Dynamic line management
CN104737543A (en) Method and device for providing high speed data transmission with video data
CN104750588A (en) Serial port communication based pressure testing method
CN106878197A (en) A kind of management system and method for the transmission of cloud platform message
CN104995872A (en) Router with passive interconnect and distributed switchless switching
CN102420773A (en) Token-bucket-algorithm-based data transmission method and traffic control device
CN104780118B (en) A kind of flow control method and device based on token
CN105138485A (en) Serial bus address management device
CN103001836A (en) Serial communication method and serial communication system free of address allocation
CN102427452B (en) Synchronize (SYN) message transmitting method and device and network equipment
CN103051612B (en) Fire compartment wall and prevent method of network attack
CN105656794A (en) Data distribution method and device
WO2020103490A1 (en) Circuit board, server, and server network
CN104516852B (en) The circuit of I/O links divides multiplexing
CN103220260A (en) Method of updating data, server, client-side and system
CN105978823B (en) Data transmission method and device for game system
CN108173909A (en) Method of data synchronization, mobile terminal and computer readable storage medium
EP3163818A1 (en) Packet processing method and related device for network device
CN104837017A (en) Intelligent system and method for transmitting block-partitioning image

Legal Events

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

Application publication date: 20170208