<br><br><div class="gmail_quote">2009/6/5 Wichert Akkerman <span dir="ltr"><<a href="mailto:wichert@wiggy.net">wichert@wiggy.net</a>></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>
> Hi Grokkers,<br>
><br>
> I'm writing a system that uses annotations to store metadata about my<br>
> objects. I'm using the annotations concept as a way of providing an<br>
> extensible metadata facility. However as I continue to read and learn about<br>
> Zope/Grok - I'm not sure about whether I'm taking the right approach.<br>
> Looking at code/commentries written by a prominent Grok/Zope member, they<br>
> advocate only non-extensive usage of annotations, and in their code write a<br>
> meta-data facility which uses containment rather than annotations to solve<br>
> the problem.<br>
><br>
> 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's just a performance thing. I fear architectural issues more than performance ones, so that's good. Thanks for your input! <br>
<br>Paul<br></div></div><br>