All Projects → yeecode → Easyrpc

yeecode / Easyrpc

Licence: apache-2.0
EasyRPC是一个远程过程调用(Remote Procedure Call,简称RPC)的最小实现。它使用极少的类、方法演示了RPC的实现原理,是一个学习RPC工作原理的良好示例。

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Easyrpc

simpleRPC
Simple RPC implementation for Arduino.
Stars: ✭ 28 (-91.49%)
Mutual labels:  rpc, rpc-framework
zero
Zero: A simple, fast, high performance and low latency Python framework (RPC + PubSub) for building microservices or distributed servers
Stars: ✭ 296 (-10.03%)
Mutual labels:  rpc, rpc-framework
nerve-rpc
Nim RPC framework
Stars: ✭ 32 (-90.27%)
Mutual labels:  rpc, rpc-framework
libcorpc
Libcorpc is a high performance coroutine base RPC framework
Stars: ✭ 20 (-93.92%)
Mutual labels:  rpc, rpc-framework
Ice Demos
Sample programs for Ice
Stars: ✭ 285 (-13.37%)
Mutual labels:  rpc, demo
http
Extension module of golang http service
Stars: ✭ 57 (-82.67%)
Mutual labels:  rpc, rpc-framework
wapc-rust
Rust-based WebAssembly Host Runtime for waPC-compliant modules
Stars: ✭ 75 (-77.2%)
Mutual labels:  rpc, rpc-framework
Fpnn
Fast Programmable Nexus Network
Stars: ✭ 220 (-33.13%)
Mutual labels:  rpc, rpc-framework
Saluki
Spring Boot starter module for gRPC framework.
Stars: ✭ 267 (-18.84%)
Mutual labels:  rpc, rpc-framework
Erpc
Embedded RPC
Stars: ✭ 262 (-20.36%)
Mutual labels:  rpc, rpc-framework
nodejs grpc
GRPC based API CRUD using Nodejs at both server and client side
Stars: ✭ 17 (-94.83%)
Mutual labels:  rpc, rpc-framework
Hprose Nodejs
Hprose is a cross-language RPC. This project is Hprose 2.0 for Node.js
Stars: ✭ 297 (-9.73%)
Mutual labels:  rpc, rpc-framework
jigsaw-rpc
jigsaw-rpc is an RPC framework written in TypeScript under Node.js
Stars: ✭ 14 (-95.74%)
Mutual labels:  rpc, rpc-framework
hprose-as3
Hprose for ActionScript 3.0
Stars: ✭ 18 (-94.53%)
Mutual labels:  rpc, rpc-framework
hrpc
Common interface definition based rpc implementation
Stars: ✭ 21 (-93.62%)
Mutual labels:  rpc, rpc-framework
Pudding
Pudding 是一款迷你级分布式服务框架
Stars: ✭ 24 (-92.71%)
Mutual labels:  rpc, rpc-framework
Hprose Php
Hprose is a cross-language RPC. This project is Hprose 3.0 for PHP
Stars: ✭ 1,952 (+493.31%)
Mutual labels:  rpc, rpc-framework
Rpc
Simple RPC style APIs with generated clients & servers.
Stars: ✭ 192 (-41.64%)
Mutual labels:  rpc, rpc-framework
rony
Fast and Scalable RPC Framework
Stars: ✭ 41 (-87.54%)
Mutual labels:  rpc, rpc-framework
Armeria
Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard.
Stars: ✭ 3,392 (+931%)
Mutual labels:  rpc, rpc-framework

EasyRPC

language license

EasyRPC是一个远程过程调用(Remote Procedure Call,简称RPC)的最小实现。它使用极少的类、方法演示了RPC的实现原理,是一个学习RPC工作原理的良好示例。

该项目十分简单,包括客户端EasyRpcClient和服务端EasyRpcServer两部分。演示时,EasyRpcClient会通过RPC调用EasyRpcServer中的方法。

功能演示

/client/target/文件夹下下载最新版的EasyRpcClient-x.x.x.jar文件,并使用下面的命令启动:

java -jar EasyRpcClient-x.x.x.jar

则EasyRpcClient启动,并工作在12310端口。

/server/target/文件夹下下载最新版的EasyRpcServer-x.x.x.jar文件,并使用下面的命令启动:

java -jar EasyRpcServer-x.x.x.jar

则EasyRpcServer启动,并工作在12311端口。

然后可以调用以下几个方法:

  • 127.0.0.1:12310/getUserCount
  • 127.0.0.1:12310/getUserInfo
  • 127.0.0.1:12310/addUser
  • 127.0.0.1:12310/querySchoolName

上面几个方法会被则EasyRpcClient接收。然后,EasyRpcClient会通过RPC调用EasyRpcServer获得操作结果,并返回。

功能实现

EasyRpcClient实现

业务代码类为MainControllerSchoolServiceUserService三个类。其中MainController类负责接收外部请求并调用SchoolServiceUserServiceSchoolServiceUserService是两个接口,并不包含实现,其具体实现由EasyRpcServer提供。

RPC代码类在rpc子包中,主要完成动态代理、远程调用参数序列化、远程调用发起、远程调用结果反序列化等工作。

EasyRpcClient代码

EasyRpcServer实现

业务带代码类为SchoolServiceUserService两个类,类中包含具体实现。EasyRpcClient通过RPC最终调用了这里的代码。

RPC代码类在rpc子包中,主要完成远程调用接收、调用参数反序列化、调用实际触发、调用结果序列化等工作。

EasyRpcServer代码

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].