Hi community!
I need some advice on when I should be using a service actions vs API. I see and have heard a lot of different information on when to use them, but my concern is the dependencies, especially when publishing multiple applications.
The issue I have today is that multiple applications (some which are different projects) are calling services from each other. So when project A is ready to be deployed to prod, it is dependent on project B since it is calling a service action which has yet to be deployed to prod (or has been changed). This in turn holds up development for different project teams.
My understanding is that service actions are a weak dependency but not when it comes to that first deployment or when referencing structures which are used in that service. Developers have overcome this by using APIs instead of services actions which then massively increases our AOs and we lose sight of usages!
I feel like my application portfolio is become somewhat a bowl of spaghetti! And I want to set up a proper way o working with microservices before we add new apps.
Wondering if anyone else has a similar issue? Any advise on how the 2 services should be used with the above use case would be appreciated.
Hey @Asha Vadher
My suggestion is to use service actions (If feasible).But you know your project situation very well, I am leaving some documentation links that may help you to make a decision.
Microservices Architecture in OutSystems
Use Services to Expose Functionality
And also there is some similar discussion on community which may help you.
https://www.outsystems.com/forums/discussion/91405/service-action-vs-rest-api-for-microservice-architecture/
I hope this will help you!
Hi,
Service actions only make sense and should be your first choice for decouple integration between two OutSystems applications.
REST API make mostly sense when you want to integrate with external systems, or other OutSystems infrastructures. There are only a handful of edge cases to use REST services for communication between OutSystems applications. These edge cases are mostly related to avoid breaking architectural referencing rules.
Regards,
Daniel