Hi all,

New feature “Multi Environment Support for API Manager” requires to read
client side configurations (currently environment configurations) from
back-end and make required API calls to the relevant environment.

Sample deployment.yaml with environment configurations

wso2.carbon.apimgt.environments:
  environmentName: Default
  environments:
  - host: dev.sample.com:9292
    loginTokenPath: /login/token
    label: Development

  - host: prod.sample.com:9292
    loginTokenPath: /login/token
    label: Production


The proposed

   1.

   New REST API Component "org.wso2.carbon.apimgt.rest.api.configurations"
   [1] <https://github.com/wso2/carbon-apimgt/pull/4679>

will read configurations from "deployment.yaml" file and enable clients to
read configurations.

The resource path "configService/environments" is used to get environment
configurations.

   1.

   ConfigManager.js [2]
   
<https://github.com/wso2/carbon-apimgt/pull/4692/files#diff-80c9fb7b89b1407dad0614f9b74e67c3>
   in client

will call the API and returns a promised response. When configurations are
needed they can be taken asynchronously.

Manage API calls by calling the API once and keeping Axios promised
response in main memory which will reduce client and server load.

[1] https://github.com/wso2/carbon-apimgt/pull/4679

[2]
https://github.com/wso2/carbon-apimgt/pull/4692/files#diff-80c9fb7b89b1407dad0614f9b74e67c3

Appreciate your feedback on design.

Regards,

-- 
*Renuka Fernando*
Software Engineering Intern | WSO2 Inc

Email : [email protected]
Mobile : +94 76 667 8752
Web : http://wso2.com
<http://wso2.com/signature>
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to