Giter VIP home page Giter VIP logo

zerogw's Introduction

Zerogw

Zerogw is a http to zeromq gateway. Which means it listens HTTP, parses request and sends it using zeromq socket (ZMQ_REQ). Then waits for the reply and responds with data received from zeromq socket.

Starting with v0.3 zerogw also supports WebSockets. Websockets are implemented by forwarding incoming messages using ZMQ_PUB socket, and listening clommands from ZMQ_SUB socket. Each WebSocket client can be subscribed to unlimited number of topics. Each zeromq message it either control message (e.g. subscription) or message to a specified topic which will be efficiently sent to every WebSocket subscribed to that particular topic.

Zerogw is written in C and uses libwebsite library for handling HTTP (which itself uses libev).

Zerogw is not a full-blown http server. It knows nothing about static files, caches, CGI, whatever. It knows some routing and that's almost it. That makes it very fast and perfectly scalable.

Use it for:
  • RPC's
  • REST API's
  • Ajax
  • WebSockets

Resources

Installing

Ubuntu:

sudo add-apt-repository ppa:tailhook/zerogw
sudo apt-get install zerogw

ArchLinux:

yaourt -S zerogw

For other distributions refer to Compiling section.

We currently support only Linux.

Dependencies

  • linux with kernel at least 2.6.28 (need accept4)
  • libwebsite for handling http
  • coyaml for handling configuration
  • python3 needed for coyaml to build configuration parser
  • libzmq and libev of course
  • libyaml for parsing configuration

First two usually compiled statically, so you don't need them at runtime. Same with python. (Eventually, I'll release a bundle with precompiled configuration parser and embedded few other libraries for easier compiling :) )

Compiling

./waf configure --prefix=/usr
./waf build
./waf install

zerogw's People

Contributors

asvetlov avatar tailhook 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.