Real Time it possible?

Results 1 to 3 of 3

Thread: Real Time it possible?

  1. #1
    Kenny Ng Guest

    Default Real Time it possible?

    I&#039ve been thinking about creating a computer lab booking system for my school where I work as a lab technician. Is it possible to have real-time booking status display using ASP and Access?

  2. #2
    Join Date
    Dec 1969

    Default RE: Real Time it possible?

    Give us an example

  3. #3
    Join Date
    Dec 1969

    Default Depends on your definition...

    To me "real time" means that the *instant* something happens, it is reflected to all listeners. Okay, fine. Now, how long is an "instant"? Computers are never infinitely fast, so do we measure an instant in nanoseconds? microseconds? milliseconds? seconds?<BR><BR>If you are willing to live with "seconds" (maybe 10 or so?) as being an "instant", then you could do this in ASP.<BR><BR>The problem is that HTML is a connectionless protocol. That means that when the browser asks for a new page, the Web server [optionally with the help of ASP...or CGI or JSP or whatever] sends back a page and then the connection is broken and forgotten about. Period. Forever.<BR><BR>So *YOUR* browser asks to see the current status of the lab bookings. The Web server (with help from your ASP code) sends back the current status. YOU see the lab is free all day tomorrow.<BR><BR>But then, from another machine, somebody books the lab for 10:00 AM tomorrow morning. <BR><BR>HOW does YOUR machine get informed of that fact? <BR><BR>The Web server certainly can&#039t tell you. It doesn&#039t even remember that you exist. Even if it did, because your browser isn&#039t expecting to receive anything from the server, it would ignore anything that was sent to it.<BR><BR>The *only* way is for YOUR machine to go out and ask the Web server: "Any changes since the last time I looked?"<BR><BR>And that&#039s pretty easy to do with JavaScript (one way) on the browser.<BR><BR>But if your entire browser page was updated (re-sent from the Web server) every ten seconds, it would be a true mess! (1) The net traffic would be horrendous. (2) Your page would constantly be flickering out of existence only to be replaced by the identical page (assuming no activity had taken place) a few seconds later.<BR><BR>So...<BR><BR>A compromise that is doable with ASP and HTML is to use a *HIDDEN FRAME* to make the every-ten-seconds query. Then, only if something has changed, do you force a reload of the visible frame(s) to reflect the changed data.<BR><BR>The HTML sent back for the hidden frame can be truly tiny. For example, it could simply re-submit itself, unchanged. Then, when a change does occur, the Web server would send back (instead) a page that forced an update in the main frame.<BR><BR>There are other ways to do this. And other technologies that are *not* connectionless, like ASP and HTML are. But this is certainly one way to get it to work.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts