Re: How to talk to a SmartFrog componentfromthe outside?

"Guijarro, Julio" <[email protected]> Wed, 21 Jun 2006 11:27:04 +0100
Newsgroups gmane.comp.java.smartfrog.devel
Message-ID <[email protected]>
> Is there a way to access the component without using Smartfrog, with
raw
> RMI ?

Yes, you can but it can be complex if you try to do it yourself. There
are two problems, finding/creating the RMI reference and security:

- You have to publish the RMI reference of the component that you want
to manage, for example using SLP, multicast, using the RMI registry,....
Not much of a problem. Patrick has already covered this last option in
more detail.

- Then, if you use security you will need to implement the RMI socket
factory using the same encryption that SF uses. This is what 
  org.smartfrog.SFSystem.initSystem(); does for you.

Julio

> -----Original Message-----
> From: smartfrog-developer-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:smartfrog-
> developer-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Olivier Pernet
> Sent: 21 June 2006 09:58
> To: Smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Subject: Re: [Smartfrog-developer] How to talk to a SmartFrog
> componentfromthe outside?
> 
> On 6/21/06, Goldsack, Patrick <[email protected]> wrote:
> >
> > Indeed, that is the case - the process compound is registered there
as
> > the way to acccess the host, after that we use SF naming.
> >
> > So to access a componenet on hist xxx you would add the attribute
> > "sfProcessComponentName yyy" to the component you wish to name, then
> > find it by using the reference "HOST xxx:yyy", either as a LAZY
> > reference in some description, or by calling sfResolve directly on
that
> > reference.
> >
> > You can do this without being in a SF deamon.
> 
> Yup, that's what we've done as a first try.
> 
> > Now if you wish to have a model where a specific component type adds
a
> > name into the registry (and removes it on termination), extend
PrimImpl
> > to add that capability into the sfDeploy and sfTerminateWith
methods,
> > and use this modified Prim. Or define a component which names others
and
> > add it to description where it is required.
> >
> > So define
> >
> > RMIRegisterNamer extends Prim {
> >     sfClass ".....NamerClass";
> >
> >     //name "someName";
> >     //component LAZY ...;
> > }
> >
> > Then you can use it in any description
> >
> > sfConfig extends Compound {
> >     aComponent extends ...
> >
> >     namer extends RMIRegisterNamer {
> >         name "myName2;
> >         component LAZY aComponent;
> >     }
> > }
> >
> > Or somehting along those lines,
> >
> >
> > Patrick
> 
> Thanks. We'll probably also use that.
> 
> --
> Olivier Pernet
> Summer Student - CERN Openlab
> 
> We are the knights who say
> echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq'|dc
> 
> 
> _______________________________________________
> Smartfrog-developer mailing list
> Smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/smartfrog-developer