3 581
مشترکین
اطلاعاتی وجود ندارد24 ساعت
-37 روز
-530 روز
آرشیو پست ها
Follow the Java Express Academy channel on WhatsApp: https://whatsapp.com/channel/0029Va6Sa3xLY6d1kj3VrO1v
Building microservices isn’t easy.
Even in the best of times, you might end up in a mess.
But if you have to still build them, it’s better to know some microservices patterns that can make your life easy.
Here are 4 must-know patterns for building microservices:
✅ Database per service
- In this pattern, each microservice manages its own data.
- This means that no other service can access that data directly.
- Communication or exchange of data can only happen through the owner service.
- The success of this pattern depends on how well you’ve defined the bounded context of your application.
✅ Shared Database
- Avoid this pattern as much as possible
- But sometimes, it’s the only viable option to incrementally move to a microservice architecture.
- This approach is lenient in the sense that multiple services use a shared database.
- However, it creates a bigger impact surface and chances of run-time issues.
✅ API Composition
- This pattern tries to solve the problem of implementing complex queries in a microservices architecture.
- An API Composer invokes other services in the required order.
- After fetching the results, it performs an in-memory join of the data before returning it to the caller.
- This is an inefficient approach due to in-memory joins on potentially large datasets.
✅ CQRS + Event Sourcing
- Next, we have CQRS
- It can help get around the issues with the API Composition Pattern.
- An application listens to domain events from other services and updates a separate query database. This makes it easy to serve complex aggregation queries.
- CQRS can also be combined with Event Sourcing where you store the state of the entity (aggregate) as a sequence of events.
- Of course, this pattern can sometimes be unfamiliar to the developers.
At the end of the day, no pattern is perfect.
Understand the trade-offs with each pattern and choose what works for your system.
Docker Commands Cheat Sheet 🐳👨💻
As Docker continues to grow in popularity, it's important for developers and ops engineers to know the key Docker commands.
This cheat sheet focuses on commands for:
• Images - docker build, pull, push
• Containers - docker run, start, stop, restart, logs
• Networks - docker network create, connect
• Volumes - docker volume create
• Services - docker service create, logs
• Cleanup - docker system prune
With these Docker commands, you'll be able to:
• Build and share container images
• Launch and manage running containers
• Network and persist data with volumes
• Define and scale services across multiple containers
• Clean up unused resources
How to improve API Performance
https://whatsapp.com/channel/0029Va6Sa3xLY6d1kj3VrO1v/108
Monolithic vs Microservices vs Ntier Architecture Styles
https://whatsapp.com/channel/0029Va6Sa3xLY6d1kj3VrO1v/106
Networking Protocols
https://whatsapp.com/channel/0029Va6Sa3xLY6d1kj3VrO1v/104
