A lightning talk is a brief informal gathering where colleagues exchange ideas, hacks, and best practices. At Amphinicy we have introduced this type of meeting to ignite conversation between teams and help each other in our everyday tasks.
The second lightning talk was delivered by Ivana Barić Ćurko, a solutions architect at Amphinicy. Ivana spoke about the distributed monolith problem. This is what she has shared with us:
"Distributed monolith is a problem. It happened to our team when we were introducing micro-services to replace the complex monolith architecture on one project for the client. In our case, the problem was that all the services were tightly coupled and needed to be updated in each release. This decreased our productivity."
"In the distributed monolith example on the image above, there's a pitfall: changing database requires changes of all services working with the terminal database object. Since both services are writing directly to the same database table, due to Service A changes, Service B needs to be changed and redeployed in production."
"To solve the problem, in the micro-services design example on the image above, we have introduced Service C which acts as a gatekeeper for the data storage. All requests -from and -to the data storage must go through it. In this case, the development and deployment of each service are independent of other services.
To summarize, the good practice is to use API (gRPC or other) to access service data. This can bring benefits:
Keeping backward compatibility - Service C has version 1 (V1) API serving Service B and version 2 (V2) API serving Service A
Lighter and easier development and deployment - in the second example, redeployed services are only Service A and C
This is only one example of the tight coupling of services. Others were not covered here."
Ivana Barić Ćurko is a solutions architect for satellite and ground solutions with 15+ years of expertise in software development, satellite solutions, and managing teams. If you liked this article maybe you would like to check out Ivana's overview of behavior-driven development.