API vs Messaging
Nishant Giri
Enterprise Solution Architect | IIM Calcutta Alumnus | Blockchain & Cloud Expert | A Technology Evangelist having over 18 yrs. of experience in Banking, Insurance, Healthcare, Transportation & in Publishing domain.
To choose among API and messaging is the common decision that developers need to take, here I am presenting various considerations taken into account as asynchronous communication is not the natural way of thinking and having various use cases:
1.??????Experience of team in the asynchronous communication is vital as in this various scenario needs to be handled like you may receive message out of order or receive multiple copies of the message.
2.??????Do we really need asynchronous communication, Architect should consider this question first. Unnecessary one should not make the system complex if there s no business needs as such.
3.??????Do we have long running executions.[Synchrounous way of coomunication having this issue especially if process takes a lot of time to process].
4.??????If you are using cloud provider that are charging based ono the end-to-end execution.
5.??????Non-critical dependencies- Occsionaly our process includes dependencies and non-dependencies. We can omit the non-dependencies steps and group them in the asynchronous mode that way it makes our entire process faster.
?Most of the time to handle complex scenarios based on my heuristics companies prefer to use hybrid mode of API and Messaging both depending on project ecosystem.
?
?