Two-way Communication /w Web Services

Discussion in 'ASP .Net Web Services' started by hufaunder@yahoo.com, Aug 27, 2006.

  1. Guest

    I am going to write a smart client application. This application will
    be used both on an intranet as well as over the internet. Among other
    things, the application needs to be able to tell the server to monitor
    certain items/tasks and notify the client when the item/task has
    changed. Initially, I wanted to use web services but I am not sure how
    I would implement a two-way communication between the server and client
    (pushing). Is it possible? If so how? If not what are the alternatives?
    Remoting? What disadvantages would the alternatives have (security,
    access rights, etc).

    The only way I can think of right now how to get it to work with
    webservices is by making an async call. The server would block the call
    until something has changed or a timeout occurs. When the client wants
    to be notified of the next change again he will have to make another
    async call after the previous one has finished. Would this work?

    Thanks
    , Aug 27, 2006
    #1
    1. Advertising

  2. Hufaunder,
    a stateless HTTP application such as a webservice has no way of simply
    dialing up a client over HTTP and saying "hey! Something's changed and here
    it is!"

    You would either need to use Remoting, or some sort of timer-based polling
    mechanism that makes regular webservice method calls to some "GetStatus"
    method.


    Hope this helps,
    Peter


    --
    Co-founder, Eggheadcafe.com developer portal:
    http://www.eggheadcafe.com
    UnBlog:
    http://petesbloggerama.blogspot.com




    "" wrote:

    > I am going to write a smart client application. This application will
    > be used both on an intranet as well as over the internet. Among other
    > things, the application needs to be able to tell the server to monitor
    > certain items/tasks and notify the client when the item/task has
    > changed. Initially, I wanted to use web services but I am not sure how
    > I would implement a two-way communication between the server and client
    > (pushing). Is it possible? If so how? If not what are the alternatives?
    > Remoting? What disadvantages would the alternatives have (security,
    > access rights, etc).
    >
    > The only way I can think of right now how to get it to work with
    > webservices is by making an async call. The server would block the call
    > until something has changed or a timeout occurs. When the client wants
    > to be notified of the next change again he will have to make another
    > async call after the previous one has finished. Would this work?
    >
    > Thanks
    >
    >
    Peter Bromberg [C# MVP], Aug 27, 2006
    #2
    1. Advertising

  3. Guest

    Peter,

    Thanks for the reply. I had the feeling it won't work but was hoping
    because Comet (the 'new' Ajax) can push data, too. I'm not familiar
    enough with it to know how they achieve that.

    In any case, any comments regarding my idea on making async calls and
    the server just blocks until something changes? Also, what are the
    disadvantages using Remoting over the internet?

    Thanks

    Peter wrote:
    > Hufaunder,
    > a stateless HTTP application such as a webservice has no way of simply
    > dialing up a client over HTTP and saying "hey! Something's changed and here
    > it is!"
    >
    > You would either need to use Remoting, or some sort of timer-based polling
    > mechanism that makes regular webservice method calls to some "GetStatus"
    > method.
    >
    >
    > Hope this helps,
    > Peter
    >
    >
    > --
    > Co-founder, Eggheadcafe.com developer portal:
    > http://www.eggheadcafe.com
    > UnBlog:
    > http://petesbloggerama.blogspot.com
    >
    >
    >
    >
    > "" wrote:
    >
    > > I am going to write a smart client application. This application will
    > > be used both on an intranet as well as over the internet. Among other
    > > things, the application needs to be able to tell the server to monitor
    > > certain items/tasks and notify the client when the item/task has
    > > changed. Initially, I wanted to use web services but I am not sure how
    > > I would implement a two-way communication between the server and client
    > > (pushing). Is it possible? If so how? If not what are the alternatives?
    > > Remoting? What disadvantages would the alternatives have (security,
    > > access rights, etc).
    > >
    > > The only way I can think of right now how to get it to work with
    > > webservices is by making an async call. The server would block the call
    > > until something has changed or a timeout occurs. When the client wants
    > > to be notified of the next change again he will have to make another
    > > async call after the previous one has finished. Would this work?
    > >
    > > Thanks
    > >
    > >
    , Aug 27, 2006
    #3
  4. Asynchronous method calls with the server "blocking" until something changes
    is not an extensible approach IMHO. You can support events over remoting,
    althought most experts recommend against that too. Basically you are turning
    the client into a server and the server makes "event" calls to the client.
    There aren't any particular issues with remoting over internet as you call
    it, you can use either HTTP or TCP channel. Your remoting server can be
    hosted in IIS which gives some nice advantages.

    What I do is that if the client is expecting some state to change, it simply
    polls the server every XX seconds and gets back a state object.
    Pete


    --
    Co-founder, Eggheadcafe.com developer portal:
    http://www.eggheadcafe.com
    UnBlog:
    http://petesbloggerama.blogspot.com




    "" wrote:

    > Peter,
    >
    > Thanks for the reply. I had the feeling it won't work but was hoping
    > because Comet (the 'new' Ajax) can push data, too. I'm not familiar
    > enough with it to know how they achieve that.
    >
    > In any case, any comments regarding my idea on making async calls and
    > the server just blocks until something changes? Also, what are the
    > disadvantages using Remoting over the internet?
    >
    > Thanks
    >
    > Peter wrote:
    > > Hufaunder,
    > > a stateless HTTP application such as a webservice has no way of simply
    > > dialing up a client over HTTP and saying "hey! Something's changed and here
    > > it is!"
    > >
    > > You would either need to use Remoting, or some sort of timer-based polling
    > > mechanism that makes regular webservice method calls to some "GetStatus"
    > > method.
    > >
    > >
    > > Hope this helps,
    > > Peter
    > >
    > >
    > > --
    > > Co-founder, Eggheadcafe.com developer portal:
    > > http://www.eggheadcafe.com
    > > UnBlog:
    > > http://petesbloggerama.blogspot.com
    > >
    > >
    > >
    > >
    > > "" wrote:
    > >
    > > > I am going to write a smart client application. This application will
    > > > be used both on an intranet as well as over the internet. Among other
    > > > things, the application needs to be able to tell the server to monitor
    > > > certain items/tasks and notify the client when the item/task has
    > > > changed. Initially, I wanted to use web services but I am not sure how
    > > > I would implement a two-way communication between the server and client
    > > > (pushing). Is it possible? If so how? If not what are the alternatives?
    > > > Remoting? What disadvantages would the alternatives have (security,
    > > > access rights, etc).
    > > >
    > > > The only way I can think of right now how to get it to work with
    > > > webservices is by making an async call. The server would block the call
    > > > until something has changed or a timeout occurs. When the client wants
    > > > to be notified of the next change again he will have to make another
    > > > async call after the previous one has finished. Would this work?
    > > >
    > > > Thanks
    > > >
    > > >

    >
    >
    Peter Bromberg [C# MVP], Aug 28, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stephen Boulet

    popen and two-way communication

    Stephen Boulet, Oct 18, 2004, in forum: Python
    Replies:
    4
    Views:
    3,142
  2. Replies:
    3
    Views:
    432
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Aug 28, 2006
  3. Yasin cepeci
    Replies:
    2
    Views:
    345
    Yasin cepeci
    Jun 4, 2007
  4. Brian Schroeder

    druby two-way communication question

    Brian Schroeder, Jul 23, 2004, in forum: Ruby
    Replies:
    2
    Views:
    147
    Brian Schroeder
    Jul 25, 2004
  5. James Smith
    Replies:
    18
    Views:
    289
Loading...

Share This Page