This wiki is locked. Future workgroup activity and specification development must take place at our new wiki. For more information, see this blog post about the new governance model and this post about changes to the website.

Why redundant storage of bidirectional links is unavoidable in loosely coupled applications

Bidirectional linking of artifacts across applications can be done in two ways:

  • Symmetrical: each application stores a link to the artifact. Since links are stored redundantly, link integrity is not automatic given.
  • Asymmetrical: the link is only stored in one application and the other direction of the link is implemented via a query. Since links are not stored redundantly integrity problems are avoided.

In the following I've collected some arguments why redundant storing is the more practical approach for loosely coupled applications.

Transactional Integrity

In loosely coupled distributed applications we have different expectations with regard to transactional integrity: within one application we expect full transactional integrity, across different applications we are willing to relax our integrity expectations.

An example for "integrity within the application" is how we treat "duplication resolution" in RTC. If a bug is a duplicate of another bug, a link "Duplicate Of" will be established between the bugs and the first bug will be assigned the state "Resolved as Duplicate". This establishes a constraint on the link: whenever there is a "Duplicate Of" link, the state must reflect this with a value of "Resolved as Duplicate" and vice versa. Maintaining this constraint is simple if modification of the link and the resolution state can be done in a transaction and if this transcation stays within the bounds of a single application.

For links across applications, we expect that we can see the link even if the other side is not online, but we

If we now consider the asymmetric model and store the link and the state in different applications, things become more complex. One consequence is that applications become more tigtly coupled: If the application where the link is stored is down, the application that keeps the state cannot allow the state to be modified.

In addition, we can only see "back links" if a query succeeds. If it fails we would not see any links.

Queries

If the link is only stored on the "other side" (and calculated on "this side"), it is difficult to have efficient queries because "joining" across system boundaries is required. As a consequence, applications most likely will store linking information locally in order to enable efficient queries.

-- AndreWeinand - 16 Feb 2009

Edit | Attach | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 16 Feb 2009 - 16:02:11 - AndreWeinand
 
This site is powered by the TWiki collaboration platform Copyright � by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Contributions are governed by our Terms of Use
Ideas, requests, problems regarding this site? Send feedback