https://github.com/jponge/vertx-devoxxfr19-demos
Vert.x demos for our session at Devoxx France 2019
https://github.com/jponge/vertx-devoxxfr19-demos
Last synced: 11 months ago
JSON representation
Vert.x demos for our session at Devoxx France 2019
- Host: GitHub
- URL: https://github.com/jponge/vertx-devoxxfr19-demos
- Owner: jponge
- License: mpl-2.0
- Created: 2019-04-15T11:41:50.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-01-23T15:52:22.000Z (about 6 years ago)
- Last Synced: 2024-10-20T22:24:40.383Z (over 1 year ago)
- Language: Java
- Homepage: https://cfp.devoxx.fr/2019/talk/ULH-5772/Du_reactif_au_service_du_pneu_connecte
- Size: 84 KB
- Stars: 6
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Devoxx France 2019 Eclipse Vert.x demo
Initial implementation by [Julien Ponge](https://julien.ponge.org/) at _Red Hat, Inc_.
## Scenario
This demo shows various aspects of Vert.x around the toy scenario of tyres that send pressure updates to some backend.
It especially shows:
* HTTP APIs to store and query data in MongoDB,
* implementation of a _edge service_ with RxJava2 that aggregates data from 3 other HTTP services,
* Kafka-based event streaming with live updates to a web application plugged on the Vert.x event-bus.
## How to run it
Just enjoy live reload
# In one terminal
$ docker compose-up
# In a second terminal
$ ./gradlew vertxRun
# In a third terminal, have fun with the APIs:
$ http POST :3000/ingest tyreId=123 pressure:=12.5
# (...)
The Kafka example is not running from the `vertxRun` task to avoid polluting the logs, you can just run each instance from the `main` method of the classes in `demo.eventdriven` from your IDE.
## How to generate some workload
See `locustfile.py` with sections to uncomment to generate traffic to the HTTP APIs with [Locust](https://locust.io/).
It's not worth focusing on the reported data, since all instances are running as single verticles, and everything happens on the same machine anyway.
I also have no idea of how _correct_ Locust is, especially with respect to _coordinated omission_.