Link to home
Start Free TrialLog in
Avatar of tfsln
tfslnFlag for New Zealand

asked on

Raise an event from the web service to a client

Is this possible?

The client and web service were both created using VB.NET 2008 Framework 3.5

Our client application does all of its transactions with the server via a web service. We have a new messaging function which needs to be implemented and in order to receive new messages we need to either poll the server at regular intervals in order to check for new messages, or we need the web server to be able to tell the client application when there is a new message.

The second option is clearly ideal. So the question is how can it be done?
ASKER CERTIFIED SOLUTION
Avatar of Solar_Flare
Solar_Flare

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tfsln

ASKER

So how do instant message applications work? Or any other application which display notifications like that? Do they constantly poll servers to check for new messages/items?

Having the server know the address of each client is not a problem, because i could send that information to the server each time a user logs in. I guess the only problem would be firewalls like you say.
Avatar of oobayly
IM applications tend to use their own protocol and not http (even if they use tcp 80). Their connections tend to stay open so that data can be pushed back and forth, unlike http which was designed as a stateless protocol: the connections were supposed to be closed after a page was requested. Only with http 1.1 were connections defaulted to remain open as opening connections tend to be expensive.