Apr 16, 2009, 2:46 AM
After Ajax, how about Reverse Ajax
I recently had a situation, where the client initiated a complex time-consuming operation on the server from the browser.
During the time of the operation, I needed to continuously provide feedback in the browser on the progress of the overall operation and the exact thing that was being performed on the server.
My goodness, thanx to [AjaxMethod]s, I was able to accomplish the entire task with little coding & inside an hour. The client clicked Submit, after which the button was disabled. Processing was initiated on the server, and a server-side [AjaxMethod] was polled per second to keep the client updated. It has all gone well. No page flickers, minimum traffic with light-weight Json.
So, I was thinking if the process could be further improved. The only thing that came to mind was polling could have been avoided. A new technique is rising Reverse Ajax, that now enables javascript calls from server, through persistent Http connections. I haven't studied it in detail, nor have I used it.
But, with Coolite providing the capability of calling server-side code from Javascript, how about doing the reverse, calling javascript from server-side code??
I know this is ambitious. I believe this would take time to implement. But there is already atleast one library available for doing this from Java code. I am only suggesting the Coolite core team to look if it is a proposal worth considering.
This would add teeth to the already powerful, ExtJs backed Coolite.
ExtJs being a completely client-side library, it should NOT help in any way in this. So, I have not filed a similar request on ExtJs forums. Does anyone believe here ExtJs might help in any significant way in achieving Reverse Ajax??
During the time of the operation, I needed to continuously provide feedback in the browser on the progress of the overall operation and the exact thing that was being performed on the server.
My goodness, thanx to [AjaxMethod]s, I was able to accomplish the entire task with little coding & inside an hour. The client clicked Submit, after which the button was disabled. Processing was initiated on the server, and a server-side [AjaxMethod] was polled per second to keep the client updated. It has all gone well. No page flickers, minimum traffic with light-weight Json.
So, I was thinking if the process could be further improved. The only thing that came to mind was polling could have been avoided. A new technique is rising Reverse Ajax, that now enables javascript calls from server, through persistent Http connections. I haven't studied it in detail, nor have I used it.
But, with Coolite providing the capability of calling server-side code from Javascript, how about doing the reverse, calling javascript from server-side code??
I know this is ambitious. I believe this would take time to implement. But there is already atleast one library available for doing this from Java code. I am only suggesting the Coolite core team to look if it is a proposal worth considering.
This would add teeth to the already powerful, ExtJs backed Coolite.
ExtJs being a completely client-side library, it should NOT help in any way in this. So, I have not filed a similar request on ExtJs forums. Does anyone believe here ExtJs might help in any significant way in achieving Reverse Ajax??