Ruby Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesRuby Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 20th, 2011, 01:18 PM
manuele manuele is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2011
Posts: 1 manuele User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m 59 sec
Reputation Power: 0
How to develop publish-subscribe service

This could be a more general question, related to web architecture.

I'm developing a web application using ruby on rails, with jQuery to implement some AJAX requests and other funny slide effects.

Now i'm trying to figure out how to implement a "publish-subscrive" service.

It's difficult to explain it, maybe an example is better:

on facebook, when a friend of you put a comment on your state, you can see it, without the refreshing of the page.

I need something similar: when someone else create a new item of an entity, the server ask the client to add this new item in a table (for example).

The problem is that I don't think it could be done, because the server cannot contact the client (if the client hasn't start the connection with a server, through a GET-POST request, for example)... but facebook does it ;-) so i'm trying to learn how to do a similar thing.

A possible idea could be a javascript function, called every 1 second, that contact the server (through AJAX for example) for checking if there's a new "item"...
But it isn't so efficient.

Do u know how I can do it? Any suggestions?

Thanks guys!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesRuby Programming > How to develop publish-subscribe service

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap