Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Remote data transmission method based on Netty

A remote data transmission and data technology, applied in the Internet field, can solve problems such as thread stack overflow, server downtime, I/O thread easy to block, etc., and achieve high data transmission, improve processing efficiency, and high throughput.

Inactive Publication Date: 2020-12-29
CHINA SOUTHERN POWER GRID DIGITAL GRID RES INST CO LTD +1
View PDF2 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The remote procedure call of the traditional RPC framework or the remote service based on the remote method call in the form of RMI all use synchronous blocking I / O (input / output) events, and synchronous blocking I / O events are easy to increase with the increase in client concurrency and the network Frequent waiting for delay growth causes I / O threads to easily block
If the thread cannot be released in time, the I / O event processing efficiency will drop sharply, and even the thread stack overflow will cause the server to go down.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Remote data transmission method based on Netty
  • Remote data transmission method based on Netty

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0016] The present invention will be described in detail below in conjunction with the accompanying drawings and embodiments.

[0017] like figure 1 As shown, the remote data transmission method of the Netty-based NIO (non-blocking IO, non-blocking IO) framework comprises the following steps:

[0018] Step S101: the Netty client initiates an RPC (Remote Procedure Call Protocol, remote procedure call protocol) request, and starts the Netty connector to establish a connection with the Netty server.

[0019] Step S102: In the process of establishing a connection between the Netty client and the Netty server, the Netty client initializes the thread group.

[0020] Step S103: the Netty client allocates NIO (non-blocking IO, non-blocking IO) threads, and establishes a thread pool.

[0021] In this embodiment, the Netty client adopts Reactor mode (a reactor mode) as the startup mode of this embodiment. It should be understood that when multiple Netty servers initiate request servi...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a remote data transmission method based on Netty. The method comprises the following steps: initiating an RPC request; in the process of establishing the connection, initializing a thread group; assigning an NIO thread, and establishing a thread pool; starting a data transponder, and processing an I / O event; processing packet boundaries; constructing a connection server channel; putting the connected channels into a queue; sending the data to a buffer area and then refreshing and outputting; when receiving the data, accessing the data into a kafka message queue; packaging the data into Producer Record of kafka; judging whether a specified partition exists in the topic or not; if it is determined that the specific partition does not exist in the top, judging whethera specific key exists or not; if it is determined that the specified key exists, specifying a partition for the top by adopting a corresponding hash algorithm according to the value of the key; and accessing to the partitions corresponding to the topics, and sequentially storing the data into the buffer pools corresponding to the partitions. By means of the mode, high-throughput data transmissioncan be achieved, the I / O event processing efficiency is effectively improved, and the phenomenon of server downtime caused by thread stack overflow is avoided.

Description

technical field [0001] The invention relates to the technical field of the Internet, in particular to a Netty-based remote data transmission method. Background technique [0002] With the rapid development of the mobile Internet, the scale of the website is expanding day by day. For example, communication, business, logistics, and game system visits are all rapidly increasing numbers. It is said that they all face the test of big data carrying capacity. [0003] The remote procedure call of the traditional RPC framework or the remote service based on the remote method call in the form of RMI all use synchronous blocking I / O (input / output) events, and synchronous blocking I / O events are easy to increase with the increase in client concurrency and the network Latency increases and frequent waiting causes I / O threads to easily block. If the thread cannot be released in time, the I / O event processing efficiency will drop sharply, and even the thread stack overflow will cause t...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/54G06F9/50
CPCG06F9/542G06F9/546G06F9/544G06F9/547G06F9/5027G06F2209/541G06F2209/544G06F2209/548G06F2209/5011G06F2209/5018
Inventor 张华兵黄海英曹小明张今革杨航徐晖魏理豪
Owner CHINA SOUTHERN POWER GRID DIGITAL GRID RES INST CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products