You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Saliya Ekanayake <sa...@wso2.com> on 2009/04/03 15:02:00 UTC

Dependency Management with Synapse

Hi,

At present Synapse may fail due to dangling references. As an example 
consider a proxy service which refers to a sequence. If the sequence 
definition is not there it will be a dangling reference and Synapse will 
fail to mediate properly.

The following items are the possible items on which others may depend.
1. sequences
2. endpoints
3. local entries
4. resources in the registry (remote)

A way to overcome the issue is to resolve dependencies at startup. This, 
however, has an issue since we cannot distinguish between references for 
local entries and for registry. If we force the user to have all the 
referring items either in local entries or in registry prior to start 
Synapse, then we can clearly identify missing resources. Anyway if the 
user removes a used resource from registry then again Synapse will not 
be able to handle it. Therefore, IMHO it will be good to omit the 
dependency management on registry resources.

Resolving the remaining dependencies can be achieved by having a list of 
dependents in each of the 1 - 3 elements. This list can be populated at 
start time, of course an additional step is necessary to do this.

So I would like to know what you folks think about this approach.

Thanks,
Saliya



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Re: Dependency Management with Synapse

Posted by indika kumara <in...@gmail.com>.
Hi Saliya

I believe this will need concepts of resource management and garbage
collection. There are some patterns and concepts in the literature to
support these and most of them used centralized approach. This most
probably should transparent and cannot relay on clients (mediators,
etc…) that use API you provide, if the semantic of API has not been
strongly enforced.

The issue of managing objects references in actual distributed system
really hard. Apache River (Jini) used some mechanism for this and
definitely there should be some implementations other than Apache
River that can get some inputs(concepts) to your implementation.

Thanks
Indika

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Re: Dependency Management with Synapse

Posted by Ruwan Linton <ru...@gmail.com>.
Also the delete method should return a boolean specifying whether the
deletion is successful or not because with this approach there is an
instance where the resource is not going to be deleted even though we call
delete.

Thanks,
Ruwan

On Fri, Apr 3, 2009 at 9:34 PM, Ruwan Linton <ru...@gmail.com> wrote:

> I think this is really important, even though I am not sure about how we
> are going to do the dependency resolution at the startup.
>
> One other scenario is that the resource deletion. For the moment, you can
> delete any of the resource from the SynapseConfiguration through the synapse
> API. Upon deleting these resource (for example sequences or endpoints) we do
> not check whether there is a live reference to that particular resource or
> not. In WSO2 ESB we allow the users to manage the configuration at runtime
> and this is an important requirement for us to handle on the synapse layer.
>
> I propose that we improve the delete methods of the Synapse Configuration
> in a way that we can pass a boolean value to the delete method which
> specifies whether you want to cascade delete the entries if there are live
> references to this entry or to not to delete if there are references.
>
> Further, we should be able to see the references for a particular resource
> in the synapse configuration.
>
> Saliya, please create a JIRA issue for this if there are no issues already
> there in the JIRA for this.
>
> Thanks,
> Ruwan
>
>
> On Fri, Apr 3, 2009 at 6:32 PM, Saliya Ekanayake <sa...@wso2.com> wrote:
>
>> Hi,
>>
>> At present Synapse may fail due to dangling references. As an example
>> consider a proxy service which refers to a sequence. If the sequence
>> definition is not there it will be a dangling reference and Synapse will
>> fail to mediate properly.
>>
>> The following items are the possible items on which others may depend.
>> 1. sequences
>> 2. endpoints
>> 3. local entries
>> 4. resources in the registry (remote)
>>
>> A way to overcome the issue is to resolve dependencies at startup. This,
>> however, has an issue since we cannot distinguish between references for
>> local entries and for registry. If we force the user to have all the
>> referring items either in local entries or in registry prior to start
>> Synapse, then we can clearly identify missing resources. Anyway if the user
>> removes a used resource from registry then again Synapse will not be able to
>> handle it. Therefore, IMHO it will be good to omit the dependency management
>> on registry resources.
>>
>> Resolving the remaining dependencies can be achieved by having a list of
>> dependents in each of the 1 - 3 elements. This list can be populated at
>> start time, of course an additional step is necessary to do this.
>>
>> So I would like to know what you folks think about this approach.
>>
>> Thanks,
>> Saliya
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
>> For additional commands, e-mail: dev-help@synapse.apache.org
>>
>>
>
>
> --
> Ruwan Linton
> Senior Software Engineer & Product Manager; WSO2 ESB; http://wso2.org/esb
> WSO2 Inc.; http://wso2.org
> email: ruwan@wso2.com; cell: +94 77 341 3097
> blog: http://ruwansblog.blogspot.com
>



-- 
Ruwan Linton
Senior Software Engineer & Product Manager; WSO2 ESB; http://wso2.org/esb
WSO2 Inc.; http://wso2.org
email: ruwan@wso2.com; cell: +94 77 341 3097
blog: http://ruwansblog.blogspot.com

Re: Dependency Management with Synapse

Posted by Ruwan Linton <ru...@gmail.com>.
I think this is really important, even though I am not sure about how we are
going to do the dependency resolution at the startup.

One other scenario is that the resource deletion. For the moment, you can
delete any of the resource from the SynapseConfiguration through the synapse
API. Upon deleting these resource (for example sequences or endpoints) we do
not check whether there is a live reference to that particular resource or
not. In WSO2 ESB we allow the users to manage the configuration at runtime
and this is an important requirement for us to handle on the synapse layer.

I propose that we improve the delete methods of the Synapse Configuration in
a way that we can pass a boolean value to the delete method which specifies
whether you want to cascade delete the entries if there are live references
to this entry or to not to delete if there are references.

Further, we should be able to see the references for a particular resource
in the synapse configuration.

Saliya, please create a JIRA issue for this if there are no issues already
there in the JIRA for this.

Thanks,
Ruwan

On Fri, Apr 3, 2009 at 6:32 PM, Saliya Ekanayake <sa...@wso2.com> wrote:

> Hi,
>
> At present Synapse may fail due to dangling references. As an example
> consider a proxy service which refers to a sequence. If the sequence
> definition is not there it will be a dangling reference and Synapse will
> fail to mediate properly.
>
> The following items are the possible items on which others may depend.
> 1. sequences
> 2. endpoints
> 3. local entries
> 4. resources in the registry (remote)
>
> A way to overcome the issue is to resolve dependencies at startup. This,
> however, has an issue since we cannot distinguish between references for
> local entries and for registry. If we force the user to have all the
> referring items either in local entries or in registry prior to start
> Synapse, then we can clearly identify missing resources. Anyway if the user
> removes a used resource from registry then again Synapse will not be able to
> handle it. Therefore, IMHO it will be good to omit the dependency management
> on registry resources.
>
> Resolving the remaining dependencies can be achieved by having a list of
> dependents in each of the 1 - 3 elements. This list can be populated at
> start time, of course an additional step is necessary to do this.
>
> So I would like to know what you folks think about this approach.
>
> Thanks,
> Saliya
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>
>


-- 
Ruwan Linton
Senior Software Engineer & Product Manager; WSO2 ESB; http://wso2.org/esb
WSO2 Inc.; http://wso2.org
email: ruwan@wso2.com; cell: +94 77 341 3097
blog: http://ruwansblog.blogspot.com