Results 1 to 4 of 4

Thread: Client side invocations from a Server app.

  1. #1
    vincei's Avatar
    vincei is offline Registered User
    Name: Vincent Ibeachum
    Organization: Sherman Observatory
    Project: Remote Observatory Control
    Join Date
    Jul 2007
    Posts
    34

    Client side invocations from a Server app.

    This is a newbie post so please be gentle...

    I'm new to ICE and I'm trying to understand how I can achieve the following:

    Say I have a socket connection which by definition is full duplex. One side is a server and the other side is a client. I can send messages in either direction over this socket and the server and client can respond appropriately to the messages that are exchanged.

    From my limited understanding (if this is wrong please forgive me) of ICE it appears that server always responds to invocations from the client and return result sets back as either out parameters or the return value of the invocations.

    I have a situation where the Server has to invoke an operation on one or more of its connected clients. How do I do this? Does the client have to create an entity(a client side server) that is exposed as a proxy to the Server that needs to make the invocations? I hope not seeing as we already have a full duplex connection that exists under the covers.

    Could you please point me to resources that can help clear up the confusion I'm having.

    Thanks, Vince

  2. #2
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi Vince,

    Yes, the client has to create an object adapter, register a servant with it and pass a proxy for this servant to your server. When calling on this proxy the server will generally establish a new connection.

    If you want to re-use the existing connection between the client and server, you should use bidirectional connections instead. See the demo/Ice/bidir demo from your Ice distribution for an example on how to use bidirectional connections. See also this section in the Ice manual for more information on bidirectional connections.

    Cheers,
    Benoit.

  3. #3
    vincei's Avatar
    vincei is offline Registered User
    Name: Vincent Ibeachum
    Organization: Sherman Observatory
    Project: Remote Observatory Control
    Join Date
    Jul 2007
    Posts
    34
    Benoit,

    Thanks for the fast reply. Much appreciated. I will look at the sample and absorb the section of the manual that you pointed out. Thanks again.

    -- Vince

  4. #4
    vincei's Avatar
    vincei is offline Registered User
    Name: Vincent Ibeachum
    Organization: Sherman Observatory
    Project: Remote Observatory Control
    Join Date
    Jul 2007
    Posts
    34
    Fantastic! That's exactly what I was looking for.

    -- Vince

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to know server down in client app?
    By wangh705 in forum Help Center
    Replies: 1
    Last Post: 06-04-2009, 07:09 AM
  2. Client-side objects
    By Kenni in forum Help Center
    Replies: 1
    Last Post: 12-28-2008, 09:30 AM
  3. Replies: 5
    Last Post: 02-06-2006, 10:26 AM
  4. OutOfMemoryError Exception in the client side
    By lucsat in forum Help Center
    Replies: 4
    Last Post: 01-03-2006, 07:20 AM
  5. client-side thread safety
    By fitzharrys in forum Help Center
    Replies: 1
    Last Post: 07-06-2005, 10:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •