Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Triggers in Topic Maps


Published on

A proposal for a trigger language for Topic Maps based on tolog updates. From the open space session at TMRA 2009.

Published in: Education, Technology
  • Be the first to comment

Triggers in Topic Maps

  1. 1. Triggers in Topic Maps<br />TMRA 2009, November 13, Leipzig<br />Lars Marius Garshol, &lt;;<br />
  2. 2. The use case<br />Rani wants to be able to assign user-friendly name-based item identifiers to his topics<br />...<br />
  3. 3. The solution<br />An API where you can register a trigger<br />A trigger consists of<br />a tolog pattern<br />a tolog update statement<br />For every change to the topic map<br />we test the changed topic against the pattern,<br />if it matches, we run the update statement <br />
  4. 4. Solving Rani’s problem<br />The pattern<br />topic-name(%topic%, $TN), not(item-identifier(%topic%, $II))<br />The update<br />INSERT $topic ^ $ii . FROM<br /> topic-name(%topic%, $TN),<br /> value($TN, $VALUE),<br /> /* string transform to $ii */<br /> $topic = %topic%<br />
  5. 5. Implementation<br />Register an event listener with the Ontopia event API<br />For each change, find the topic affected<br />The rest is just a trivial use of the tolog API<br />
  6. 6. Issues<br />How to register triggers?<br />need to be persistent<br />must be reliably present<br />Interaction with transactions<br />run all triggers on commit (before actual commit)?<br />rollback commit if triggers fail?<br />allow delay between commit and trigger execution?<br />
  7. 7. Thoughts? Questions?<br />