Re: Sockets and Groups

Networker <[email protected]> Mon, 20 Feb 2006 23:40:54 -0500
Newsgroups gmane.comp.java.jxta.user
Message-ID <20060221044231.XTBW6620.tomts11-srv.bellnexxia.net@mtas.sympatico.ca>
I believe what you observed is right. The MembershipService 
offers you an infrastructure to establish the identities of peers.
It does not currently enforce the access control based on the
identities. The MembershipService is more or less an authentication
service right now.

The access control you expected is the job of the access service.
The current implementation of the access service is rudimentary and
it can be used only as a demo. That is not a bad thing. That gives
you all the freedom to develop different kinds of access services
from single operation control (such as JxtaSocket connection) to
full-blown enterprise-strength resources management.

That being said, it may be a good idea to have some access control
features built into the platform, such as pipe resource control.  



> 
> From: Eugenio Flores <[email protected]>
> Date: 2006/02/20 Mon PM 01:51:44 EST
> To: [email protected]
> Subject: [JXTA user] Sockets and Groups
> 
> Hello Group.
>    
>   I got a conceptual doubt about joining groups and JXTASockets:
>    
>   I have two applications (You know that already), the first one has a JxtaServerSocket, but first it creates a group. Then I declare the JxtaServerSocket in the scope of this group, instead of doing it in the scope of the netGroup:
>    
>   myGroup = PeerGroupFactory.newNetPeerGroup();
>   private PeerGroup pg = null;
>   private PeerGroupAdvertisement advPG = null;//I assign advPG when I look for the group advertisement locally
>   JxtaServerSocket serverSocket;
>   pg = myGroup.newGroup(advPG);
>   serverSocket = new JxtaServerSocket(pg, this.pipeAdv,10);
>    
>   The other application has a JxtaSocket, but first it finds the group advertisement published by the first application, afterward it instantiates that group. Finally I create the JxtaSocket in the scope of this group.
>    
>    socket = new JxtaSocket(pg,
>                                 //no specific peerid
>                                 null,
>                                 pipeAdv,
>                                 //general TO: 30 seconds
>                                 30000,
>                                 // reliable connection
>                                 true);
>    
>   Both application work fine, they communicate with each other well, but the second application did not have to join the group created in the JXTAServer application. As I told you, I just instantiate! , in the second application, the group that it finds and creates the JxtaSocket with this group. So now I wonder in what kind of cases it is necessary to join a group.
>    
>   Could you help me with this doubt?
>    
>   Thanks a lot again.
> 
> 
> 
> 		
> ---------------------------------
>   Do You Yahoo!? La mejor conexión a Internet y 2GB extra a tu correo por $100 al mes. http://net.yahoo.com.mx 
>