Triggers in Topic Maps

1,185 views
1,159 views

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
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,185
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
11
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Triggers in Topic Maps

  1. 1. Triggers in Topic Maps<br />TMRA 2009, November 13, Leipzig<br />Lars Marius Garshol, &lt;larsga@bouvet.no&gt;<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 />

×