turbo-rpc异步响应式 RPC 框架
turbo-rpc 是一款速度超凡的异步响应式RPC框架。
功能特点
仅支持异步调用,Service接口所有public方法返回值都必须为CompletableFuture。
配置定义在Service接口上,而非实现类上,方法实现者和调用者都不需要引入奇奇怪怪的注解。
支持REST调用。
支持失败回退, 支持熔断, 支持心跳, 支持自动重连。
支持自定义 服务注册 负载均衡 序列化。
支持Filter, 可通过该机制实现 Tracing 限流限速 黑白名单 等功能。
支持spring boot。
Quick Start
1.定义接口
@TurboService(version = "1.0.0") public interface HelloService { @TurboService(version = "1.0.0", rest = "hello") default CompletableFuture<String> hello(String msg) { // default实现会自动注册为失败回退方法,当远程调用失败时执行 return CompletableFuture.completedFuture("error"); } }
2.服务端实现接口
@Component public class HelloServiceImpl implements HelloService { @Override public CompletableFuture<String> hello(String msg) { return CompletableFuture.completedFuture(msg); } }
3.配置turbo-server.conf, 声明 服务器地址 序列化协议 注册地址 等信息
4.服务端启动
@SpringBootApplication(scanBasePackages = { "com.hello" }) @EnableTurboServer public class TruboServerBootTest { public static void main(String[] args) { SpringApplication.run(TruboServerBootTest.class, args); } }
5.客户端调用
@Component public class HelloReferTest { @Autowired HelloService helloService; public void doSomeThing(String msg) { helloService.hello(msg) .thenAccept(message -> System.out.println(message)); } }
6.配置turbo-client.conf, 声明 服务器地址 序列化协议 注册地址 等信息
7.客户端启动
@SpringBootApplication(scanBasePackages = { "com.hello" }) @EnableTurboClient public class HelloBootTest { public static void main(String[] args) { SpringApplication.run(HelloBootTest.class, args); } }
评论
turbo-rpc异步响应式 RPC 框架
turbo-rpc是一款速度超凡的异步响应式RPC框架。功能特点仅支持异步调用,Service接口所有public方法返回值都必须为CompletableFuture。配置定义在Service接口上,
turbo-rpc异步响应式 RPC 框架
0
Missian异步RPC框架
大家都知道,Hessian是一个了不起的RPC框架。但是,它的调用是同步的,并且只能基于HTTP传输。作者创建missian(mina+hessian的意思)的目的有二: 1、实现异步的RPC调用。同
Missian异步RPC框架
0
Groundwork响应式框架
GroundworkCSS是一个基于Sass预处理器的开源项目,主要用于快速构建响应式Web应用程序。拥有一个灵活的、可嵌套的网格系统,可以创建适应多种浏览设备的布局。Groundwork还提供多种U
Groundwork响应式框架
0