All Projects → pwh19920920 → xmutca-rpc

pwh19920920 / xmutca-rpc

Licence: Apache-2.0 license
Xmutca-rpc是一个基于netty开发的分布式服务框架,提供稳定高性能的RPC远程服务调用功能,支持注册中心,服务治理,负载均衡等特性,开箱即用。

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to xmutca-rpc

Xxl Rpc
A high performance, distributed RPC framework.(分布式服务框架XXL-RPC)
Stars: ✭ 493 (+2638.89%)
Mutual labels:  registry, netty, distributed
toy-rpc
Java基于Netty,Protostuff和Zookeeper实现分布式RPC框架
Stars: ✭ 55 (+205.56%)
Mutual labels:  netty, distributed
litchi
这是一款分布式的java游戏服务器框架
Stars: ✭ 97 (+438.89%)
Mutual labels:  netty, distributed
piccolo
Netty4长连接网关
Stars: ✭ 19 (+5.56%)
Mutual labels:  netty, nacos
Java Note
后端研发——笔记
Stars: ✭ 54 (+200%)
Mutual labels:  netty, nacos
ship-gate
Use SpringWebFlux,Netty and Nacos to build high performance,responsive API gateways.
Stars: ✭ 138 (+666.67%)
Mutual labels:  netty, nacos
Summer
这是一个支持分布式和集群的java游戏服务器框架,可用于开发棋牌、回合制等游戏。基于netty实现高性能通讯,支持tcp、http、websocket等协议。支持消息加解密、攻击拦截、黑白名单机制。封装了redis缓存、mysql数据库的连接与使用。轻量级,便于上手。
Stars: ✭ 336 (+1766.67%)
Mutual labels:  netty, distributed
Game Server
Distributed Java game server, including cluster management server, gateway server, hall server, game logic server, background monitoring server and a running web version of fishing. State machine, behavior tree, A* pathfinding, navigation mesh and other AI tools
Stars: ✭ 916 (+4988.89%)
Mutual labels:  netty, distributed
Fox
fox is a distributed RPC framework
Stars: ✭ 79 (+338.89%)
Mutual labels:  netty, distributed
Windows11-betterUX
A non-destructive registry preset to improve the default user-experience with windows 10.
Stars: ✭ 21 (+16.67%)
Mutual labels:  registry
small-rpc
🔥基于netty和hessian的一个轻量级RPC调用框架
Stars: ✭ 21 (+16.67%)
Mutual labels:  netty
message-pipe
基于Redis客户端Redisson实现负载均衡的分布式消息顺序管道
Stars: ✭ 21 (+16.67%)
Mutual labels:  nacos
zlimiter
A toolkit for rate limite,support memory and redis
Stars: ✭ 17 (-5.56%)
Mutual labels:  distributed
regclient
Docker and OCI Registry Client in Go and tooling using those libraries.
Stars: ✭ 603 (+3250%)
Mutual labels:  registry
CampusForum
校园论坛
Stars: ✭ 62 (+244.44%)
Mutual labels:  netty
intelli-swift-core
Distributed, Column-oriented storage, Realtime analysis, High performance Database
Stars: ✭ 17 (-5.56%)
Mutual labels:  distributed
simplx
C++ development framework for building reliable cache-friendly distributed and concurrent multicore software
Stars: ✭ 61 (+238.89%)
Mutual labels:  distributed
Distributed-ResNet-Tensorflow
A Distributed ResNet on multi-machines each with one GPU card.
Stars: ✭ 20 (+11.11%)
Mutual labels:  distributed
elfo
Your next actor system
Stars: ✭ 38 (+111.11%)
Mutual labels:  distributed
p2p-project
A peer-to-peer networking framework to work across languages
Stars: ✭ 68 (+277.78%)
Mutual labels:  distributed

Xmutca-rpc

Xmutca-rpc是一个基于netty开发的分布式服务框架,提供稳定高性能的RPC远程服务调用功能,支持注册中心,服务治理,负载均衡等特性,开箱即用。

模块介绍

  • 1.xmutca-rpc-core rpc核心模块
  • 2.xmutca-rpc-example rpc示例
  • 3.xmutca-rpc-local 本地容器实现
  • 4.xmutca-rpc-registry-nacos nacos注册中心
  • 5.xmutca-rpc-spring spring容器实现

实现功能

  • 1.核心实现:SPI扩展,支持动态加载拓展实现,具体可以看实现类ExtensionLoader
  • 2.负载均衡:现在已支持轮训负载,随机负载,也可自定义
  • 3.集群容错:FailFast快速失败、 FailOver故障切换,FailSafe故障安全, FailBack失败恢复,Broadcast广播调用
  • 4.注册发现:目前支持接入nacos
  • 5.容器支持:支持本地java容器,支持spring容器
  • 6.注解拓展:支持注解加载提供者,注解获取远程rpc对象
  • 7.序列方式:支持fastJson, Kryo, protostuff序列化,默认走protostuff序列化
  • 8.极速拓展:允许加载自定义的过滤器,自定义容器,自定义注册中心等等。

快速开始

1. maven配置
<dependency>
    <groupId>com.xmutca</groupId>
    <artifactId>xmutca-rpc-core</artifactId>
    <version>0.0.1-SNAPSHOT </version>
</dependency>

<dependency>
    <groupId>com.xmutca</groupId>
    <artifactId>xmutca-rpc-spring</artifactId>
    <version>0.0.1-SNAPSHOT </version>
</dependency>

<dependency>
    <groupId>com.xmutca</groupId>
    <artifactId>xmutca-rpc-registry-nacos</artifactId>
    <version>0.0.1-SNAPSHOT</version>
</dependency>

2. 定义接口
public interface HelloService {

    /**
     * test
     * @param msg
     * @return
     */
    String sayHello(String msg);
}

3. 提供者实现接口
@Component
@Provider(interfaceClass = HelloService.class)
public class HelloServiceImpl implements HelloService {

    @Autowired
    private TestService testService;

    @Override
    public String sayHello(String msg) {
        return testService.test() + " -> " + msg;
    }
}

4. 提供者配置
rpc:
  registry: nacos://localhost:8848 # 注册中心地址
  provider: # 提供者配置
    corePoolSize: 60       # 核心线程数
    maxPoolSize: 300       # 最大线程数
    port: 8886             # 提供者端口
    scanPackage: com.xmutca.rpc.provider.facade   # 扫描提供者包路径
    metadata:              # 服务元数据
      group: "order"       # 服务分组
      serviceName: "test"  # 服务名称
      version: "v1.0.0"    # 服务版本


5. 启动提供者
@EnableXmutcaRpc
@SpringBootApplication
public class XmutcaSpringProviderApplication {

    public static void main(String[] args) {
        SpringApplication.run(XmutcaSpringProviderApplication.class, args);
    }
}

6. 消费者引用
@RestController
@RequestMapping
public class ControllerTest {

    @Reference(serviceName = "test", group = "order", interfaceClass = HelloService.class)
    private HelloService helloService;

    @RequestMapping("/test")
    public Object test() {
        return helloService.sayHello("test");
    }
}

7. 消费者配置
rpc:
  registry: nacos://localhost:8848
  consumer:
    - timeout: 1000               # 超时配置
      metadata:
        group: "order"            # 服务分组
        serviceName: "test"       # 服务名称
        version: "v1.0.0"         # 服务版本

8. 启动消费者
@EnableXmutcaRpc
@SpringBootApplication
public class XmutcaSpringConsumerApplication {

    public static void main(String[] args) {
        SpringApplication.run(XmutcaSpringConsumerApplication.class, args);
    }
}

作者题外话

此项目欢迎各位gay友试用,互相学习,及时反馈,谢谢。

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].