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.rpc
package:BizServiceSkeleton
,BizServiceStub
, andBizServiceTest
classes separately. -
A main class is
Main
in 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
Simulator
in 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 theMain
class andSimulator
class at the same time. -
ClientChannelManager
in thetw.me.ychuang.rpc
package 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