microservices

Spring Boot Application - what is default timeout for any rest API endpoint or a easy config to control all endpoint timeout

不想你离开。 提交于 2019-11-27 18:31:48
问题 I am using current Spring boot version (1.4.x) and wondering if it has any default timeout for api calls. I have tested it by putting breakpoints but it was keep waiting and didn't time-out. I was also trying to configure default timeout for all my spring-boot apps by using some annotation or yml settings. I found couple of alternatives (one of them here) but using callable actually adding extra non-business logic code where setting something in xml bean is out of fashion in latest spring

Transactions across REST microservices?

主宰稳场 提交于 2019-11-27 16:33:53
Let's say we have a User, Wallet REST microservices and an API gateway that glues things together. When Bob registers on our website, our API gateway needs to create a user through the User microservice and a wallet through the Wallet microservice. Now here are a few scenarios where things could go wrong: User Bob creation fails: that's OK, we just return an error message to the Bob. We're using SQL transactions so no one ever saw Bob in the system. Everything's good :) User Bob is created but before our Wallet can be created, our API gateway hard crashes. We now have a User with no wallet

Enabling session in lumen framework

戏子无情 提交于 2019-11-27 15:03:41
问题 I have two (but let's image more) micro-services (API) which need to be aware of authenticated user. Ideally I would simple like to resume their sessions. All micro-services are using same storage for sessions: redis. All API calls will have Cookie header, so all services will be able to resume sessions based on that cookie. I have successfully implemented this via PHP $_SESSIONs. Now the question: how would you go about implementing this with Laravel/Lumen? 回答1: The accepted answer is

Parent pom and microservices

纵饮孤独 提交于 2019-11-27 14:43:09
问题 We have several projects that are microservices, every project is independent (running on separate spring boot server, exposing rest services, using separate DB schema...) We use maven to manage the dependencies. Is it a good idea to have a parent pom declaring each microservices as modules? And so helping to manage the common dependencies (like the lib servlet-api witch is used in every project, to remove it of all of them and declare it in only the parent pom) 回答1: The 'problem' with a

Microservices with shared database? using multiple ORM's?

霸气de小男生 提交于 2019-11-27 12:22:37
I'm learning about microservices and I'm gonna build a project with a microservices architecture. The thing is, one of my team mates want to use one database for all services, sharing all tables so "data doesn't get repeated", each service would be built with different frameworks and languages like django and rails which use very different ORM standards. What would be the correct approach? Since I think working with one database would involve a lot of "hacking" the ORMs in order to make them work correctly. You are not likely to benefit from a Microservices architecture if all the services

Microservices vs Monolithic Architecture [closed]

感情迁移 提交于 2019-11-27 10:06:40
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. Kaj 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 increased decoupling and separation of concerns. Since you are litteraly splitting up your application. This

Microservice Authentication strategy

非 Y 不嫁゛ 提交于 2019-11-27 10:01:25
I'm having a hard time choosing a decent/secure authentication strategy for a microservice architecture. The only SO post I found on the topic is this one: Single Sign-On in Microservice Architecture My idea here is to have in each service (eg. authentication, messaging, notification, profile etc.) a unique reference to each user (quite logically then his user_id ) and the possibility to get the current user's id if logged in. From my researches, I see there are two possible strategies: 1. Shared architecture In this strategy, the authentication app is one service among other. But each service

Microservices – best practices to retrieve the related data to specific user from the other micro services with the minimal memory/time loss

三世轮回 提交于 2019-11-27 09:53:47
I am trying to create a microservice architecture using Lumen / Laravel Passport . I have a multiple dockerized services, which all run as an separate Lumen app container in different VMs: API Gateway service (integrated with Laravel Passport for authentication & request validation to further proceeding) Chat Service (service for messaging/chat rooms) News Service … (and many other services) All of this services has it’s own separated Redis/MySQL databases e.t.c. In monolithic application, for example, there was a User table in the database, there was the relations between the tables and so

DB design for microservice architecture [closed]

余生颓废 提交于 2019-11-27 08:41:16
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 ? Nitish Bhardwaj Microservices offers decoupling . You must break down your application into independent domains. Each domain can have a DB. In case other MS needs to access data owned by some other microservices, they have to

How to get docker toolbox to work with .net core 2.0 project

安稳与你 提交于 2019-11-27 06:34:15
I'm getting an error trying to use the Docker functionality with my .NET core 2.0 project. I've been getting an error message saying Visual Studio Container Tools requires Docker to be running before building, debugging or running a containerized project. For more info, please see: http://aka.ms/DockerToolsTroubleshooting I followed the link, and upon realizing I have Windows 10 Home x64, and had to install Docker Toolbox, instead of Docker For Windows. Now it installed this executable called Docker Quickstart Terminal Is this the way one is supposed to start up that docker services? I have