Remote Procedure Call is a Netty 4-based Remote Procedure Call (RPC) system.
This is my first GitHub project for the Spirit of Open Source. I has rewritten the source codes and completed the new features. Developing a simple Peer-to-peer framework based on RPC framework is my next plan in the future.
Netty 4-based RPC System Development on Slideshare website.
- NIO-based client and server with TCP socket
- Many-to-many relationship among servers and clients with multi-channels
- Parameters marshalling and unmarshalling by JSON
- Idle channels detection
- Inactive channels reconnection
- Cross-platform remote invocation by JSON and TCP socket
- Stream compresses and decompresses
- High availability support
- Load balancing algorithms: Round-Robin and Low-Workload-First
- Java Development Kit (JDK) 1.7.x or later stable version.
- Netty 4.0.x or later stable version except Netty 5.0.
- Google Gson 2.3.x or later stable version.
- Apache Commons Lang 3.3.x or later stable version.
- SLF4j 1.7.x or later stable version.
- Log4j 2.2 or later stable version.
- JZlib 1.1.3 or later stable version.
- JUnit 4.1.2 or later stable version.
-
Please refer to three classes defined in the
test.tw.me.ychuang.rpcpackage:BizServiceSkeleton,BizServiceStub, andBizServiceTestclasses separately. -
A main class is
Mainin thetw.me.ychuang.rpc. Starting up the client or/and server processes that is dependent on rpc-client.properties or/and rpc-server.properties whether are found in the classpath. -
Another main class is
Simulatorin thetw.me.ychuang.rpc. It provides several scenarios to simulate some use cases, e.g. urgent and heavy user requests. Please refer to rpc-simluator.properties. Please avoid starting up theMainclass andSimulatorclass at the same time. -
ClientChannelManagerin thetw.me.ychuang.rpcpackage provides several convenient methods for management, e.g.pauseChannelProxies(serverHost, serverPort),stopChannelProxies(serverHost, serverPort), andrestartChannelProxies(serverHost, serverPort)methods.
Remote Procedure Call is released under version 2.0 of the Apache Version 2.0