GithubHelp home page GithubHelp logo

nishiwodelian / my-rpc Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 7.11 MB

本项目是基于My-Network-Library多线程网络库实现的分布式网络通信框架(RPC),通过本框架可以方便快速地实现RPC方法调用。

CMake 1.74% C 0.07% C++ 98.19%

my-rpc's Introduction

My-Rpc

项目介绍

本项目是基于My-Network-Library多线程网络库实现的分布式网络通信框架(RPC)。为分布式环境下服务器之间进行远程方法调用提供了一套接口,通过本框架可以方便快速地实现RPC方法调用。

项目使用Protobuf完成序列化和反序列化,使用ZooKeeper实现服务注册中心。

项目特点

  • 研究实现了RPC远程过程调用
  • 采用Protobuf数据序列化和反序列化协议
  • 注册中心采用ZooKeeper分布式一致性协调服务
  • 通信部分由My-Network-Library多线程网络库完成
  • conf配置文件
  • CMake构建项目集成编译环境

开发环境

  • 操作系统:Ubuntu 20.04.5 LTS
  • 编译器:g++ 9.4.0

项目构建

安装Cmake

sudo apt-get update
sudo apt-get install cmake

构建项目

mkdir build && cd build
cmake ..
make install
make

运行案例

cd ./bin

./provider -i test.conf

服务提供者,从test.conf中读取服务端ip地址和端口号,ZooKeepter的ip地址和端口号

./consumer -i test.conf

服务调用者,向服务端发起远程调用,从test.conf中读取ZooKeepter的ip地址和端口号

my-rpc's People

Contributors

nishiwodelian 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.