https://github.com/jesperancinha/from-paris-to-berlin-circuit-breaker
This project is an investigation of Hystrix in the Kotlin language
https://github.com/jesperancinha/from-paris-to-berlin-circuit-breaker
Last synced: 8 months ago
JSON representation
This project is an investigation of Hystrix in the Kotlin language
- Host: GitHub
- URL: https://github.com/jesperancinha/from-paris-to-berlin-circuit-breaker
- Owner: jesperancinha
- License: apache-2.0
- Created: 2021-10-13T14:57:38.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-13T07:00:16.000Z (over 1 year ago)
- Last Synced: 2024-04-13T21:54:09.429Z (over 1 year ago)
- Language: Kotlin
- Size: 5.79 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
- Roadmap: Roadmap.md
Awesome Lists containing this project
README
# from-paris-to-berlin-circuit-breaker
---
[](https://github.com/jesperancinha/from-paris-to-berlin-circuit-breaker)
[](https://circleci.com/gh/jesperancinha/from-paris-to-berlin-circuit-breaker)
[](https://github.com/jesperancinha/from-paris-to-berlin-circuit-breaker/actions/workflows/from-paris-to-berlin-circuit-breaker.yml)
[](https://github.com/jesperancinha/from-paris-to-berlin-circuit-breaker/actions/workflows/from-paris-to-berlin-circuit-breaker-e2e.yml)
[](https://www.codacy.com/gh/jesperancinha/from-paris-to-berlin-circuit-breaker/dashboard?utm_source=github.com&utm_medium=referral&utm_content=jesperancinha/from-paris-to-berlin-circuit-breaker&utm_campaign=Badge_Grade)
[](https://codebeat.co/projects/github-com-jesperancinha-from-paris-to-berlin-circuit-breaker-main)
[](https://snyk.io/test/github/jesperancinha/from-paris-to-berlin-circuit-breaker)
[](https://www.codacy.com/gh/jesperancinha/from-paris-to-berlin-circuit-breaker/dashboard?utm_source=github.com&utm_medium=referral&utm_content=jesperancinha/from-paris-to-berlin-circuit-breaker&utm_campaign=Badge_Coverage)
[](https://codecov.io/gh/jesperancinha/from-paris-to-berlin-circuit-breaker)
[](https://coveralls.io/github/jesperancinha/from-paris-to-berlin-circuit-breaker?branch=main)
[](#)
[](#)
[](#)
---
## Technologies used
Please check the [TechStack.md](TechStack.md) file for details.
## Introduction
The idea of this project is to take passengers from Paris to Berlin. However, in our simulation, the weather is bad and so the lines will be failing. The role of kystrix here is to avoid a massive traffic flow to blocked roads and instead to get the cars somewhere else.
The idea of [Kystrix](https://github.com/johanhaleby/kystrix) is the same as [Hystrix](https://github.com/Netflix/Hystrix). These are circuit-breakers responsible to stop the flow of requests to certain endpoints and make them fail or redirect to somewhere else.
Hystrix is, however, no longer in development, and instead we have [Resilience4J](https://github.com/resilience4j/resilience4j).
This means that although we can hope that [Kystrix](https://github.com/johanhaleby/kystrix) gets more standardized, it appears to be that [Resilience4J](https://github.com/resilience4j/resilience4j) is the way to go at this time.
#### Stable releases
- [0.0.0](https://github.com/jesperancinha/from-paris-to-berlin-circuit-breaker/tree/0.0.0) - [bc013410e0f9db81b84979746cbb88fe32bdb5cf](https://github.com/jesperancinha/from-paris-to-berlin-circuit-breaker/tree/0.0.0) - Docker with IP's / Kotlin 1.8 / JDK17
## Project Layout
1. [From Paris to Berlin Data](./from-paris-to-berlin-data) - Common Data Library used in all executable projects
2. [From Paris to Brlin City Generator](./from-paris-to-berlin-city-generator) - Generates a City JSON which can be fed to the main application
3. [From Paris to Berlin Kystrix Demo](./from-paris-to-berlin-kystrix-runnable-app) - A simplified Kystrix demo independently of Spring
4. [From Paris to Berlin Resilience4J Runnable Demo](./from-paris-to-berlin-resilience4j-runnable-app) - Creating Circuit Breakers using programmatic Resilience4J independently of Spring
5. [From Paris to Berlin Resilience4J Spring Demo](./from-paris-to-berlin-resilience4j-spring-app) - Creating Circuit Breakers using programmatic Resilience4J using Spring
6. [From Paris to Berlin Resilience4J AOP Spring Demo](./from-paris-to-berlin-resilience4j-aop-spring-app) - Creating Circuit Breakers using AOP(Aspect Oriented Programming) and declarative Resilience4J
7. [From Paris to Berlin Web](./from-paris-to-berlin-web) - Front end application to support the Paris to Berlin Game
## Java Setup
```shell
sdk install java 17-open
sdk use java 17-open
```
## How to run locally
##### Docker-Compose
1. Start Image
```shell
make dcup-full-action
```
2. Start Demo
```shell
make demo-docker
```
3. Go to [localhost:9000](http://localhost:9000)
---
## Swagger UI
##### Local
1. [from-paris-to-berlin-resilience4j-aop-spring-app](http://localhost:8080/api/fptb/webjars/swagger-ui/index.html)
2. [from-paris-to-berlin-ws-service](http://localhost:8081/api/fptb/swagger-ui/index.html#/)
##### Via Docker
1. [from-paris-to-berlin-resilience4j-aop-spring-app](http://localhost:9000/api/fptb/webjars/swagger-ui/index.html)
2. [from-paris-to-berlin-ws-service](http://localhost:9000/api/fptb/broker/ws/swagger-ui/index.html)
## Coverage report Graphs
## References
- [Improve your Kotlin code with Detekt](https://medium.com/frichtitech/improve-your-kotlin-code-with-detekt-65795656b1ed)
- [Resilience 4J Spring-Boot-Demo](https://github.com/resilience4j/resilience4j-spring-boot2-demo)
- [Netflix / Hystrix](https://github.com/Netflix/Hystrix)
- [Kystrix – A Kotlin DSL for Hystrix](http://code.haleby.se/2018/09/16/kystrix-a-kotlin-dsl-for-hystrix/)
- [johanhaleby / kystrix](https://github.com/johanhaleby/kystrix)
- [resilience4j / resilience4j](https://github.com/resilience4j/resilience4j)
- [CircuitBreaker - Getting started with resilience4j-circuitbreaker](https://resilience4j.readme.io/docs/circuitbreaker)
## About me
[](https://github.com/jesperancinha)