[Standards] vCard4: IQ vs. PEP
waqas20 at gmail.com
Wed Apr 6 18:55:17 UTC 2011
On Wed, Apr 6, 2011 at 10:32 PM, Peter Saint-Andre <stpeter at stpeter.im> wrote:
> A few minutes ago I published an Internet-Draft that specifies a vCard
> KIND of "thing" (instead of "individual" etc.) for use by entities such
> as XMPP servers or MUC rooms. This made me think again about whether we
> want to use IQs (as in vcard-temp) or PEP (as currently in XEP-0292) as
> the way to transport vCard4 data over XMPP. It seems to me that PEP
> might make sense for individuals, but not for things like servers or MUC
> One approach might be to use IQs for vCard publication and retrieval,
> but a special PEP node for notifications that a vCard has changed (if
> anyone cares).
>  http://www.ietf.org/id/draft-saintandre-vcard-thing-00.txt
My personal preference is IQs for vCards. Rationale follows.
PEP is sent to contact resources when they come online. Given avatars,
vCards can be large. I don't want to be sent vCards of my 100+
contacts every time I come online just because I want to see their
Avatars are cached, and updates are via hash in presence. That's
lightweight, and lets me have avatars in my contact list.
Also, PEP in MUC is not a solved problem. I do like avatars in MUC.
PEP for the XMPP server or MUC room itself isn't trivial either. We
can ignore subscriptions, and let anyone who sends presence see PEP.
However, either the server would need to keep track of everyone who
has sent us presence, or blindly respond to all presence with PEP.
Workarounds do exist, e.g., keeping a fixed size LRU cache of
presence, but it's still not a perfect solution, and would still lead
to sending PEP unnecessarily.
All that said, I would really really love to have a generic framework
to do for PEP and pubsub and disco and everything what we currently do
for avatars via hash in presence. We added hashes in presence to avoid
iq:avatar, iq:disco and iq:version floods on login. When we start
having large data in PEP/PubSub, PEP floods are going to become a
One obvious solution is a 'hashes' node in PEP. You subscribe to that,
and you get hash updates. A hash update is a set of hashes for avatar,
versions, custom namespace, etc. You send a manual request for what
you want to actually get, and cache the result for the future. It
would be nice to have this also requestable via IQ (possibly a pubsub
That was a brain dump more than anything. Let me know if I overlooked
More information about the Standards