1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-24 22:40:55 +01:00
phorge-phorge/src/docs
epriestley 877cb136e8 Add an assocations-like "Edges" framework
Summary:
We have a lot of cases where we store object relationships, but it's all kind of messy and custom. Some particular problems:

  - We go to great lengths to enforce order stability in Differential revisions, but the implementation is complex and inelegant.
  - Some relationships are stored on-object, so we can't pull the inverses easily. For example, Maniphest shows child tasks but not parent tasks.
  - I want to add more of these and don't want to continue building custom stuff.
  - UIs like the "attach stuff to other stuff" UI need custom branches for each object type.
  - Stuff like "allow commits to close tasks" is notrivial because of nonstandard metadata storage.

Provide an association-like "edge" framework to fix these problems. This is nearly identical to associations, with a few differences:

  - I put edge metadata in a separate table and don't load it by default, to keep edge rows small and allow large metadata if necessary. The on-edge metadata seemed to get abused a lot at Facebook.
  - I put a 'seq' column on the edges to ensure they have an explicit, stable ordering within a source and type.

This isn't actually used anywhere yet, but my first target is attaching commits to tasks for T904.

Test Plan: Made a mock page that used Editor and Query. Verified adding and removing edges, overwriting edges, writing and loading edge data, sequence number generation.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, 20after4

Differential Revision: https://secure.phabricator.com/D2088
2012-04-04 15:30:21 -07:00
..
configuration Fix URI typo in "Configuring File Storage" 2012-03-19 18:29:07 -07:00
contributing Use assert_instances_of() in Differential 2012-04-04 15:11:30 -07:00
developer Add an assocations-like "Edges" framework 2012-04-04 15:30:21 -07:00
flavortext Document mercurial and immutable history doctrines 2011-09-15 07:45:22 -07:00
technical Add a basic chatlog 2012-02-17 10:21:38 -08:00
userguide Update Herald docs 2012-03-30 14:13:30 -07:00
feedback.diviner Provide documentation about Audit, Differential, and audit vs review 2012-03-21 17:10:12 -07:00
installation_guide.diviner Add some documentation about Windows support. 2012-03-19 19:48:41 -07:00
introduction.diviner Minor documentation improvements 2012-01-12 20:08:19 -08:00