On Sep 8, 2009, at 1:53 PM, Peter Saint-Andre wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The recent discussion about namespaced attributes on the x...@ietf.org
list set me to thinking about the separation of routing information and
payload data.

Below you use <header/> in your examples, which per XEP-0131 is for "non-addressing information about the stanza", which seems to be payload data to me.

Could you revise your suggestion to discussing moving say <addresses/> [XEP-0033] information, which is more obviously routing information, into attributes of the stanza?

I have to wonder how this might compare to the old "envelope" approach referenced in XEP-0033. I'd compare it myself but I couldn't find a copy (sure would be nice if the inbox was under revision control).

-- Kurt


Perhaps it makes sense to recommend that routing
information is best included via namespaced attributes of the root
element for the stanza, reserving children of the stanza element for
payloads. This would enable a server to avoid deep packet inspection on
stanzas.

So, for instance, here is a current SHIM example from XEP-0131:

<message from='ro...@montague.net/orchard'
        to='jul...@capulet.com/balcony'>
 <body>Neither, fair saint, if either thee dislike.</body>
 <headers xmlns='http://jabber.org/protocol/shim'>
   <header name='In-Reply-To'>123456...@capulet.com</header>
   <header name='Keywords'>shakespeare,&lt;xmpp/&gt;</header>
 </headers>
</message>

If we put the headers into the <message/> element with a new namespace,
we might have something like this:

<message xmlns:shim='urn:xmpp:shim:1'
        from='ro...@montague.net/orchard'
        to='jul...@capulet.com/balcony'
        shim:In-Reply-To='123456...@capulet.com'
        shim:Keywords='shakespeare,&lt;xmpp/&gt;'>
 <body>Neither, fair saint, if either thee dislike.</body>
</message>

Now the routing entity (server) doesn't need to grovel around in the
child elements of the stanza in order to figure out how to route or
deliver the stanza.

Just a thought...

Peter

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


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqmxFEACgkQNL8k5A2w/vzzWwCgtSTY1+JrHc5A2xMccdEPSXB3
314AoJDKFKDQNs8AThuim1qf0zISeYeX
=G2/A
-----END PGP SIGNATURE-----

Reply via email to