Microservices: how to handle foreign key relationships

It is possible to use a shared database for multiple microservices. You can find the patterns for data management of microservices in this link: http://microservices.io/patterns/data/database-per-service.html. By the way, it is a very useful blog for microservices architecture. In your case, you prefer to use database per service pattern. This make microservices more autonomous. In this … Read more

What is the role of Zookeeper vs Eureka for microservices?

I am going to implement the orchestration of a set of microservices in my application. This is a hard problem to solve by yourself. You are probably better off using an existing orchestration system (see below). Is there any other powerful tool? You should look into kubernetes, which seems to be the standard in orchestration … Read more

Reactive Programming Advantages/Disadvantages

Well, Reactive Programming means you are doing all your IO bound tasks such as network calls asynchronously. For an instance say your application calls an external REST API or a database, you can do that invocation asynchronously. If you do so your current thread does not block. You can serve lots of requests by merely … Read more

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

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 should operate very similarly to in-container process supervision since docker containers start running very quickly. … Read more

Communication between two microservices

I’m not sure if what I am going to answer is thé right way. I’m still learning myself.. But I can tell you how I’ve implemented my microservices attempts.. First, I started with HTTP communication based microservices using this blog. This works fine, but the problem is, that you create dependendies between your services. Service … Read more

What is Upstream and Downstream services in a microservices based architecture?

Definition 1: The direction of action Upstream: receiving requests from / sending responses to A service upstream is calling me. Downstream: making requests to / receiving responses from I am calling a service downstream. Definition 2: The direction of dependency Upstream: making requests to / receiving responses from I am calling a service upstream. Downstream: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)