changing the subject...

On 5/30/12 3:07 AM, Sergey Dobrov wrote:
> On 05/30/2012 05:33 AM, Peter Saint-Andre wrote:
>> On 5/28/12 1:53 AM, Sergey Dobrov wrote:
>>> On 05/26/2012 01:23 AM, Peter Saint-Andre wrote:
>>>> On 5/23/12 1:28 AM, Sergey Dobrov wrote:
>>>>> On 05/23/2012 03:24 AM, Peter Saint-Andre wrote:
>>>>>>
>>>>>>> The meaning is just to provide easy way to obtain this very important
>>>>>>> data by just retrieving some magic constant named item. 
>>>>>>
>>>>>> We usually try to avoid magic values. :)
>>>>>>
>>>>>
>>>>> It's a good position and perhaps it's good enough for pubsub nodes but
>>>>> think about comments nodes:
>>>>>
>>>>> 1) extra node can lead to nodes names conflicts easier (again we need
>>>>> some magic value to construct new node name)
>>>>> 2) it's harder to clean up: to delete post from blog you will need three
>>>>> retracts which can't be done atomic.
>>>>
>>>> Yes, I see your point. I don't see a good solution right now, but I will
>>>> think about it some more.
>>>
>>> Can we just add a definition of "magic" item (attached or persistent
>>> item) in XEP-60 and make, possibly, some special query to set/get that
>>> item? I think, that could solve all our problems with data sparsity. At
>>> the other hand, it will be easy to move from the item="0" to such magic
>>> item solution and we will be able to move ahead with software
>>> implementation until new standards will be released.
>>
>> I'm still not happy with magic. However, my to-do list contains an item
>> for XEP-0060 revisions so perhaps we can add this feature to the open
>> issues list. I'll start a separate thread about it so that it doesn't
>> get lost in a discussion of microblogging.
>>
> 
> But that will not be a magic but some "metaitem". What's wrong with it?

Well, we already have one magic ItemID (item='current') for singleton
nodes (i.e., nodes that contain only one item):

http://xmpp.org/extensions/xep-0060.html#impl-singleton

That doesn't mean it was a good idea. :)

You're proposing that we use item='0' (zero), or item='meta', as a magic
ItemID for metadata about the node itself. Here is our original exchange:

###

> I don't understand the special meaning of ItemID = zero for
> metadata. I think there might be a better way to handle this.

The meaning is just to provide easy way to obtain this very important
data by just retrieving some magic constant named item. It can be some
more adjective string like "meta", actually, it doesn't really matter.
But the main idea is to provide an ability to retrieve it quickly. For
example, if I see a link to some comment for a some thread in generic
pubsub service, I might be able to know which was the original post this
comment related to and then I can just retrieve that metadata node and
see and retrieve original post then. I don't want to create another
pubsub node for metadata because this will make our data even more sparse.

Maybe, we can solve this using existing metadata pubsub feature but from
my point of view it's not too useful to store such data.

###

The main problem I see here is that the data you get with item='meta'
would have a different schema than all the other items in the node. This
is not true with the singleton node model (item='current'). For that
reason alone, I think it would be best to use the existing mechanism we
defined for retrieving the node metadata:

http://xmpp.org/extensions/xep-0060.html#entity-metadata

Peter

-- 
Peter Saint-Andre
https://stpeter.im/


Reply via email to