<div dir="ltr">2008/10/8 Urho Konttori <span dir="ltr"><<a href="mailto:urho.konttori@nokia.com">urho.konttori@nokia.com</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">ext Jamie McCracken wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Urho,<br>
<br>
we need it because tracker needs to know service src/content and URI at<br>
creation time<br>
<br>
creating objects on the fly is not possible in tracker without above<br>
info<br>
<br>
</blockquote></div>
Yeah, I guess you are right. As the URI is there already in the SetMany, it *could* be added to the valuemap, but perhaps it's still better to keep the create.<br>
<br>
I feel that there are issues by having the SetMany without automatic creation of the objects (such as: one of the objects hasn't been created - do you fail the entire SetMany, or do you somehow report unable to set the one or several failed ones. )</blockquote>
<div><br>Yeah, the semantics about the transactions is important to get right. In fact we have the same problem in the simple Set() method. What if one of the supplied fields doesn't exist in the ontology? Will the rest of the fields still be set?<br>
<br>The only thing that makes sense to me is to make it fully transactional (or come up with a smarter API). Ie the server must check that everything is a-ok before committing to the database. A non-transactional API would be a pita to code against.<br>
<br>As an app developer I can definitely live with the entire transaction failing in SetMany() since if it fails it is because of a bug in my code. Given the server returns a good error message it should be easy to debug.<br>
<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
I'm not opposed to the create methods, just that I think that object without any property doesn't justify its own existence and should be preferably automatically weeded out.<br>
</blockquote><br>Well an object will always hold a minimum of information:<br><br> * It exists<br> * Source category<br> * Content category<br><br>If it is created via the proposed API it will also have a non-empty uri field (although it is unclear whether this uri is xesam:url or some other field). These four items alone can actually be used for quite a lot.<br>
<br>Cheers,<br>Mikkel<br><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 class="Wj3C7c"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
On Tue, 2008-10-07 at 12:27 +0300, Urho Konttori wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
ext Mikkel Kamstrup Erlandsen wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
A few of us made a more or less complete draft of a Xesam Metadata<br>
API. I just brushed it up a bit. You can now find it here:<br>
<a href="http://xesam.org/main/XesamMetadataAPI" target="_blank">http://xesam.org/main/XesamMetadataAPI</a><br>
<br>
Please comment.<br>
<br>
<br>
</blockquote>
I'm really interested in why do we need to have the explicit create method? Shouldn't all objects/nodes anyway have some property to have the reason why they were/are created? If so, shouldn't we just use the set method and explicitly mention that if setting properties for an object that doesn't exist, the object will be created automatically? Engines will anyway need to lookup the objects from the database, so they might just as well trigger the creation of the object while they are at it.<br>
<br>
Also, should we consider allowing xml based graph injection?<br>
<br>
Anyway, looking good already.<br>
_______________________________________________<br>
Xesam mailing list<br>
<a href="mailto:Xesam@lists.freedesktop.org" target="_blank">Xesam@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/xesam" target="_blank">http://lists.freedesktop.org/mailman/listinfo/xesam</a><br>
<br>
</blockquote>
<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Cheers,<br>Mikkel<br>
</div>