Results 1 to 3 of 3

Thread: Ice (С++) quetion about SessionFactory interface

  1. #1
    alex_leshii is offline Registered User
    Name: Alex Samsonik
    Organization: Donskoi State Technical University
    Project: OCI middle f
    Join Date
    Jul 2010
    Posts
    7

    Ice (С++) quetion about SessionFactory interface

    Hi!
    I use Ice 3.4.2 in my client-server application (С++), which creates sessions on the server-side with Session and SessionFactory interfaces like in your example "sessions".
    Can you suggest, how can i interchange server's and client's roles to make remote call from server to client? Must i create new slice interface for this call? And how can i bind SessionFactory object and object of new interface?

    Thanks,
    Alex

  2. #2
    xdm's Avatar
    xdm
    xdm is offline ZeroC Staff
    Name: Jose Gutierrez de la Concha
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Sep 2003
    Location
    La Coruña, Spain
    Posts
    588
    Hi Alex,

    There are several ways to do that:

    At first the simpler will be that the client creates an "object adapter" adds a servant to it, and the server can call to that object. The downside is that you will need to deal with the client firewall.

    To avoid managing the client firewall you can use Ice bidirectional connections, the client still needs to create an object adapter, and register a servant, but it don't need to assign the adapter endpoints or deal with the client firewall, instead the client object adapter is configured to reuse the connection that was previously opened to the server, an the client can receive invocations throw this connection, see demo/Ice/bidir demo included in Ice distributions.

    If you are using session objects, and now want to use bidirectional connections, this sound like a good use case for Glacier2, Glacier2 is a lightweight firewall traversal solution for Ice applications. Take a look to Glacier2 documentation, also take a look to demo/Glacier2/session and demo/Glacier2/callback demos included in Ice distributions.

    For a more elaborate example of using Glacier2, sessions and bidirectional connections i suggest to take a look to Chat Demo, the articles provide great detail of the design.

    José

  3. #3
    alex_leshii is offline Registered User
    Name: Alex Samsonik
    Organization: Donskoi State Technical University
    Project: OCI middle f
    Join Date
    Jul 2010
    Posts
    7
    Hi, José!
    Thank you for your help!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Questions about IceBox and the Ice.Communicator interface
    By heinz_mueller in forum Help Center
    Replies: 1
    Last Post: 10-26-2010, 04:23 AM
  2. calling Ice interface functions locally
    By rpeters in forum Help Center
    Replies: 6
    Last Post: 07-14-2010, 04:02 PM
  3. Porting ICE to LabVIEW using .Net interface
    By stancilmor in forum Help Center
    Replies: 2
    Last Post: 01-28-2009, 04:19 PM
  4. Ice-3.1.0 - slice2cpp - interface seq in class
    By StuartA in forum Bug Reports
    Replies: 2
    Last Post: 07-15-2006, 08:15 PM
  5. About Ice::Stats interface
    By OrNot in forum Comments
    Replies: 4
    Last Post: 11-27-2005, 08:32 PM

Posting Permissions

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