Code Monkey home page Code Monkey logo

subpub's Introduction

Overview

True to it's name, SubPub is a system-to-system messaging solution designed to be a "black box", hiding as much as possible the complexity inherent in messaging. It's design goals are:

  1. Interoperability
  2. Ease of use / low barrier to adoption
  3. Standard messaging stereotype (Pub/Sub, Request/Reply)
  4. "Always On" architecture

In short, events are published into SubPub to which multiple consumers may subscribe to, for which SubPub guarantees at least once delivery. SubPub services wrap two sides (publishing and delivery) of the RabbitMQ AMQP messaging broker. On the front-end/publishing side is an HTTP RESTful endpoint that allows a Principal to manage subscriptions and publish messages. The back-end/delivery side manages several processes which consume messages from the AMQP broker and delivers them to Consumer Endpoints. Consumer Endpoints are typically RESTful services.

Getting Started

Installing pre-requisites

Installing Erlang

Erlang will need to be installed locally. On OS X, it's as simple as

brew install erlang

Alternatively, you could download and install from source:

wget http://www.erlang.org/download/otp_src_R15B01.tar.gz
tar zxvf otp_src_R15B01.tar.gz
cd otp_src_R15B01
./configure
make
sudo make install

Installing RabbitMQ

SubPub utilizes RabbitMQ internally as it's message broker. You will need to [download/install] (http://www.rabbitmq.com/download.html) from VMWare.
If you are on OS X, Homebrew is the easiest way to get up and running.

brew update
brew install rabbitmq

And if you're installing from source:

wget http://www.rabbitmq.com/releases/rabbitmq-server/v2.8.1/rabbitmq-server_2.8.1-1_all.deb
sudo dpkg -i --force-depends rabbitmq-server_2.8.1-1_all.deb
sudo rabbitmq-plugins enable rabbitmq_management
sudo /etc/init.d/rabbitmq-server restart

Developing

Let's get 'er running...

Building

export ERL_LIBS="deps/erlang:$ERL_LIBS"
./rebar clean compile

Running locally

Ensure that RabbitMQ is running locally and can accept connections from subpub. Typically, you start via:

rabbitmq-server

And fire up subpub:

./shell

Assuming all goes well, you can check your local subpub service at [the status link] (http://localhost:4778/v1/status).

It should show something like this:

{
   "status": {
      "served_by": "[email protected]",
      "current_time": "2012-08-24T14:55:01Z",
      "up_nodes": [
        {
          "node": {
            "name": "[email protected]",
            "version": "r3",
            "start_time": "2012-08-24T14:53:43Z",
            "uptime_seconds": 78,
            "num_messages_posted": 0,
            "num_messages_delivered": 0,
            "num_failed_deliveries": 0,
            "num_watched_subscriptions": 0,
            "rest_status": "serverin",
            "watched_subscriptions": [],
            "processes_awaiting_broker_reconnection": []
         }
       }
      ],
      "down_nodes": []
   }
}

License

Licensed under Apache 2.0. See LICENSE file.

subpub's People

Watchers

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