Reputation: 3527
I'm struggling in what would be a better approach for a project I'm working on. I'm working on a micro-service based SaaS where I have several services for some functionality, each one with its own REST APIs. My dilemma right now is whether to:
Thoughts?
Thanks
Upvotes: 1
Views: 948
Reputation: 3962
Here are some considerations:
Security. If your micro services are data-oriented (as they should be) do they know about end-user accounts and implement necessary checks? If you are going to call them via AJAX directly, they must be secured.
Performance. To get good performance, microservices must be called in parallel. Does your client architecture support that?
Service locator. What do you use to locate service instances, do healthcheck and failover? Usually all that is too complex to be used directly from javascript.
API. Think about cost of maintaining backward compatibility for multiple small all-around APIs vs single application-specific API.
I'm not saying that you should go and create Gateway. Because not creating gateway is less code and less APIs. You should weight everything and decide for yourself.
Upvotes: 1