Giter VIP home page Giter VIP logo

party-reservation's Introduction

Party Reservation

An application to make party reservations.

Java CI

Design

#

The Use Case

I would like to make a party reservation(via Reservation Entry) such that it instantly shows my RSVP on the doorman's iPad(via Reservation Confirmation). If my name is not there, I will not be allowed to enter the party.

The Problem

Consumer microservices typically are bound to know or have some level of knowledge about the domain of the Producer microservice especially when the communication between a Consumer microservice and a Producer microservice is done via HTTP. The problem of really not coupling your microservices becomes a challenge especially in the case when there are more Producer microservices that the Consumer microservice depends on.

The Goal

So the idea here is that we can decouple microservices through messaging as opposed to REST/communication via HTTP. The other great thing about this approach is that the producing microservice will not have to care about what type of technology/stack/language the consumer uses as the consumer will only just consume messages from Kafka. The Reservation-Entry service is the producer and sends messages to Kafka and the Confirmation service is the consumer application which will consume messages from Kafka and send data as Server Sent Events to the client.

The Reservation-Entry service is a Reactive Spring Application that uses the normal Spring Kafka to publish data onto the Kafka queue that our Confimation service will consume. This application will be in charge of writing/publishing to the queue.

The Confirmation service is a Reactive Spring Application that uses the Project Reactor Kafka library to consume from kafka reactively and send data to the client reactively. This application will only be reading events from the queue only.

Swagger

Reservation Confirmation Service

http://localhost:8081/webjars/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config

Docker

  • To start both microservices in docker you need to run: docker-compose up or docker-compose up -d without the daemon attached to your console.
  • This will start the confirmation service on localhost:8081 and the reservation service on localhost:8080
  • To stop the services from running while the daemon is attached to your console you need to run ctrl + c.

Testing

  • Testing on both confirm microservice and reservation-entry microservice is done at the unit test level.

party-reservation's People

Contributors

artemas-muzanenhamo avatar

Stargazers

 avatar  avatar

Watchers

 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.