Implementing Cloud-Native Architectural Patterns with Micronaut
Oct. 12, 2019•0 likes•397 views
Download to read offline
Report
Software
Slides from my presentation at Software Architects Bangalore meetup help on October 12, 2019. Covers externalised configuration, runtime reconfiguration, fault tolerance, and API versioning.
37. sample-service ./gradlew run
> Task :run
05:12:07.121 [main] INFO io.micronaut.runtime.Micronaut - Startup completed in 1260ms. Server Running: http://localhost:8080
05:12:07.251 [nioEventLoopGroup-1-3] INFO i.m.d.registration.AutoRegistration - Registered service [sample-service] with Consul
43. 07:19:19.838 [pool-1-thread-2] ERROR i.m.r.intercept.RecoveryInterceptor - Type
[com.nareshak.demo.GreetClient$Intercepted] attempting to resolve fallback for unavailable service
[sample-service]
07:19:19.843 [pool-1-thread-2] ERROR i.m.h.s.netty.RoutingInBoundHandler - Unexpected error occurred:
No available services for ID: sample-service
io.micronaut.discovery.exceptions.NoAvailableServiceException: No available services for ID: sample-
service at
io.micronaut.http.client.loadbalance.AbstractRoundRobinLoadBalancer.getNextAvailable(AbstractRoundRo
binLoadBalancer.java:50)
49. 07:26:27.347 [pool-1-thread-2] ERROR i.m.r.intercept.RecoveryInterceptor - Type [com.nareshak.demo.GreetClient$Intercepted]
attempting to resolve fallback for unavailable service [sample-service]
07:26:37.355 [pool-1-thread-2] ERROR i.m.r.intercept.RecoveryInterceptor - Type [com.nareshak.demo.GreetClient$Intercepted]
attempting to resolve fallback for unavailable service [sample-service]
07:26:52.361 [pool-1-thread-2] ERROR i.m.r.intercept.RecoveryInterceptor - Type [com.nareshak.demo.GreetClient$Intercepted]
attempting to resolve fallback for unavailable service [sample-service]
07:27:12.373 [pool-1-thread-2] ERROR i.m.r.intercept.RecoveryInterceptor - Type [com.nareshak.demo.GreetClient$Intercepted]
attempting to resolve fallback for unavailable service [sample-service]
07:27:12.378 [pool-1-thread-2] ERROR i.m.h.s.netty.RoutingInBoundHandler - Unexpected error occurred: No available services for
ID: sample-service
io.micronaut.discovery.exceptions.NoAvailableServiceException: No available services for ID: sample-service
at
io.micronaut.http.client.loadbalance.AbstractRoundRobinLoadBalancer.getNextAvailable(AbstractRoundRobinLoadBalancer.java:50)
63. When you in are in cloud-native world, features like fault tolerance,
service discovery, externalised configuration are necessary
Micronaut makes it easier to implement these patterns with its built-in support
Conclusion