|
|
|
|||||
|
Various servers behind Glacier2
Hello again!!
I am studying Glacier2 and I am testing a dummy application. I use IceGrid as locator service and with Glacier2 I stablish a connection from and external client (out of my local network). Now, I want to include another server using IceGrid, and I know that it is not necessary to use another external connection, but I don't know how to do it. I have the following specification: #ifndef DEMO_ICE #define DEMO_ICE #include <Glacier2/Session.ice> module Demo { interface Friend { nonmutating void sayHello(); }; interface Printer extends Glacier2::Session { ["ami"] nonmutating string getMessage(Friend* f); }; }; #endif And this is my descriptor: <icegrid> <application name="Demo"> <node name="localhost"> <server id="Printer" exe="./Server.py" activation="on-demand"> <adapter name="SimplePrinterAdapter" endpoints="tcp -h 127.0.0.1" register-process="true"> <object identity="Printer/manager" type=": emo:Printer"/></adapter> </server> </node> </application> </icegrid> If I include another interface in my Slice description, how could I access to its associated server from an external client using an unique connection with Glacier2? My glacier2router config file is the following: Glacier2.InstanceName=Printer Glacier2.Client.Endpoints=tcp -h 192.168.1.5 -p 8000 Glacier2.Client.PublishedEndpoints=tcp -h ladorada.dyndns.org -p 8000 Glacier2.Server.Endpoints=tcp -h 192.168.1.5 Glacier2.SessionManager=Printer/manager Glacier2.SessionTimeout=60 Glacier2.CryptPasswords=passwords #Ice.Trace.Network=2 Ice.Default.Locator=IceGrid/Locator:tcp -h 127.0.0.1 -p 9090 Therefore, if I include another server behind my firewall, what value should the Glacier2.SessionManager parameter have? I hope I have explained my problem correctly. Thank you very much!
__________________
Full name: David Vallejo Fernández University of Castilla-La Mancha (Spain) ICE Project: basic-fipa-multiagentsystem |
|
||||||
|
You don't have to change the session manager at all, i.e., there is one session manager that your client uses, independent of the number of servers your client uses. You call the second server just like the first, by invoking on a proxy pointing to an Ice object implemented by this server. What specific problems do you have?
As an aside, I highly recommend to read issue 1 and issue 2 of our Connections newsletter. Last edited by marc : 08-11-2006 at 12:10 PM. |
|
|||||
|
If I append another interface:
interface NewServer extends Glacier2::Session { nonmutating string sayGoodbye(Friend* f); }; and I specify another server in the descriptor: <server id="NewServer" exe="./NewServer.py" activation="on-demand"> <adapter name="NewServerAdapter" endpoints="tcp -h 127.0.0.1" register-process="true"> <object identity="¿¿??" type=": emo:NewServer"/></adapter> </server> How can I get an object which represents the new funcional qualities if the previous "Printer/manager" object extended from Glacier2::Session and, therefore, represents the Glacier2 connection? It is analogous to the chat example exposed in Connections (Issue number 1), but appending another interface and using IceGrid. Do you understand my explanations? Thank you.
__________________
Full name: David Vallejo Fernández University of Castilla-La Mancha (Spain) ICE Project: basic-fipa-multiagentsystem |
|
|||||
|
Thank you for your explanations!
I had a wrong conception of Glacier2, but now I understand its operation correctly. Thank you again, David.
__________________
Full name: David Vallejo Fernández University of Castilla-La Mancha (Spain) ICE Project: basic-fipa-multiagentsystem |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What will the clients do when the servers be killed? | AaronIct | Help Center | 1 | 02-26-2007 08:15 AM |
| node name(s) on multiple servers | angelocook | Help Center | 1 | 09-01-2006 03:01 PM |
| Newbie: How to search for Servers | jaleira | Help Center | 9 | 06-29-2006 09:02 PM |
| A problem about IceGrid's replicated servers | rc_hz | Help Center | 3 | 05-30-2005 10:01 AM |
| Ice and stateless servers | zet | Help Center | 2 | 12-01-2004 04:06 AM |