Discussion:
[omniORB] problems registering omniNames
José Felix
2007-01-15 01:27:30 UTC
Permalink
To Duncan and Tuyen an everyone else that read this message, thanks in
advance for the help.
I will now describe the system as you have suggested, to see if there
is a possible solution. Here it comes:
In this application, we have a remote server, one of then running in
the entire network, and local instances running in every machine.
Each of these instances binds to the CORBA environment a name. Each
machine is supposed to have an interface where it is possible to
control the local or the remote machines. If one wants to control the
local machine, the CORBA interface ( or a program that uses omniORB
api or similar stuff ) should ( in an ideal situation ) take the
object whose name we tried to get from the local machine, and use a
"local omninames" , that is the instance of omninames whose objects
are from the local machine. If one wants to access objects located in
a remote machine, the library should recognize this name and retrieve
the object published in the "remote omninames", running in the remote
server.
So, when the local application starts, it has to publish the CORBA
interface in two different environments: a local one ( where is
supposed to be an "local omninames" ) and a remote one (where is
supposed to exist an "remote omninames", or a instance of omninames
that contains the objects published to be accessed from remote
machines)

Had I make myself clear about how this system works? I hope so.

The great difficulty I found is : how to develop a program whith
omniORB that takes a name from the "user", recognize it as a local or
remote name, and retrieve the object whose name is associated to, if
we have two servers (a local and a remote) ? How to switch between
servers this way?

Thank you very much.

F?lix Ladeia Rodrigues - Electric engineer
University of S?o Paulo
Escola Polit?cnica de S?o Paulo

Digital Television Laboratory

S?o Paulo - Brasil
Duncan Grisby
2007-01-25 15:54:44 UTC
Permalink
Post by José Felix
In this application, we have a remote server, one of then running in
the entire network, and local instances running in every machine.
Each of these instances binds to the CORBA environment a name. Each
machine is supposed to have an interface where it is possible to
control the local or the remote machines. If one wants to control the
local machine, the CORBA interface ( or a program that uses omniORB
api or similar stuff ) should ( in an ideal situation ) take the
object whose name we tried to get from the local machine, and use a
"local omninames" , that is the instance of omninames whose objects
are from the local machine. If one wants to access objects located in
a remote machine, the library should recognize this name and retrieve
the object published in the "remote omninames", running in the remote
server.
That all makes sense.
Post by José Felix
So, when the local application starts, it has to publish the CORBA
interface in two different environments: a local one ( where is
supposed to be an "local omninames" ) and a remote one (where is
supposed to exist an "remote omninames", or a instance of omninames
that contains the objects published to be accessed from remote
machines)
I don't understand this bit. Why should the local application register
itself in the remote omniNames?
Post by José Felix
Had I make myself clear about how this system works? I hope so.
The great difficulty I found is : how to develop a program whith
omniORB that takes a name from the "user", recognize it as a local or
remote name, and retrieve the object whose name is associated to, if
we have two servers (a local and a remote) ? How to switch between
servers this way?
Well, you must know the logic to tell if a server is local or remote.
Once you have decided, you just contact the local or remote omniNames.
I don't understand what the difficulty is, I'm afraid.

First of all, remember that you don't have to register your objects in
omniNames. It's only required if you need to look them up by name. If
you're passing them around in method calls, there's generally no need to
register them by name.

Second, perhaps you just want to put references to two naming services
in the configuration? You can do something like this in omniORB.cfg:

InitRef = LocalNameService=corbaname::localhost
InitRef = RemoteNameService=corbaname::some.remote.machine

Then you can use resolve_initial_refereces to get either one as
appropriate.

Does that help?

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Loading...