Live updates in browser (without manual refresh/F5)

Reply

Join Date: Aug 2009
Posts: 36
Reputation: BlackPhoenix is an unknown quantity at this point 
Solved Threads: 0
BlackPhoenix BlackPhoenix is offline Offline
Light Poster

Live updates in browser (without manual refresh/F5)

 
0
  #1
Aug 12th, 2009
Hi everyone

I have an idea for something but not sure which method would work best to provide the desired result.

Let's say I have a database up and running, storing data for 2 users (php and mysql). What I want to achieve is: having 2 clients on the page with 2 different machines(different browser), have one user (do something), have the data stored in the database, then have user 2 see what has happened in as close to real time as possible.

Can this be done using JavaScript/Ajax to poll the database and update all browsers with a fast response time (100 ms updates?) is that too much strain for a hosted webserver?

If so, is this something achievable with php sockets?

Thanks!! Posted on my iPhone
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 483
Reputation: DangerDev has a spectacular aura about DangerDev has a spectacular aura about 
Solved Threads: 58
DangerDev's Avatar
DangerDev DangerDev is offline Offline
Posting Pro in Training

Re: Live updates in browser (without manual refresh/F5)

 
0
  #2
Aug 13th, 2009
Try Comet.
Freedom in the Mind, Faith in the words.. Pride in our Souls...
Indian Developer
http://falaque.wordpress.com/
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 36
Reputation: BlackPhoenix is an unknown quantity at this point 
Solved Threads: 0
BlackPhoenix BlackPhoenix is offline Offline
Light Poster

Re: Live updates in browser (without manual refresh/F5)

 
0
  #3
Aug 13th, 2009
Originally Posted by DangerDev View Post
Try Comet.
Tomorrow I will look into this Comet Programming more in-depth.

It appears to be a style of coding that I can use to Google search and find more information about, and not a framework itself. Seems like EXACTLY what I wanted.

Do you think this "comet programming" is what helped created Project APE? http://www.ape-project.org/

Basically exactly what I am trying to achieve; to be able to have me do something (or say something) on one browser, and have everyone else with the browser open view it in as close to real-time as possible!
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 254
Reputation: BzzBee is an unknown quantity at this point 
Solved Threads: 37
BzzBee BzzBee is offline Offline
Posting Whiz in Training

Re: Live updates in browser (without manual refresh/F5)

 
0
  #4
Aug 13th, 2009
its possible using ajax. as your user will update records and apply functionality at view area to refresh your page at every second using ajax. but it will take little time as client one is entering data and two is accessing from server. there will be difference of few seconds
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 483
Reputation: DangerDev has a spectacular aura about DangerDev has a spectacular aura about 
Solved Threads: 58
DangerDev's Avatar
DangerDev DangerDev is offline Offline
Posting Pro in Training

Re: Live updates in browser (without manual refresh/F5)

 
0
  #5
Aug 13th, 2009
Do you think this "comet programming" is what helped created Project APE? http://www.ape-project.org/
Yes, it seems they have created a nice API, you should explore this also.

Basically exactly what I am trying to achieve; to be able to have me do something (or say something) on one browser, and have everyone else with the browser open view it in as close to real-time as possible!
This is where comet will be useful
Freedom in the Mind, Faith in the words.. Pride in our Souls...
Indian Developer
http://falaque.wordpress.com/
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 36
Reputation: BlackPhoenix is an unknown quantity at this point 
Solved Threads: 0
BlackPhoenix BlackPhoenix is offline Offline
Light Poster

Re: Live updates in browser (without manual refresh/F5)

 
0
  #6
Aug 13th, 2009
Is Comet Programming still just a concept?

Or will I be able to find PHP Comet Programming tutorials and real-world examples?

Very excited to get home from work and start researching/working!!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC