Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 2.65 KB

README.md

File metadata and controls

51 lines (32 loc) · 2.65 KB

Remote Procedure Call

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.

Links

Netty 4-based RPC System Development on Slideshare website.

System Features

  • 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

System Requirements

  • Java Development Kit (JDK) 1.7.x or later stable version.

Library Dependencies

Get Started

  • Please refer to three classes defined in the test.tw.me.ychuang.rpc package: BizServiceSkeleton, BizServiceStub, and BizServiceTest classes separately.

  • A main class is Main in the tw.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 the tw.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 the Main class and Simulator class at the same time.

  • ClientChannelManager in the tw.me.ychuang.rpc package provides several convenient methods for management, e.g. pauseChannelProxies(serverHost, serverPort), stopChannelProxies(serverHost, serverPort), and restartChannelProxies(serverHost, serverPort) methods.

License

Remote Procedure Call is released under version 2.0 of the Apache Version 2.0