In App Manager we use carbon mediation engine as the gateway. Thus the
business logic is implemented in few handlers.

In order to code business logic, we need to fetch domain objects from the
database via a service. The primary domain object the "webapp' object.

(Please see the attached image)

In the current implementation, we have made the webapp object, an instance
variable of the handlers. Since the handlers are instantiated per API
(represents an app in our case), this works fine.

Upon the first call to the app, we fetch the relevant webapp object and
store it as the aforementioned instance variable.

Since there are more than one handlers which need to deal with the webapp
object we need to do above step in each of those handlers.

We are thinking of having an init handler which does the service call and
fetch the domain object and share it with the other handlers in the chain.
The purspose of evaluating this is to, increase the code maintainability
and improve the performance to some extent.

In order to do that we need to have the domain object in the message
context. But then again consume a lot of memory when there is a high load.

One solution to above issue to create a new thin domain object with only
the necessary fields for the gateway.

Thoughts please ?



-- 
*Best Regards*

*Rushmin Fernando*
*Technical Lead*

WSO2 Inc. <http://wso2.com/> - Lean . Enterprise . Middleware

mobile : +94772891266

Attachment: appm_gateway_runtime.pdf
Description: Adobe PDF document

_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to