GithubHelp home page GithubHelp logo

mgohashi / event-streams Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 54.64 MB

TDC2019 - Event Streams Example

License: Apache License 2.0

Java 83.36% Ruby 0.52% Shell 0.91% HTML 6.15% JavaScript 9.05%
kafka vagrant mysql coffee-store samples eventsourcing events cqrs angular vertx

event-streams's Introduction

Sample Coffee Bar - Event / Reactive System

Modules

  • vagrant: Vagrant environment with Ansible provisioner to provide an environment with Kafka and MySQL;
  • coffee-model: Model project to reuse data POJOs between projects;
  • coffee-store: Vert.x App Store project to generate orders and control its statuses;
  • coffee-stock: Vert.x App Stock project to control the product stock items;
  • coffee-machine: Vert.x App Machine project to simulate the machine running;
  • coffee-monitor: Vert.x with Angular App Monitor project to have an overview of the system running;

Valid States for an Order

  • placed: Order is pre validated;
  • confirmed: The order has enough ingredients available;
  • delivered: The order has finished its preparation process;
  • canceled: The order has been canceled due to out of stock items.

Event Streams / State transitions / Kafka Topics

  • test-order-submitted: User interaction event to submit orders;
  • test-order-placed: After the order has been pre validated the other is accepted by the system;
  • test-order-confirmed: After the order has been validated against required stock products;
  • test-order-preparation-started: After the order has started the preparation process;
  • test-order-preparation-finished: After the order has finished from the preparation process;
  • test-order-canceled: After the order has been canceled due to out of stock products.

Running the modules

  • Download Kafka from https://kafka.apache.org/ and place it under the [BASE_DIR]/event-streams/vagrant/roles/kafka/files


    NOTE

    This script is expecting to have the following version: kafka_2.12-2.2.0.tgz


  • vagrant: $ vagrant up

  • coffee-stock: $ mvn exec:java -pl coffee-stock

  • coffee-machine: $ mvn exec:java -pl coffee-machine

  • coffee-store: $ mvn exec:java -pl coffee-store

  • coffee-monitor: $ mvn exec:java -pl coffee-monitor

Monitor

Monitor Running

event-streams's People

Contributors

mgohashi avatar

Stargazers

 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.