Source code implementation of Netty master slave Reactor multithreading mode
Netty -- source code implementation of master-slave Reactor multithreading mode
Overview
What is EventLoopGroup?
EventLoopGroup is a container for storing EventLoop, and it should have the function of thread pool.
graph BT;
EventLoopGroup --> EventExecutorGroup;
EventExecutorGroup --> ScheduledExecutorService;
Because EventLoopGr ...
Posted by wmhop on Thu, 05 Dec 2019 20:44:52 -0800
Java calls Http interface (7,end)--WebClient calls Http interface
WebClient is a non blocking and responsive Http client provided by Spring. It provides synchronous and asynchronous API s, which will replace RestTemplate and AsyncRestTemplate. The software versions used in this paper are Java 1.8.0, SpringBoot 2.2.1.RELEASE.
1. Server
See also Java calls Http interface (1) -- write server
2. Call
The use of ...
Posted by seeker2921 on Fri, 29 Nov 2019 06:03:11 -0800
Java learning notes 16 netty buffer ByteBuf details
Netty's own ByteBuf
ByteBuffer is designed to solve the problems of ByteBuffer and meet the daily needs of network application developers.
Disadvantages of JDK ByteBuffer:
Unable to expand dynamically: the length is fixed and cannot be expanded and contracted dynamically. When the data is larger than the ByteBuffer capacity, an index out of bo ...
Posted by kmutz22 on Tue, 26 Nov 2019 08:58:04 -0800
Java learning note 14 netty thread model and source code analysis
Netty introduction
Netty is a high performance. The highly scalable asynchronous event driven network application framework greatly simplifies network programming such as TCP and UDP client and server development. Netty's four key elements:
Reactor thread model: a high performance multithreaded programming idea
Self defined Channel concept in ...
Posted by itguysam on Mon, 25 Nov 2019 22:02:59 -0800
Netty learning notes (10) - example of netty application
Originally, I wanted to learn about Netty components first, then learn about component applications. Then, learning more and more makes me feel weird. I always feel that there is something missing. I don't know how to use components when I learn them. Think about learning from Netty applications first.
Own technology learning method: first ...
Posted by RMcLeod on Sun, 24 Nov 2019 06:00:06 -0800
Tong Gong said that Java NIO of netty series makes group chat possible (I am addicted to chatting with myself)
Hello, I am Tong Ge, this is the fourth article in the netty series.
Welcome to my public Tong Tong to read Source Systematically to learn the knowledge of Source-Architecture.
brief introduction
In the previous chapter, we learned the story of BIO/NIO/AIO in Java together. This chapter will take you all together to use pure NIO to implement a ...
Posted by hellonoko on Tue, 19 Nov 2019 10:50:46 -0800
netty source code parsing (4.0)-28 ByteBuf memory pool: pooledbybufalocator - assemble everything
Pooledbytebufalocator is responsible for initializing PoolArena(PA) and PoolThreadCache(PTC). It provides a series of interfaces to create PooledByteBuf objects that use heap memory or direct memory. These interfaces are just a skin. PA and PTC capabilities are fully used internally. The initialization process is divided into two steps, first i ...
Posted by Gente on Mon, 11 Nov 2019 22:43:58 -0800
Deep analysis of thread pool in java thread series -- construction method
(it's more convenient to see the source code on the horizontal screen of mobile phone)
Note: java source code analysis part is based on java version 8 unless otherwise specified.
brief introduction
The construction method of ThreadPoolExecutor is to create the entry of thread pool. Although it's relatively simple, it has a large amount of in ...
Posted by cyberRobot on Mon, 04 Nov 2019 16:18:44 -0800
RocketMQ upgrade to master-slave switch (DLedger, multi replica) practice
This article mainly introduces how to upgrade RocketMQ cluster from the original master-slave synchronization to the master-slave switch.
First, it introduces the core configuration attributes related to the master-slave switch of the DLedger multi replica, that is, the RocketMQ master-slave switch. Then it tries to build a master-slave synchro ...
Posted by amesowe on Sun, 03 Nov 2019 02:22:11 -0800
Netty - sticky and half wrapped
In the previous article, we introduced sticky package and half package and their general solutions. Today, we will focus on how Netty implements the framing scheme.<!-- more -->
Decoding core process
Three kinds of decoders, FixedLengthFrameDecoder, DelimiterBasedFrameDecoder, LengthFieldBasedFrameDecoder, have been introduced before. The ...
Posted by ngreenwood6 on Wed, 23 Oct 2019 19:05:38 -0700