Important Principles with creating microservices
Important Principles with creating microservices...
https://dzone.com/storage/assets/3259596-dzonerefcardz-gettingstartedmicroservices.pdf
both architectures: a monolith one and microservices should be designed following good software architecture principles. So before our BIG EXCHANGE from old architecture to microservices we must consider following principles:
1. Separate your concerns.
Use MVC and well-defined APIs for high cohesion and low coupling.
2. Use Convention over Configuration (CoC).
Keep configuration to a minimum by using or establishing conventions.
3. Follow the Law of Demeter. Each unit should have only limited knowledge about other units: only units "closely" related to the current unit. Each unit should only talk to its friends.
Do not talk to strangers! Only talk to your immediate friends.
4. Use Domain-Driven Design.
Keep objects related to a domain/component together.
5. Focus on Automation.
Automate testing and fully automated deployment pipeline.
6. Design to Interfaces / APIs.
Classes shouldn’t call other classes directly just because they happen to be in the same archive. Such group of friendship could be later one microservice...
7. Group code by functionality, not by layer.
Monoliths usually have a layered architecture, and it’s common to group classes by layer. Instead you should break up your code into packages separated by functionalities to allow easier splitting into future microservices. It also makes easier to see the dependencies between your future microservices.
8. Make your code stateless and externalize your application’s state.
One cannot rely on static variables or global variables as the source of your application’s state. Use external data sources such as key-values stores or databases to maintain state.
Known problems:
- Sharing
- Asynchronicity
- Security
- Simplicity
- Evolution
- Health
How can we create a docker image?
Fast...
from dockerfile.
Where can we create a docker image from dockerfile?
On AWS.
Ready, steady, go!
The docker container with 3 main "beasts": Java, Tomcat and Alpine/Centos Linux... - very useful information we can read at:
No comments:
Post a Comment