On Sun, Aug 4, 2013 at 3:19 PM, Sanjeewa Malalgoda <[email protected]>wrote:
> > > On Fri, Aug 2, 2013 at 2:47 PM, Nuwan Dias <[email protected]> wrote: > >> Hi, >> >> In the current design of the API Manager we have to hard-code the >> production endpoint (and/or sandbox endpoint) at the time of creating the >> API. What if there is a requirement to determine the endpoint at runtime? >> For example determining the proper endpoint depending on a user's current >> location. It would be a valid requirement IMO. >> > +1. > >> >> For supporting above, we could ask users to write a class mediator which >> defines the logic in determining the endpoint and set it as the 'To' header >> from within the mediator itself. When routing the message, we could use a >> synapse default endpoint instead of routing to the hard-coded url. At the >> time of API creation, the name of this mediator will have to be provided on >> the UI so that using it, we can generate the synapse configuration of the >> API. >> > How if we used dynamic end point concept using registry? Then that would > be more scalable in a clustered environment. Also what ratha mentioned is > also good approach for this, In that can we can have set end points stored > in registry and we can pick appropriate end point based on incoming request. > We cannot achieve this through "Extension points to associate custom sequences". The reason being that those sequences are not meant to change the direction of the message. Besides, these sequences are executed through a handler. Which means that they are executed before the actual mediation flow of the API has begun. The dynamic endpoints through registry will work. The question I still have is how is a user going to define the criteria of forwarding the appropriate endpoint? > > Thanks, > Sanjeewa, > >> >> We will have to think through synchronizing the mediator among a cluster >> of gateways and on deploying them on the fly. The above are my initial >> thoughts on $subject. >> >> Suggestions and feedback welcome. >> >> Thanks, >> NuwanD. >> >> -- >> Nuwan Dias >> >> Senior Software Engineer - WSO2, Inc. http://wso2.com >> email : [email protected] >> Phone : +94 777 775 729 >> >> _______________________________________________ >> Architecture mailing list >> [email protected] >> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >> >> > > > -- > * > * > *Sanjeewa Malalgoda* > WSO2 Inc. > Mobile : +94713068779 > > <http://sanjeewamalalgoda.blogspot.com/>blog > :http://sanjeewamalalgoda.blogspot.com/<http://sanjeewamalalgoda.blogspot.com/> > > > > _______________________________________________ > Architecture mailing list > [email protected] > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > > -- Nuwan Dias Senior Software Engineer - WSO2, Inc. http://wso2.com email : [email protected] Phone : +94 777 775 729
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
