Skip to content

lisirrx/fastR

Repository files navigation

fastR

本项目为一个简单的基于RSocket的RPC实现

  1. 使用方法:引入依赖(还未发布到maven仓库
 <dependency>
    <groupId>me.lisirrx</groupId>
    <artifactId>fastR-spring-boot-starter</artifactId>
    <version>1.0-SNAPSHOT</version>
 </dependency>
  1. 启动center目录下的注册中心。

  2. 服务端:

@Service
@FastRSocketService
public class DemoServiceImpl implements DemoService {
    @Override
    @ServiceMethod
    public Mono<String> demo() {
        return Mono.just("Demo!");
    }
}
  1. 客户端
@Bean
public DemoService demoService(){
    return RemoteServiceBuilder.ofService(DemoService.class);
}
  1. 客户端调用:
demoService.demo()
    .subscribe(System.out::println);

// Demo!

TODO

  • Zookeeper注册中心
  • 重构启动流程,现在启动流程很混乱
  • 接入spring-boot-starter
  • 重构并发相关,publishOn线程池和TcpClient/TcpServer线程池
  • 整理依赖相关,抽离父pom
  • 发布maven仓库

About

Java上基于RSocket的RPC框架

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages