gmarik / gorack

Gorack a Go backed frontend webserver for Ruby's Rack apps

Home Page:http://gmarik.info/blog/2015/02/25/gorack-go-webserver-rack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gorack

gorack is a Go backed frontend webserver for Ruby's Rack applications

Current state

  1. alpha quality
  2. Gem file ships with only Darwin amd64 prebuilt binary. Why? See 1.

Why

An experiment; inspired by node's nack

How To

Building from sources

  1. export GORACKPATH=$GOPATH/src/github.com/gmarik
  2. mkdir -p $GORACKPATH
  3. git clone http://github.com/gmarik/gorack $GORACKPATH
  4. cd $GORACKPATH
  5. go run main/gorack-server.go -config ./ruby/test/echo.ru
  6. open http://localhost:3000

Building Gemfile

  1. cd $GORACKPATH
  2. make gemfile # builds to ./build/ruby/gorack-x.x.x.gem

Testing

  1. cd $GORACKPATH
  2. go test -v .
  3. go test -v -bench=. . # with benchmarking

Get Up And Running

NOTE: gem provides only for x86_64 OSX binary at the moment. See instructions how to build from source

  1. gem install gorack
  2. gorack -config ./path/to/config.ru

ie:

  1. gorack -config=$(dirname $(gem which gorack))/../test/echo.ru
  2. open http://localhost:3000

TODO

  • fix weird zombie leaking
  • improve error handling: broken IPC results in malfunction of the parent ruby process
  • improve performance

About

Gorack a Go backed frontend webserver for Ruby's Rack apps

http://gmarik.info/blog/2015/02/25/gorack-go-webserver-rack


Languages

Language:Go 71.7%Language:Ruby 23.6%Language:Makefile 4.7%