GithubHelp home page GithubHelp logo

970263611 / rpc Goto Github PK

View Code? Open in Web Editor NEW
28.0 2.0 5.0 98 KB

自己编写的rpc调用框架,配置简单,使用更简单,如果您感觉有用请点赞,纯个人手写

Java 100.00%
rpc java netty netty-rpc

rpc's Introduction

dahuaboke-rpc

纯自己手动编写的rpc框架,已经做成了starter,使用超级方便,天然支持高可用。

性能测试

单节点调用(传输字符串类型参数)响应时间不超过100毫秒(本机测试,注册中心在服务器,服务器带宽为1M)。

单节点调用500QPS正常响应。

集群调度方式

现在支持随机调度提供者方式

使用须知

下载源码,打包引入

<dependency>
    <groupId>com.dahuaboke</groupId>
    <artifactId>rpc</artifactId>
    <version>1.0.0-SNAPSHOT</version>
</dependency>

只需要在service层将@Service注解替换成@RpcService,调用方无感知,不需要修改任何代码。

端口

消费者无端口占用

提供者默认采用localIp配置的端口,当同一台机器部署多个提供者时,请配置不同端口

使用配置

provider(提供者)
#使用者身份(提供者)
rpc.role=provider
#消费者暴漏的本机ip(容器化部署时可以通过端口映射之后填写宿主机ip)
rpc.localIp=localhost:13579
#注册中心地址 zookeeper方式
	rpc.regist.address=zookeeper://localhost:2181 
#注册中心地址 nodou方式(支持身份验证和心跳是否移除以及不同版本)
	rpc.regist.address=nodou://localhost:9888
	rpc.nodou.username=username
	rpc.nodou.password=password
	rpc.nodou.version=1.0.0
	rpc.nodou.autoRemove=true
consumer(消费者)
#使用者身份(消费者)
rpc.role=consumer
#注册中心地址 zookeeper方式
	rpc.regist.address=zookeeper://localhost:2181
#注册中心地址 nodou方式(支持身份验证和心跳是否移除以及不同版本)
	rpc.regist.address=nodou://localhost:9888
	rpc.nodou.username=username
	rpc.nodou.password=password
	rpc.nodou.version=1.0.0
	rpc.nodou.autoRemove=true

扩展

扩展接口已经预留,注册中心扩展方法预留,实时动态切换提供者方法已经预留。

联系我

加我请注明来意

邮箱: [email protected] [email protected]

微信: dingweiqiang872226

QQ : 970263611

rpc's People

Contributors

970263611 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.