Enhance the data model
Modify the data model to support multiple parents for a single project.
Sponsor This Project
Bounty:
US $1.96(Sponsor Project)
You currently need to log in to sponsor a project. We apologize for the inconvenience.
Note: You can propose changes using the forum below.
Modify the data model to support multiple parents for a single project.
Here are some things to watch out for:
- In the projects table, the held_amounts and bounty_portions columns are flat comma-separated lists of contributions from each tier in the project hierarchy. These columns will have to switch to a keyed syntax.
- The projects table contains columns named "parent" and "root". Much of the code assumes that these values are uniquely defined.
- We'll need to ensure that adoption doesn't introduce cycles in the graph. This can be done by making sure that a project never adopts one of its ancestors.
- A locking strategy is employed where parent projects must be locked prior to their children being modified. This works well for tree structures, but it will need some thought now that we're moving to a DAG (directed acyclic graph). One approach might be to pre-enumerate all the involved projects, then lock them in order of their project ID. This approach risks having the graph change during the enumeration stage, but it is safe to simply back out and try again if that happens.
Here are some things to watch out for:
- In the projects table, the held_amounts and bounty_portions columns are flat comma-separated lists of contributions from each tier in the project hierarchy. These columns will have to switch to a keyed syntax.
- The projects table contains columns named "parent" and "root". Much of the code assumes that these values are uniquely defined.
- We'll need to ensure that adoption doesn't introduce cycles in the graph. This can be done by making sure that a project never adopts one of its ancestors.
- A locking strategy is employed where parent projects must be locked prior to their children being modified. This works well for tree structures, but it will need some thought now that we're moving to a DAG (directed acyclic graph). One approach might be to pre-enumerate all the involved projects, then lock them in order of their project ID. This approach risks having the graph change during the enumeration stage, but it is safe to simply back out and try again if that happens.
Post a Comment
There are currently no comments in this forum.