Skip to content

jaxl/ebosh

Repository files navigation

#ebosh#

Copyright (c) 2011-2012 Abhinav Singh

Version: 0.0.1

Authors: Abhinav Singh (me@abhinavsingh.com).

a work in progress, not yet ready for production use

ebosh is a BOSH connection manager written on top of erlang otp principles.

Features:

  • stream restarts
  • multiple streams
  • in-order message forwarding
  • starttls, stream compression support
  • request and response acknowledgements
  • support for https and key sequence protection against insecure sessions
  • support for long polling, chunked encoding, jsonp and websocket bosh requests

Quick Start Guide

get ebosh

download and compile

PROMPT> git clone git://github.com/abhinavsingh/ebosh.git
PROMPT> cd ebosh
PRMOPT> chmod +x ebosh
PROMPT> ./eboshctl rebar
PROMPT> ./eboshctl get-deps
PROMPT> ./eboshctl compile
PROMPT>

start

start ebosh

PROMPT> ./eboshctl start
starting ebosh ...
PROMPT>

test

Ping ebosh to test if it's running

PROMPT> ./eboshctl ping
pinging ebosh@127.0.0.1 ...
running
PROMPT>

Point your bosh clients to http://127.0.0.1:9696/http-bind

debug

debug ebosh by entering corresponding erlang console

PROMPT> ./eboshctl debug
Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:5] [hipe] [kernel-poll:true]

Eshell V5.8.5 (abort with ^G) (ebosh@127.0.0.1)1> toolbar:start(). BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded (v)ersion (k)ill (D)b-tables (d)istribution ^C PROMPT>

press CNTL+C to quit debug mode

stop

stop ebosh

PROMPT> ./eboshctl stop
PROMPT> ./eboshctl ping
pinging ebosh@127.0.0.1 ...
not running

Configuration Parameters

Edit ebosh.config for your custom port and path configuration. Following options are available:

  • http_lib "mochiweb" | "cowboy"
  • http_port 9696
  • https_port 9697
  • http_bind_path "/http-bind"
  • https_certfile "priv/cert/server.crt"
  • https_keyfile "priv/cert/server.key"

Dependencies

ebosh require following external libraries.

You can run ebosh either with mochiweb, cowboy or even your own custom erlang server.

ebosh requires a patched version of exmpp to work with.

You can obtain the patched version in two ways:

  • git clone git://github.com/abhinavsingh/exmpp.git
  • patch src/network/exmpp_session.erl of exmpp source with this patch



History

ebosh was developed for jaxl.com/jaxl.im infrastructure needs

##Modules##

ebosh
ebosh_app
ebosh_cowboy
ebosh_http
ebosh_mochiweb
ebosh_session
ebosh_stream
ebosh_sup
shaper

About

BOSH (bidirectional stream over http) connection manager written on top of Erlang OTP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published