# P2P facility or plugin?

**URL:** <https://www.ruby-forum.com/t/p2p-facility-or-plugin/137945>\
**Category:** Rails\
**Created:** [May 18, 2008, 8:11pm UTC](https://www.ruby-forum.com/t/p2p-facility-or-plugin/137945 "2008-05-18T20:11:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![damaris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/2bfe46/32.png) [@damaris](https://www.ruby-forum.com/u/damaris)\
**Post date:** [May 18, 2008, 8:11pm UTC](https://www.ruby-forum.com/t/p2p-facility-or-plugin/137945/1 "2008-05-18T20:11:08Z")

</div>

Hi you all, is there any plugin or extension to create P2P applications  
with Rails? Such as JXTA for Java?  
Thanks.

---

<div class="post-metadata">

**Author:** ![damaris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/2bfe46/32.png) [@damaris](https://www.ruby-forum.com/u/damaris)\
**Post date:** [May 19, 2008, 3:15am UTC](https://www.ruby-forum.com/t/p2p-facility-or-plugin/137945/2 "2008-05-19T03:15:00Z")

</div>

While I wouldn’t say it’s impossible, I would say that Peer-to-Peer  
(P2P) is outside the scope of Rails. Rails is a web application  
framework (server-side) and wouldn’t be the technology I would choose  
for building a P2P network. Although, a Rails application could  
certainly play a role in the P2P network. You still need some client-  
side applications to act as the peers.

Consider a simple P2P network like an instant messenger where each  
peer runs an application that sends messages to another peer running  
the same (or other compatible) application. You might be able to force-  
fit a Rails application to this purpose, but it would seem to me to be  
the wrong technology for the job.

In that same case there is usually a centralized “server” that allows  
the peers to find each other on the network. Maybe a Rails application  
would be a good fit there. But, that’s not actually what I would call  
a pure P2P network where messages, or files would be transmitted  
directly from one peer to another without the need for a central  
server.

I’m not aware of any plugins for Rails similar to JXTA. That would be  
more like searching for a plugin for Struts that is similar to JXTA.  
What I mean is that whatever that would be would probably not be for  
Rails but for Ruby in the same way that JXTA is a library for Java and  
not some Java based web application framework.

Maybe a better way to ask your question is to fill us in on what you  
are actually trying to do. Just asking about P2P is a pretty broad  
subject. You could quite easily build a P2P between two web  
applications using a REST API and ActiveResource. That’s pretty common  
and is, technically, a P2P network, but maybe not in the sense you’re  
referring.

On May 18, 2:11 pm, Damaris F. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![damaris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/2bfe46/32.png) [@damaris](https://www.ruby-forum.com/u/damaris)\
**Post date:** [May 19, 2008, 3:19am UTC](https://www.ruby-forum.com/t/p2p-facility-or-plugin/137945/3 "2008-05-19T03:19:40Z")

</div>

I would create P2P applications with Ruby, rather than Rails. One could  
make  
the comparison that Rails is more like [mininova.org](http://mininova.org) where Ruby is more  
like  
Transmission/Azereus.

---

<div class="post-metadata">

**Author:** ![damaris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/2bfe46/32.png) [@damaris](https://www.ruby-forum.com/u/damaris)\
**Post date:** [May 19, 2008, 1:04pm UTC](https://www.ruby-forum.com/t/p2p-facility-or-plugin/137945/4 "2008-05-19T13:04:21Z")

</div>

Umm…yes, I’ve seen is easy and even more obvious to create a P2P app  
as a non-Web app, just with Ruby. And I could do a kind of hybrid app,  
mixing Ruby apps for clients and Web apps for clients that act also as  
rendezvous, but perhaps is too complicated.

I’m trying to build a kind of Emule app. JXTA for Java offers a set of  
protocols that makes easier the functionality of a whole app of this  
type.

In that way, I wonder if there is an extension for Ruby similar to Jxta.

Thanks again.

Ryan B. wrote:

> I would create P2P applications with Ruby, rather than Rails. One could  
> make  
> the comparison that Rails is more like [mininova.org](http://mininova.org) where Ruby is more  
> like  
> Transmission/Azereus.

---

<div class="post-metadata">

**Author:** ![damaris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/2bfe46/32.png) [@damaris](https://www.ruby-forum.com/u/damaris)\
**Post date:** [May 19, 2008, 4:31pm UTC](https://www.ruby-forum.com/t/p2p-facility-or-plugin/137945/5 "2008-05-19T16:31:56Z")

</div>

However, now that I think, there is out there some instant messaging  
apps like MSN with a version online, instead of a locally-installed  
application. These apps can be considered in some way P2P apps. So  
perhaps it is not so wrongly-considered to have a Web-based app for this  
P2P network.

Damaris F. wrote:

> Umm…yes, I’ve seen is easy and even more obvious to create a P2P app  
> as a non-Web app, just with Ruby. And I could do a kind of hybrid app,  
> mixing Ruby apps for clients and Web apps for clients that act also as  
> rendezvous, but perhaps is too complicated.
> 
> I’m trying to build a kind of Emule app. JXTA for Java offers a set of  
> protocols that makes easier the functionality of a whole app of this  
> type.
> 
> In that way, I wonder if there is an extension for Ruby similar to Jxta.
> 
> Thanks again.
> 
> Ryan B. wrote:
> 
> > I would create P2P applications with Ruby, rather than Rails. One could  
> > make  
> > the comparison that Rails is more like [mininova.org](http://mininova.org) where Ruby is more  
> > like  
> > Transmission/Azereus.
