Learning by doing: Spring Cloud
GPL-3.0 License
[Spring Cloud](http://spring-projects.ru/projects/spring-cloud/) [Kotlin](https://kotlinlang.ru/) .
:
💚 -.
Cloud-native - , .
, "". .
_ ?_
URL | |
---|---|
discovery-server | http://host:8761/eureka |
Spring Cloud :
Spring Cloud Consul
Spring Cloud Zookeeper
Spring Cloud Netflix
- Spring Cloud Netflix. Netflix .
Eureka. , ( Eureka).
, (Discovery servers) , . :
eureka.client.register-with-eureka=true
eureka.client.fetch-registry=true
Eureka , , , . , , Discovery Server - , .
Eureka :
( ).
Eureka (aka , dashboard) . .
http://localhost:8761
URL | |
---|---|
weather-service | http://host:port/weather |
@EnableDiscoveryClient
, WeatherServiceApplication
Discovery Server Discovery Server .
URL | |
---|---|
weather-app | http://host:port/current/weather |
URL | |
---|---|
datetime-service | http://host:port/datetime |
@EnableDiscoveryClient
, DatetimeServiceApplication
Discovery Server Discovery Server .
URL | |
---|---|
datetime-app | http://host:port/current/datetime |
URL | |
---|---|
client | http://host:port |
@EnableDiscoveryClient
, ClientApplication
Discovery Server.
Eureka, , - . false:
eureka.client.register-with-eureka=false
, ... .
(cascading failure) - , .
?
" " (Circuit breaker design pattern) - , . .
Netflix Hystrix - ...
. ?
URL | |
---|---|
hystrix-dashboard | http://host:port/hystrix |
: Circuit Breaker: Hystrix Dashboard( .)
Module | URL |
---|---|
turbine | http://host:3000/turbine.stream |
Hystrix . , , . .
Turbine ( Spring Cloud Netflix) (streams) Hystrix , Hystrix .
:
turbine.app-config=weather-app,datetime-app
turbine.cluster-name-expression='default'
.
.
.
📗 TODO
: [Gradle](https://gradle.org/) .
IntelliJ IDEA, STS / Eclipse, NetBeans .
./gradlew :discovery-server:bootRun
./gradlew :weather-service:bootRun
./gradlew :weather-app:bootRun
./gradlew :client:bootRun
./gradlew :datetime-service:bootRun
./gradlew :datetime-app:bootRun
./gradlew :turbine:bootRun
./gradlew :hystrix-dashboard:bootRun
Gradle ( , ).
, . :
: , , .
📗 TODO
Travis CI |
---|
[GNU GPL v3](https://www.gnu.org/licenses/gpl-3.0.ru.html).