5 ms·
You can actually use microservices to reduce the complexity of a monolith. One example which I built just for this purpose is Barricade https://github.com/purt
by ianpurton 4y ago
You can actually use microservices to reduce the complexity of a monolith.
One example which I built just for this purpose is Barricade https://github.com/purton-tech/barricade https://github.com/purton-tech/barricade which extracts authentication out of your app and into a container.
- bvrmn 4y agoAuthentication is a very simple part and doesn't add complexity. Every platform has a plethora of libraries to deal with anything. Authorization is a real deal.
- ianpurton 4y agoThere are libraries but you still have to integrate them into a front end whilst being aware of any security issues. Those libraries generally come with lots of dependencies so splitting out the front end and back end auth code into a container can reduce the complexity of your main app and is a nice separation of concerns in my opinion.
- bvrmn 4y agoBut you solution requires architectural decisions. Like fixed DB. For example main app uses Mongo. And now it must be integrated with PG. I choose orthogonal set of primitives as a library any day. Frameworks and more so 3d-party services are too rigid and can contain hidden maintenance cost regarding flexibility. For example, it seems barricade doesn't support TOTP or SMS. What should I do as a backend developer?
- ianpurton 4y agoAgreed Barricade is a Postgres solution so may not fit if you are already using Mongo. Barricade supports OTP via email. TOTP is on the road map.
- hamandcheese 4y agoAnd best of luck to anyone attempting to extract authorization to a microservice in a way that doesn't create new problems.
- mirekrusin 4y agoAuthentication/sso, logging, metrics, persisted data stores (ie. sql server), caches (ie. redis), events, workflows and few others are all well known, understood, isolated behaviors with good implementations that doesn't need to be embedded/reinvented - it can and in many cases should run separately to your core service/s. It doesn't imply microservices in any way.
- rozularen 4y agoI'd argue the exact opposite and would say it's the perfect example of mixroservices architecture. you'd have one instance for your auth token generator, one for the gateway, one for the dashboard, and so on
- mbrodersen 4y agoNope. Microservices are guaranteed to be more complex than an equivalent monolith. It constantly blows my mind that it isn’t obvious to some developers. A distributed system (microservices) is always more complex than a non-distributed system (monolith).