Git Product home page Git Product logo

caocaos_warriors_ezshare's Introduction

COMP90015 EZShare Project

A resource sharing network that consists of servers, which can communicate with each other, and clients which can communicate with the servers.

Team:

Getting Started

Make sure you have this librarys/software installed in your machine:

  • Java 1.8
  • Eclipse IDE
  • Maven
    • If you are using OSX you can just run below command from the terminal (assume you have brew)
    brew install maven
    

Steps

0. Import the project to eclipse

  1. File -> Import -> Maven -> Existing maven project
  2. Select your code folder
  3. Finish

Import project

1. Install any dependencies

  1. Right click on the root project
  2. Select maven -> Update Project

Install dependencies

Running The App

0. Compile/Build the application

Using command line run this command in the root folder

mvn package

After you run this command, the jar file will be available in target/ folder.

1. Run the application

You need to run the client and server in the separate command line/terminal

Available command line arguments for Server

 -advertisedhostname <arg>        advertised hostname
 -connectionintervallimit <arg>   connection interval limit in seconds
 -debug                           Print debug information
 -exchangeinterval <arg>          exchange interval in seconds
 -port <arg>                      Server port, an integer
 -secret <arg>                    Secret

Server

java -cp target/ezshare-1.0-jar-with-dependencies.jar EZShare.Server <command line arguments>

Available command line arguments for Server

-advertisedhostname <arg>        advertised hostname
-connectionintervallimit <arg>   connection interval limit in seconds
-debug                           Print debug information
-exchangeinterval <arg>          exchange interval in seconds
-port <arg>                      Server port, an integer
-secret <arg>                    Secret
-secureportnumber <arg>          Secure port, an integer

Client

java -cp target/ezshare-1.0-jar-with-dependencies.jar EZShare.Client <command line arguments>

Available command line arguments for Client

 -channel <arg>       channel
 -debug               print debug information
 -description <arg>   resource description
 -exchange            exchange server list with server
 -fetch               fetch resources from server
 -host <arg>          server host, a domain name or IP Address
 -name <arg>          resource name
 -owner <arg>         owner
 -port <arg>          server port, an integer
 -publish             publish resource on server
 -query               query for resources from server
 -remove              remove resource from server
 -secret <arg>        secret
 -secure              secure socket
 -servers <arg>       server list
 -share               share resource on server
 -subscribe           keep connect
 -tags <arg>          resource tag
 -unsubscribe         disconnect
 -uri <arg>           resource uri

Code Structure

The code will be split into Server and Client. All of code will be under src/main/java folder.

├── src/main/java              
├──── com.ezshare               # entry point for the application
├──────── Client.java           # Main Client class
├──────── Server.java           # Main Server class
├──── com.ezshare.client        # Package for client code
├──── com.ezshare.server        # Package for server code
├── target                      # compilation result
└── start-client.js     # script to running front-end code process

caocaos_warriors_ezshare's People

Contributors

dazajuandaniel avatar haorans1994 avatar martindavid avatar sharon-librae avatar

Stargazers

 avatar  avatar

Watchers

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