Results 1 to 10 of 10

Thread: [RESOLVED] Can a WCF service initiate communications to the client?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2008
    Location
    Zeist, The Netherlands
    Posts
    266

    Resolved [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?

  2. #2
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: Can a WCF service initiate communications to the client?

    Yes WCF can do that, it is called WCF callback (a simple example)
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2008
    Location
    Zeist, The Netherlands
    Posts
    266

    Re: Can a WCF service initiate communications to the client?

    Hmmm, not that simple I would say, but I got the idea. (I think )

  4. #4
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: [RESOLVED] Can a WCF service initiate communications to the client?

    A complicated thing can't be explained too easy
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2008
    Location
    Zeist, The Netherlands
    Posts
    266

    Re: [RESOLVED] Can a WCF service initiate communications to the client?

    True!

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  7. #7
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    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?
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2008
    Location
    Zeist, The Netherlands
    Posts
    266

    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.

  9. #9
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  10. #10
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994

    Re: [RESOLVED] Can a WCF service initiate communications to the client?

    Quote 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
  •  



Click Here to Expand Forum to Full Width