Scratch handwriting dubbo rpc framework

rpc

rpc is java rpc framework netty-based implementation, similar to dubbo.

Mainly used for individual learning by getting into the deep understanding of the underlying rpc implementation principle.

Foreword

Work to date, the contact rpc framework has been for a long time.

But for its principles have been just a rough idea about, never studied in depth.

I had always wanted to write, but was delayed due to various reasons.

Technical preparations

Java Concurrency real learning

TCP / IP protocol study notes

Netty Definitive Guide to learn

The preparation phase techniques, spend a relatively long time.

There are also suggestions to write the relevant knowledge base rpc framework.

Not repeat the experience of other rpc framework used here.

Fast iterative

Had always wanted to write rpc, the cause of action is not to think too much and do too little.

Think about all the finish, the result is got nothing to write.

So this development, each branch of code to do the actual few, only a function point.

One after another after nearly a month of improvement, with his experience and knowledge to further rpc framework.

Code to achieve the function, the main reference Apache Dubbo

File

File

Markdown text document will be used in the form of supplement what code level do not have.

Code comments

The code has detailed notes, easy to read and post-maintenance.

test

Currently the test code is not really perfect. Follow-up will continue to completion.

rpc module

rpc-common common code

rpc-server server

rpc-client client

rpc-register registry

rpc-test test module

Branch code

release_0.0.1-server server start

release_0.0.2-client client starts

release_0.0.3- client calls the server

release_0.0.4-p2p client automatically call server

release_0.0.5-serial sequence of

release_0.0.6- universal call to reflection

release_0.0.7-timeout timeout handling

release_0.0.8-register registry

release_0.0.9-load balance load balancing

release_0.1.0-callType invocation

release_0.1.1-fail failure policy

release_0.1.2-generic generalization call

release_0.1.3-gracefully elegant closed

release_0.1.4-interceptor interceptor

Test code

From v0.0.6 and later, in order to allow the code to keep clean, all the test code will be placed rpc-example.

Each test code and implement versions-one correspondence.

rpc-example

Documentation

0.0.1-server server start

0.0.2-client client starts

0.0.3- client calls the server

0.0.4-p2p client automatically call server

0.0.5-serial sequence of

0.0.6- universal call to reflection

0.0.7-timeout timeout handling

0.0.8-register registry

0.0.9-load balance load balancing

0.1.0-callType invocation

0.1.1-fail failure policy

0.1.2-generic generalization call

0.1.3-gracefully elegant closed

0.1.4-interceptor interceptor

Guess you like

Origin www.cnblogs.com/houbbBlogs/p/11780210.html