项目作者: whyaneel

项目描述 :
Meeting Room Booking Facility with WebSockets in Spring Boot App
高级语言: Java
项目地址: git://github.com/whyaneel/book-a-meeting-room.git
创建时间: 2019-11-01T13:13:35Z
项目社区:https://github.com/whyaneel/book-a-meeting-room

开源协议:MIT License

下载


Meeting Room Booking Facility with WebSockets in Spring Boot App

WebSocket Protocol Setup

Broker Backed Messaging

  • StompEndpoint - /ws-prototype
    • StompClient is created with above endpoint, means WebSocket connection is established.
  • In Memory MessageBroker
    • Application DestinationPrefixes - /bot/booking
      • Any messages that come to above prefix will be routed to @MessageMapping(“/message/{uuid}”) annotated methods
    • SimpleBroker - /meetingroom
      • @SendTo("/meetingroom/{uuid}”) will carry the message (whatever method returns) back to the clients, whoever subscribed to /meetingroom/{uuid}

WebSocket Event Listeners

  • Log when a new client is connected and disconnected
    • Connect
    • Disconnect

Database and Service

Database Schema Design

  • H2
  • Init Script For Reference Data

Service Layer Should Do Below (Implemented in DSL integration)

  • Available Meeting Rooms
  • Available Timings For Selected Meeting Room
  • Book Meeting Room
  • Release Meeting Room (pending)

Environment Setup

Dockerizing (From Local Machine)

  • Create a Bootable Jar

    1. cd book-a-meeting-room
    2. ./gradlew clean build
  • Create a Docker Image (from Dockerfile)

    1. docker build --no-cache -t book-a-meeting-room-app .
  • Run The Application

    1. docker run -p 9000:8080 book-a-meeting-room-app

    Application Should be Running at http://localhost:9000/

Deploy to Elastic BeanStalk

  • Simply deploy the jar file or docker image

Deploy thru AWS CodePipeline

  • CodePipeline to pickup from Github