Giter VIP home page Giter VIP logo

cramp-pub-sub-chat-demo's Introduction

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
$ bundle exec thin —timeout 0 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

cramp-pub-sub-chat-demo's People

Contributors

johnkchow avatar lifo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cramp-pub-sub-chat-demo's Issues

no method error, no superclass

127.0.0.1 - - [12/Oct/2011 17:42:34] "GET HTTP/1.1" 200 - 0.0061
/var/lib/gems/1.8/gems/cramp-0.15.1/lib/cramp/websocket/protocol10_frame_parser.rb:55:in getbyte': super: no superclass methodgetbyte' for #Cramp::Protocol10FrameParser::MaskedString:0xb6dbd998 (NoMethodError)

full console here http://pastie.org/2683356

I have redis runing

this is the line when I conect to chat ex: Admin:
[31569] 12 Oct 17:56:49 - 2 clients connected (0 slaves), 555640 bytes in use

and here is the console when I joi to chat in another browser with User:

[31569] 12 Oct 17:57:08 - Accepted 127.0.0.1:54399
[31569] 12 Oct 17:57:08 - Accepted 127.0.0.1:54400
[31569] 12 Oct 17:57:08 - Accepted 127.0.0.1:54401
[31569] 12 Oct 17:57:08 - Client closed connection
[31569] 12 Oct 17:57:08 - Client closed connection
[31569] 12 Oct 17:57:08 - Client closed connection
[31569] 12 Oct 17:57:08 - Client closed connection
[31569] 12 Oct 17:57:08 - Accepted 127.0.0.1:54402
[31569] 12 Oct 17:57:08 - Client closed connection
[31569] 12 Oct 17:57:08 - Accepted 127.0.0.1:54403
[31569] 12 Oct 17:57:08 - Accepted 127.0.0.1:54404
[31569] 12 Oct 17:57:08 - Client closed connection
[31569] 12 Oct 17:57:08 - Client closed connection
[31569] 12 Oct 17:57:08 - Client closed connection

How this can be fixed? or this is something that I did wrong?

the string received in server is wrong

In file chat_action.rb:17, the received param 'data' messed up. See error below:

Yajl::ParseError: lexical error: invalid char in json text.
                          ??K\?0~t??5z?if7?$5{?g~`?..7?i
 (right here) ------^

Looks like some encode/decode issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.