Hi Nuwan,

IMO, dynamic endpoint are very much similar to ESB endpoints, specially FT
and Load balancing endpoints. Those can also be stored in registry as well.

It is best if we can implement this using ESB endpoints, and if you need to
do something that is not in ESB endpoints right now, please extend it at
ESB endpoints and use them.

Does this make sense?

--Srinath


On Mon, Aug 5, 2013 at 10:34 AM, Vijayaratha Vijayasingam
<[email protected]>wrote:

> Hi Nuwan;
> Still not clear why this is an issue(ie: handler execution order)
> Say;
> class mediator+To header mediator logic can be in a sequence. Default
> endpoint is another template . If user is not providing the "Production
> URL" it is going to be the "Default endpoint" case. So, we could load that
> template and the custom sequence. We are executing that sequence before the
> actual sequence logic(which contains logic of filtering+default endpoint
> logic). So, we could define the "To" header and based on default endpoint,
> that request will be routed..
> This is not the case?
> Thanks..
>
>
> On 5 August 2013 08:48, Nuwan Dias <[email protected]> wrote:
>
>> 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
>>
>>
>
>
> --
> -Ratha
> mobile: (+94)755906608
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
============================
Srinath Perera, Ph.D.
   http://people.apache.org/~hemapani/
   http://srinathsview.blogspot.com/
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to