Reflection, jdk dynamic proxy, rpc
reflex
Reflection is one of the characteristics of Java programming language. It allows running Java programs to check themselves, or "self audit", and can directly operate the internal properties and methods of the program.
Some classes of reflection
Field class: represents the object properties obtained in reflection
Constructor ...
Posted by winkhere on Fri, 14 Jan 2022 08:19:47 +0100
Handwritten RPC - crude version
preface
Recently, I was accidentally isolated, had a holiday to think about it, and decided to start in the handwritten sequence. This sequence had an idea when looking at the source code of Nacous and gateway, but it has not been implemented. Take advantage of isolation.
Introduction to essential knowledge
Serializable and Deserialize
Ser ...
Posted by tomwhalen on Fri, 07 Jan 2022 01:52:45 +0100
Distributed RPC framework Apache Dubbo
1. Evolution process of software architecture
The development of software architecture has experienced the evolution process from single architecture, vertical architecture, SOA architecture to micro service architecture. Let's learn about these architectures respectively.
1.1 single structure
Architecture Description:
All functions ar ...
Posted by erth on Thu, 06 Jan 2022 16:17:58 +0100
Based on the case of custom RPC based on Netty, the transformation is carried out. Implementation of simple service registration and discovery mechanism based on Zookeeper
Modification version required:
1. Start two servers to automatically register IP and port information with Zookeeper
2. When the client starts, it obtains the node information of all service providers from Zookeeper, and the client establishes a connection with each server
3. After a server goes offline, the Zookeeper registration list will ...
Posted by MP145 on Tue, 04 Jan 2022 00:27:46 +0100
Teach you to write an RPC (SPI, registry, etc.)
In the previous two articles, we learned about the SPI mechanism in RPC and dubbo. In order to further understand the whole process of RPC call, in this article, we will implement simple SPI mechanism, zookeeper registry, load balancing and other functions. I will put the link of the source code at the end of the article. If necessary, you c ...
Posted by poseidix on Mon, 03 Jan 2022 13:26:11 +0100
Dubbo has a memory leak
[premise]
The content described in this article is based on Dubbo version 2.7.3
[text]
As shown above, in the previous article com. alibaba. There is a memory leak in fastjson In this article, we explained that there is a memory leak in threadLocals of threads. Look closely at the figure above. There is another place where 662.19KB of memor ...
Posted by Renich on Sun, 02 Jan 2022 08:18:22 +0100
2021SC@SDUSC -Yamada Zhiyun source code analysis (13)
2021SC@SDUSC
rpc procedure in seafile
According to the previous analysis, I already know that one of the functions of seafile server is to provide rpc to the front end, that is, seahub. Therefore, in the source code of seahub, there should also be a call to searpc. Next, the relevant parts of seahub source code are analyzed.
It is learned fr ...
Posted by lush_pierre on Sat, 01 Jan 2022 12:31:10 +0100
[Dubbo] Provider request processing
1. Preface
The previous article analyzes how the Consumer initiates an RPC call, and how the Request object Request is encoded from the client, then sent to the server through the network, and then decoded by the server. Next, it starts to analyze how the service Provider handles RPC call requests.
This paper will analyze from two dimension ...
Posted by Gambler on Thu, 16 Dec 2021 17:27:13 +0100
Cluster layer for in-depth analysis
Relationship of each node:
The Invoker here is an abstraction of the callable Service of the Provider. The Invoker encapsulates the Provider address and Service interface information;
Directory represents multiple invokers and can be regarded as a List. However, unlike List, its value may change dynamically, such as pushing changes by the reg ...
Posted by sunshine66 on Thu, 16 Dec 2021 11:21:22 +0100
Dubbo service invocation source code analysis
RPC call: the client serializes and transmits the service call interface, method name, method type parameters and method parameter values to the server, and the server reads the information in reverse sequence for proxy call. Summary: (1) When the client starts, it will pull and subscribe to the corresponding service list from the registry, and ...
Posted by turpentyne on Sun, 12 Dec 2021 11:44:45 +0100