Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Startup weekend Taipei 2011 project
Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
config
script
.gitignore
Gemfile
Gemfile.lock
README.textile
application.rb
config.ru

README.textile

talkplus

Talkplus is a project for startup weekend Taipei, it’s based https://github.com/lifo/cramp-pub-sub-chat-demo

API

for Host

The host’s uid is given when loading javascript.

Client request:

{ :action => “join”, :user => “ihower”, :channel => 123, :uid => “1234567890” } { :action => “message”, :message => ’xxxx, :uid => “1234567890” } { :action => “leave”, :uid => “1234567890” }

Server response:

{ :action => “block”, :uid => “1234567890” } { :action => “allow”, :uid => “1234567890” } { :action => “control”, :user => “foobar”, :message => ’xxxx }

for Guest

Client request:

{ :action => “join”, :user => “ihower”, :channel => 123 } { :action => “message”, :message => ’xxxx } { :action => “leave” }

Server response:

{ :action => “control”, :user => “foobar”, :message => ’xxxx } { :action => “assign”, :uid => “1234567890” } { :action => “block”, :uid => “1234567890” } { :action => “allow”, :uid => “1234567890” }

Cramp chat using Redis Pub/Sub + WebSockets

This is a proof-of-concept application to showcase Cramp’s integration with Redis Pub/Sub + WebSockets.

Running the application

Make sure you have Redis up and running.

$ bundle install
$ sudo RACK_ENV=production bundle exec thin —timeout 0 —port 80 start &

You should now see the application running at http://0.0.0.0:3000

Credits

This is an updated version of the Cramp application originally written by Pieter Noordhuishttps://gist.github.com/348262

Something went wrong with that request. Please try again.