-
Notifications
You must be signed in to change notification settings - Fork 63
Home
Welcome to the microprofile-fault-tolerance wiki! Some future discussions:
On Thursday, May 25, 2017 at 2:44:43 PM UTC-7, [email protected] wrote: Ok, I'm beginning to see the syntax. I feel there needs to be more of a description about the workflow a method is invoking, and this has only increased given the service mesh for micro services announcement by Google, IBM, and Lyft, with support from Red Hat and others:
A question is how the MicroProfile effort fits into a service mesh architecture? I can see both externalization of fault-tolerance and injection of either policies or service proxies needing to be supported. ...
and here is another based on some type of injection of service proxies that are registered with the mesh: public class MyAbstractGateway { @ServiceReference(name="dbResults", endpoint = "/books") WebTarget dbResults;
@Asynchronous
@ServiceReference(name="images", endpoint = "/books/images")
WebTarget images;
@ServiceReference(name="reviews", endpoint = "/books/reviews")
WebTarget reviews;
@Workflow(
name = "display-book-info",
services = {
@ServiceReference(name="dbResults", endpoint = "/books"),
@ServiceReference(name="images", endpoint = "/books/images"),
@ServiceReference(name="reviews", endpoint = "/books/reviews")
}
)
@GET
@Path("frontend-gateway")
@Produces("application/json")
public String myGatewayMethod() {
dbResults.request().get(...);
return null;
}
}
public class MyAbstractGateway { @Retry(maxRetries=3, delay=1)
@ServiceReference(name="dbResults", endpoint = "/books")
WebTarget dbResults;
@Asynchronous
@CircuitBreaker(delay = 5, delayUnit = ChronoUnit.SECONDS)
@ServiceReference(name="images", endpoint = "/books/images")
WebTarget images;
@Retry(maxRetries=3, delay=1)
@ServiceReference(name="reviews", endpoint = "/books/reviews")
WebTarget reviews;