All Projects → zycgit → Rsf

zycgit / Rsf

已作为 Hasor 的子项目,迁移到:http://git.oschina.net/zycgit/hasor

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Rsf

Jupiter
Jupiter是一款性能非常不错的, 轻量级的分布式服务框架
Stars: ✭ 1,372 (+1681.82%)
Mutual labels:  rpc, rpc-framework, spring, service-discovery, distributed-systems, high-performance, cluster
Whatsmars
Java生态研究(Spring Boot + Redis + Dubbo + RocketMQ + Elasticsearch)🔥🔥🔥🔥🔥
Stars: ✭ 1,389 (+1703.9%)
Mutual labels:  rpc, dubbo, rpc-framework, spring
impress-cli
Impress Application Server Command line interface
Stars: ✭ 25 (-67.53%)
Mutual labels:  cluster, rpc, soa
yurpc
high-performance RPC framework.
Stars: ✭ 59 (-23.38%)
Mutual labels:  service-discovery, rpc, soa
Dis Seckill
👊SpringBoot+Zookeeper+Dubbo打造分布式高并发商品秒杀系统
Stars: ✭ 315 (+309.09%)
Mutual labels:  rpc, dubbo, distributed-systems
Zato
ESB, SOA, REST, APIs and Cloud Integrations in Python
Stars: ✭ 889 (+1054.55%)
Mutual labels:  soa, high-performance, cluster
Advanced Java
😮 Core Interview Questions & Answers For Experienced Java(Backend) Developers | 互联网 Java 工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务、海量数据处理等领域知识
Stars: ✭ 59,142 (+76707.79%)
Mutual labels:  rpc, dubbo, distributed-systems
Joyrpc
high-performance, high-extensibility Java rpc framework.
Stars: ✭ 290 (+276.62%)
Mutual labels:  rpc, dubbo, high-performance
Rpc Websockets
JSON-RPC 2.0 implementation over WebSockets for Node.js and JavaScript/TypeScript
Stars: ✭ 344 (+346.75%)
Mutual labels:  rpc, rpc-framework, distributed-systems
Nebula
Nebula is a powerful framwork for building highly concurrent, distributed, and resilient message-driven applications for C++.
Stars: ✭ 385 (+400%)
Mutual labels:  distributed-systems, high-performance, cluster
Scalecube Services
ScaleCube Services is a high throughput, low latency reactive microservices library built to scale. it features: API-Gateways, service-discovery, service-load-balancing, the architecture supports plug-and-play service communication modules and features. built to provide performance and low-latency real-time stream-processing. its open and designed to accommodate changes. (no sidecar in a form of broker or any kind)
Stars: ✭ 482 (+525.97%)
Mutual labels:  service-discovery, distributed-systems, cluster
Fpnn
Fast Programmable Nexus Network
Stars: ✭ 220 (+185.71%)
Mutual labels:  rpc, rpc-framework, high-performance
Doge
Doge is a high-performance, Python based, open source RPC framework
Stars: ✭ 144 (+87.01%)
Mutual labels:  rpc, rpc-framework, service-discovery
core
Enterprise Grade #NodeJS Platform implementing Industry Standards & Patterns in order to provide Connectivity, Stability, High-Availability and High-Performance
Stars: ✭ 54 (-29.87%)
Mutual labels:  high-performance, rpc, soa
Zanphp
PHP开发面向C10K+的高并发SOA服务 和RPC服务首选框架
Stars: ✭ 1,451 (+1784.42%)
Mutual labels:  rpc, soa, high-performance
Saluki
Spring Boot starter module for gRPC framework.
Stars: ✭ 267 (+246.75%)
Mutual labels:  rpc, rpc-framework, soa
Rpcx Java
rpcx implementation in Java for server side and client side
Stars: ✭ 71 (-7.79%)
Mutual labels:  rpc, dubbo, rpc-framework
Dapeng Soa
A lightweight, high performance micro-service framework
Stars: ✭ 101 (+31.17%)
Mutual labels:  rpc, soa, high-performance
Simple Rpc
RPC with service discovery base on netty
Stars: ✭ 103 (+33.77%)
Mutual labels:  rpc, spring, service-discovery
Spring Cloud Alibaba
Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.
Stars: ✭ 20,934 (+27087.01%)
Mutual labels:  dubbo, spring, service-discovery

请注意:RSF 项目回归 Hasor。为了方便后续开发维护,此代码库暂停维护。请您更新 Fork 和 Star 到下面两个地址:

源码和历史版本已迁移到:http://git.oschina.net/zycgit/hasor or https://github.com/zycgit/hasor


RSF

  一个高可用、高性能、轻量级的分布式服务框架。支持容灾、负载均衡、集群。一个典型的应用场景是,将同一个服务部署在多个Server上提供 request、response 消息通知。

  使用RSF可以点对点调用,也可以分布式调用。部署方式上:可以搭配注册中心,也可以独立使用。


工作原理

工作原理


RSF架构设计

RSF架构


RoadMap

RoadMap


介绍

特色功能:
  1. 支持服务热插拔:支持服务动态发布、动态卸载
  2. 支持服务分组:支持服务分组、分版本
  3. 支持多种方式调用:同步、异步、回调、接口代理
  4. 支持多种模式调用:RPC模式调用、Message模式调用   RPC 模式: 远程调用会等待并返回执行结果。适用于一般方法。遇到耗时方法会有调用超时风险   Message 模式: 远程调用当作消息投递到远程机器,不会产生等待,可以看作是一个简单的 MQ。适合于繁重的耗时方法
  5. 支持点对点调用。RSF的远程调用可以点对点定向调用,也可以集群大规模部署集中提供同一个服务
  6. 支持虚拟机房。通过配置虚拟机房策略可以降低跨机房远程调用
  7. 支持泛化调用。简单的理解,泛化调用就是不依赖二方包,通过传入方法名,方法签名和参数值,就可以调用服务
  8. 支持隐式传参。可以理解隐式传参的含义为,不需要在接口上明确声明参数。在发起调用的时传递到远端
  9. 内置 Telnet 控制台,可以命令行方式直接管理机器
  10. 支持 offline/online 动作
扩展性:
  1. 支持第三方集成,可以独立使用,也可以和 Spring、Jfinal等第三方框架整合使用
  2. 支持拦截器RsfFilter,开发者可以通过扩展 Filter 实现更多需求
  3. 支持自定义序列化。默认使用内置 Hessian 4.0.7 序列化库
  4. 支持Telnet控制台自定义指令。通过扩展控制台指令,可以发挥更大想象空间
稳定性(参数可配置):
  1. 最大发并发请求数配置(默认:200)
  2. 最大发起请求超限制策略设置: A-等待1秒重试、B-抛异常(默认:B-抛异常)
  3. Netty线程数配置(默认: 监听请求线程数: 1,IO线程数: 8)
  4. 提供者调用队列容量配置(默认: 队列容量: 4096)
  5. Work线程数配置(默认: 处理调用线程数: 4)
  6. 请求超时设置。支持服务提供者,服务订阅者独立配置各自的超时参数(默认 6000毫秒)
  7. 双向通信。RSF会合理利用Socket连接,双向通信是指当A机器发起远程调用请求之后,RSF会建立长连接   -- 如果B机器有调用A机器的需求则直接使用这个连接不会重新创建新的连接,双向通信会大量降低集群间的连接数
  8. 支持优雅停机。应用停机,Center会自动通知整个集群。即便所有 Center 离线,RSF也会正确处理失效地址
健壮性:
  1. 每小时地址本动态备份。当所有注册中心离线,即便在没有注册中心的情况下应用程序重启,也不会导致服务找不到提供者的情况
  2. 当某个地址失效之后,RSF会冻结一段时间,在这段时间内不会有请求发往这个地址
  3. 支持请求、响应分别使用不同序列化规则
可维护性:
  1. 支持QoS流量控制。流控可以精确到:接口、方法、地址
  2. 支持动态路由脚本。路由可以精确到:接口、方法、参数
  3. 通过路由脚本可以轻松实现接口灰度发布
安全性:
  1. 支持发布服务授权
  2. 支持服务订阅授权
  3. 支持匿名应用

Demo

<!-- 引入依赖 -->
<dependency>
	<groupId>net.hasor</groupId>
	<artifactId>hasor-rsf</artifactId>
	<version>1.1.0</version>
</dependency>

<!-- 配置文件 -->
<!-- server-config.xml and client-config.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://project.hasor.net/hasor/schema/main">
    <hasor.environmentVar>
        <RSF_CENTER_SERVERS>rsf://<CenterHostAddress>:2180</RSF_CENTER_SERVERS>
    </hasor.environmentVar>
</config>

// 服务接口
public interface EchoService {
    public String sayHello(String echo) throws InterruptedException;
}

// 服务接口实现
public class EchoServiceImpl implements EchoService {
    public String sayHello(String echo) throws InterruptedException {
        return "you say " + echo;
    }
}

// 服务提供者
Hasor.createAppContext("server-config.xml", new RsfModule() {
    public void loadModule(RsfApiBinder apiBinder) throws Throwable {
		EchoService echoService = new EchoServiceImpl();
		apiBinder.rsfService(EchoService.class).toInstance(echoService).register();
	}
});

// 服务消费者
AppContext clientContext = Hasor.createAppContext("client-config.xml", new RsfModule() {
    public void loadModule(RsfApiBinder apiBinder) throws Throwable {
		apiBinder.rsfService(EchoService.class).register();
	}
});
RsfClient client = clientContext.getInstance(RsfClient.class);
EchoService echoService = client.wrapper(EchoService.class);
String echoMessage = echoService.sayHello("Hello Word");
System.out.println(echoMessage);

未来版本计划支持的项目(粗略计划)

  • 细节优化
  • 整个 static-config.xml 的配置都可以被主配置文件进行覆盖。
  • RsfCenter 数据订阅,方便不同版本Center之间数据同步。为Hasor版本升级可能存在的不兼容性考虑。

相关连接

正式发布

  • mvn release:prepare -P release
  • ./deploy.sh -P release
  • ./build.sh && docker build -t debug . && docker run debug
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].