Jump to content

Real Time Updating


smerny
 Share

Recommended Posts

AJAX provides almost-real-time updating (i.e. within a second), but since HTTP is a "pull" protocol (clients have to make requests for resources), you can never get true real-time changes (e.g. no action games :)).

Link to comment
Share on other sites

Real-time applications are done with sockets and compiled server-side languages that are constantly running and listening to a certain port, while on the client side a program pushes data to the server through the socket.With AJAX and PHP you can get things to go fast enough for a chatroom or a game of chess, but you wouldn't have it fast enough for an online racing or fighting game or anything like that.

Edited by Ingolme
Link to comment
Share on other sites

using ajax, what would be used to keep the page up to date if new information is pushed into the database by another source (like you didnt do anything to trigger it in your own browser window)?

Link to comment
Share on other sites

You just have a timed event (i.e. using JavaScript's setTimeout() and setInterval() functions) that constantly checks for new data.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...