Skip to content

Instantly share code, notes, and snippets.

@donpdonp
Last active December 25, 2015 15:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donpdonp/6996720 to your computer and use it in GitHub Desktop.
Save donpdonp/6996720 to your computer and use it in GitHub Desktop.
Web Message Bus

Web Message Bus notes (Oct 2013)

Description

a message bus for http requests and responses. hanging off the bus are webapps and http listeners. routing table is modified at runtime. the start script for apps and listeners are part of the configuration (services endure, like node's forever)

Components

  • Bus = nanomsg
  • Webapp: Rails, Node, etc (anything with a nanomsg lib)
  • HTTP Listener: nginx module
    • Distributed routing config with coreos/etcd

Use Cases

An Android project needs to post registration data to a node.js server. The server is written and listens on localhost:1234. The web front end is nginx. I need an easy way to get this script started and have nginx pass traffic to it from http://server/androidcloud.

$ swmb route add /androidcloud localhost:1234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment