Skip to main content

Design - JXTA implementation

2 replies [Last post]
ivarulz
Offline
Joined: 2007-08-17

Hi everybody,

I started reading some literature about JXTA.
Now I want to find some answers, before I do a design for an application.

Purpose: create a P2P community. The community can be divided in more groups. A peer can be member of more groups.

Being a pure distributed application, with no centralized control, i still need some things clear.

Q1. What is actually a group service?
In the Network there can be more groups, each one with specific needs.
If a peer joins my group, how can he access my groups specific services? The peers need to have the software components locally that will handle service invocations? Can the services related components be downloaded?

Q2 Group service - invoke upon who?
The invocation of a group service is done on a Group, and all the peers in the grouped will be queried?
Or you can invoke the service upon a single peer in the group?

Q3. Design Group services or Peer Service?
In the case of more groups which actually are very similar, but they just want to restrict access. The functionality should be designed and impelemnted as Peer services (all peers having the same services) or Group Service

Q4. Group Authentication
When a peer joins a group, it authenticates against who? Who does the credentials checking?
How can 2 peers know that they are authenticated in the same group?

Q5 Design related
When the application starts, i want to connect to different groups. These groups are very different in their nature.
should I create a Peer for each group and join? Should I join with the same peer all the Groups? How can I make the difference that a message was received from one group or another?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hamada
Offline
Joined: 2003-06-12

> Q1. What is actually a group service?

The ability to successfully instantiate all the service defined by the group, and establish a group membership if the group deems it.

> In the Network there can be more groups, each one
> with specific needs.

yes

> If a peer joins my group, how can he access my groups
> specific services?

Through the channels and protocols defined by the service.

> The peers need to have the
> software components locally that will handle service
> invocations? Can the services related components be
> downloaded?

The JxtaLoader supports remote resource downloading so that if a service could not be resolved locally, it can be downloaded through the code URI define in the module advertisement.

>
>
> [b]Q2 Group service - invoke upon who?[/b]
> The invocation of a group service is done on a Group,
> and all the peers in the grouped will be queried?
> Or you can invoke the service upon a single peer in
> the group?

A node must initiate a service request. Services can define the type of channels to communicate on.

>
> [b]Q3. Design Group services or Peer Service?[/b]
> In the case of more groups which actually are very
> similar, but they just want to restrict access. The
> functionality should be designed and impelemnted as
> Peer services (all peers having the same services) or
> Group Service

If the application wishes to enforce the existence of the service within a group then it should be defined as a group service, otherwise run it as an application of the group.

> [b]Q4. Group Authentication[/b]
> When a peer joins a group, it authenticates against
> who?

The application defines the membership policy, by implementing it's own, there are a couple membership service already included (null , and PSE)

>Who does the credentials checking?

The group membership service.

> How can 2 peers know that they are authenticated in
> the same group?

A credential must be used to establish trust

>
> [b]Q5 Design related[/b]
> When the application starts, i want to connect to
> different groups. These groups are very different in
> their nature.
> should I create a Peer for each group and join?
> Should I join with the same peer all the Groups? How
> can I make the difference that a message was received
> from one group or another?

Not necessary, A node can participate in multiple groups (where group traffic is scoped to each group), there is no chance for messages to cross group boundaries unless the application does so explicitly.

ivarulz
Offline
Joined: 2007-08-17

Thank you for your reply.

I still need to fully understand all the concepts involved here.

Still have 1 question:
"Not necessary, A node can participate in multiple groups (where group traffic is scoped to each group), there is no chance for messages to cross group boundaries unless the application does so explicitly."

If a Peer is Member of 2 groups, G1 and G2, , how can it know that a message was received from a peer inside G1 or G2?