Skip to content

zhiming99/rpc-frmwrk

Repository files navigation

[中文]

rpc-frmwrk new badge

This is an asynchronous and event-driven RPC implementation for embeded system with small system footprint. It is targeting at both IOT platforms and mainstream servers with high-throughput and high availability. It features highly easy to use with a versatile skeleton generator, to generate C++, Python, Java or JavaScript skeleton code instantly. Welcome to use!

Concept

Here is an introduction to the concept of rpc-frwmrk.

Features

  1. Synchronous/asynchronous request handling
  2. Active/passive request canceling.
  3. Server-push events
  4. Keep-alive for time-consuming request.
  5. Simultaneous object access over network and IPC.
  6. Peer online/offline awareness.
  7. Publishing multiple local/remote object services via single network port.
  8. Full-duplex streaming channels
  9. Both OpenSSL and GmSSL support
  10. Websocket support
  11. Object access via Multihop routing
  12. Authentication support for Kerberos, OAuth2 and SimpAuth(password)
  13. Node Redudancy/Load Balance
  14. A collection of skeleton generators for C++, Python Java, and JavaScript
  15. A GUI config tool for rpcrouter
  16. rpcfs - filesystem interface for rpc-frmwrk

Building rpc-frmwrk

Installation

  1. Run sudo make install from the root directory of rpc-frmwrk source tree.
  2. Configure the runtime parameters for rpc-frwmrk as described on this page.
  3. Start the daemon process rpcrouter -dr 2 on server side, and on start daemon process rpcrouter -dr 1 on client side. And now we are ready to run the helloworld program. For more information about rpcrouter, please follow this link.
  4. Smoketest with HelloWorld. Start the hwsvrsmk, the helloworld server on server side. And start the hwclismk on the client side.
  5. This wiki has some detail information.

Development

rpc-frmwrk can generate skeleton systems for different system architectures.

  1. The micro-service RPC. rpc-frmwrk has an interface description language, ridl to help you to generate the skeleton code in one second. Examples can be found here. The advantage is that you can deploy new services on the fly, as well as shutting down some of them.
  2. The single-app RPC. ridlc can also generate skeleton code in the form of the classic client/server program. The advantage is it has much better performance.
  3. Programming with rpcfs. The ridlc can generate a pair of filesystems for server and client respectively with the ridl file. And all the rpc traffic goes through file read/write and other file operations. And moreover rpcfs hosted by the rpcrouter provides information for runtime monitoring and management.

Deployment

The configuration tool rpcfg.py for rpc-frmwrk can automatically generate installation packages for the target machine. The installation package can install the runtime libraries of rpc-frmwrk and perform system configuration. The configuration includes setting the runtime parameters for rpc-frmwrk, configuring the Apache or Nginx web server, distributing SSL keys, and, when authentication is enabled, configuring the Kerberos server. For more details about the installation package, please refer to the user guide for rpcfg.py.

Monitoring

rpc-frmwrk provides a web-based monitoring program, which allows you to easily monitor rpc-frmwrk servers and configure runtime parameters from various platforms. The monitoring program features access control, so different users can access different content. Access control can be easily customized from the backend. The monitoring system can enable logging for specific setpoints at the backend, providing more detailed historical data for analysis and optimization. For information on setting up the monitoring functionality, please refer to this article.

Runtime Dependency

This project depends on the following 3rd-party packags at runtime:

  1. dbus-1.0 (dbus-devel)
  2. libjson-cpp (jsoncpp-devel)
  3. lz4 (lz4-devel)
  4. cppunit-1 (for the test cases, cppunit and cppunit-devel)
  5. openssl-1.1 for SSL communication.(optional)
  6. MIT krb5 for authentication and access control.(optional)
  7. c++11 is required, and make sure the GCC is 5.x or higher.
  8. python 3.5+ is required for Python support.(optional)
  9. Java OpenJDK 8 or higher for Java support.(optional)
  10. npm 9.0 and webpack(optional)
  11. FUSE-3 for rpcfs support(optional)
  12. GmSSL 3.0(optional)

About

This is an asynchronous and event-driven RPC framework

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors