Archived

This forum has been archived. Please start a new discussion on GitHub.

Glacier2Router can be linked in series?

Hi,there
So far as an implementaion of the interface "Router", are two or more Glacier2Routers possible to be linked in series? Of course this may be of no use in practice, However, I just want to know if it is feasible that two or more services , which implement the "Router", can be linked to support multi-tier servers. I am just curious.
Are there any examples in demos about this ?
Thanks a lot

Comments

  • benoit
    benoit Rennes, France
    Hi,

    Glacier2 routers can't be "linked". A Glacier2 router is a standalone service that sits between clients and servers (in general clients are on a public network and servers in a private network.)

    I suppose in theory it could be possible to implement a router service that implements the Ice::Router interface and route a request through multiple routers. But to answer your question... we don't have any demos to demonstrate this :).

    Benoit.
  • hi,
    Before I met Glacier2Router stuff, I have traced all the demo source codes line by line , and have a rough understanding about the ICE run time core, such as AMI\AMD, Marshaling\Unmarshaling and threadpool mechanisms. However, I am now puzzled again by the part of the router in the ObjectAdapterI.cpp . My questions are:

    1) If I implement some routers , which are able to be linked one after one, are there any rules I have to be obey in programing so that I only need set some perpertites
    in config file ? In other words, if the interface given in Router.ice is the only requirements to be fulfilled ?
    2)Does the codes about router in ObjectAdapterI.cpp provide the possiblity for me to develop a linkable router ?

    Sorry for my the two questions. It seems not very clear because ,actually, I myself am not very clear. As what I understand, I just feel all the codes about the router in runtime core just serve the Glaicer2::Router.
    Of course , I can develop a home-made router without using the interface router.ice as a common application, but I think if I obey the interface.ice , it is more consistent with the basic rules of ICE.
  • benoit
    benoit Rennes, France
    The Ice::Router interface is all you need to implement your own router. You'll of course also need to configure the Ice runtime to use it (the Ice.Default.Router property, etc). Without knowing a lot more on what a 'linkable router' would be, its requirements and purpose -- it's impossible to say wether or not it's feasible.

    Note that implementing a router is not a trivial thing to do. It requires a very good understanding of the Ice object model and runtime. I would strongly recommend to learn more about Ice as well as Glacier2 first.

    Of course, if you have a commercial interest in a custom router implementation, we can always provide consulting services, please contact us as info@zeroc.com if that's the case!

    Benoit.
  • Thank you Benoit.
    Acatually, My "linkable router" would work in a binary tree . The root (here acts as a client) wants to make a call to a remote left ( acts as a server), then it will thavel to the detination via the routers. I will be very happy if you can check the atttached file,which will make this more clearly. That is, the router may be like a gateway. ;)