Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 358697

Summary: [Subsystems] DAG interface and implementation
Product: [RT] Virgo Reporter: Glyn Normington <glyn.normington>
Component: runtimeAssignee: Florian Waibel <fwaibel>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: eclipse, fwaibel
Version: unspecified   
Target Milestone: 4.0.0.RELEASE   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 358442    

Description Glyn Normington CLA 2011-09-23 05:51:38 EDT
This feature is to take the generic Tree in the Virgo util repository and copy and change it to create a generic DAG (we should keep the Tree too as it might be useful elsewhere - we can choose to delete it later).

The basic difference is that a DAG has a getParents operation on a node rather than a getParent.

The only juicy part of the implementation that I can think of is how to create shared subgraphs because the current tree creates subtrees by copying an input subtree, whereas in the shared case we don't want to end up with two copies. Therefore we'll probably need an alternative method to add a shared child.

So the work would be to extend the node so it can hold record parents, change the API to match that, and then write additional test cases to create and test DAGs.

The main other challenge is ensuring thread safety, but if the patterns in the Tree data structure are followed, that should be achievable.
Comment 1 Florian Waibel CLA 2011-10-21 11:12:53 EDT
Hi Glyn,

at 
https://github.com/fwaibel/virgo.util/commit/d0db33ed1a47e4a8171e9ac0e1f63a1c1227cc86

you can find the DAG.

This code is based on Tree / ThreadSafeArrayListTree / ThreadSafeArrayListTreeTests from org.eclipse.virgo.util.common.
I wrote all modifications of the code and have the rights to contribute it to Eclipse under the eclipse.org web site terms of use.
Comment 2 Florian Waibel CLA 2011-10-21 14:14:40 EDT
All new Java files contain the appropriate license header now.

https://github.com/fwaibel/virgo.util/commit/ffdd31369c465f2d9061da81d6b43298a64bc961
Comment 3 Glyn Normington CLA 2011-10-24 06:17:08 EDT
Thanks Florian. I have raised CQ 5775 and we'll need to wait for it to reach "checkintocvs" status before we can pull this code in to Eclipse git and start integrating it into the kernel.

Meanwhile, assigning this bug to you as you have done the work.
Comment 4 Chris Frost CLA 2011-10-31 12:44:00 EDT
Hi,

I have pulled that commit from github and pushed to master. Thank you for the work.

Chris.
Comment 5 Glyn Normington CLA 2011-11-29 04:31:45 EST
*** Bug 358895 has been marked as a duplicate of this bug. ***