Coder Social home page Coder Social logo

s2s's Introduction

S2S : Shoer to Shoers

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

Presentation

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.

Usage

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    

Principles

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

  • sub directory,
  • ruby files
  • images rasters
  • .txt? .html .... files

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 :

  • server : a application which memorize the list of applications actives, and can give this list to anyone
  • client : a application share his files with all other client. a client is server : it keep a list of all client, so a client is a server too.

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.

Requirements

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

Refs

http://regisaubarede.posterous.com/tag/p2p

https://github.com/ashbb/green_shoes

Status

Ready for experimentations

  • Chipmunk in gs : ok, patched (in s2s.rb) for limit the number of dynamic shape
  • firewall and NAT : serveur should signale the issue to the client
  • Watch ui memory ;)
  • todo : a gui alternative with OCRA ?...
  • define a protocol for delete/rename files and directorys : vote ?

s2s's People

Contributors

glurp avatar

Stargazers

 avatar Max Winkler avatar EVOKE avatar Johan avatar Julian Pokrovsky avatar Henrique Breim avatar Angus H. avatar Alex Moore-Niemi avatar Glenn Y. Rolland avatar Cyberarm avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.