locked
Invoking a method from WCF server itself RRS feed

  • Question

  • Hello All,

    I'm a new bee in WCF , I'm trying to implement something as below;

    I have a WCF server hosted in area A and client at area B

    now I'm using the Chunking channel example for my research .

    what I need is , I need to invoke something from the AREA A and push an image from A to B i.e., from server to client

    rather than client calling a method and pulling something from server to client ;

    I need server to push something to client ;

    is it possible ? Thanks in advance for any help...

    i did tried this http://social.msdn.microsoft.com/Forums/en/wcf/thread/4943d3f6-99ba-4af4-9a96-89b117402f02 but it is not pushing anything ; it is just calling  anddoing something at server end itself

     

    Thursday, August 25, 2011 11:52 AM

Answers

  • Try implement a Publish Subscribe messaging framework. 

    See this link 

    http://msdn.microsoft.com/en-us/magazine/cc163537.aspx#S6


    Tanvir Huda Application Architect/Consultant
    • Marked as answer by deepateresa Thursday, September 1, 2011 11:09 AM
    Thursday, August 25, 2011 1:47 PM
  • Chunking channel has nothing to do with pushing data from service to client. It simply divides large messages to small chunks, and send them one by one. For your scenario to work, you need to host a service on the client machine, or you will have to make the client poll the service at a regular interval. You can either create a service host manually, or use a duplex binding, which will create a service host on the client machine automatically.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Windows Azure Technical Forum Support Team Blog
    • Proposed as answer by DPS Bali Tuesday, August 30, 2011 5:21 AM
    • Marked as answer by Yi-Lun Luo Thursday, September 1, 2011 9:27 AM
    Tuesday, August 30, 2011 3:51 AM

All replies

  • Try implement a Publish Subscribe messaging framework. 

    See this link 

    http://msdn.microsoft.com/en-us/magazine/cc163537.aspx#S6


    Tanvir Huda Application Architect/Consultant
    • Marked as answer by deepateresa Thursday, September 1, 2011 11:09 AM
    Thursday, August 25, 2011 1:47 PM
  • Is the "client" in area B a server machine or are they are real clients running a client OS?

     

    Francois

    Thursday, August 25, 2011 1:54 PM
  • WCF server in  my case is a web viewer, which is done as .net windows application and later used in web as an embedded viewer;

    in this viewer based on the IP of the client machine ,  that is used , the server is hosted itself and the endpoints are communicated to the client

    again WCF client in my case is a windows service; after getting the endpoints , the channel is created from window service

    now client to server communication was implemented long back using help of channel helper (chunking channel ex) of WCF ;

    & now the requirement came saying we need to send Large images from VIEWER (WCF server ) to WINDOWS SERVICE( WCF client)

    now to make the WINDOWS SERVICE another WCF server is not allowed due to some technical reasons....

    this is my scenario


    Deepa John
    Thursday, August 25, 2011 2:51 PM
  • Hello All,

    I'm a new bee in WCF , I'm trying to implement something as below;

    I have a WCF server hosted in area A and client at area B

    now I'm using the Chunking channel example for my research .

    what I need is , I need to invoke something from the AREA A and push an image from A to B i.e., from server to client

    rather than client calling a method and pulling something from server to client ;

    I need server to push something to client ;

    is it possible ? Thanks in advance for any help...

    i did tried this http://social.msdn.microsoft.com/Forums/en/wcf/thread/4943d3f6-99ba-4af4-9a96-89b117402f02 but it is not pushing anything ; it is just calling  anddoing something at server end itself

     


    is it possible to avoid the port , while specifying the endpoints?
    Deepa John
    Thursday, August 25, 2011 3:01 PM
  • Hello, do you mean you only have one client? In this case, you can simply host a service on the client machine, and your server machine will act as a client when it wants to push data to the service on the client machine. If you have multiple clients, you can use a duplex binding: http://msdn.microsoft.com/en-us/library/ms731064.aspx.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Windows Azure Technical Forum Support Team Blog
    Friday, August 26, 2011 6:38 AM
  • I tried to implement the same ;

    in the example provided by Microsoft ; I could find the server is hosted in IIS and then the same is consumed ;

    BUt what I need is that I'm already having an implementation of WCF in my application & my new implementation shoudl not affect the older one

    old one is based on chunking channel examples IN "C:\Samples\WCFWFCardSpace\WCF\Extensibility\Channels\ChunkingChannel"

    if I'm going to implement publisher subscriber model , I may need a fixed channel and that too duplex;

    is it possible to raise events by using the chunkBinding and related services?

    --------

    THIS is my scenarion I have the WCF client fixed and the SERVER may differ  from Machine to Machine for the customers...

    I my client to server communication is fine ; I need a mechanism in which server shoudl invoke by itself and the client should get a set of files ...

    & I need my existing implementation to be as such .. as it is of high performance for us ( transferring GB's of .dcm files )

    do u think that I can merge the Publisher - subscriber model  OR something like that in my existing implemnetation ?


    Deepa John
    Monday, August 29, 2011 11:59 AM
  • I'm alreading having something implemented in WCF and is working perfectly fine

    old one is based on chunking channel examples IN "C:\Samples\WCFWFCardSpace\WCF\Extensibility\Channels\ChunkingChannel"

    ------------------

    THIS is my scenarion I have the WCF client fixed and the SERVER may differ  from Machine to Machine for the customers...

    my client to server communication is fine ; I need a mechanism in which server shoudl invoke by itself and the client should get a set of files ...

    & I need my existing implementation to be as such .. as it is of high performance for us ( transferring GB's of .dcm files )

    can u suggest anything that will go along with  my existing implemnetation ?


    Deepa John
    Monday, August 29, 2011 12:02 PM
  • Chunking channel has nothing to do with pushing data from service to client. It simply divides large messages to small chunks, and send them one by one. For your scenario to work, you need to host a service on the client machine, or you will have to make the client poll the service at a regular interval. You can either create a service host manually, or use a duplex binding, which will create a service host on the client machine automatically.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Windows Azure Technical Forum Support Team Blog
    • Proposed as answer by DPS Bali Tuesday, August 30, 2011 5:21 AM
    • Marked as answer by Yi-Lun Luo Thursday, September 1, 2011 9:27 AM
    Tuesday, August 30, 2011 3:51 AM