microservices

What is best practice to communicate between React components and services?

别说谁变了你拦得住时间么 提交于 2019-12-05 03:32:45
问题 Instead of using flux/redux architecture, how react components should communicate with services? For example: There is a container having few representational (react) components: ChatBox - enables to read/write messages AvatarBox with password changer - which enables to change user's password News stream - lists news and apply filter to them Thinking of them as resources representation, I want each of them to access Microservice API by itself (getting or updating data). Is this correct? It

What is the difference between an API-Gateway and an Edge Service?

穿精又带淫゛_ 提交于 2019-12-05 03:02:22
I understand the concept behind an API gateway as described by Richardson: http://microservices.io/patterns/apigateway.html But what is the difference to an Edge service. Is this a concrete implementation of the API gateway pattern? Technically, an API Gateway is the API exposed to the public (REST, etc.), and an Edge Service is a service running on the API resolving the proxying, routing, etc. There could be many edge services on the Gateway. But practically there is usually only one service, logic, on the Gateway thus API Gateway = Edge Service. 来源: https://stackoverflow.com/questions

Event publisher for ASP.NET Web Api

巧了我就是萌 提交于 2019-12-05 01:19:33
问题 I have started to work with micro-services and I need to create an event publishing mechanism. I plan to use Amazon SQS. The idea is quite simple. I store events in the database in the same transaction as aggregates. If user would change his email, event UserChangedEmail will be stored in the database. I also have event handler, such as UserChangedEmailHandler , which will (in this case) be responsible to publish this event to SQS queue, so other services can know that user changed email. My

Should instances of a horizontally scaled microservice share DB?

人走茶凉 提交于 2019-12-05 00:49:29
问题 Given a microservice that owns a relational database and needs to scale horizontally, I see two approaches to provisioning of the database server: provide each instance of the service with it's own DB server instance with a coupled process lifecycle OR have the instances connect to a shared (by identical instances of the same service) independent db server or cluster With an event driven architecture and the former approach, each instance of the microservice would need to process each event

org.glassfish.jersey.server.model.ModelValidationException: Validation of the application resource model has failed during application initialization

萝らか妹 提交于 2019-12-04 19:43:02
I'm developing spring boot microservices example from the link: https://dzone.com/articles/spring-boot-creating . In this project I simply updated the parent dependency to its latest version and other code files are unchanged. I faced the following error when I click http://localhost:8080/order?idCustomer=2&idProduct=3&amount=4 2016-09-09 11:46:20.888 ERROR 14152 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : StandardWrapper.Throwable org.glassfish.jersey.server.model.ModelValidationException: Validation of the application resource model has failed during application initialization

Microservices async operation HTTP response

a 夏天 提交于 2019-12-04 19:35:52
We're building a microservice app where clients can create projects . The following diagram shows the technical flow of this process: My question: what HTTP response should the API gateway return to the client (step 1.)? My initial idea was to give back a 202, but the problem there is that I don't know the Location yet ( /projects/{id} ), because the id of the project will be created at the Project Management Service. Considering that the IDs of the newly created project entity is not known at the request time (i.e. it is generated after the insertion into the database) you indeed cannot

Hystrix and Turbine does not work with Spring boot 2 and Spring cloud Finchley.M8

拈花ヽ惹草 提交于 2019-12-04 17:40:56
I tried turbine + hystrix dashboard with Spring boot 2 and latest versions of Spring cloud, seems exist some problem and turbine could not get stream from reactive service. I just uploaded simple microservices to github https://github.com/armdev/reactive-spring-cloud Exception like this: com.netflix.turbine.monitor.instance.InstanceMonitor$MisconfiguredHostException: [{"timestamp":"2018-03-08T17:22:05.809+0000","status":404,"error":"Not Found","message":"No message available","path":"/hystrix.stream"}] at com.netflix.turbine.monitor.instance.InstanceMonitor.init(InstanceMonitor.java:318) ~

How to achieve immediate consistency in microservice architecture?

你。 提交于 2019-12-04 16:33:31
For example amazon.com; they rely on microservice architecture and probably order and payment are seperate micro services but when you checkout order on amazon.com you can finally see the order id and details.If it's not eventual consistency approach what is it? Maybe 2PC? I'm generalizing my question; what if eventual consistency is not appropriate for business transaction(end user should see the result end of transaction) but seperate microservices is meaningful(like order and payment) how to handle immediate consistency? There are several techniques which can provide cross-service

Microservices - how to solve security and user authentication?

断了今生、忘了曾经 提交于 2019-12-04 14:56:47
There is a lot of discussion about microservice architecture. What I am missing - or maybe what I did not yet understand is, how to solve the issue of security and user authentication? For example: I develop a microservice which provides a Rest Service interface to a workflow engine. The engine is based on JEE and runs on application servers like GlassFish or Wildfly. One of the core concepts of the workflow engine is, that each call is user centric. This means depending of the role and access level of the current user, the workflow engine produces individual results (e.g. a user-centric

Implementing authentication and authorization using Zuul Proxy, Oauth2 on REST Microservices

喜夏-厌秋 提交于 2019-12-04 14:32:41
问题 I am trying to implement the above architecture in the workflow with Spring Boot. Web client makes a request to Resource Server (Microservices Endpoints) through Zuul Proxy. Zuul Proxy redirects to oauth2 server for authentication. Oauth2 redirects to Zuul Proxy if the request is authenticated or not. If not authenticated, Zuul redirects Web client with an unauthenticated response. If Authenticated, Zull proxy redirects to the requested microservice endpoint. Microservice endpoint checks if