Git Product home page Git Product logo

pg6102-practice's Introduction

Practise project for PG6102

Microservice architecture based on SpringBoot, written in Kotlin.

Attempting to design as a "Twelve-Factor App", but using a root-POM as done in the course.

TODO:

  1. Check out jOOQ with seek() for easier implementation of keyset/seek pagination

Scripts:

  • ./build-and-start
    • Rebuilds all .jar files and Docker images
    • Starts the project locally
  • ./start-dev
    • Used for local development
    • Starts all supporting services as Docker images

Use 'chmod +x ./SCRIPT_NAME' if permission is denied.

Local development

Use the script ./start-dev in the root folder to start all backing services (databases, Redis etc.).

Modules

Gateway

Used as the entrypoint for the microservices. Exposed on port 8080 and redirects requests to the correct service based on URL paths.

Auth

Authentication service that stores usernames and hashed passwords in the connected database. Uses Redis to store active sessions so other services can verify requests that require authentication, and messages the other services via RabbitMQ on creation of new accounts.

Supporting services

  • PostgreSQL database for persistent storage.
  • Consul as discovery service.
  • Redis for storing active sessions.
  • RabbitMQ as message-broker.
    • Uses the service.action.exchangetype naming scheme for exchanges, e.g. user.created.fx for a fanout-exchange ('fx') used when new users are created.

Table of ports

Name: Type: Port
Gateway Service 8080
Auth Service 8081
Auth Database 5432
Discovery Support 8500
Redis Support 6379
RabbitMQ Support 5672

pg6102-practice's People

Contributors

eolseng avatar

Watchers

 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.