How to implement microservices [Node.js]?
I am new to this, what is a best approach to implement microservices?
I found fw like
seneca but it is little bit confusing…
Is there any tut how to create jwt auth, mongodb and other staff in microservices?
2 Solutions collect form web for “How to implement microservices [Node.js]?”
Take a look on Docker.
docker-compose you can play with several services with an easy integration without worrying about the IP addresses to connect them.
Also if you add
nginx to your stack, it’s gonna be very easy to scale those services, there are several videos and tutorials that you can lookup to help you get started.
I’ve heard about
seneca, but I haven’t used, I think you shouldn’t depend on a specific framework because one of the ideas behind of Microservices is the low coupling.
To make the jump into the real micro-services world is not trivial. It’s not about plumbing some APIs, but a radical change in architecture thinking that, well, at the beginning will make you a bit uncomfortable (e.g. every service with its own database) 🙂
The best book I have read so far about micro-services is The Tao of Microservices, by Richard Rodger the author of Seneca himself. It exposes very well the shift from monolithic and object-oriented software towards micro-services.
I have personally struggled a bit with Seneca because of the average quality of documentation (inconsistencies, etc…). I would rather recommend Hemera, which took its inspiration from the message-pattern approach from Seneca, but is better documented and much more production-ready.