microservices

Microservices authentication

扶醉桌前 提交于 2019-11-29 23:09:21
Context I have multiple services like : User (LDAP or active directory etc...) Billing Planning etc... Authentication I need to connect on my microservices Using OAuth2.0, for beginning, using the standard login / password (I use my own data, and not gettint a third leg server) Problem According to these pictures : Step 1 Step 2 How can I handle access_token control or authorization control, in my other services than authmicroservice ? In order to manage authentication in a microservices architecture, you must have a different point of view. Remember when you worked on a monolith, you had a

Microservice, service registry, API gateway and data sharing

℡╲_俬逩灬. 提交于 2019-11-29 22:31:20
I m actually reading tones of articles concerning microservices architecture, but, it seems that they are dealing the things the easiest way possible, without going deeper in explanations. To explain you my questions, I will show you my actual little architecture : So, here's what I want to use. Before making anything technically, I need more theoretical informations. Description of my domain I have some mobile and browser based customers, able to connect themselves on an application, getting their user informations and able to consult billing informations about what they bought. On a

How to deploy microservices on Heroku

吃可爱长大的小学妹 提交于 2019-11-29 22:29:58
I have read a lot about microservices, and would like to build my app with that approach. What I know so far is that I nead some services like: load balancer - to deal with every request, and push it forward to another services authorization service - to authorize my users database - for my microservices. I would like to use one instance of DB with different schemas for every service. service A - for functionality A service B - for functionality B etc. etc. etc. I found out, that Heroku is interesting place to deploy applications. My problem is that I completely don't understand they ideology.

DB consistency with microservices

梦想的初衷 提交于 2019-11-29 22:17:55
What is the best way to achieve DB consistency in microservice-based systems? At the GOTO in Berlin , Martin Fowler was talking about microservices and one "rule" he mentioned was to keep "per-service" databases, which means that services cannot directly connect to a DB "owned" by another service. This is super-nice and elegant but in practice it becomes a bit tricky. Suppose that you have a few services: a frontend an order-management service a loyalty-program service Now, a customer make a purchase on your frontend, which will call the order management service, which will save everything in

Sharing code and schema between microservices

孤街浪徒 提交于 2019-11-29 20:51:01
If you go for a microservices architecture in your organization, they can share configuration via zookeeper or its equivalent. However, how should the various services share a common db schema? common constants? and common utilities? One way would be to place all the microservices in the same code repository, but that would contradict the decoupling that comes with microservices... Another way would be to have each microservice be completely independent, however that would cause code duplication and data duplication in the separate databases each microservice would have to hold. Yet another

Should I use forever/pm2 within a (Docker) container?

南笙酒味 提交于 2019-11-29 20:46:34
I am refactoring a couple of node.js services. All of them used to start with forever on virtual servers, if the process crashed they just relaunch. Now, moving to containerised and state-less application structures, I think the process should exit and the container should be restarted on a failure. Is that correct? Are there benefits or disadvantages? My take is do not use an in-container process supervisor (forever, pm2) and instead use docker restart policy via the --restart=always (or one of the other flavors of that option). This is more inline with the overall docker philosophy, and

Angular and Micro-Frontends

你离开我真会死。 提交于 2019-11-29 19:11:06
I am doing some research on how to split a huge single-page-monolith into a micro-frontend architecture. The idea: the page consists of several components which would be running autonomously each component is managed by one dev-team each team can change, update and deploy their components without breaking components of other teams each team chooses its own toolstack The reason To efficiently develop large applications you need to have many people working on it. However the number of developers per app/team does not scale well. Parallel development of multiple independent apps by independent

inter micro-service request responds with Forbidden status in spring cloud application

久未见 提交于 2019-11-29 18:17:27
I am investigating microservice architecture. I chose the spring cloud framework. My application shema looks like this: Also I have discovery server eureka but I decided to skip on the picture to simplify it. Full source code of example you can find on githib: https://github.com/gredwhite/spring-cloud Problem explanation: hello world service: @GetMapping("/helloWorld") @HystrixCommand(fallbackMethod = "reliable") public String hello() { return this.restTemplate.getForObject("http://hello-service/hello?name=World", String.class); } hello service: @GetMapping("/hello") public String hello(

Best practice to organize authorization in microservice architecture?

淺唱寂寞╮ 提交于 2019-11-29 18:03:12
问题 For example, I have 3 services: Authentication Seller Buyer Each of them got their own databases, models, services... etc Authentication service knows about users, user-groups, roles, permissions and creates token. Where should I store sellers/buyers entities? On Authentication service, or on Seller/Buyer services? How should Seller/Buyer services interact to create new seller/buyer entity? How should Seller/Buyer services check permissions? Seller and Buyer entities have some common fields:

Send data in Request body using HttpURLConnection

做~自己de王妃 提交于 2019-11-29 17:10:28
问题 I am using HttpURLConnection to make a POST request to a local service deployed in my local created using JAVA Spark. I want to send some data in request body when I make the POST call using the HttpURLConnection but every time the request body in JAVA Spark is null . Below is the code I am using for this Java Spark POST Service Handler post("/", (req, res) -> { System.out.println("Request Body: " + req.body()); return "Hello!!!!"; }); HTTPClass Making the post call `public class