Talkplus is a project for startup weekend Taipei, it’s based https://github.com/lifo/cramp-pub-sub-chat-demo
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 }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” }This is a proof-of-concept application to showcase Cramp’s integration with Redis Pub/Sub + WebSockets.
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
This is an updated version of the Cramp application originally written by Pieter Noordhuis – https://gist.github.com/348262