Communication Questions !
Aurélio Garcia <[email protected]> Mon, 4 Dec 2006 16:43:09 -0000
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <00b701c717c3$4e204df0$0202a8c0@cr7pt0r> |
------=_NextPart_000_00B4_01C717C3.47D6F5C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello all,
Simple questions:
1. Why every peer (rendezvous or not) must create a group instead of =
just joining existing ones? I mean, imagine that you have a private =
network with only 3 peers (1-rendezvou; 2-edges) where each peer provide =
a service (different services). Isnt correct to think that only one of =
this peers (the rendezvou) should create a new group (child of the net =
peer group) and the others should just join it ? If the anwser is yes, I =
dont understand why in every tutorial I found all peers create the same =
group instead of check first if the group we're creating already exist. =
I'm not understanding quitte well this concept. Anyone can enlight me ?
2. While I'm studying the JXTA Platform anyone can enlight me how =
peers can communicate ? The answers I have now are:
2.1 Through PIPES.
2.2 Through Queries.
I'm interested in the Queries mechanism. So I know I must =
implement the QueryHandler interface and use the ResolverService to send =
response messages to other peers.
3. Based on the answer given in the 2nd question anyone can enlight =
me what is the procedure that I must follow to implement correctly the =
following example:
=
http://img480.imageshack.us/img480/1096/lookupserviceexamplemj4.png
The anwsers I have are (counting that I've already implemented all =
the services,interfaces needed to comunicate and the rendezvous):
3.1 I must create the Module Class Advertisement, Module =
Implementation Advertisement and the Module Specification Advertisement =
for each of my services. Question: for my implementation advertisement I =
have to set a ModuleSpecID, this ID must be different for each of the =
services or it should be equal to all of them ?
3.2 I must create a new group (confuse why I must do this if the =
group already exist) passing the following parameters:=20
newGroup =3D netPeerGroup.newGroup(groupID, implAdv, =
name,description).
Question the groupID must be equal in all peers that want to =
participate in this group ? If yes, why I must create it multiple time =
instead of just join it and publish my advertisements ?
4. Based on the answer given in the 3rd question the rendezvous peer =
internally propagate a lookupService message =
(http://platform.jxta.org/java/api/net/jxta/peergroup/PeerGroup.html#look=
upService(net.jxta.id.ID) ? If not, how can I do it ?
I really need this guidance because its being to difficult to =
understand how can I implement a solution that provide several services =
in a jxta network. I'me reading jxta books but none can directly answer, =
or enlight, my doubts. I want to thank you in advance.
Sincerly,
Aur=E9lio Garcia
------=_NextPart_000_00B4_01C717C3.47D6F5C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.5730.11" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2> Hello =
all,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> Simple =
questions:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> 1. Why every peer =
(rendezvous or=20
not) must create a group instead of just joining existing ones? I mean, =
imagine=20
that you have a private network with only 3 peers (1-rendezvou; 2-edges) =
where=20
each peer provide a service (different services). Isnt correct to =
think=20
that only one of this peers (the rendezvou) should create a new =
group=20
(child of the net peer group) and the others should just join it ? =
If the=20
anwser is yes, I dont understand why in every tutorial I found all peers =
create=20
the same group instead of check first if the group we're creating =
already exist.=20
I'm not understanding quitte well this concept. Anyone can enlight me=20
?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> 2. While I'm =
studying the JXTA=20
Platform anyone can enlight me how peers can communicate ? The answers I =
have=20
now are:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
2.1 Through=20
PIPES.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
2.2 Through=20
Queries.</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2> I'm=20
interested in the Queries mechanism. So I know I must implement the =
QueryHandler=20
interface and use the ResolverService to send response messages to other =
peers.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> 3. Based on the =
answer given in=20
the 2nd question anyone can enlight me what is the =
procedure that=20
I must follow to implement correctly the following example:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
</FONT><FONT=20
face=3DArial size=3D2><A=20
href=3D"http://img480.imageshack.us/img480/1096/lookupserviceexamplemj4.p=
ng">http://img480.imageshack.us/img480/1096/lookupserviceexamplemj4.png</=
A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> The anwsers I have =
are (counting=20
that I've already implemented all the services,interfaces needed to =
comunicate=20
and the rendezvous):</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
3.1 I must=20
create the Module Class Advertisement, Module Implementation =
Advertisement and=20
the Module Specification Advertisement for each of my services. =
Question: for my=20
implementation advertisement I have to set a ModuleSpecID, this =
ID must be=20
different for each of the services or it should be equal to all of them=20
?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
3.2 I must=20
create a new group (confuse why I must do this if the group already =
exist)=20
passing the following parameters: </FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
newGroup =3D=20
netPeerGroup.newGroup(groupID, implAdv, name,description).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
Question the=20
groupID must be equal in all peers that want to participate in this =
group ? If=20
yes, why I must create it multiple time instead of just join it and =
publish my=20
advertisements ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> 4. Based on the =
answer given in=20
the 3rd question the rendezvous peer internally propagate a =
lookupService=20
message (<A=20
href=3D"http://platform.jxta.org/java/api/net/jxta/peergroup/PeerGroup.ht=
ml#lookupService(net.jxta.id.ID">http://platform.jxta.org/java/api/net/jx=
ta/peergroup/PeerGroup.html#lookupService(net.jxta.id.ID</A>)=20
? If not, how can I do it ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> I really need this =
guidance=20
because its being to difficult to understand how can I implement a =
solution that=20
provide several services in a jxta network. I'me reading jxta books but =
none can=20
directly answer, or enlight, my doubts. I want to thank you in=20
advance.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> =
Sincerly,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> Aur=E9lio=20
Garcia</FONT></DIV></FONT></DIV></BODY></HTML>
------=_NextPart_000_00B4_01C717C3.47D6F5C0--