Server Side Notifications and a Javascript Application...

G

Guest

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!
 
N

Nick Chan

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
 
B

bruce barker

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="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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top