Re: Persistent (long) http connection

Adam Tuliper <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.web
Message-ID <032d01c7608c$76450070$62cf0150$@com>
What about the 'comet' technology - similar to what google uses for gmail
chat?


-----Original Message-----
From: Discussion of building .NET applications targeted for the Web
[mailto:[email protected]] On Behalf Of Jon Finley
Sent: Tuesday, March 06, 2007 8:01 AM
To: [email protected]
Subject: Re: [DOTNET-WEB] Persistent (long) http connection

Hi James,

This is a tough one to answer as there are so many variables that may affect
the design.

At first glance, I would probably create a TCP Socket connection from client
to host.  When an update is available the host can send a message out and
then all clients can hit the web service.  This may not work if the only
access to the "box" is HTTP.

Jon


-----Original Message-----
From: Discussion of building .NET applications targeted for the Web
[mailto:[email protected]] On Behalf Of James Berry
Sent: Monday, March 05, 2007 8:44 AM
To: [email protected]
Subject: [DOTNET-WEB] Persistent (long) http connection

I have a mobile device which needs to know about new data pretty much as
soon as it is available.  I have a web service that I can poll to find
out about the data, but it's a question of when I poll it.

Since this device is connected over a mobile (GPRS) connection, and data
is not free, I'd like to avoid a solution which just polls every 60
seconds or similar.

So I'd like to make an http(s) connection that is "up" as long as it can
be, which will just return some data is going to be available over the
web service.  On the server side I can do whatever tricks I can
(probably just polling the database occasionally - which could be
changed to using sql 2005 notifications when are clients move to sql
2005), and return when there is something new.  But there won't be any
data going over the link so usage costs will be kept down.  When the
client notices a disconnect, then it can just re-connect.   I'm pretty
sure this is a similar mechanism to Exchange Server works from mobile
units.

This strikes me as something which will have been done before - or
perhaps there are better ways of doing it?  Any tips, tricks or
web-links appreciated - google hasn't turned up anything for me.

Best wishes
James

===================================
This list is hosted by DevelopMentor.  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.