GithubHelp home page GithubHelp logo

p3-idchatserver-part2's Introduction

Identity Server Part 2 | Project 3

Lucas Marchand and Jared White

CS455-001 S2020

Table of contents

File/Folder Manifest

p3-idserver-part2
├── inc                         Dependencies
│   └── commons-cli-1.4         Command line arguments library
├── Makefile                    Makefile for project
├── multiple-clients.sh         Script to test with multiple clients
├── run-client.sh               Script to run client
├── run-server.sh               Script to run server
├── src                         Source directory
│   ├── IdClient.java           Client class
│   ├── Id.java                 RMI interface
│   ├── IdServer.java           Server class
│   ├── mysecurity.policy       Security policy for JVM
│   |── User.java               Representation of a user
│   └── ServerInfo.java         Representation of an IdServer
└── run-tests.sh                Script to test running multiple servers, elections, and replication of servers

Building and running

must have Java 11 to run

To build

make

Utilize the run-server.sh and run-client.sh scripts to run the server and clients for the project. run-tests.sh is a great example of how docker and the IdServer can be utilized for replication and consistency with clients. The differences between this phase of the IdServer and the previous phase is that this phase has a lead server that handles communication with clients and that has backup servers that are ready to run an election and step into the leaders place if the leader should fail to respond to clients. This is shown in the run-tests.sh script where the docker container for the leader is killed. The election system is ran assigning the server with the highest PID as the winner. A PID in this context is based on communication between servers on when they were created and is assigned and coordinated by the lead server when a new server comes online and registers with the lead server.This model allows the IdServer to know has replicaiton and consistency.

Testing

We used the testing scripts (included with the code) to ensure that everything was working properly. We heavily utilized the run-tests.sh script which setup docker containers for each server to show how they can be run in a distributive manner.

Reflection

RMI for java is a very difficult way to handle distributed systems. There seems to be an overload of error handling that is hard to track and troubleshoot effectively. There wasn't as much documentation on RMI as I would have liked there to be a little more literature on the subject. It seemed that RMI did not give good ways of handling timeouts with clients. We ended up moving to a socket based approach to check if a server was alive instead of trying to get a reference to its registry.

p3-idchatserver-part2's People

Contributors

lucas-marchand avatar 7thfleet avatar

Watchers

James Cloos 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.