Coder Social home page Coder Social logo

farisnassif / fourthyear_distributedsystemsproject Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 129.08 MB

A gRPC distributed user account management system split into two parts. [1]: A gRPC Password service [2]: RESTful User Account Service

Java 100.00%
grpc encryption rest-api dropwizard

fourthyear_distributedsystemsproject's Introduction

Project Details

Details
Project Project Spec
Course BSc (Hons) in Software Development
Module Distributed Systems
Author Faris Nassif
Lecturer Dr John French

Project Outline

  1. Create a gRPC Password Service which will provide Password hashing and Verification. The service will expose a gRPC API with two methods:

  2. Design a REST API for a User Account web service using OpenAPI and SwaggerHub, the API definition should support multiple operations, following the REST architectural style.

  3. Develop a User Account service by implementing the API in Java using the Dropwizard microservice framework. The User Account service should use the password utility methods provided by the gRPC Password Service developed in Part 1.

Running the Program

  1. In your command line terminal
    git clone https://github.com/farisNassif/FourthYear_DistributedSystemsProject
  2. Navigate to the User_Service directory
    cd user_service
  3. Run the Password Service (Part 1)
    java -jar runnable_jars/PasswordServer.jar
  4. Run the User Account Service (Part 2) along with the .yaml file
    java -jar runnable_jars/UserService.jar server userApiConfig.yaml

Both services run on port 50000 so manual input isn't needed

Working your way around the Program

  1. After completing the steps above have a look at the API Definition for the User Account Service.
  2. Using Postman or any other collaboration platform of your choice execute any of the operations outlined in the API Definition.

Outcomes

The User Account Service correctly intergrates with the previously developed Password Service and returns the desired functionality. Passwords are correctly Hashed and Verified via the Password Service and this is observeable via executing the relevant operations outlined in the API Definition. Appropriate Status Codes are returned based on the body of the Request. All operations outlined in the Brief are implemented and Status Code Validated.

Changes made to the Password Service

When first testing my Part 2 with my Part 1 I found it wouldn't correctly integrate, I made a change to my Part 1 by where I removed a lot of the loose coupling and tightly coupled it without changing the code, I also hardwired the Server to Listen on Port 50000 as the Client is hardwired to connect to that Port. After removing the Client testing classes from the Part 1 project folder and re-packaging it and running it, it seemed to work perfectly with Part 2. I'm positive I made no hard changes to the code, I remember messing about with the .pom which may have fixed the previous issue.

Issues with the Project

  1. Password Validation is Asynchronous
    After hours spent trying to get the Validation working Synchronously with appropriate requests I found myself running into issue after issue and neglecting other parts of the Project. In the future it will be definitely something I look at since I feel it was something small I was missing, I just couldn't find what.

  2. Password Validation (Again), while it works it does require two Requests
    I believe this is due to the way I have the boolean Result setup in the Client. The way I have the Boolean implemented isn't optimal and wouldn't be used in a real world scenario however for testing this project it saved me a lot of time at the cost of throwing this issue (bit of a contradiction). After several unsuccessful attempts to debug it, it remains in the final release. Again this is something I will look at in future since it's a bit of a hinderance that probably has a reasonable fix with some more debugging.

References

fourthyear_distributedsystemsproject's People

Contributors

farisnassif avatar

Watchers

 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.