Skip to content
A fast HTTP/WebSocket to zeromq gateway
C Python CSS JavaScript Shell Makefile Other
Failed to load latest commit information.
completion
coyaml @ 2de4f0d Add vagga.yaml with build-ubuntu-package command Dec 20, 2014
doc
examples Added examples to vagga file Feb 12, 2015
libwebsite @ 7791eec
src
test Better reaction on more than 3 message parts from backend (fixes #27) Feb 11, 2014
.gitignore Add vagga.yaml with build-ubuntu-package command Dec 20, 2014
.gitmodules Add vagga.yaml with build-ubuntu-package command Dec 20, 2014
.travis.yml
LICENSE
PKGBUILD.tpl Version bumped to v0.5.25 Apr 10, 2012
README.rst
TODO.txt
vagga.yaml
waf
wscript Update travis.yaml to work with submodules Dec 21, 2014
wscript.bundle Version bumped to v0.5.9 May 30, 2011

README.rst

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 commands 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 update
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
Something went wrong with that request. Please try again.