Code Monkey home page Code Monkey logo

theater-service-dapr's Introduction

Theater Service

This demo app, Theater Service, consumes TheaterCreatedEvent published by a provider. It also provides endpoints to create/get/get history of a theater.

A newly created theater will be in PENDING status, when a TheaterCreatedEvent is consumed, it updates the theater status to CREATED, and keeps a log of its history.

  • A. Prerequisites

  • B. Getting Started & Run the Application

      1. Clone the git repo in to your local directory from the github repository
      1. Open the command prompt and navigate to the main project directory.
      1. Copy mssql.jks file located under rest-controller submodule to under "tmp" directory on your local env. Empty file merely for local testing purpose.
      1. Build the application:
        • mvn clean install
      1. Run the application with Dapr as sidecar WITH docker container:
        • docker-compose up --build
      1. Stop the app:
        • docker-compose stop
      1. Tear down the app (warning: this will delete the contents of your app's database):
        • docker-compose down
      1. If you don't have Docker installed locally, run the application with Dapr as sidecar locally WITHOUT docker container:
        • dapr run --components-path ./theater-service-dapr-components --app-id theater-service --app-port 9000 -- java -jar theater-service-rest-controller/target/theater-service-rest-controller-0.0.1-SNAPSHOT-exec.jar -p 9000
  • C. Project Code Modules

    • theater-service-config - Spring Configuration classes for all of the modules.
    • theater-service-dapr-components - dapr components files for pubsub.
    • theater-service-data - Contains domain data shared with other applications such as rest-api, events etc.
    • theater-service-persistence - Responsible for hosting the Entities and Repositories for the database.
    • theater-service-qa - Integration/Functional Tests.
    • theater-service-rest-controller - REST Endpoints for the application.
    • theater-service-service - Contains business logic for the application.
  • D. Application Launch

PubSub

For testing purpose, we are using EMQ X MQTT public broker https://www.emqx.io/mqtt/public-mqtt5-broker so the Subscriber app can communicate with this service through MQTT pubsub.

Instructions to deploy to AKS

Refer to my Medium article for detailed instructions to deploy to Azure Kubernetes Service: https://betterprogramming.pub/how-to-deploy-microservice-using-dapr-in-azure-kubernetes-service-da75319dd0ea?sk=54a491852d5993df0a1eebf7387ccad2

theater-service-dapr's People

Contributors

dependabot[bot] avatar wenqiglantz avatar wenqiglantz-agi avatar

Stargazers

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