Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
a realtime resource-centric application framework
Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
experiments
lib
templates/application
.gitignore
README.markdown
funnel.gemspec

README.markdown

funnel - a realtime resource-centric application framework

Installation

gem install funnel -s http://gemcutter.org

Creating a project

funnel example
cd example
ruby script/server

Project Hierarchy

/config
    boot.rb
    routes.rb (define your handler routes)
    settings.yml (host, port, accepted sources, etc)
/handlers -> your real time resource handlers
    game_handler.rb
    chat_handler.rb
/script
    server
/htdocs
    test.html -> a simple page to test that your server is running

your first "handler"

echo_handler.rb

class EchoHandler < Funnel::WebSocket::Connection

  #called when the connection is ready to send
  #and receive data
  def on_ready
  end

  #called on disconnect
  def on_disconnect
  end

  #right back at you
  def on_data msg
    send_message msg
  end

end

set up the route in config/routes.rb

map.connect "/echo" => EchoHandler

Dependencies

Coming soon

  • Plugins for various real time things (amqp, xmpp, twitter, etc)
  • Client side libraries to enable cross browser development
  • Client side plugins
Something went wrong with that request. Please try again.