[JDEV] Attaching MIME types
David Waite
dwaite at jabber.com
Fri Jan 19 12:21:23 CST 2001
Sunir Shah wrote:
> Is there an existing protocol for attaching MIME types in the
> Jabber message stream? Say I was talking to you and wanted to
> send you an image; could I embed that in a <message/> element?
>
> This might look like:
>
> <message to="foo at server" from="bar at server">
> <x
> xmlns="jabber:x:mime"
> type="image/gif"
> target="aWindow"
> >
> [... insert MIME encoded gif; probably in a CDATA section ...]
> </x>
> </message>
>
> If not, to whom would I submit an RFC?
>
some basic issues:
1. you will definately need to so something such as base64 encoding to
send the data reliably - streaming binary data would most probably hit
either a reserved XML character or generate invalid UTF-8.This will
increase the size of data by about a third while in transit.
2. the jabber.org server has client rate limiting (called karma)
installed: this will limit you very quickly in the amount of traffic you
can send. This is understandable: no deployed network or server in the
world could handle 20,000 users streaming MP3s through one node. This
does however require that you turn off karma by hand in your server, and
will limit your mime sending to just the local server or to other servers
you disable this protection on. In other words - this will not be
accepted into the core protocol, as it will never adequately work.
3. you will be limited based on the size of the message - the Jabber
server does not route messages asynchronously, so the entire content will
have to live on the server and be processed by the server in order to be
routed. I do not know the exact limit, but after a certain size (I'm
guessing 500k) the system will just kill off your session.
-David Waite
More information about the JDev
mailing list