|
-
Feb 18th, 2009, 04:58 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Can a WCF service initiate communications to the client?
I watched the first few videos at channel 9, and was wondering about this:
For example, if I'm building something like a chat program where I want to support multiple participants, one of the participants will enter a message and submit it to the service. It would then need to relay the message to all the clients. Is there any way (besides having the client periodically update or building a WCF service into your client that can trigger the update) the service can send an update to the client?
-
Feb 18th, 2009, 05:31 AM
#2
Re: Can a WCF service initiate communications to the client?
Yes WCF can do that, it is called WCF callback (a simple example)
-
Feb 18th, 2009, 05:42 AM
#3
Thread Starter
Hyperactive Member
Re: Can a WCF service initiate communications to the client?
Hmmm, not that simple I would say, but I got the idea. (I think )
-
Feb 18th, 2009, 05:44 AM
#4
Re: [RESOLVED] Can a WCF service initiate communications to the client?
A complicated thing can't be explained too easy
-
Feb 18th, 2009, 05:47 AM
#5
Thread Starter
Hyperactive Member
Re: [RESOLVED] Can a WCF service initiate communications to the client?
-
Feb 18th, 2009, 08:00 AM
#6
Re: [RESOLVED] Can a WCF service initiate communications to the client?
When it comes to chat clients, you run the risk of non-availability and I don't think a callback is the best solution for this scenario unless you're prepared to set up the housekeeping code to handle lost connections, etc. Most chat services on the web operate with the client polling the service at regular intervals. An intranet environment or a small network could work well with a callback.
-
Feb 18th, 2009, 08:35 AM
#7
Re: [RESOLVED] Can a WCF service initiate communications to the client?
I know this isnt a solution but I'm curious as to why you really need a service for a chat client - why cant each chat client just have the ability to send and recieve messages and when you want to send a message to multiple recipients you just have the client do the sending to each recipient, instead of passing it to the service for the service to then pass to each recipient?
I guess what I'm asking is - what advantage do you get out of using a central service to pass things around in this scenario?
-
Feb 18th, 2009, 10:34 AM
#8
Thread Starter
Hyperactive Member
Re: [RESOLVED] Can a WCF service initiate communications to the client?
It was just a hypothetical example. No particular reason....
I do have a plan for a project where I would do more with the application that includes the chat service than just forward chat messages. The chat functionality would be just one of the components, and I want to make sure that the application hosting the central service gets the messages, even if other connected clients don't.
-
Feb 18th, 2009, 12:12 PM
#9
Re: [RESOLVED] Can a WCF service initiate communications to the client?
To answer chris - a WCF service is useful here because you can use an MSMQ binding and let MSMQ handle the message queue with guarantees and reliability.
-
Feb 20th, 2009, 03:16 AM
#10
Frenzied Member
Re: [RESOLVED] Can a WCF service initiate communications to the client?
 Originally Posted by mendhak
To answer chris - a WCF service is useful here because you can use an MSMQ binding and let MSMQ handle the message queue with guarantees and reliability.
WCF is also great for handling security.
"Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
- Zack de la Rocha
Hear me roar.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|