Coder Social home page Coder Social logo

jyjsjd / easyrpc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matrix6677/easyrpc

0.0 0.0 0.0 297 KB

EasyRpc is a simple, high-performance, easy-to-use RPC framework based on Netty, ZooKeeper and ProtoStuff.

License: Apache License 2.0

Java 100.00%

easyrpc's Introduction

EasyRpc

Build Status license

EasyRpc是基于Netty、ZooKeeper和ProtoStuff开发的一个简单易用,便于学习的RPC框架。


1 特性

  • 简单易用;
  • 低延迟,基于Netty 4;
  • 解决TCP粘包/拆包问题;
  • 仿Dubbo,协议头仅20字节;
  • 支持非阻塞的同步/异步调用;
  • 基于ProtoStuff的对象序列化;
  • 基于ZooKeeper实现的服务注册和发现;
  • 支持4种负载均衡策略:随机、轮询、哈希、最佳响应;
  • 完整的单元测试和JMH性能压测;
  • 注释完善,方便学习。

2 总体设计

2.1 架构图

系统架构

2.2 系统时序

系统时序

2.3 主流程图

主流程

2.4 数据包结构

数据包结构

3 性能测试

吞吐量

平均耗时&随机取样

4 参考文献

[1]阮一峰.理解字节序[J/OL].阮一峰的网络日志,2016-11-22.

[2]猿码道.聊聊Linux 五种IO模型[J/OL].简书,2016.05.18.

[3]猿码道.聊聊同步、异步、阻塞与非阻塞[J/OL].简书,2016.05.18.

[4]科来网络.网络通讯协议[J/OL].科来网络,2019-01.01.

[5]此鱼不得水.Dubbo编码解码[J/OL].简书,2017-12-20.

[6]Newland.谈谈如何使用Netty开发实现高性能的RPC服务器[J/OL].博客园,2016-06-25.

[7]加多.谈谈Netty的线程模型[J/OL].并发编程网,2019-08-23.

[8]鲁小憨.怎样对 RPC 进行有效的性能测试[J/OL].简书,2018-02-02.

5 License

EasyRpc is under the Apache 2.0 license. See the LICENSE file for details.

easyrpc's People

Contributors

matrix6677 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.