Closed nicolaferraro closed 7 years ago
Hi @nicolaferraro .
What is your idea? Replace the API-Gateway by Camel? Or add another endpoint?
I'm wondering how "heavy" would be this addition, because one of the problems that we face is that helloworld-msa is getting too heavy for ordinary laptops.
@burrsutter Do you want to add any comments?
Hi @rafabene, Camel is suited for building an endpoint, but probably the gateway part is more appropriate here. From a performance point of view nothing will change, since we're going to replace a spring-boot container with another, but I think that the Camel version will contain a lot less code than the current one.
I'd replace the API gateway if people experience performance problems. Wdyt?
It seems to be appropriated and aligned with Red Hat message. I'd like to hear from @burrsutter too.
@nicolaferraro Do you think that the integration with ZipKin and OpenTracing will continue to work? The PR https://github.com/redhat-helloworld-msa/helloworld-msa/pull/24 is about moving Helloworld-MSA to OpenTracing.
@rafabene Camel supports Zipkin in current version and a new component for Opentracing is coming with next major release (2.19.0, will be released in less than 2 months).
For what I see in the other repos, you still use the brave (Zipkin related) instrumentation into the microservices to send spans to the http endpoints of both Zipkin and Hawkular. So you're still not using a pure opentracing implementation. Anyway, since Camel uses the spring-boot http server to receive incoming requests and common libraries (e.g. apache http client) to call other services, Zipkin and Opentracing can be enabled also at spring-boot level.
I've already done some work here: https://github.com/nicolaferraro/api-gateway/tree/master/src/main/java/com/redhat/developers/msa/api_gateway.
There's already support for Hystrix, Swagger and Zipkin (http, so also Hawkular should work). Zipkin is currently configured at spring-boot level, but I plan to use the Camel component directly, so we can later use the opentracing instrumentation by just switching the libs camel-zipkin
-> camel-opentracing
.
For the blue/green demo, where you change the code of the api-gateway
to append a static text to the responses (I refer to: https://www.youtube.com/watch?v=Sqa-RXvqKuk), sure, that can be done with a simple transformation in the route definition, something like .transform().body(b -> "Version 2 - " + b)
(that was asked by @burrsutter).
I really liked the code. I'll be happy to merge this PR/work once you feel confortable to send it.
Can you also please update the documentation for Blue/Green? https://github.com/redhat-helloworld-msa/helloworld-msa/blob/master/deployments.adoc#bluegreen-deployment-using-routes
Thank you
Hi @rafabene, I hope to find some time later (or tomorrow) to complete it. I wanted to try that changes to Zipkin and do some more tests on Hystrix timeouts during recovery.
I'll update the doc, sure. And I need to change the endpoint for the api gateway in the UI. It was /api
, but to use that endpoint in Camel I should have registered the Camel servlet at the root (/*
) endpoint, preventing other spring-boot features to work (eg. Actuator for health checks). I used the /api/ciao
endpoint in the new gateway :)
(so, binding camel to the /api/*
path).
IMHO I don't think we should use /api/ciao as it translates to "bye". We have the Goodbye demo ( https://github.com/redhat-helloworld-msa/goodbye ) that shows how to fail in microservices. To avoid confusion could we use something like /api/gateway ? Thank you.
@rafabene I've added 3 related PRs in different projects.
Nicola. I have tested and merged your 3 PRs. The only thing that needs more work is the Swagger endpoint, which has a hardecoded server URL and it doesn't work when we change the router hostname.
Thank you for your contribution.
On Mon, Mar 13, 2017 at 8:58 AM, Nicola Ferraro notifications@github.com wrote:
@rafabene https://github.com/rafabene I've added 3 related PRs in different projects.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/redhat-helloworld-msa/helloworld-msa/issues/25#issuecomment-286099659, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB1s2ELfehljKxfBAnrItqx53Mf7Kjnks5rlT1zgaJpZM4MOHba .
-- Rafael Benevides | Senior Product Manager Director of Developer Experience Follow me at Twitter: @rafabene https://twitter.com/rafabene M: +1-407-401-3555 Register today at https://developers.redhat.com/
Btw Nicola. Don't you plan to write a blog post about it?
On Thu, Mar 23, 2017 at 5:12 PM, Rafael Benevides benevides@redhat.com wrote:
Nicola. I have tested and merged your 3 PRs. The only thing that needs more work is the Swagger endpoint, which has a hardecoded server URL and it doesn't work when we change the router hostname.
Thank you for your contribution.
On Mon, Mar 13, 2017 at 8:58 AM, Nicola Ferraro notifications@github.com wrote:
@rafabene https://github.com/rafabene I've added 3 related PRs in different projects.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/redhat-helloworld-msa/helloworld-msa/issues/25#issuecomment-286099659, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB1s2ELfehljKxfBAnrItqx53Mf7Kjnks5rlT1zgaJpZM4MOHba .
-- Rafael Benevides | Senior Product Manager Director of Developer Experience Follow me at Twitter: @rafabene https://twitter.com/rafabene M: +1-407-401-3555 <(407)%20401-3555> Register today at https://developers.redhat.com/
-- Rafael Benevides | Senior Product Manager Director of Developer Experience Follow me at Twitter: @rafabene https://twitter.com/rafabene M: +1-407-401-3555 Register today at https://developers.redhat.com/
Building microservices with Apache Camel has been made super-easy in recent times: Spring-boot starters, service call EIP, ribbon, hystrix, zipkin, etc.
Camel is also the basis of JBoss Fuse Integration Services 2.0 (a.k.a. integration microservices on top of Openshift).
We think that a Camel microservice should be included in the Red Hat helloworld msa.
If you agree, I can work on it.