Giter VIP home page Giter VIP logo

mini-project-loner-edition's Introduction

Overview

Deploy

Project by cph-hw98 & cph-sn311.

Since all of these technologies should be relatively universal and interoperable, we'll be making this assignment in various different languages and frameworks as an exercise

  • REST: Typescript (deno)
  • SOAP: C# (ASP.NET Core)
  • gRPC: Rust (tonic)
  • Migration: Python
  • Frontend: Typescript (Angular)

An additionally container running Python will be doing the database migration.

The assignment definition can be seen in mini-project-loner-edition/A3-MP-API.pdf

Installation

  1. Clone the repo by running: git clone https://github.com/Mutestock/mini-project-loner-edition.git
  2. cd ./mini-project-loner-edition
  3. Then run (requires docker & docker-compose): docker-compose up

NOTE: Web application is running on http://localhost:33333 locally.

Be advised that pulling the containers and compiling their contents will take some time.

Deployment

The solution is deployed at:

Frontend

http://159.65.54.148/

Backend

Techstack

Frontend

  • Angular

Backend

  • C# - SOAP
  • Rust - gRPC
  • Python - migration(Database population and initialization)
  • Typescript(Deno) - REST

Databases

  • PostgreSQL

Proxy

  • Envoy Proxy

DevOps

  • Github Actions, DigitalOcean

Utilities

  • GitHub

Reasoning

There are multiple reasons why we've decided to solve the assignment like this

  1. The education we're currently taking involves a lot of copying and pasting. We believe this is counterintuitive. We need to make our own solutions for the sake of learning.
  2. Being able to use multiple tools and languages makes us more versatile as programmers.
  3. Using multiple and completely different languages in the context of SOAP, REST and gRPC and being able to use them together cooperatively on the same platform (frontend Angular), showcases the interoperability and independance of the technologies.
  4. Creating the services like this allows us to easily reuse and expand them for future projects.

Envoy proxy

Envoy is required because our frontend is communicating directly with a gRPC server over gRPC-web. There are some message transportation errors since gRPC-web uses http/2.

Ports

  • Web Application: 80 or 33333
  • Postgres DB: 10010
  • REST service: 10020
  • gRPC service: 10030
  • SOAP service: 10040
  • Envoy Proxy: 10050
  • Soap to rest translater service: 10060

Diagrams

Note that:

  • REST is responsibile for Grades and relations
  • gRPC is responsible for Student
  • SOAP is responsible for Teachers

alt text

REST

interface Grade {
  id: number;
  name: string;
  created_at: string;
  updated_at: string;
}
interface Person {
  first_name: string;
  last_name: string;
  phone_number: string;
  email: string;
}
Endpoint HTTP Method Success Code Response Value Description
/grade GET 200 Grade[] Get a list of all grades.
/grade/<id> GET 200 Grade Get a single grade based on id. <id> is an int.
/grade POST 201 Add a new grade.
/grade/<id> PUT 204 Update an existing grade.
/grade/<id> DELETE 200 Removes a grade. <id> is an int.
/grade-student/<id> GET 200 Person[] Get a list of students related to grade, from grade id. <id> is an int.
/grade-teacher/<id> GET 200 Person[] Get a list of teachers related to grade, from grade id. <id> is an int.

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.