Fact and Fiction
Image By Psyon CC BY-SA 3.0
const puzzleArray = ourPuzzle.toArray(); puzzleArray.forEach(pieceA => { puzzleArray.forEach(pieceB => { if (pieceA.canConnectTo(pieceB)) { pieceA.connect(pieceB); } }); });
*Measured time
and
According to Wikipedia:
A monolith is a geological feature consisting of a single massive stone or rock, such as some mountains, or a single large piece of rock placed as, or within, a monument or building.
-https://en.wikipedia.org/wiki/Monolith
For developers, the term references a single large codebase that runs as a single application. Or we could say a "mountain of code".
I have been thrown into the middle of some fairly complex code to try and fix a problem. This leads to two different outcomes.
You spend a lot of time trying to figure out what everything does and try and understand each process and how it all fits together and hope eventually you will find your way through the code.
You go in and start changing code that looks promising then hope for the best.
Microservices is a specialisation of an implementation approach for service-oriented architectures (SOA) used to build flexible, independently deployable software systems.
- https://en.wikipedia.org/wiki/Microservices
We were working with a stock analyst application.
Here is an example of the steps used:
In this case each step became its own microservice.
Each microservice should be assigned to a team or individual. This has a lot of advantages over everyone being responsible for the entire program.
The advantages normally fall into one of these two reasons.
When building a web application there are two fundamental ways to approach microservices.
The router method is where you use a microservice to handle all of the communications coming in.
This approach has each microservice that provides services directly to the front-end provide their own endpoints.
So should I use microservices on my next project?
Or maybe?
Just because you use have a monolith doesn't mean you can't have some microservices.
One area you should look into is 3rd party APIs.
A real world example.
AirBnB for RVers
Users: Landowners and RVers
Offering: Website(curbnturf.com), Apple & Google Apps
Team Size: 3 (2 devs and 1 UI/UX)
Technologies: Postgres, NodeJS, Angular, Ionic
Hosting: AWS, ElasticBeanstalk, S3, CloudFlare, Lambda
3rd Party Services: HereMaps, AWS Cognito(auth), Converge (Credit Card processing)
Microservice: Search, Location lookup, Photo processing, Payment Gateway Facade