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 (JIRA)" <ji...@apache.org> on 2009/04/06 06:30:13 UTC

[jira] Created: (SYNAPSE-532) Dependency Management in Synapse

Dependency Management in Synapse
--------------------------------

                 Key: SYNAPSE-532
                 URL: https://issues.apache.org/jira/browse/SYNAPSE-532
             Project: Synapse
          Issue Type: New Feature
          Components: Core
            Reporter: Saliya Ekanayake


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 start up. 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 and focus only on whatever the information available in synapse.xml. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (SYNAPSE-532) Dependency Management in Synapse

Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12758597#action_12758597 ] 

Ruwan Linton commented on SYNAPSE-532:
--------------------------------------

Hiranya, I agree with the point. Lets get rid of this issue. 

> Dependency Management in Synapse
> --------------------------------
>
>                 Key: SYNAPSE-532
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-532
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Saliya Ekanayake
>            Assignee: Hiranya Jayathilaka
>         Attachments: diag1.jpeg, diag2.jpeg
>
>
> 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 start up. 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 and focus only on whatever the information available in synapse.xml. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (SYNAPSE-532) Dependency Management in Synapse

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hiranya Jayathilaka resolved SYNAPSE-532.
-----------------------------------------

    Resolution: Won't Fix

Resolving as per the comment by Ruwan.

> Dependency Management in Synapse
> --------------------------------
>
>                 Key: SYNAPSE-532
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-532
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Saliya Ekanayake
>            Assignee: Hiranya Jayathilaka
>         Attachments: diag1.jpeg, diag2.jpeg
>
>
> 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 start up. 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 and focus only on whatever the information available in synapse.xml. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (SYNAPSE-532) Dependency Management in Synapse

Posted by "Saliya Ekanayake (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Saliya Ekanayake updated SYNAPSE-532:
-------------------------------------

    Attachment: diag2.jpeg
                diag1.jpeg

Proposed Design for Synapse Dependency Management
-----------------------------------------------------------------------------------------

Note: The following discussion will not consider about entries referring to registry resources.

The elements in the Synapse configuration can refer to other elements as dependencies. Denote such elements which can be defined and be referred later by other elements as "dependable" elements. The Synapse configuration language identifies three dependable elements as follows.

1. Sequence 
2. Local Entry
3. Endpoint

The possible dependents are obviously proxy services, endpoints, and sequences. Additionally, the following mediators too may be dependents.

1. send
2. validate
3. callout
4. xslt
5. xquery
6. router
7. throttle
8. cache
9. clone
10. iterate
11. script
12. spring

The proposed design in diagram 1 suggests that each of the dependable elements should implement the Dependable interface. Each dependable will have a list of dependents as well. The interface includes three methods as follows.

1. isUsed()
	This will return a boolean value based on whether the element has any dependents or not. 
2. addDependent(dependent)
	This will add the given dependent to the list of dependents in the dependable element.
3. getDependents()
	This will return the list of dependents.

The next step of the design (diagram 2) is to let the possible dependents (note: not all the possible dependents are shown in the diagram for the sake of clarity) implement the "SynapseResolver" interface. The interface declares a single method, i.e. resolve(parent). The objective of the method is to find the dependable elements for the particular dependent. It will add a reference to itself as the dependent in each dependable it finds. If the parameter "parent" is specified then this will add a reference to the parent as the dependent instead of itself. Thus, after the completion of resolve method, each dependable element will contain a list of dependents. 

This approach enables a user to safely delete dependable elements through Synapse API. It will also provide the ability to take the deletion decision either as not to delete or to perform cascade delete based on the list of dependents for the particular dependable element. 

Your ideas on this approach are welcome.


Thanks,
Saliya


	

> Dependency Management in Synapse
> --------------------------------
>
>                 Key: SYNAPSE-532
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-532
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Saliya Ekanayake
>         Attachments: diag1.jpeg, diag2.jpeg
>
>
> 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 start up. 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 and focus only on whatever the information available in synapse.xml. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (SYNAPSE-532) Dependency Management in Synapse

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12758583#action_12758583 ] 

Hiranya Jayathilaka commented on SYNAPSE-532:
---------------------------------------------

I had a look at the proposal and have some comments. First of all I need to mention that Saliya has done a pretty good research job and design work when creating this proposal. It is indeed well thought and well designed and from the looks of it he hasn't missed anything. However I'm afraid that implementing this proposal would mean a number of small changes have to be introduced to a large number of source files in our code base. Also as I understand Synapse cannot directly benefit from a dependency management system since Synapse doesn't allow its configuration to be  changed at runtime. So IMO this feature needs to be implemented outside of Synapse using the extension points Synapse provides. FYI few weeks back I did something similar with WSO2 ESB using the recently added Synapse configuration observer API. In that case I used the API to monitor the Synapse configuration and construct a model which captures dependencies among various configuration elements. Then that model was used to restrict how users can add/remove items in the Synapse configuration.

So it is my opinion that this feature should be implemented outside of Synapse. I would like to get the feedback of other as well on this. Folks, WDYT?

> Dependency Management in Synapse
> --------------------------------
>
>                 Key: SYNAPSE-532
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-532
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Saliya Ekanayake
>            Assignee: Hiranya Jayathilaka
>         Attachments: diag1.jpeg, diag2.jpeg
>
>
> 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 start up. 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 and focus only on whatever the information available in synapse.xml. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Assigned: (SYNAPSE-532) Dependency Management in Synapse

Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruwan Linton reassigned SYNAPSE-532:
------------------------------------

    Assignee: Hiranya Jayathilaka

Hiranya, will you be able to have a look at this?

> Dependency Management in Synapse
> --------------------------------
>
>                 Key: SYNAPSE-532
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-532
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Saliya Ekanayake
>            Assignee: Hiranya Jayathilaka
>         Attachments: diag1.jpeg, diag2.jpeg
>
>
> 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 start up. 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 and focus only on whatever the information available in synapse.xml. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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