Archived
This forum has been archived. Please start a new discussion on GitHub.
Glacier2 and internal vs. external access
I've got an Ice application that users inside the firewall access. I want to add the ability for users outside the firewall to access the application. So, obviously I am looking into Glacier2.
My clients use Ice.Application right now. However, from my reading I would need to use Glacier2.Application to make them work through Glacier2.
So, my question is: Do I need to maintain a separate client for users inside the firewall that don't need to access the services via Glacier and a client for users outside the firewall that do need to use Glacier? Or, is there some way to have one client that can work on either side of the firewall? If they are inside then it doesn't make sense to use Glacier to route the connections and they might as well connect directly.
Thanks for any tips and help.
-Isaac
My clients use Ice.Application right now. However, from my reading I would need to use Glacier2.Application to make them work through Glacier2.
So, my question is: Do I need to maintain a separate client for users inside the firewall that don't need to access the services via Glacier and a client for users outside the firewall that do need to use Glacier? Or, is there some way to have one client that can work on either side of the firewall? If they are inside then it doesn't make sense to use Glacier to route the connections and they might as well connect directly.
Thanks for any tips and help.
-Isaac
0
Comments
-
Hi Isaac,
It is not necessary to create two versions of the client; a single client can work with or without Glacier2, as long as it's written properly.
You are not required to use Glacier2.Application in order to communicate with Glacier2, it is simply a convenience class intended to make using Glacier2 easier. Furthermore, in the situation you're describing, you can't use Glacier2.Application, or at least not exclusively. The class requires the creation of a Glacier2 session, but your client won't need a session if it's running inside the firewall.
Regardless of whether you use Glacier2.Application or simply examine its source code and duplicate some of its functionality, it's important to understand the differences between running with and without Glacier2. In general, using Glacier2 is pretty straightforward:- set the Ice.Default.Router property
- create a session
- keep the session alive
- handle the loss of a session
The key point is that the proxies used by the client are (or are not) configured to use a router. Setting Ice.Default.Router means every proxy by default will use the router, and you can also configure individual proxies if necessary. However, aside from the administrative chores of setting up and maintaining the session, the way that a client uses its proxies is the same regardless of whether you are using a router.
Hope that helps,
Mark0 -
Thanks Mark. That helps, though not what I was hoping for.
I'll start digging into the Glacier2.Application and Ice.Application code and see if I can come up with a happy hybrid MyApp.Application class that I can reuse across clients.
0