<br><br><div class="gmail_quote">2009/6/5 Wichert Akkerman <span dir="ltr">&lt;<a href="mailto:wichert@wiggy.net">wichert@wiggy.net</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">Previously Paul Wilson wrote:<br>
&gt; Hi Grokkers,<br>
&gt;<br>
&gt; I&#39;m writing a system that uses annotations to store metadata about my<br>
&gt; objects. I&#39;m using the annotations concept as a way of providing an<br>
&gt; extensible metadata facility. However as I continue to read and learn about<br>
&gt; Zope/Grok - I&#39;m not sure about whether I&#39;m taking the right approach.<br>
&gt; Looking at code/commentries written by a prominent Grok/Zope member, they<br>
&gt; advocate only non-extensive usage of annotations, and in their code write a<br>
&gt; meta-data facility which uses containment rather than annotations to solve<br>
&gt; the problem.<br>
&gt;<br>
&gt; What wisdom on this topic do you have?<br>
<br>
</div></div>It depends a bit on your application. Annotations are very convenient,<br>
but they have one downside: annotations are not stored directly on<br>
the object being annotated but in a BTree on that object. That means<br>
they are not in the same ZODB object. So instead of loading one object<br>
from the ZODB you might need to load several objects, which will<br>
increase latency and cache pressure. Most of the time that is not<br>
problematic. If you need to scale up to large or high performance<br>
systems this can become an important factor.<br>
<br>
A rule of thumb: data that is accessed often should be stored in the<br>
ZODB object, for example via an attribute on the python object.</blockquote><div><br>Okay - so it&#39;s just a performance thing. I fear architectural issues more than performance ones, so that&#39;s good. Thanks for your input! <br>
<br>Paul<br></div></div><br>