Anonymous Asked in Cars &Transportation · 2 weeks ago

Should microservices share common code?

The general guideline in microservices is to not share code. Things that can be shared are libraries that don't changed very often like US States, color, etc. To answer your question what about the code for the communication between the microservices , I would say not to share this code. 18 нояб. 2017 г.


Should microservices share code repositories?

A particular team needs to take the ownership and governance of the library and its code repository. One of the main limitations of this approach is that the Microservices should share the same programming language and platform to reuse the libraries effectively.

How do you use common code in microservices?

Sharing Code Between Microservices1Sharing common code between our microservices while keeping our code DRY.2Avoiding coupling through shared-libs which eliminates the advantages of separating development process.3Enable simple changes and sync to the code we share between our microservices.How to Share and Sync Code Between Microservices - DZone

Should microservices talk to each other directly?

If possible, never depend on synchronous communication (request/response) between multiple microservices, not even for queries. The goal of each microservice is to be autonomous and available to the client consumer, even if the other services that are part of the end-to-end application are down or unhealthy.

Why microservices should not share database?

Microservices with shared databases can't easily scale. Changes related to the database could impact multiple services. Besides, microservices won't be independent in terms of development and deployment as they connect to and operate on the same database.

Related Questions

Relevance
Write us your question, the answer will be received in 24 hours