Hi All,
I could would like to your opinion on the two different approach which we drafted. Need to understand the pros and cons
Approach1:
We are creating one webapi and based on the path parameter it will be routed to respective Handler(expression rule)and the handler will respond back
Question:
1. Creating One web-API /per http method ,will it create high load to Web-api which will in turn make 503 exception(timeout) on prod?
Approach 2:
Creating a Web-API /per Package and which in turn as respective handler (expression rule ) for the response
1)desired approach to solve the needful?
2)Pros and cons on Approach 1 over the Approach 2?
Thanks in advance!
Discussion posts and replies are publicly visible
Both will work to meet your use case.
The pros of having one API object for each method is that you can separately secure each method with different security. If you put everything in one endpoint then you can only secure that one endpoint using group security. Also, if each method has a different request type (GET, PUT) then you will need a separate object for each.
If your logic is simple, I think having one web API object could add simplicity to your application. Otherwise, create multiple objects.
The Logic is simple, as just route it to respective handler based on the path parameter ,Will it be a high load for the appian engine to push all request to one webapi? Comparing creating individual web api for the handlers.
Considering it as on-presmise version (prod)
I wouldn't expect it to make much of a difference load-wise even if they are going through one API. How much load are you expecting on this API?
We just have implemented the approach no. 1. You have to consider if the called handler is an expression rule or if it has to be a process model. With expression rule called we are getting response times between 2-5 Milliseconds. One hint to determine the handler: maybe it is feasible to utilize the concept of indirect evaluation. https://docs.appian.com/suite/help/20.4/Expressions.html#indirectly-evaluating-arguments
e. g.
myrule( fn!sum, {1, 2, 3}) returns 6
myrule( fn!sum, {1, 2, 3})
6
myrule( fn!average, {1, 2, 3}) returns 2
myrule( fn!average, {1, 2, 3})
2
This helps to keep the code base lean.