Service Publishing for Dubbo Source Analysis 3

1. Overview of service publishing The Dubbo service export process starts when the Spring container publishes a refresh event [dubbo:service --> ServiceBean --> onApplicationEvent (ContextRefreshedEvent event)] and executes the service export logic after receiving the ContextRefreshedEvent even ...

Posted on Sat, 11 Jan 2020 16:59:36 -0800 by amargharat

Talk about the indicator monitoring of lettuce

order This paper mainly studies the index monitoring of lettuce DefaultCommandLatencyEventPublisher lettuce-core-5.0.4.RELEASE-sources.jar!/io/lettuce/core/event/metrics/DefaultCommandLatencyEventPublisher.java public class DefaultCommandLatencyEventPublisher implements MetricEventPublisher { private final EventExecutorGroup eventExecutorG ...

Posted on Wed, 01 Jan 2020 02:58:18 -0800 by MarcB

How can netty solve sticking and half wrapping

TCP is a protocol based on "flow". The so-called flow is like the water in a river without strict boundaries. The bottom layer of TCP doesn't know the specific implementation of the upper layer service. It will be divided according to the specific situation of the TCP buffer. Therefore, a complete TCP packet in the service may be spl ...

Posted on Tue, 31 Dec 2019 14:37:14 -0800 by jredsmyth

SPI of Dubbo source code analysis

I. overview This article introduces adaptive extension, the implementation of getadaptive extension(). Many functions of the ExtensionLoader class itself also use adaptive extensions. Includes the ExtensionFactory extension. Generally speaking, the logic of adaptive extension is: when calling the method of extension point, automatically judge ...

Posted on Tue, 17 Dec 2019 12:46:03 -0800 by feddie1984

Basic use and principle of Netty (NIO framework)

NIO framework Netty, Mina, Akka (scala highly available, scalable) Netty provides asynchronous event driven Web application framework and tools for rapid development of high performance, high reliability Network server And client programs. Netty is a client and server programming framework based on NIO. Using netty can ensu ...

Posted on Tue, 03 Dec 2019 22:36:48 -0800 by mabans

Netty application example websocket application example

1. server implementation Source code implementation: public void run(int port){ EventLoopGroup bossGroup = new NioEventLoopGroup(); EventLoopGroup workGroup = new NioEventLoopGroup(); try{ ServerBootstrap b = new ServerBootstrap(); b.group(bossGroup, workGroup) .channel(NioServerSocketChannel.class) ...

Posted on Tue, 03 Dec 2019 16:39:40 -0800 by madhukar_garg

Using LineBasedFrameDecoder and StringDecoder to solve the problem of half package sticking

Before modification Netty server development Code, change to the following code public class TimeServer { public void bind(int port) throws Exception { EventLoopGroup bossGroup = new NioEventLoopGroup(); EventLoopGroup workerGroup = new NioEventLoopGroup(); try { ServerBootstrap b = new ServerBootstrap ...

Posted on Sun, 01 Dec 2019 16:32:43 -0800 by MK27

Java learning notes 17 netty practice and optimization

Try to do it yourself Short connection: after the request / response, close the established TCP connection, and establish another connection next time. Long connection: after the request / response, do not close the TCP connection, multiple requests, and reuse the same connection. In order to avoid the performance loss caused by frequent connec ...

Posted on Sun, 01 Dec 2019 10:55:42 -0800 by solee

Java and Python use Grpc to access the Serving code of Tensorflow

I found that a lot of code on the Internet is mnist, and I am not engaged in image processing, so I don't want to do this example; Wide & deep, a model with various features, is what I need. iris is also a text training model, so it's very simple; This article gives Python and Java service code to access Tensorflow. Java ...

Posted on Fri, 22 Nov 2019 08:56:45 -0800 by akabugeyes

Implementation of netty source code parsing (4.0)-29 Future mode

Future mode is an important asynchronous concurrent mode, which is implemented in JDK. However, the function of future mode implemented by JDK is relatively simple and complex to use. On the basis of JDK Future, Netty has strengthened the ability of future, which is embodied in: A simpler way to return results. In JDK, users need to implement ...

Posted on Tue, 19 Nov 2019 23:48:46 -0800 by joePHP