Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: PHP Web-Development
Could you please let me know the best way to achieve this thing, for example when a user is seeing a web page (like a e-mail service), if there is some event or update (like a message received from someone), this should be notified to the user right at that time (nearly real time)?
 
I've thought of using AJAX and a timer-like handler to check for the update periodically but this seems not to be good for the server (there may be a chance when many users will be visiting the page simultaneously and each user has a loop for checking the new contents in the database which is stored on the server-side).
 
Is there any other technique?
 
Your help would be highly appreciated!
Thanks!
Posted 26-Nov-12 2:52am
supernorb2.5K
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

In Visual Basic we would use WithEvents, but im not sure what the C#/PHP equivalant is, but a quick search turned up this result maybe it can help point you in the right direction.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Hi
 
1] Better to Provide Auto Update ON/OFF functionality along with it.
2] Default would be ON but it will GO to DB after some long Time to fetch Data.
3] Provide Refresh functionality to get Data Updated Data Manually.
 

Those or my suggestion's
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 383
1 ChauhanAjay 186
2 Richard Deeming 180
3 Sergey Alexandrovich Kryukov 171
4 Yogesh Kumar Tyagi 165
0 Sergey Alexandrovich Kryukov 6,252
1 OriginalGriff 5,498
2 CPallini 2,473
3 Richard MacCutchan 1,627
4 Abhinav S 1,530


Advertise | Privacy | Mobile
Web04 | 2.8.140821.2 | Last Updated 26 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100