项目作者: vascospereira

项目描述 :
Distributed system to backup files between 'peers'
高级语言: Java
项目地址: git://github.com/vascospereira/Distributed-Backup-Service.git


Distributed System Configuration

To COMPILE in UNIX:

  • using a terminal, navigate to the project’s root folder
  • cd to “scripts” subfolder and enter “chmod 755 compile.sh”
  • followed by “./compile.sh”

To COMPILE in WINDOWS:

  • through Command Prompt, navigate to root project folder
  • cd to “scripts” subfolder and enter “compile.bat”

To START a Peer in UNIX:

  • navigate to the project’s “src” folder
  • through the terminal type: “rmiregistry &” to start the RMI registry process
  • in the same terminal, or other pointing to the same directory, type:
    1. <br/>"java peer.Peer \<protocolVersion> \<serverID> \<accessPoint> \<MC>:\<MCPort> \<MCB>:\<MCBPort> \<MCR>:\<MCRestore>"

    example: java peer.Peer 1.0 1 remote 224.0.0.3:3333 224.0.0.3:4444 224.0.0.3:5555

To START a Peer in WINDOWS:

  • open Comand Prompt, navigate to project’s “src” folder
  • enter “start rmiregistry” to start the RMI registry process
  • in the same Command Prompt, or other pointing to the same directory, type:
    1. <br/>"java peer.Peer \<protocolVersion> \<serverID> \<accessPoint> \<MC>:\<MCPort> \<MCB>:\<MCBPort> \<MCR>:\<MCRestore>"

    example: java peer.Peer 1.0 1 remote 224.0.0.3:3333 224.0.0.3:4444 224.0.0.3:5555

To RUN the TestApp in UNIX:

  • navigate to the project’s “src” folder
  • through the terminal type:
    1. <br/>"java test.TestApp <peer_access_point> BACKUP \<filepath> <replication_degree>" or
    2. <br/>"java test.TestApp <peer_access_point> RESTORE \<filepath>" or
    3. <br/>"java test.TestApp <peer_access_point> DELETE \<filepath>" or
    4. <br/>"java test.TestApp <peer_access_point> RECLAIM \<space>" or
    5. <br/>"java test.TestApp <peer_access_point> STATE"

    backup example: java test.TestApp remote backup ../testfiles/nature.jpg 1

To RUN the TestApp in WINDOWS:

  • open Comand Prompt, navigate to project’s “src” folder
  • through the Comand Prompt type:
    1. <br/>"java test.TestApp <peer_access_point> BACKUP \<filepath> \<replication_degree>" or
    2. <br/>"java test.TestApp <peer_access_point> RESTORE \<filepath>" or
    3. <br/>"java test.TestApp <peer_access_point> DELETE \<filepath>" or
    4. <br/>"java test.TestApp <peer_access_point> RECLAIM \<space>" or
    5. <br/>"java test.TestApp <peer_access_point> STATE"

    backup example: java test.TestApp remote backup ..\testfiles\nature.jpg 1

DESCRIPTION of local files created by the peer application:

  1. Inside 'peers' folder, each peer creates a new folder, which is the name's Peer identifier and creates also a:
  • ‘backup’ folder: Saves every backup initiated by other peers.
  • ‘local’ folder: Saves every information related to local initiated backups.
  • ‘restore’ folder: Saves every restored file.