Thursday, April 28, 2011

Notify server to client via Web service

I made a WebService chat. At the client side I am running a thread to check periodically if there any new messages available.

I want to know is there are any way to notify clients via Web Service.

I found something call 'Solicit Response' related to web service. But I am not aware how it works.

Any help is appreciated. Thank you

From stackoverflow
  • In web services, the clients strictly request, they don't listen. What you need is some way for the server to "push" to the client. You're looking for something like Comet which isn't part of a web service per se.

    Edit

    Here's a relevant stackoverflow discussion.

    : thank you very much for your reply. As I know XMLHttpRequest(AJAX) can only used in web. My client is a forms application like gtalk/yahoo/msn. Actually is periodically checking for new message, that real way of working chat applications. I mean is it the way that famous gtalk also working ?
    Dave Aaron Smith : Oh, I see what you're saying. I don't know for sure, but I doubt other forms applications using "polling" (periodically checking for new messages). Usually chats are inactive so polling is inefficient. I imagine they open up a port and use "events" (waiting passively for messages). I'm not sure though.

0 comments:

Post a Comment