Wildsonet::Server

Server backend for Wildsonet.

Implementation

Implements simple Rack interdace on top of Netty library.

Status

  • No tests

Not production ready … experimental … proof of concept.

Usage

This server should be used behind front-end server.

nginx

server {

    listen          <public_port>;
    server_name     <public_address>;

    location /static/ {
        internal;
        alias <path_to_rails_application>/public/;
    }

    location / {
        proxy_set_header X-For-Host     $http_host;
        proxy_set_header X-For-Scheme   $scheme;
        proxy_pass http://<rails_address>:<address_port>;
    }

}

This template may be used to configure front-end nginx server to work with this server. <public_port> and <public_address> is your front facing domain and port. <path_to_rails_application> points to location of your rails application, this server uses nginx to serve static content. <rails_address> and <address_port> is address where was your rails/rack application started.

Rails

Start rails with the following command

rails server wildsonet -p <port> -b <hostname> -e <environment>

Rack

Add this to your config.ru

Wildsonet::Server::Handler.run(App)

where App is your Rack application.

X-Handled

When response includes X-Handled header, the server will not try to respond by itself, but will expect the application to handle to response. The server will only clean up temporary files for the request.

To be done

  • Configuration (threadpool)

  • Lots of other features

Changes

0.2.6

  • Enable non-standard response via X-Handled

0.2.5

  • Delete temp file after request is processed

0.2.4

  • Rename module from WildSoNet to Wildsonet and update documentation

0.2.3

  • Depend on Rack

  • Do not depend on Rails (ActiveSupport)

0.2.2

  • Rewritten from Jetty to Netty - no need for full web server

Contributing to wildsonet-server

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet

  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it

  • Fork the project

  • Start a feature/bugfix branch

  • Commit and push until you are happy with your contribution

  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2010 Marek Jelen. See LICENSE.txt for further details.