| Author |
AJAX Issue
|
Animesh Saxena
Ranch Hand
Joined: Jan 15, 2006
Posts: 62
|
|
Well AJAX has certainly been something new in the world of request response. The so called request respone being asynchronous...I think its great...Even microsoft didn't think of that at the time of writting .NET Anyway I think its use in chat applications is quite slow. Cos of the asynchronous nature the replies....sometimes take too long to come... Can AJAX be improved for chattin systems?
|
Animesh Saxena<br /> <br />Open Source Developer
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14685
|
|
Even microsoft didn't think of that at the time of writting .NET
I'm not sure that Microsoft has anything to do with Ajax. Isn't Ajax just a mix of technologies that were already in front of us for ages ? (Javascript, DOM, XHTML...) By the way, there is Ajax for Java, and Ajax for .NET
|
[My Blog]
All roads lead to JavaRanch
|
 |
Christian Gross
Author
Ranch Hand
Joined: Feb 20, 2006
Posts: 85
|
|
What you are asking for is an implementation of the Persistent Communications pattern variation Server Push. Essentially what you want to do is poll the server, but the server holds the lock and responds with an answer. Jetty, and Apache call this continuations, and can deal with the extra overhead of keeping a connection alive. The way it works is that you use the HTTP protocol to create to communication channels; POST/PUT, and GET. GET is used to retrieve results, and POST/PUT is used to send results. Normally when you poll you poll every X [seconds|minutes|etc]. Between those polls your client does not nothing. Another way to poll is for the client to make a request, and have the server use a monitor to wait for results. The advantage is that the client will always get the latest data available. The disadvantage of this approach is that you are always holding one connection open to the server. However, with Apache 2.2.x, and Jetty 6.x they have solved this problem. There are other details such as URL management, and redirection, but the pattern explains those details. You could also look at the pattern sources to get an idea of what I am talking about. [ February 21, 2006: Message edited by: Christian Gross ]
|
Author of Ajax Patterns and Best Practices
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15362
|
|
Originally posted by Satou kurinosuke: I'm not sure that Microsoft has anything to do with Ajax. Isn't Ajax just a mix of technologies that were already in front of us for ages ? (Javascript, DOM, XHTML...) By the way, there is Ajax for Java, and Ajax for .NET
Micrososft is the first one to implemnent the XMLHttpRequest object. So they sort of are responsible for it. Eric
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14685
|
|
|
Thanks for the precision Eric.
|
 |
 |
|
|
subject: AJAX Issue
|
|
|