07 Feb '14, 8pm

Chat Example App Using Server-Sent Events:

Chat Example App Using Server-Sent Events Mason Fischer July 14, 2013 rails redis Rails 4 can stream data to the browser with ActionController::Live using server-sent events (SSEs) . I was curious how server sent events worked so I decided to use them to implement a simple chat application. Tiny-chat is a chat app I built using Goliath , Redis Pub/Sub and of course server-sent events . Subscribing to Events require 'goliath' require 'redis' class Subscribe < Goliath::API def response(env) EM.synchrony do @redis = Redis.new(Options::redis) channel = env["REQUEST_PATH"].sub(/^\/subscribe\//, '') # We pass the subscribe method a block which describes what to # do when we receive an event. # This block writes the message formatted as a server sent event # to the HTTP stream. @redis.subscribe(channel) do |on| on.message do |channel, message| @message = message env.stream_send(p...

Full article: http://robots.thoughtbot.com/chat-example-app-using-serve...

Tweets

Facebook Custom Audiences: 7 Strategies Markete...

searchenginewatch.com 07 Feb '14, 12pm

At the end of January, Facebook announced the global rollout of Custom Audiences, an ad targeting and retargeting solution...

New post: Valentine’s Day Live Chat with (Eco) Sex Expert and Sexual Healing Columnist Stefanie Iris Weiss

New post: Valentine’s Day Live Chat with (Eco) ...

ecosalon.com 07 Feb '14, 7pm

Stefanie Iris Weiss is the author of nine books, including her latest title–”Eco-Sex: Go Green Between the Sheets and Make...