Results 1 to 10 of 10

Thread: A question about CallbackAdapter.Router

  1. #1
    rc_hz is offline Registered User
    Name: Eric RC
    Organization: www.genband.com
    Project: No project yet
    Join Date
    Jul 2004
    Location
    Hangzhou, China
    Posts
    189

    A question about CallbackAdapter.Router

    Suppose there is a Client(IP:1.2.3.4)/Server(IP: 10.0.0.1) system which uses a Glacier2(IP: 5.6.7.8/10.0.0.2) to handle firewall issues. Further, the Client provide callbacks, so the Client has to make configuration as follows:
    Code:
    Ice.Default.Router=Glacier2/router:tcp -h 5.6.7.8 -p 10005
    CallbackObjectAdapter.Router=Glacier2/router:tcp -h 5.6.7.8 -p 10005
    I have read Chapter 39.4.4 of Ice manual(2.1.1). However, I can not figure out why we have to use two different config items to use callbacks. I think, most of time (or all of time), these two config items should have the same value(Glacier2/router:tcp -h 5.6.7.8 -p 10005).

    Thank you!
    Eric RC
    www.genband.com (telecommunication)
    I like ICE (Ice for C++/Java/Python)

  2. #2
    marc's Avatar
    marc is offline ZeroC Staff
    Name: Marc Laukien
    Organization: ZeroC, Inc.
    Project: The Internet Communications Engine
    Join Date
    Feb 2003
    Location
    Florida
    Posts
    1,860
    Ice.Default.Router is only for the client side (i.e., outgoing requests) of your application. The server-side router information (i.e., for incoming requests) must be set separately for each per object adapter.

  3. #3
    rc_hz is offline Registered User
    Name: Eric RC
    Organization: www.genband.com
    Project: No project yet
    Join Date
    Jul 2004
    Location
    Hangzhou, China
    Posts
    189
    I am sorry, I still can not understand although I have read this part in Ice manula once again.

    According to Figure 39.6, there are 4 steps to make a callback connection in Glacier2. However, step1 and step4 always use the same connection, so when they(these two config items) have different value ?
    Eric RC
    www.genband.com (telecommunication)
    I like ICE (Ice for C++/Java/Python)

  4. #4
    marc's Avatar
    marc is offline ZeroC Staff
    Name: Marc Laukien
    Organization: ZeroC, Inc.
    Project: The Internet Communications Engine
    Join Date
    Feb 2003
    Location
    Florida
    Posts
    1,860
    If you would use multiple Glacier2 routers (i.e., if your client would receive callbacks from different servers, using different Glacier2 routers), then you would have to use multiple object adapters with different router configurations.

    In this case, Ice.Default.Router would only be useful if for outgoing requests, you have one "default" server. For servers other than the default server, you would have to set the router on a per-proxy basis, i.e., with the proxy's ice_router() operation.

  5. #5
    rc_hz is offline Registered User
    Name: Eric RC
    Organization: www.genband.com
    Project: No project yet
    Join Date
    Jul 2004
    Location
    Hangzhou, China
    Posts
    189
    If there is just a Client and Server, we can use different Glacier2 routers as follows?
    Code:
    Client --step1--> Glacier2 routerA --step2---> Server
      ^                                              |
      |                                              |
      |                                              |
      |                                              |
      ---step4-------Glacier2 routerB<----step3-------
    Eric RC
    www.genband.com (telecommunication)
    I like ICE (Ice for C++/Java/Python)

  6. #6
    rc_hz is offline Registered User
    Name: Eric RC
    Organization: www.genband.com
    Project: No project yet
    Join Date
    Jul 2004
    Location
    Hangzhou, China
    Posts
    189
    I am puzzled by this sentence in Ice manual 2.1.1, page 1129:
    Code:
    The router forwards the callback request to the client using the bi-directional connection established in step 1.
    Eric RC
    www.genband.com (telecommunication)
    I like ICE (Ice for C++/Java/Python)

  7. #7
    marc's Avatar
    marc is offline ZeroC Staff
    Name: Marc Laukien
    Organization: ZeroC, Inc.
    Project: The Internet Communications Engine
    Join Date
    Feb 2003
    Location
    Florida
    Posts
    1,860
    Sorry, I don't understand the question. Why would you want to use multiple Glacier2 instances if there is only one server? You only need multiple Glacier2 instances if you have different servers, running in different backend networks, both with their own separate access to the Internet. If the servers share the same access to the Internet, there is no need for multiple Glacier2 instances.

    Note that you can have multiple Glacier2 instances for load balancing, but this is an entirely different issue. In this case, you would configure one router proxy with multiple endpoints, each referring to one of the redundant Glacier2 instances. The Ice runtime would then pick one of them at random.

  8. #8
    marc's Avatar
    marc is offline ZeroC Staff
    Name: Marc Laukien
    Organization: ZeroC, Inc.
    Project: The Internet Communications Engine
    Join Date
    Feb 2003
    Location
    Florida
    Posts
    1,860
    Quote Originally Posted by rc_hz
    I am puzzled by this sentence in Ice manual 2.1.1, page 1129:
    Code:
    The router forwards the callback request to the client using the bi-directional connection established in step 1.
    I'm sorry, but I'm afraid I don't understand this question either. What exactly puzzles you about this sentence? Using bi-directional connections, a server sends callbacks over the connection that has been established from the client to the server, instead of trying to create a new connection from the server to the client. That's how all bi-directional connections work, if you use them with Glacier or not...

  9. #9
    rc_hz is offline Registered User
    Name: Eric RC
    Organization: www.genband.com
    Project: No project yet
    Join Date
    Jul 2004
    Location
    Hangzhou, China
    Posts
    189
    I have drawn a picture to reflect my understanding. Can you be so kind to have a look and point out my misunderstanding? Thank you ?
    Attached Files Attached Files
    Last edited by rc_hz; 06-06-2005 at 11:51 AM.
    Eric RC
    www.genband.com (telecommunication)
    I like ICE (Ice for C++/Java/Python)

  10. #10
    marc's Avatar
    marc is offline ZeroC Staff
    Name: Marc Laukien
    Organization: ZeroC, Inc.
    Project: The Internet Communications Engine
    Join Date
    Feb 2003
    Location
    Florida
    Posts
    1,860
    Technically, both case 1 and case 2 work, with one exception: In case 2, you need to establish a connection from the client to server A via router B. Otherwise, there is no connection that router B could use to send callbacks to the client.

    To establish such a connection, you could create a single proxy for server A, set the router for this proxy (with ice_router()) to router B, and establish a session with this proxy with router B as usual.

    However, I don't understand the purpose of this setup. Why do you want to have two Glacier2 instances to route callbacks to your client from the same server? What's the advantage over using just one router?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Recovery after router failure
    By apetrov in forum Help Center
    Replies: 3
    Last Post: 04-15-2009, 05:33 PM
  2. Problem about router adapter
    By leo in forum Help Center
    Replies: 0
    Last Post: 05-12-2008, 06:11 AM
  3. Using Glacier2 with no default router
    By rhochmuth in forum Help Center
    Replies: 8
    Last Post: 02-02-2005, 11:50 AM
  4. Replies: 4
    Last Post: 11-21-2004, 10:22 PM
  5. about glacier and router
    By li.c++ in forum Help Center
    Replies: 0
    Last Post: 10-22-2004, 05:16 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
  •