Giter VIP home page Giter VIP logo

backend-microservices-ticketingsystem's Introduction

Group04-FinalProject - Public Transport Company

Index:


Microservice architecture

microservice_architecture.png

Scalability & Availability

- Kafka

- Saga Choreography

Involved transaction: purchasing tickets sagas_transaction.png

- Eureka Server

- API Gateway


Business Logic

User types

  1. Admin
  2. Admin_E
  3. User
  4. Turnstile/Embedded_system

Ticket types

tickets_table.png

Requests

login_service_apis.png tickets_table.png ticket_c_s_apis.png payment_service_apis.png


Set-up project guidelines

The following guidelines illustrate how to set up the project concretely:

Kafka containers

Run in the project command line:

docker-compose up -d

Once completed,
start the two created containers (kafka_kafka_1 and kafka_zookeeper_1)

docker start group04_final_project_kafka_1 group04_final_project_zookeeper_1

Databases

Two containers are necessary, each one with 2 databases respectively.

1. Create containers

For creating these two containers,
execute the following command in the command line:

docker run --name login_traveler_container -p 54320:5432 -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=db_traveler -d postgres

and then

docker run --name ticketCatalogue_payment_container -p 54321:5432 -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=db_payment -d postgres

These four databases have the following names respectively:

  • Container login_traveler_container has the following two databases:

    • postgres, on port 54320, that contains info regarding login service
    • db_traveler, on port 54320, that contains info regarding traveler service
  • Container ticketCatalogue_payment_container has the following two databases:

    • postgres, on port 54321, that contains info regarding ticket catalogue service
    • db_payment, on port 54321, that contains info regarding payment service

2. Start containers

Start the created containers with the following command:

docker start login_traveler_container ticketCatalogue_payment_container

3. Add Datasources

In addition, to successfully run the app,
Add two new Datasources of type PostegreSQL in the IntelliJ project,
for each one username and password (should be postgres and postgres respectively) specified in:

and the host and port specified in

Servers

  • LoginService server (DB: postgres on port 54320) on port 8081

  • TravelerService server (DB: db_traveler on port 54320) on port 8085

  • TicketCatalogueService server (DB: postgres on port 54321) on port 8082

  • PaymentService server (DB: db_payment on port 54321) on port 8083

  • EurekaService server on port 8761

  • GatewayService server on port 8761


backend-microservices-ticketingsystem's People

Contributors

fermic98 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.