[jdev] newbie Q: how can I use jabber to share file access P2P?

Cedric Hyppolite cedric.hyppolite at free.fr
Wed Apr 19 01:01:54 CDT 2006


Hi Tobias,

I think JXTA (www.jxta.org) could be a good match for the networking  
part.
They have a Java implementation of the protocol and one the libraries  
(JXTA-CMS, cms.jxta.org) is designed to share content in a P2P fashion.

 From jxta.org :

"JXTA™ technology is a set of open protocols that allow any connected  
device on the network ranging from cell phones and wireless PDAs to  
PCs and servers to communicate and collaborate in a P2P manner.

JXTA peers create a virtual network where any peer can interact with  
other peers and resources directly even when some of the peers and  
resources are behind firewalls and NATs or are on different network  
transports.

Project JXTA Objectives

     * Interoperability - across different peer-to-peer systems and  
communities
     * Platform independence - multiple/diverse languages, systems,  
and networks
     * Ubiquity - every device with a digital heartbeat

Imagine the possibilities!

     * Find peers and resources on the network even across firewalls
     * Share files with anyone across the network
     * Create your own group of peers of devices across different  
networks
     * Communicate securely with peers across public networks"

Regards,
Cedric
Le 19 avr. 06 à 05:06, Tobias Thierer a écrit :

> Hi,
>
> I hope this is the right place to ask - otherwise I'd be glad to  
> get some
> pointers to better places. I have a task for which SOAP over XMPP  
> (JEP-0072,
> http://www.jabber.org/jeps/jep-0072.html ) might be the right tool.  
> However,
> I am entirely new to Jabber and web services, so I would like to get
> feedback on the following questions:
>
>  1.) Is XMPP / SOAP over XMPP the right technology to use for my  
> problem
>      (see below for a detailed description)?
>
>  2.) If yes, then which existing Java libraries would allow me to  
> get the
>      job done most efficiently? I know of the Smack and the JSO  
> (jabber
>      stream objects) libraries which implement XMPP (but not SOAP over
>      XMPP), but don't know which of them is suitable, stable and  
> easy to
>      use. I don't know of any existing implementation of SOAP over  
> XMPP.
>
>  3.) If XMPP/SOAP is not the right technology to use for my  
> problem, what
>      else should I use?
>
> Here comes a description of my current status, and of what I would  
> want to
> achieve:
>
> I've written an application in Java that allows users to organise  
> documents
> (e.g. DNA sequences, journal articles, protein structure) and perform
> operations on them, and to import such documents from public  
> databases. The
> documents are XML files, typically a couple KBytes large, and there  
> would be
> typically 100-1000 (up to ~ 10,000) documents in a client's  
> repository.
>
> Now as a new feature, I'd like to give users the option of making the
> documents that they have locally in their repository available to  
> other
> users. To avoid firewall issues, traffic between the clients would  
> probably
> have to be relayed by a server that I provide. The clients would have
> contact lists (stored on the server) of people with whom they want  
> to share
> data.
>
> Obviously Jabber / XMPP suggests itself as a protocol for  
> maintaining the
> contact list. However, I am not really writing an instant messenger  
> but
> rather a P2P filesharing program, so I am not sure if XMPP is  
> suitable (is
> it?).
>
> Specifically, after Romeo finds out that Juliet has shared her  
> repository,
> he must be able to perform the following operations:
>
> 1.) Send a filter (e.g. a search query) to Juliet and get a list of
>     documents in return that match the filter. This list should not
>     contain the actual files, but only some description (filename,  
> filetype,
>     size, etc.).
>
> 2.) Retrieve a specific shared file (identified through its  
> description)
>
> 3.) in the future, there would be additional operations.
>
> This sounds like SOAP (although I don't need interaction with other
> languages, so I could use RMI or any other sort of RPC facility).  
> Does it
> seem right to use XMPP as the transport for SOAP? Or should I rely  
> on other
> lower-level protocols for enhanced performance?
>
> Should I:
>
>  a) Use XMPP for everything, as outlined above
>
>  b) Use XMPP for the contact list and to find out with whom to  
> share data,
>     but then use SOAP over some other transport, or Java RMI, or  
> anything
>     else, for the remaining communication?
>
>  c) Use something completely different altogether?
>
> Which libraries should I use, and how feasible does the whole thing  
> sounds?
> Any other hints on how I should proceed?
>
> I'd appreciate any feedback on the matter - as I said, I am very  
> new to
> Jabber and Web services, and I don't know how these things are  
> typically
> done. Of course, I don't want to make avoidable errors that others  
> have made
> before me.
>
> Best regards, and thanks in advance for any help and pointers.
>
>   Tobias




More information about the JDev mailing list