Thursday, March 29, 2012

Server Side Notifications and a Javascript Application...

Hello Everyone,
I'm building an application which requires server side events to be pushed
to clients.
Typically I build these applications with a think client, but the machines
I'm deploying this particular application have a very slim image - no .NET,
Java, or any other runtimes.
I am only able to use Internet Explorer 6.0 (running on Windows 2000 Pro).
I've implemented a solution using web services, a polling mechanism, and
ASP.NET AJAX ... however this method takes up a lot of CPU cycles on the
client which is noticable since javascript is single-threaded. I am polling
the server every second.
I understand there is an up and coming framework called COMET which does
provide server side event pushed through a persistent connection, but does
anyone know how easy it would be to integrate this pattern into ASP.NET
Ajax?
I'm just throwing this out to see how other people have built applications
which require a server side event push.
Thanks!hi at matlus dot com there's "always connected" http thingey written
in delphi. client is always connected. i wonder if it helps to achieve
what u want
On Nov 30, 1:17 pm, Spam Catcher <spamhoney...@.rogers.com> wrote:
> Hello Everyone,
> I'm building an application which requires server side events to be pushed
> to clients.
> Typically I build these applications with a think client, but the machines
> I'm deploying this particular application have a very slim image - no .NET
,
> Java, or any other runtimes.
> I am only able to use Internet Explorer 6.0 (running on Windows 2000 Pro).
> I've implemented a solution using web services, a polling mechanism, and
> ASP.NET AJAX ... however this method takes up a lot of CPU cycles on the
> client which is noticable since javascript is single-threaded. I am pollin
g
> the server every second.
> I understand there is an up and coming framework called COMET which does
> provide server side event pushed through a persistent connection, but does
> anyone know how easy it would be to integrate this pattern into ASP.NET
> Ajax?
> I'm just throwing this out to see how other people have built applications
> which require a server side event push.
> Thanks!
comet uses what used to be called server push. basically the browser
does a request usually to a iframe. the server keeps the connection open
for a limited time, say a minute and pushes javascript events via
script. you want to reload to free memory in the browser and to prevent
timeouts.
<iframe src="http://pics.10026.com/?src=push.aspx">
push logic
Response Buffer Off
Response.Write("<script>")
loop
wait on event
if (timeout)
Response.Write("document.location.href = 'push.aspx'")
Response.End()
else
Write event javascript
Response.Flush()
end loop
-- bruce (sqlwork.com)
Spam Catcher wrote:
> Hello Everyone,
> I'm building an application which requires server side events to be pushed
> to clients.
> Typically I build these applications with a think client, but the machines
> I'm deploying this particular application have a very slim image - no .NET
,
> Java, or any other runtimes.
> I am only able to use Internet Explorer 6.0 (running on Windows 2000 Pro).
> I've implemented a solution using web services, a polling mechanism, and
> ASP.NET AJAX ... however this method takes up a lot of CPU cycles on the
> client which is noticable since javascript is single-threaded. I am pollin
g
> the server every second.
> I understand there is an up and coming framework called COMET which does
> provide server side event pushed through a persistent connection, but does
> anyone know how easy it would be to integrate this pattern into ASP.NET
> Ajax?
> I'm just throwing this out to see how other people have built applications
> which require a server side event push.
> Thanks!

0 comments:

Post a Comment