Coder Social home page Coder Social logo

ihavec / event-json-rpc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hy0kl/event-json-rpc

0.0 0.0 0.0 78 KB

:high_brightness: 基于 libevent,以二进制头+json为协议来实现的 rpc 框架.

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.93% C 96.06% PHP 3.02%

event-json-rpc's Introduction

event-json-rpc

基于 libevent,以二进制头+json为协议来实现的 rpc 框架.

参考和依赖

libevent
cJSON
zlog
libzdb

以此为基础

https://github.com/jasonish/libevent-examples

json c 解析器

https://github.com/kbranigan/cJSON

c loger

https://github.com/HardySimpson/zlog

数据库连接池

http://re2c.org/ https://github.com/mverbert/libzdb http://www.tildeslash.com/libzdb

命令号和错误码

命令号/错误码

Q&A

为什么不用 protobuf 或 thrift ?

因为我认为现在互联网开发的数据交互, json 已经成为事实标准,所以采用 json,这样在架构上让它直接,简单,有效,还兼具可扩展性,使那些只要支持 socket 编程的语言都可以不借助 protobuf/thrift 的扩展就能轻松实现 RPC.

为什么用 libevent,而不直接用 epoll?

libevent 已经经过无数网络程序验证过了,无需再造轮子,而且我造的轮子大概率没有现成的好.另外,我大部分程序是在 mac 下开发,跨平台的网络库比效率更重要.

TODO

 _____ ___  ____   ___
|_   _/ _ \|  _ \ / _ \
  | || | | | | | | | | |
  | || |_| | |_| | |_| |
  |_| \___/|____/ \___/

TODO

event-json-rpc's People

Contributors

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