All Projects → luxiaoxun → Nettyrpc

luxiaoxun / Nettyrpc

A simple RPC framework based on Netty, ZooKeeper and Spring

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Nettyrpc

Mini Rpc
Spring + Netty + Protostuff + ZooKeeper 实现了一个轻量级 RPC 框架,使用 Spring 提供依赖注入与参数配置,使用 Netty 实现 NIO 方式的数据传输,使用 Protostuff 实现对象序列化,使用 ZooKeeper 实现服务注册与发现。使用该框架,可将服务部署到分布式环境中的任意节点上,客户端通过远程接口来调用服务端的具体实现,让服务端与客户端的开发完全分离,为实现大规模分布式应用提供了基础支持
Stars: ✭ 205 (-89.62%)
Mutual labels:  rpc-framework, zookeeper, spring, netty
Jupiter
Jupiter是一款性能非常不错的, 轻量级的分布式服务框架
Stars: ✭ 1,372 (-30.53%)
Mutual labels:  rpc-framework, spring, netty
Simple Rpc
RPC with service discovery base on netty
Stars: ✭ 103 (-94.78%)
Mutual labels:  zookeeper, spring, netty
Easyrpc
EasyRpc is a simple, high-performance, easy-to-use RPC framework based on Netty, ZooKeeper and ProtoStuff.
Stars: ✭ 79 (-96%)
Mutual labels:  rpc-framework, zookeeper, netty
Whatsmars
Java生态研究(Spring Boot + Redis + Dubbo + RocketMQ + Elasticsearch)🔥🔥🔥🔥🔥
Stars: ✭ 1,389 (-29.67%)
Mutual labels:  rpc-framework, zookeeper, spring
Rpc Fromscratch
🌈 从零开始设计一个轻量级分布式 RPC 框架,基于 Spring + Netty + Protostuff + Zookeeper
Stars: ✭ 106 (-94.63%)
Mutual labels:  zookeeper, spring, netty
mini-rpc
Spring + Netty + Protostuff + ZooKeeper 实现了一个轻量级 RPC 框架,使用 Spring 提供依赖注入与参数配置,使用 Netty 实现 NIO 方式的数据传输,使用 Protostuff 实现对象序列化,使用 ZooKeeper 实现服务注册与发现。使用该框架,可将服务部署到分布式环境中的任意节点上,客户端通过远程接口来调用服务端的具体实现,让服务端与客户端的开发完全分离,为实现大规模分布式应用提供了基础支持
Stars: ✭ 221 (-88.81%)
Mutual labels:  netty, zookeeper, rpc-framework
Books Recommendation
程序员进阶书籍(视频),持续更新(Programmer Books)
Stars: ✭ 558 (-71.75%)
Mutual labels:  zookeeper, spring, netty
Eshop Soa
EShop基于Dubbo实现SOA服务化拆分,并基于RocketMQ解决了分布式事务(新版SpringBootSOASkeleton)
Stars: ✭ 65 (-96.71%)
Mutual labels:  zookeeper, spring
Rsf
已作为 Hasor 的子项目,迁移到:http://git.oschina.net/zycgit/hasor
Stars: ✭ 77 (-96.1%)
Mutual labels:  rpc-framework, spring
Twjitm
项目基于idea工作环境搭建的框架,添加mybatis3,spring4,springmvc4,以及redis。主要实现通过注解和反射自定义netty私有协议栈,实现在一条socket通道上传递不同的消息,采用支持tcp,udp和http协议
Stars: ✭ 26 (-98.68%)
Mutual labels:  spring, netty
Springboot Templates
springboot和dubbo、netty的集成,redis mongodb的nosql模板, kafka rocketmq rabbit的MQ模板, solr solrcloud elasticsearch查询引擎
Stars: ✭ 100 (-94.94%)
Mutual labels:  zookeeper, netty
Superman
Superman是什么:构建Java 高级开发技术的知识体系,从基础不断打怪升级成为超人之路(更新中.......)
Stars: ✭ 106 (-94.63%)
Mutual labels:  zookeeper, spring
Netty Stroll
RPC基础通信框架
Stars: ✭ 77 (-96.1%)
Mutual labels:  zookeeper, netty
Nettyrpc
NettyRPC is high performance java rpc server base on Netty,using kryo,hessian,protostuff support message serialization.
Stars: ✭ 1,131 (-42.73%)
Mutual labels:  spring, netty
Milkomeda
Spring extend componets which build from experience of bussiness, let developers to develop with Spring Boot as fast as possible.(基于Spring生态打造的一系列来自业务上的快速开发模块集合。)
Stars: ✭ 117 (-94.08%)
Mutual labels:  zookeeper, spring
Mmo Server
Distributed Java game server, including login, gateway, game demo
Stars: ✭ 114 (-94.23%)
Mutual labels:  zookeeper, netty
Mrpc
🐿 netty,zookeeper,spring,kyro rpc framework.
Stars: ✭ 128 (-93.52%)
Mutual labels:  zookeeper, netty
Pdf Books
📚 PDF 书籍库
Stars: ✭ 134 (-93.22%)
Mutual labels:  spring, netty
Javaquarkbbs
基于Spring Boot实现的一个简易的Java社区
Stars: ✭ 755 (-61.77%)
Mutual labels:  spring, netty

NettyRpc

An RPC framework based on Netty, ZooKeeper and Spring
中文详情:Chinese Details

Features:

  • Simple code and framework
  • Service registry/discovery support by ZooKeeper
  • High availability, load balance and failover
  • Support different load balance strategy
  • Support asynchronous/synchronous call
  • Support different versions of service
  • Support different serializer/deserializer
  • Dead TCP connection detecting with heartbeat

Design:

design

How to use (netty-rpc-test)

  1. Define an interface:

    public interface HelloService { 
        String hello(String name); 
        String hello(Person person);
    }
    
  2. Implement the interface with annotation @NettyRpcService:

    @NettyRpcService(HelloService.class, version = "1.0")
    public class HelloServiceImpl implements HelloService {
        public HelloServiceImpl(){}
    
        @Override
        public String hello(String name) {
            return "Hello " + name;
        }
    
        @Override
        public String hello(Person person) {
            return "Hello " + person.getFirstName() + " " + person.getLastName();
        }
    }
    
  3. Run zookeeper

    For example: zookeeper is running on 127.0.0.1:2181

  4. Start server:

    1. Start server with spring config: RpcServerBootstrap
    2. Start server without spring config: RpcServerBootstrap2
  5. Call the service:

    1. Use the client:
    final RpcClient rpcClient = new RpcClient("127.0.0.1:2181");
    	
    // Sync call
    HelloService helloService = rpcClient.createService(HelloService.class, "1.0");
    String result = helloService.hello("World");
    	
    // Async call
    RpcService client = rpcClient.createAsyncService(HelloService.class, "2.0");
    RPCFuture helloFuture = client.call("hello", "World");
    String result = (String) helloFuture.get(3000, TimeUnit.MILLISECONDS);
    
    1. Use annotation @RpcAutowired:
    public class Baz implements Foo {
        @RpcAutowired(version = "1.0")
        private HelloService helloService1;
           
        @RpcAutowired(version = "2.0")
        private HelloService helloService2;
           
        @Override
        public String say(String s) {
            return helloService1.hello(s);
        }
    }
    
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].