• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

To the Author of the Book: Reverse AJAX

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

These days I am hearing terms like "Reverse Ajax" and "Offline AJAX".
May I know a little about this.
I have a requirement where a user will come to our website and view his details.In case his details are not present, he can enter his email and the application needs to check every night whether his record is inserted in the database and send an email to the user.
Will Reverse AJAX be useful in this case?
Will your book be covering some of these topics?

Thanks.
 
author
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, not exactly.

Reverse Ajax sometimes refers to COMET.. which basically means always leaving open an XHR connection to the server and periodically answering it when there is data. (Comet)

Offline Ajax generally refers to using an offline storage medium like Flash Offline storage or the built in offline storage in IE and Firefox. On page 282 of Enterprise Ajax we begin talking about these technologies, and this continues to page 293 (Chapter 6).

However I wont get into those details because I think what you really need is a Chron task to periodically check to see if his record is inserted and if so- to send an email. A chronjob is a program that runs a periodic intervals. Windows has the Windows Task Scheduler and linux has chronjob.
 
Preeti Arora
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for the reply.

I know I can do this requirement using scheduled taks but just wondering if I could use AJAX here.
Also does the book covers the usage of AJAX for desktop applications.

Thanks again.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Only thing Ajax can do for you is to do the inital upload of your form.

The daily checking of data has nothing to do with the browser, it has to do with just the server.

Eric
 
Ranch Hand
Posts: 409
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone brief me on Comet? I read the info at the website, but would appreciate some feedback from someone who's keeping up with this. Are we looking for "reverse Ajax" that eventually becomes part of the JavaScript standard? Is pioneering work needed, or just agreement on an existing process to support?

The objective of Comet does not seem to be periodic checking for data; but to have a server process trigger a client action with the same response characteristics as if the other way around - i.e. as soon as possible after the action is initiated.

I'm not sure how well the chat examples cover what (it seems to me) is needed. After all, sending a chat message to a client is actually initiated by another client that sends the chat message. On the other hand, so long as there is technology that triggers action from the server to the client without that client's request - are we done yet?

Anyway - I ask because I'm working on an application that will need to contact clients in an unprovoked manner - quite often. If I can put my finger on what's really being asked for (if anything new), maybe I'll package something for public presentation.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I highly doubt this will make much sense since I just woke up after 4 hours of sleep.

You need to look at comet as a thread that sleeps. In reality it is just a http post that is taking a very very very very LONG LONG LONG LONG LONG time to get data back to the client. There is nothing special about it. It is like the Ranch when it is getting hammered with posts, it just takes awhile to retrieve them. The browser is patient and will sit there and wait to hear back from that server so far far away.

In that chat example, you have some serverside process that is listening for chat conversations to be returned. Some serverside process has to be notified to send data back to the client. That notification does not have to come from that other user. It could be anything.

Those two users are not connected in any way, so just because it involoves two users means nothing. That other user makes a post to the server, the server detects this post, and fires off a process on the server. That process is picked up by the "listening" Ajax call, and sent back to the client. That listening Ajax call is just checking the server for some sort of "flag" that says something has changed. Could be looking at a database for records or some variable. It does not care what sets this "flag". It could be some granma playing canasta in a chat room or it could be a calendar reminder fired off by a serverside process.

With comet the user has to have that open conection to the server, there is no magic way to push data down to the client without it. [Unless you look into flash/applet technologies] One bad thing about comet is that it clogs up one of the connections to the server at all times. Now why is this bad, IE has by deafult to only allow two connections open to your domain at one time. So that means there is only one connection to download images or other information. There are ways around that, but that is another story.

Eric
 
Space seems cool in the movies, but once you get out there, it is super boring. Now for a fascinating tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic