S2S : Shoer to Shoers

Peer 2 peer directory share, for ruby (Shoes) snippets


A simple p2p application, made for distribute little (free) ruby applications. GUI is made with Green-Shoes

P2p part is based on an old 9 lines LOC showed by _why. So this tool is made in souvenir of him.


Run a client with green-shoes Gui :

  > ruby s2s.rb

Run a client without gui: in CLI (no dependency, only ruby 1.9)

  > ruby p2p.rb

Run a 'server' (no dependency , only ruby 1.9) :

  > ruby p2p.rb  shoerdev server  druby://<myip>:50500  druby://homeregis.dyndns.org:50500  ...other servers....

make your own farm of p2p :

  > ruby p2p.rb  shoerdev server  druby://localhost:50500  
  > cd A ; ruby ../p2p.rb  shoerdev client  druby://localhost:50500  
  > cd B ; ruby ../s2s.rb  shoerdev  druby://localhost:50500    


The application try to maintain in each client the same directory content :

So all clients on the net should have a directory which have exactly the same content. files types and sizes are limited (size limit: 10MB).

If someone copy a file in his shared-directory, this file will be copied to all other members.

2 types of applications :

So servers are useful only at clients startup.

A server is running at homeregis.dyndns.org, so by default, all client take this one as server, but anybody can run server, it will enter in the ring.


Ruby (1.9.2 for gui),

Green-shoes for GUI

Chipmunk Windows (so linux is supported but with less fun...)

Dispose of an access to Internet without proxy (but it work on a isolated LAN, run a default server in the LAN)

If firewall :

 Create a rule for authorisation on port 50500..50510 for TCP/UDP (for your process ruby)

If NAT (box adsl)

 Create a redirection rule for ports 50500.50510 fom/to host/ruby process





Ready for experimentations