eti_assignment1

module
v0.0.0-...-33af86d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2021 License: MIT

README

Table of Contents
  1. About The Project
  2. Getting Started
  3. Roadmap
  4. License
  5. Contact

About The Project

Passenger page for getting current status, viewing trips and requesting for trips. [Passenger_Screen_Shot]

Driver page for getting current status, starting and ending ride. [Driver_Screen_Shot]

The Ride Share Assignment requires at least 2 microservices that is derived from applying the techniques of Decomposition using Strategic DDD and Tactical DDD. It also has an optional requirement for a frontend to be implemented. The following will explain what each of the microservices currently do, how is the services derieved and what frontend is being used together with a visual representation of the Microservices diagram.

There are a total of 3 microservices: (the functions and http method will be shown in each microservice.)

  1. Passenger
  1. Trip
  1. Driver

Design Consideration of Microservices

Why 3 Microservice:

  • With Driver, Passenger and Trips seperated it allows lesser dependencies between how they will communicate.
  • Driver and Passenger will focus on functions like Creating, Updating and Getting their personnal details.
  • Trips will focus on Requesting of trip, Assigning trip and both start and end trips.
  • This allows each area of focus to be seperated in case if one microservice is required to be shut down for enhancement or errors the other microservices can still operate thus ensuring user experience from the running microservices.
  • Example: If Trips microservice is shutdown, Driver and Passenger microservice will still allow the users to create profiles, update and get personnal details.

Frontend:

  • Monolith Frontend:
    • Above is chosen because this assignment's implementations will not be growing and it also shows how technologically agnostic the frontend, microservice and backend can be.

Design Pattern used:

  • Decomposition:
    • Strategic Domain-Driven Design Result:
      • Accounts
      • Trips Management
    • Tactical Domain-Driven Design Identified Microservice:
      • Driver Microservice (Handle Functions: Create, Retrieve, Update Driver Account, Retrieve Current Trip)
      • Passenger Microservice (Handle Functions: Create, Retrieve, Update Passenger Account, Retrieve List of Trips Taken)
      • Trip Microservice (Handle Functions: Request Trip, Start Trip, End Trip, Update Account On Ride Status)

(back to top)

To better understand, below is a diagram of the assignment's structure and how communications are made. [ArchitectureDiagram-screenshot] [ArchitectureDiagramEach-screenshot]

(back to top)

Built With

The main objective of this assignment is to put the knowledge and skills learnt about Golang to use. Vanilla Javascript and HTML CSS is used for the frontend.

(back to top)

Getting Started

Prerequisites

Make sure that MySQL and Golang is downloaded on your device.

Installation

  1. Clone the repo
    git clone https://github.com/gabgohkb/ETI_Assignment1.git
    
  2. Install necessary libraries
    go get -u github.com/go-sql-driver/mysql
    go get -u github.com/gorilla/mux
    go get -u github.com/gorilla/handlers
    
  3. Execute database start script in /DB/ExecuteDBSQL.sql

(back to top)

Usage

To start using the ride-hailing platform, follow the below steps:

  1. Run all microservices in each directory
cd Assignment1\DB_Passenger
go run main.go P_Database_Func.go
cd Assignment1\DB_Driver
 go run main.go D_Database_Func.go
cd Assignment1\DB_Trip
go run main.go T_Database_Func.go
  1. Open frontend by opening Home.html in Assignment1\Templates

(back to top)

Roadmap

  • Backend using Golang
  • Frontend using HTML JavaScript
  • Tidy up both backend and frontend

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Gabriel Goh - School Email

Project Link: https://github.com/gabgohkb/ETI_Assignment1.git

(back to top)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL