Giter Site home page Giter Site logo

zrpc's Introduction

zrpc

基于muduo,zookeeper,protobuf 实现的分布式网络通信框架

  • 服务注册/服务发现/zookeeper CS端的使用,封装c api
  • 异步日志/读取配置
  • 自定义消息格式(定长标识不定长长度)
  • 基于protobuf的rpc实现原理 service/method/stub/rpcchannel
bin:可执行文件
build:项目编译文件
lib:项目库文件
src:源文件
test:测试代码
example:框架代码使用范例
CMakeLists.txt:顶层的cmake文件
README.md:项目自述文件

build

mkdir build
cd build 
cmake ..
make 

# bin 目录下 发布friend/user服务到zk
./friend -i friend.conf
./user -i user.conf

./consumer -i xxx.conf # 发起两次远程调用

image-20230510150154871

ENV

ubuntu 20/zookeeper-3.4.10.tar.gz/muduo最新版本/protobuf3.6.0

编译zk c api时注意, 直接忽略警告
./configure CFLAGS="-g -O2 -Wno-error"

./zkServer.sh start-foreground #前台启动zk
./zkClie.sh

image-20230510115633892

zrpc's People

Contributors

xiaozhang8tuo avatar

Watchers

 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.