Re: [Fresco-devel] fresco prototyping ideas

cinap_lenrek <[email protected]> Thu, 08 Jul 2004 11:59:41 +0200
Newsgroups gmane.comp.video.fresco.devel
Message-ID <[email protected]>
Stefan Seefeld wrote:

> cinap_lenrek wrote:
>
>> for the how-to-access-the-nodes-question... may to the same like in 
>> Micros~1 Win... have something like *handles* or proxy-objects that 
>> can associated with a node.
>
> That's the idea. They will be (typed) objects (i.e. not 'handles'),
> but access to the internal SG is mediated and controlled.

but here is the danger if you pass CORBA-objects to the server, this 
objects can be implemented somewhere and the server has to call/query 
into this untrusted object for geting
local information.

-- example begin --
// client-code:
// Shell and Button are CORBA-Object-Ref's
Shell shell = DesktopKit.Shell();
Button button = WidgetKit.Button(shell,"Hello World");

// server-code:
WidgetKit::Button(Graphic parent, String title)
{
    Button b = new Button(title);
    // critical stuff because we call into untrusted CORBA-object here
    parent.addChild(b);
    return b;
}
-- example end --

if we use handles we don't need to ask passed CORBA-objects and can 
resolve HANDLES in Objects locally.
we could give each object an unique id for example and force the client 
to query this id's from the objects...

-- example begin --
// client-code:
// Shell and Button are CORBA-Object-Ref's
Shell shell = DesktopKit.Shell();

// here, the client first resolves a (for the server local) id and then 
passes it to the Server
Button button = WidgetKit.Button(shell.id,"Hello World");

// server-code:
WidgetKit::Button(int parentId, String title)
{
    Button b = new Button(title);

    // now we connect/link the objects without any CORBA-call
    localWidgetTree.link(
       /* parent */   parentId,
       /* child */      myId
    );
    // we could wrap this to make it look nice... maybe make a 
ObjectIdResolver or
    // thide this in Object implementation... whatever

    return b;
}
-- example end --

or don't we care about this? because we'll redo all this with Caprice later?

mfg
cinap_lenrek