New pattern to detect in AI Mentor Studio: calling REST/SOAP from Service Action
239
Views
4
Comments
New
Architecture & Governance 

This idea is about adding the detection a pattern of developers calling a REST or SOAP api method from a Service Action.

REST / SOAP services are already a loosely coupled services, and there is no need to wrap them in a Service Action, which only results in two times the latency, without any additional benefit.

2015-05-05 17-20-51
João Santos

Hi Daniel,
What if the service action does other things beyond calling the SOAP / REST API method?
Also, weak references allow for smaller deployments. I understand the performance tradeoff, but as with any tradeoff, it can have a different selection depending on the context, right?

Hi João that point has been raised by others too. I still believe abstraction in this case to a server action makes more sense.

If I replace "Service Action" with "REST API Method" and write:

"Calling a REST API method from another REST API method because it makes a better loosely coupled architecture" 

then I guess nobody will say "he that is a good idea".  And that is what is when you call a REST API method from a Service action.  

Furthermore abstracting external integrations happen in the foundation layer, I would expect Service Actions more practical in the core service layer.

2015-05-05 17-20-51
João Santos

Interesting. 
I understand that the foundation layer should contain libraries, and libraries cannot have service actions. Do you agree with this perspective, and does it work in practice?

yes