Giter Site home page Giter Site logo

tomek39856 / hotel-manager-microservices Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 4.81 MB

Java implementation of concept described in Udi Dahan's "Advanced Distributed Systems Design using SOA & DDD" course using composite-ui and message driven microservices architecture

Java 60.56% TypeScript 25.52% HTML 10.59% CSS 0.16% JavaScript 3.15% Sass 0.03%

hotel-manager-microservices's Introduction

Hotel Microservices

Project is Java implementation of concept described in Udi Dahan's "Advanced Distributed Systems Design using SOA & DDD" course.

http://udidahan.com/training/

Key assumptions

  1. Services should not use request-response pattern to communicate between themselves.
  2. The only part where request-response is allowed is itops module responsible for security and cross-domain processes which requires collecting data from many modules.
  3. Each service exposes it's own frontend component and only this service can present and modify modules data.
  4. Composite UI service collects components exposed by domain services and composes frontend views

Architecture

  1. Services are created with Spring Boot. Registers in Eureka Service Discovery. All public URL is exposed by gateway.
  2. Domain services communicate in async way (fire & forget architectural style) by Active MQ message broker.
  3. ITOPS service collects data from other services using request-response calls. Each service required by itops exposes it's own provider with Feign Client contract definition and DTOs.
  4. Domain services exposes their frontend components as static js file with reusable Angular Elements
  5. Webapp service composes UI from Angular Elements components exposed by other services

Domain Services

Reservation

Responsible for reserving a room, searching available rooms and searching for "no-show" reservations

Marketing

Holds and displays room types descriptions

Payment

Stores payment data and supports payment successes and failures

Guest

Stores guests information and supports searching by guest last name

Rate

Delivers information about rates for given room type in particular point of time

Occupancy

Supports check-in process and physical room allocation

Utility Services

ITOPS

Communicates with external service to charge card. Collects all of the required data using providers delivered by other modules.

Bus

Starts embedded Active MQ broker

Gateway

Gateway to public endpoints exposed by services. Uses Zuul

Service Discovery

Provides SD functionality by starting Eureka

Webapp

Builds UI composed from domain services frontends

Prerequisites

Java 1.8 or higher
nodejs + npm
gradle

Build process

  1. Npm frontend build by gradle incremental task, build is started only when sources or package.json changes
  2. Gradle copy of frontend project into static resources of spring boot aplication
  3. Gradle creates bootJar

Running

Start

gradle bootRun

Application is available at http://localhost:8080/webapp

Tests

Project contains only backend tests

gradle test

Built With

  • Gradle - Dependency Management

Author

hotel-manager-microservices's People

Contributors

tomek39856 avatar dependabot[bot] avatar

Stargazers

Ben Dotto avatar

Watchers

James Cloos 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.