microservices

Micro service security

随声附和 提交于 2019-12-12 08:47:46
问题 Over the last few days I've been playing with the micro service pattern and all is going well but security seems to baffle me. So If I may ask a question: How do I handle user authentication on an individual service? At the moment I pass a request to the Gateway API which in turns connects to the service. Question Edited Please See Below Bearing in mind that the individual services should not know about each other. The Gateway is the aggregator as such. Current architecture. A little code to

Django models across multiple projects/microservices. How to?

∥☆過路亽.° 提交于 2019-12-12 08:34:24
问题 I'm wondering how to solve sharing of the model structure between multiple (separated) django projects/microservices. Eg: Project: API Project: Users dashboard Project: Admin dashboard Project: Statistics Each of that projects uses the same django models. Is there a one, proper way to solve that? 回答1: Django basic idea is to couple the entire app functionality together, but this does not hold in your case. It's a style and opinion question, here is what I did in a similar situation. Split the

Unauthorized in spring boot admin

为君一笑 提交于 2019-12-12 07:35:20
问题 I wanted to control the microservices that are running in the Eureka server. I used spring-boot-admin for this, but I am getting the error on accessing the information about the Trace,Log etc... The error I am getting is Error: {"timestamp":1489052472862,"status":401,"error":"Unauthorized","message":"Full authentication is required to access this resource.","path":"/metrics"} My dependencies are <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator<

How to establish relationships between Spring Data REST / Spring HATEOAS based (micro) services?

余生颓废 提交于 2019-12-12 07:15:23
问题 Trying to figure out a pattern for how to handle relationships when using a hypermedia based microservices based on Spring Data Rest or HATEOAS. If you have service A (Instructor) and Service B (Course) each exist as an a stand alone app. What is the preferred method for establishing a relationship between the two services. In a manner that does not require columns for IDs of the foreign service. It would be possible for each service to have many other services that need to communicate in the

Service fabric more than one communication listener for service remoting

情到浓时终转凉″ 提交于 2019-12-12 06:47:06
问题 I am developing few micro services using Azure Service Fabric. I have some use cases which need the communication between micro services and I read about service remoting https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-services-communication-remoting. I just wanted to know is it possible to support more than one listeners in a SF application. E.g. I have an existing stateless web api SF application which is having a listener like below protected override

Optimized http service invocation with in azure service fabric

不羁岁月 提交于 2019-12-12 03:39:10
问题 I have 2 applications (A1 and A2) hosted in azure service fabric, each application with its own stateless reliable micro-service (S1 and S2). The app A1 depends on S1 and app A2 depends on S2. In addition, S2 service depends on S1. Both S2 and S1 are owin hosted REST api services. When the request for A2 ends up in S2, I need to make a call from S2 to S1. I am trying to figure out the optimized way of doing this. 1) Should I use HttpClient in S2 to call S1? How do I get the resolution for S1

Azure Service Fabric register COM component

久未见 提交于 2019-12-12 01:42:04
问题 We want to deploy a ASP.NET WebApi service to Azure Service Fabric. The service uses a mathematical COM component (32bit) that will be registered on a regular machine with regsvr32. The solution works perfectly on a local Service Fabric cluster (e.g Windows Server 2012 R2). Unfortunately there is no managed dll available for that component and we do not want to rewrite the code all by ourselves. So my question is, can we deploy this service to an Azure hosted Service Fabric? And if yes, how?

Creating a Gateway in JHipster microservice arhitecture without database

[亡魂溺海] 提交于 2019-12-12 01:28:50
问题 I am trying out JHipster based on the supported Microservice architecture. I have created a Registry, Gateway, and a Microservice (based on JWT authentication) as described in documentation and everything works. However I am not sure why a Gateway in JHispter need to have a database. Questions that are still unanswered for me: 1- Why does a Gateway need a database? In which scenarios would you create a Gateway with/without a database? 2- Do the Gateway and Microservice use the same database?

Storing the session token in AWS Lambda function?

社会主义新天地 提交于 2019-12-11 18:06:23
问题 I have a AWS Lambda function which need to talk to an external REST API. The external API needs a session token with every request. I generate session token using client id and secret and then i use the session token with further requests to the external REST API. I am currently storing the session token in mongodb (to persist data during lambda restarts) and retrieving it every time i need it. I think this is not the best way. what is the best / recommended way ? 回答1: The approach you are

How to Auto Scale Microservices in Local server without cloud using JAVA

笑着哭i 提交于 2019-12-11 17:42:14
问题 Hi I am new to the microservices. I have created spring boot(maven) microservices (2 services, 1 gateway and service registry). How can I scale (auto scaling) 2 services without cloud technology. Is it possible in the local configuration? 回答1: I use Docker swarm and this gives me a cloud-like environment where I can upscale or downscale a service very easily. You can read here about using Docker with Spring Boot. There is also this article. P.S. Docker and Docker swarm are free or charge (the