Git Product home page Git Product logo

sdis-project1's Introduction

To build the project, run in this order and from directory scripts:
1. /bin/bash compile.sh - creates a directory build with the compiled java classes
2. /bin/bash setup.sh - creates a directory resources in the directory build
3. /bin/bash rmiregistry.sh port - sets up rmi

To run the project:
Use separate terminals for each peer, and another one for TestApp.

4./bin/bash peer.sh version(1.0 or 2.0) peer_id access_point MC MDB MDR(address port) - to lunch peer.
Example of a channel: 224.0.0.15 8000
This creates a PeerProtocol directory and a subdirectory for the Peer with id peer_id, where the files and chunks will be saved.

Examples of usage for each protocol:
- Backup
    /bin/bash test.sh access_point BACKUP file_absolute_path replication_deg
    In this protocol, script test.sh initially makes a copy of the specified file to resources directory inside build directory.
    Then the file is also exported to the Peer directory inside PeerProtocol folder.
- Restore
    /bin/bash test.sh access_point RESTORE file_name
- Delete
    /bin/bash test.sh access_point DELETE file_name
- Reclaim
    /bin/bash test.sh access_point RECLAIM 0
- State
    /bin/bash test.sh access_point STATE
Important!
file_name != file_absolute_path

To clean up:
/bin/bash cleanup.sh peer_id - deletes the directory of a peer inside PeerProtocol directory and also its directory in Storage.

When writing the scripts, a fault was detected in the version 1.0 of the backup protocol. A condition was missing which prevents the peer from using all its 5 attempts of sending PUTCHUNK, even when the STORED message is received sucessfully.
The problem was solved and the tag was changed.

JAVA SE version 11

T3G05

João Francisco de Pinho Brandão - [email protected]
Nuno Miguel Teixeira Cardoso - [email protected]

sdis-project1's People

Contributors

nmtc01 avatar jbrandao99 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.