[JDEV] Ambiguity in jabber:iq:browse "pushes"

Jens Alfke jens at mac.com
Thu Aug 16 13:39:58 CDT 2001


On Thursday, August 16, 2001, at 10:27 AM, Dave Waite wrote:

> As far as I understand, if the JID of the top element within the browse 
> matches the JID being requested, it is a replace. If it doesn't match, 
> then you are representing a child and are doing an insert/modify/delete.

No, that isn't the issue. My point is that in the case of a normal "set" 
the semantics are to modify data belonging to the _receiver_ of the 
query, but in the funny case of a push the semantics are a notification 
of already-modified data belonging to the _sender_.

But it does look as though the ambiguity can be resolved by comparing 
the JID of the sender of the query with the JID of the top-level element 
in the payload; if they're the same (modulo resources) then it's a push, 
otherwise it's a set request. I dunno what happens in the special case 
where one resource sends such a query to another resource of the same 
JID, though! (Hmm, the ambiguity has put on weight.)

Question: is it required that every item in a browse have a JID? If so, 
how do you represent items that are subcomponents of a client 
connection? For example, what got me started on this is that I want to 
figure out how to do file sharing. My plan is (was?) to have the client 
respond to a browse request by listing the hierarchy of files it has 
available. But these files don't have their own JIDs, so what do I use?

--Jens




More information about the JDev mailing list