Ringbahn ### High performance multiple backend web server

Build Status Hex.pm Hex.pm Coverage Status Deps Status Hex.pm

Requirements

Running

Install elixir and mix: $ brew install elixir

Install project dependencies with: $ mix deps.get

Start with internal default conf: $ mix run --no-halt

Start with external conf $ mix escript.build $ ./ringbahn --config=../some_config_dir/config.ring.json

For debugging use iex iex -S mix

asciicast

We are at an early development stage, please use it with caution.

Configuration

By default Ringbahn uses json files for configuration. To distinguish between other json files please prefer using .ring.json extension. It may use templating support later on… (with EEx or any other choice)

Example configuration is like:

{
    "settings": {
        "backend": "ZMQ",                  # Defines the backend interface to talk with handlers
        "worker_count": 4,                 # Defines how many internal processes should be started
        "port_offset": 100,                # Defines the intervals for instance ports
        "disable_access_logging": true     # Disables access logging (Not Implemented)
    },
    "static_dir": {                        # Static DIR serving (Not implemented)
        "base": "public",
        "index_file": "index.html",
        "default_ctype": "text/plain"
    },
    "server": {
        "pid_file": "/run/ringbahn.pid",                                 # PID file (Not Implemented)
        "uuid": "edc0a43a-9d93-4d3d-93db-94c3a581ab17",                  # Ringbahn Server UUID (will be muxed by worker_count)
        "access_log": "/log/access.log",                                 # Access log file basename (Not Implemented)
        "error_log": "/log/error.log",                                   # Error log file basename (Not Implemented)
        "port": 6767,                                                    # Starting port for server endpoint (will be muxed by port_offset)
        "default_host": "localhost",                                     # Default host name for serving through...
        "hosts": {                                                       # Every host declaration goes inside of this
            "localhost": [                                               # Route declarations goes inside of this host
                {
                    "route": "/test",                                    # Route that will be handled
                    "send_spec": "127.0.0.1",                            # Send address that will be used to send incoming request to handlers
                    "send_port": 10000,                                  # Port that will be used for send
                    "send_ident": "f983c23e-9058-4c9c-56ec-7f9f9a34c9ma",# Identifier for sender server process group
                    "recv_spec": "127.0.0.1",                            # Receive address that will be used for receiving responses from handlers
                    "recv_port": 10001,                                  # Port that will be used for receive
                    "recv_ident": "t3ok87np-9058-4c9c-9treu-7f9f9a34c9ka"# Identifier for receiver server process group
                }
            ]
        }
    }
}

In depth documentation is available in project page: http://vertexclique.github.io/ringbahn

TODOs

Benchmarks

Benchmarks are in benchmark directory. It will be organized when new backends kicked in by time. Please head to the README of benchmarks for more info.

Ringbahn über Ostkreuz