GithubHelp home page GithubHelp logo

sdis's Introduction

To compile in LINUX:
	- using a terminal, navigate to the project's root folder and type "sh compile.sh"
To compile in WINDOWS:
	- navigate to the project's root folder
	- create a folder named "bin"
	- open a terminal in that directory (root folder) and type the following command:
		"javac -d bin -sourcepath src -encoding ISO-8859-1 src/backupservice/cli/BackupServiceCLI.java src/backupservice/cli/TestApp.java"

To run the peer:
	- navigate to the project's "bin" folder
	- open a terminal in that directory and type the following command:
		"java backupservice.cli.BackupServiceCLI <peer_id> <mc_addr> <mc_port> <mdb_addr> <mdb_port> <mdr_addr> <mdr_port> <enhanced_mode>"

	Argument description:
		peer_id - Integer representing the peer’s unique identifier
		mc_addr - IP address of the CONTROL channel
		mc_port – port of the CONTROL channel
		mdb_addr – IP address of the BACKUP channel
		mdb_port – port of the BACKUP channel
		mdr_addr – IP address of the RESTORE channel
		mdr_port – port for the RESTORE channel
		enhanced_mode – 0/1 to turn enhanced mode off/on, respectively. If "0", uses protocol version 1.0, if "1", uses protocol version "2.3" described in the "protocol.pdf" document inside the "docs" folder of the project.

To run the TestApp:
	- navigate to the project's "bin" folder
	- open a terminal in that directory and type the following command:
		"java backupservice.cli.TestApp <peer_app> <sub-protocol> <opnd_1> <opnd_2>"

	Argument description:
		peer_app – local peer access point
		sub-protocol – can be BACKUP, RESTORE, RECLAIM, DELETE or EXIT
		opnd_1 – path name of the file or amount of space to be reclaim
		opnd_2 – specifies the desired replication degree. Applies only to backup sub-protocol
		
	IMPORTANT NOTE: since the specification did not specify wether the RECLAIM protocol argument should be the ammount of bytes to "clear" or the maximmum total backup size, we established that it should be the second, which means, using "RESTORE 3000" in the TestApp guarantees that the system doesn't have more than 3000 bytes of files backed up for other peers


Description of local files created by the peer application:
	- backups  -> Saves every backup related to peers. The chunks are stored under a folder identified by peer unique identifier.
	- log      -> Stores every information generated by program. Since the start of the communication to messages changed by peers as information about files.
	- metada   -> Saves the info about a backup operation. All the information processed by backup like own files, peers files, fileID, file path and chunks are concentrated here.


sdis's People

Contributors

andrelago13 avatar leonardo95 avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

sdis's Issues

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.