microservices

Orchestrating microservices

≡放荡痞女 提交于 2019-11-27 05:43:35
What is the standard pattern of orchestrating microservices? If a microservice only knows about its own domain, but there is a flow of data that requires that multiple services interact in some manner, what's the way to go about it? Let's say we have something like this: Invoicing Shipment And for the sake of the argument, let's say that once an an order has been shipped, the invoice should be created. Somewhere, someone presses a button in a GUI, "I'm done, let's do this!" In a classic monolith service architecture, I'd say that there is either an ESB handling this, or the Shipment service

Eureka service discovery without Spring-boot

大憨熊 提交于 2019-11-27 04:32:16
问题 I have written a spring boot micro-service and a REST client. The client is a part of another module and make RESTful calls to the micro-service. The micro-service registers with the Eureka registry and I want my client (Which is not a spring boot project) to use the Eureka to query and get the service endpoints. My problem is since the client is not a Spring-Boot applications I can not use the annotations like @SpringBootApplication , @EnableDiscoveryClient and the DiscoveryClient is not get

Customizing Zuul Exception

时间秒杀一切 提交于 2019-11-27 04:25:09
I have a scenario in Zuul where the service that the URL is routed too might be down . So the reponse body gets thrown with 500 HTTP Status and ZuulException in the JSON body response. { "timestamp": 1459973637928, "status": 500, "error": "Internal Server Error", "exception": "com.netflix.zuul.exception.ZuulException", "message": "Forwarding error" } All I want to do is to customise or remove the JSON response and maybe change the HTTP status Code. I tried to create a exception Handler with @ControllerAdvice but the exception is not grabbed by the handler. UPDATES: So I extended the Zuul

Using Zuul as an authentication gateway

元气小坏坏 提交于 2019-11-27 00:02:46
问题 Background I want to implement the design presented in this article. It can be summarised by the diagram below: The client first authenticate with the IDP (OpenID Connect/OAuth2) The IDP returns an access token (opaque token with no user info) The client makes a call through the API gateway use the access token in the Authorization header The API gateway makes a request to the IDP with the Access Token The IDP verifies that the Access Token is valid and returns user information in JSON format

Reactive Programming Advantages/Disadvantages

人走茶凉 提交于 2019-11-26 19:44:42
问题 I keep studying and trying Reactive Style of coding using Reactor and RxJava. I do understand that reactive coding makes better utilization of CPU compared to single threaded execution. Is there any concrete comparison between reactive programming vs imperative programming in web based applications? How much is the performance gain, throughput I achieve by using reactive programming over non-reactive programming? Also what are the advantages and disadvantages of Reactive Programming? Is there

Why do I need to deploy a “default” app before I can deploy multiple services in GAE?

China☆狼群 提交于 2019-11-26 19:12:24
Reading this doc it says "You must initially deploy a version of your app to the default service before you can create and deploy subsequent services." I don't understand this because I thought the GAE microservices were separate things as in: But it seems this is not an accurate depiction of how GAE microservices work? Is there like a master controller "default" service that sets top level config or does some kind of routing? If I'm just running a bunch of non web apps (meaning apps that wil run on a scheduled and process data) and a frontend "app" for accepting web requests isn't necessary

Eureka and Kubernetes

一世执手 提交于 2019-11-26 17:35:14
问题 I am putting together a proof of concept to help identify gotchas using Spring Boot/Netflix OSS and Kubernetes together. This is also to proove out related technologies such as Prometheus and Graphana. I have a Eureka service setup which is starting with no trouble within my Kubernetes clouster. This is named discovery and has been given the name "discovery-1551420162-iyz2c" when added to K8 using kubectl run discovery --image=xyz/discovery-microservice --replicas=1 --port=8761 For my config

Customizing Zuul Exception

雨燕双飞 提交于 2019-11-26 17:28:19
问题 I have a scenario in Zuul where the service that the URL is routed too might be down . So the reponse body gets thrown with 500 HTTP Status and ZuulException in the JSON body response. { "timestamp": 1459973637928, "status": 500, "error": "Internal Server Error", "exception": "com.netflix.zuul.exception.ZuulException", "message": "Forwarding error" } All I want to do is to customise or remove the JSON response and maybe change the HTTP status Code. I tried to create a exception Handler with

Microservices vs Monolithic Architecture [closed]

帅比萌擦擦* 提交于 2019-11-26 15:00:49
问题 I did some reading about microservices, and I'm little bit intrigued.Seems like it is interesting concept. But I wonder, what are advantages and disadvantages using microservices over monolithic architecture, and vice versa. When microservices suitable better, and where better to go with monolithic architecture. 回答1: While I'm relatively new to the microservices world, I'll try to answer your question as complete as possible. When you use the microservices architecture, you will have

DB design for microservice architecture [closed]

北战南征 提交于 2019-11-26 14:07:49
问题 I am planning to use the Microservices architecture for the implementation of our website. I wanted to know if it is right to share databases between services or if it is preferable to have a separate database for each service. In this regard, can I consider having one common database for all services or does it violate the very essence of Microservice architecture ? 回答1: Microservices offers decoupling . You must break down your application into independent domains. Each domain can have a DB