Responsibility chain model of behavior model
1 General
Chain of responsibility pattern is a common behavior pattern. It encapsulates the processor into a processing chain, so that the request can be delivered on the chain. The processor on the chain decides whether to process the request or not.
2 responsibility chain mode
A typical usage scenario of responsibility chain mode is when an e ...
Added by Nymphetamine on Sat, 06 Jun 2020 13:17:26 +0300
Consumption mode of consumer of pulsar
client processing logic
ConnectionPool
netty related configurations are available in com.yahoo.pulsar.client.impl.ConnectionPool
public ConnectionPool(final PulsarClientImpl client, EventLoopGroup eventLoopGroup) {
this.eventLoopGroup = eventLoopGroup;
this.maxConnectionsPerHosts = client.getConfiguration().getConnection ...
Added by Nothsa on Wed, 27 May 2020 14:04:46 +0300
NettyConfiguration of spring cloud gateway
This paper mainly studies the NettyConfiguration of spring cloud gateway
NettyConfiguration
@Configuration
@ConditionalOnProperty(name = "spring.cloud.gateway.enabled", matchIfMissing = true)
@EnableConfigurationProperties
@AutoConfigureBefore(HttpHandlerAutoConfiguration.class)
@AutoConfigureAfter({GatewayLoadBalancerC ...
Added by BZorch on Mon, 20 Apr 2020 18:20:59 +0300
Handwritten MVC framework - example of using IOC alone
-------Previous: Handwritten MVC framework (two) - code implementation and use examples------
background
I used the GMVC framework when developing the GMQ framework, and found some inconveniences in the process of using, which were also optimized. Currently, GMQ transmission is based on http transmission. I plan to use netty instead. Because my ...
Added by groovything on Sun, 12 Apr 2020 17:17:29 +0300
Dubbo Source Learning-Service Reference (Remote Call Phase)
In the previous article, we looked at what was done during the startup phase of a Dubbo service reference, and what was not seen during the remote invocation phase.The Dubbo service invocation process is complex and involves many steps, such as sending requests, codec, service demotion, filter chain processing, serialization, thread dispatch, ...
Added by Aaron111 on Sat, 21 Mar 2020 05:19:50 +0200
Architects must fully master the responsibility chain mode of the thorough way of kicking the ball
In our daily life, the responsibility chain mode is quite common. We usually work to handle some affairs, often all departments cooperate to complete a project task. Each department has its own responsibilities, so many times when a part of the work has been completed, it will be handed over to the next department, until all the departments hav ...
Added by PHPfolife on Mon, 16 Mar 2020 12:22:36 +0200
Example of ProtocolBuf implemented by Java native Socket
1. Development environment
1.Protocol version: 3.9 (latest available) Download Address
2.Protocol Protocol Version: 3
3. Ordinary java environment, source code is 2 classes.
This is mainly about instant messaging using the native Java Socket API with its previous and back-end.Then binary data ( ...
Added by joeiscoolone on Fri, 06 Mar 2020 02:50:05 +0200
Lightweight RPC Design and Implementation Version 1
What is RPC
RPC (Remote Procedure Call Protocol), a remote procedure call, has the common explanation that a client calls an object that exists on a remote computer without knowing the details of the call, just like an object in a local application, without knowing the protocol of the underlying network technology.
Simple overall workflow
The r ...
Added by varai on Wed, 19 Feb 2020 19:01:20 +0200
Java Concurrent Programming Basic type atomic class initial use plus source code analysis
Java Concurrent Programming Basic type atomic class initial use plus source code analysis
Let's first look at the atomic classes.
Now let's see how to use these atomic classes.
AtomicInteger
Code:
package atomic;
import java.util.concurrent.atomic.AtomicInteger;
public class AtomicIntegerDemo1 impl ...
Added by Discord on Tue, 18 Feb 2020 06:12:17 +0200
Chapter 3: protocol transmission between server and client
Chapter 3: protocol transmission between Netty server and client
Based on the content of the previous chapter, we learned how to send string data to the server and output it. In this chapter, we will talk about how to make protocol, transform data content into corresponding format for communication, a ...
Added by caster001 on Fri, 17 Jan 2020 14:44:23 +0200