Giter Site home page Giter Site logo

simple_rpc's Introduction

Simple_RPC

simple-rpc是一个基于netty+springboot+zookeeper的分布式服务框架,具有服务注册与发现、远程服务调用和集群负载均衡等基本功能。架构上参考了dubbo的分层设计,各功能模块放在不同的包中,通过API相互关联实现解耦。

功能列表

  • 基于Netty实现客户端与服务端之间的通信,包括空闲检测、心跳保持、解决粘包半包等问题
  • 基于zookeeper实现服务的注册与发现,利用zookeeper的监听机制实现服务的订阅/推送
  • 实现了一致性哈希/轮询/随机/加权随机和最小活跃度等负载均衡算法
  • 实现了failover/failfast/failsafe三种集群容错机制
  • 基于springboot的自动配置功能实现bean的加载,并且自定义了一个springboot-starter插件供用户使用

分层设计

分层设计是为了解耦,下层向上层暴露接口,上层只需要调用下层的接口而无需关心实现,具体实现类由用户通过配置文件来配置,避免硬编码。

架构图

初始化

image

服务调用之ConsumerSide

image

服务调用之ProviderSide

image

simple_rpc's People

Contributors

michaelyang1995 avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar  avatar  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.