0

I am trying to make a simple chat-like application where each of the users share data. I need to somehow update all the clients with the new data in real-time when 1 of them is sending something. Is there a way to do it, maybe a webserver or smt ? something that works on apache? For the client page i am using ajax to send data to server and PostgreSQL database to store the datas, but idk how to 'tell' clients that they need to 'refresh' the client browser because 1 client sent new datas to server.

Thank you in advance, Daniel!

Pacuraru Daniel
  • 1,207
  • 9
  • 30
  • 56

1 Answers1

0

I don't know what technology you are using so I would just recommend have a look at this service http://pusher.com/. They are a paid service that gives you the functionality you need. If you give more information on your technology we could provide better help.

Joel Friedlaender
  • 2,191
  • 1
  • 18
  • 24
  • right now i have a html page which sends a text to a php on the server and the php saves the text in a PostgreSQL database. the other clients check the database every 5 seconds to see if new text added.. so i was wondering if i could do a real-time refresh on other clients instead making them check the database every 5 seconds – Pacuraru Daniel Apr 28 '12 at 14:58
  • I don't know much about PHP, but check out websockets to point you in the right direction. In rails you would do something like this http://railscasts.com/episodes/260-messaging-with-faye – Joel Friedlaender Apr 29 '12 at 07:52