Archived
This forum has been archived. Please start a new discussion on GitHub.
Port forwarding
devtty
in Help Center
Hello, I have the next problem:
We have one server(hardware-hw1) and many processes with servants. And they can call each other(on localhost only). Also we have an other server(hardware-hw2). And it is my problem. May I use only one open port on hw1 to async/sync calls? *i'm going to use ssh-tunneling.* I tried to use something like this:
[PHP]
____________________________________
| Servant1
| Servant2 |
| | Req |prx |
| RegManager |Glacier| |
| | | | hw1 |
|
|
|
| | ssh |
| Req |______|
|
| hw2 |
[/PHP]
HW2 send to RegManager Request to get Servant1's Proxy. RegManager resend request to Servant1 and it through Glacier send own Proxy to HW2(create session and call function of hw2*setProxy(ObjectPrx)*. In glacier2router i put hw2 as server. Also hw2 work's not all time. But this doesn't work. Please tell me right way to make such scheme.
PS. sorry for my bad english
We have one server(hardware-hw1) and many processes with servants. And they can call each other(on localhost only). Also we have an other server(hardware-hw2). And it is my problem. May I use only one open port on hw1 to async/sync calls? *i'm going to use ssh-tunneling.* I tried to use something like this:
[PHP]
____________________________________
| Servant1
| Servant2 |
| | Req |prx |
| RegManager |Glacier| |
| | | | hw1 |
|
|
|
| | ssh |
| Req |______|
|
| hw2 |
[/PHP]
HW2 send to RegManager Request to get Servant1's Proxy. RegManager resend request to Servant1 and it through Glacier send own Proxy to HW2(create session and call function of hw2*setProxy(ObjectPrx)*. In glacier2router i put hw2 as server. Also hw2 work's not all time. But this doesn't work. Please tell me right way to make such scheme.
PS. sorry for my bad english
0
Comments
-
Now:
I run Glacier2 on hw1.
Processes from hw1connect as clients to Glacier2.
On hw1 there are processes with own servants and they communicate to each other.
Scheme:
http://pic.ipicture.ru/uploads/091008/bBtzbZTF2a.png
But if i right undestand, then i call functions on hw2 of proxy it doesn't go throuth glacier.server.endpoint?
But I want to call(sync/async) hw1's processes's functions from hw2 using only one open port on hw1 and one open port on hw2.0 -
Without more information about your application it's difficult to give advices but if you want to limit the number of connections between hw1 and hw2, it seems to me that it would be easier if this process on hw2 was the Glacier2 client. This way, all requests from the different hw1 processes will go through Glacier2 through the unique connection established between the hw2 process and Glacier2.
Cheers,
Benoit.0 -
But, if i want to use async calls, i need have 1 open port for each process on hw1? And I should run for each process one glacier?benoit wrote: »This way, all requests from the different hw1 processes will go through Glacier2 through the unique connection established between the hw2 process and
PS. I updated my last message.0 -
But. I send proxy from client to server. And than I use this proxy on server-side, it doesn't work over glacier2 and connect make RPC direct(not use glacier2,netstat tell me about it)?
config.glacier2:
Glacier2.InstanceName=TestGlacier2
Glacier2.Client.Endpoints=ssl -p 10005 -h 127.0.0.1
Glacier2.Server.Endpoints=tcp -h 192.168.0.187
Glacier2.SessionManager=PNASessionManager:tcp -h 192.168.0.189 -p 10003
Glacier2.PermissionsVerifier=verifier:tcp -h 192.168.0.189 -p 10003
Glacier2.SessionTimeout=30
.....
config.client:
Ice.Default.Router=TestGlacier2/router:ssl -p 10005 -h 127.0.0.1
FTPService.Client.Router=TestGlacier2/router:ssl -p 10005 -h 127.0.0.1
LocalService.Endpoints=tcp -h 127.0.0.1 -p 10000
config.server:
PNAServer.Endpoints=tcp -h 192.168.0.189 -p 10003
What is the right way to do tunnel?0 -
devtty wrote: »But. I send proxy from client to server. And than I use this proxy on server-side, it doesn't work over glacier2 and connect make RPC direct(not use glacier2,netstat tell me about it)?
config.client:
Ice.Default.Router=TestGlacier2/router:ssl -p 10005 -h 127.0.0.1
FTPService.Client.Router=TestGlacier2/router:ssl -p 10005 -h 127.0.0.1
LocalService.Endpoints=tcp -h 127.0.0.1 -p 10000
You should use createObjectAdapterWithRouter on the client side, and you should not set any endpoints for the object adapter. See demo/Glacier2/callback for an example of how to do this.0
