The new and smart way to develop microservices for Istio - Eclipse MicroProfile
Focus on MicroProfile and demonstrate 8 MicroProfile specifications with some overview on Istio
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
New and smart way to develop microservice for istio with micro profile
1. 1
The new smart way to develop Microservices for Istio
- Eclipse MicroProfile
Emily Jiang, Java Champion, Liberty Architect for MicroProfile and CDI @IBM
@emilyfhjiang
8. 8
cloud-native microservice
1. RESTful – like cattle not pet, communicative
2. Configurable
3. Fault tolerance
4. Can be discovered
5. Secure
6. Traceable, monitorable
7. Able to communicate with the cloud infrastructure
11. 11
Open specifications
Wide vendor support
REST services
OpenAPI support
Security
Fault Tolerance
Configuration
Metrics
Health
Open Tracing
https://wiki.eclipse.org/MicroProfile/Implementation
Quarkus
30. 30
MicroProfile Health
A B
@Health
@ApplicationScoped
public class InventoryResource implements HealthCheck {
...
public boolean isHealthy() {...}
@Override
public HealthCheckResponse call() {
if (!isHealthy()) {
return
HealthCheckResponse.named(“InventoryResource”).withData(…).down().build();
}
return
HealthCheckResponse.named(“InventoryResource”).withData(…).up().build();
}
}
31. 31
MicroProfile Metrics
A B
@Timed(name = "inventoryPropertiesRequestTime",
absolute = true,
description = "Time needed to get the properties of" +
"a system from the given hostname")
public Properties get(String hostname) {
return invUtils.getProperties(hostname);
}
32. 32
MicroProfile OpenTracing
A B
@Traced(value = true, operationName = "InventoryManager.list")
public InventoryList list() {
return new InventoryList(systems);
}
JAX-RS methods are
automatically
traced by default
33. 33
Eclipse MicroProfile
Open specifications
Wide vendor support
REST services
OpenAPI support
Security
Fault Tolerance
Configuration
Metrics
Health
Open Tracing
38. 38
MicroProfile Health with Kubernetes
A B
readinessProbe:
httpGet:
path: /health
port: 9080
initialDelaySeconds: 15
periodSeconds: 5
failureThreshold: 1