Skip to main content

Publish resources

3 replies [Last post]
xiptos
Offline
Joined: 2005-02-23
Points: 0

Hi all!

This is probably a naive question, but what is the best way to make resources available for other peers to know?
. By using custom advertisements
. By connecting to each peer and ask for a list (PipeService, for example)
. Not making resource knowledge available

By resources I mean something, such as pictures, sensor readings, ...

Cheers,

/rp

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
adamman71
Offline
Joined: 2007-01-31
Points: 0

In general (but there might be exceptions too):

i) You would publish an advertisement corresponding to your resource locally.
ii) If existing advertisements don't fit your needs, creating a customized one is fine.
iii) Avoid remote publishing this advertisement to every peers, because it would generate a lot of unnecessary traffic. Let remote peers contact the peer who may have the resource.
iv) Use the discovery service if possible (the search capabilities are not perfect).

If you are not happy with this technique, you could also create a set of queries. It is a bit more complex, but offers more possibilities for implementing 'complex' search functionalities when the discovery service is 'too simple for what you need'. In this case, you would not need advertisements.

If the resources you publish are physical devices or software services for other peers, I would go for an advertisement.

If you are dealing with images, ISBN numbers, etc... or other digital content, I would store the information in a separate system (like a database) and use a JXTA query system for requests etc... Then, the transfer of 'large' digital content can be performed with pipes.

Hope this helps.

J.

Message was edited by: adamman71

xiptos
Offline
Joined: 2005-02-23
Points: 0

Thanks for the great answer!

Just an additional quickie: When you refer to the JXTA query system for handling requests (in case of images, ISBN numbers, etc, ...), you mean building a specific JXTA module which can receive custom queries and issue responses through messages?

Cheers,

/rp

adamman71
Offline
Joined: 2007-01-31
Points: 0

No no, there is already such a system. See the Javadoc of the ResolverService.