[omniORB] Finding methods / part 3

Casillas_Juan_M/madrid_tecnologia@sinvest.es Casillas_Juan_M/madrid_tecnologia@sinvest.es
Wed, 1 Dec 1999 13:34:13 +0100


Hi everybody, =20

Duncan says:

>
>I don't think you mean "instantiate new objects...". I think you mean
>you want A to use an _object reference_ to an object which has a type
>that A does not know. In this case, there is no problem with creating
>he reference, and invoking operations on it with DII. You obviously
>can't use static invocation since you don't have compile-time
>knowledge of it.
>

      Ok, that's fine.

>
>That said, I think you need to carefully re-think what it is you are
>trying to do. As someone pointed out earlier, knowing that a server
>supports an interface with an operation named hello() doesn't do you
>any good at all, since the name of an operation doesn't tell you
>anything about what it does. Not only that, but there is no guarantee
>that the arguments to different hello() operations are the
>same. Consider two interfaces:
>

   That's fine too. But here I have another problem: I have to find the
   interface (I don't known nothing about it) and then, I have to find
   what methods they have, and their values ... sounds dificult ... =20
   how can I do that usign omniORB only ?

>
>If a client of your proposed system asks for objects supporting
>hello(), and gets back references to instances of I and J, how can it
>possibly do anything useful?  Especially since it doesn't have
>compile-time knowledge of J::myStruct.
>

   Ok, You have all the reason. Test only the methods is danger. I
   have to find the interfaces, and then test the methods. But I want
   to do that in a distributed way ... Imagine the following scenario:

   Program A wants to know what Laser Printers are out of paper;
   There are programs monitoring the printers say, these monitors
   check periodically the printer to see its status and send events
   about it; and in the other side, these monitor have a CORBA interface=

   so you can manage the printer from another program:

   A program monitor has:
         1) code to check the printer periodically
         2) code to send events to the Eventchannel or something like
            this (the Communication Adapter) so we can notify the
            status to other programs
         3) code to receive events that contain commands
         4) a corba interface to allow another program manage the
            printer, just like this program was the monitor

   so Program A don't =20
   manage the printers directly and A don't know nothing about the
   monitoring programs; Program A and the monitors talks using a
   event channel or something like this. So to do something useful,
   A must check:

      1) first all the printers
      2) then for the printers available, all the laser printers
      3) from this, printers that are out of paper.

   There are 2 ways to do this
      =20
      1) Use the Naming service, register all the monitors on it,
         and then use object references for all of them from the
         program A, and use their interfaces to check the conditions
         but this has two problems: 1) It requires lots of connections
         to do this and 2) is very centralized, so if A crash, I have
         problems.

      2) The other way is to use a comunication media says an Event
         channel, or something like this, so A can query to the rest =20
         of programs (in this scenario, the monitors) for those that
         are monitoring laser printers, that are out of paper. The =20
         monitors that check the conditions (monitors monitoring
         laser printers that are out of paper) send the answer to =20
         program A; so A can use the Monitor CORBA interface to =20
         manage this printers. This is way is distributed (each
         monitor checks itself the conditions) and requires less
         connections. I think my steps must follow this path
         =20
Sorry by this long message :)
Btw, This project is called GAP
(http:://www.gsyc.inf.uc3m.es/~assman/gap)
I think it is a new approach to distributed administration.

Kind Regards

Juan Manuel Casillas
Santander Investment
(systems/technology)