[Standards] [XEP-0385] Some Questions

Daniel Gultsch daniel at gultsch.de
Tue Dec 5 10:55:03 UTC 2017


2017-12-05 11:47 GMT+01:00 Tobias Markmann <tmarkmann at googlemail.com>:
>
>
> On Tue, Dec 5, 2017 at 11:42 AM, Daniel Gultsch <daniel at gultsch.de> wrote:
>>
>> 2017-12-05 11:32 GMT+01:00 Tobias Markmann <tmarkmann at googlemail.com>:
>> >
>> >
>> > On Tue, Dec 5, 2017 at 11:18 AM, Daniel Gultsch <daniel at gultsch.de>
>> > wrote:
>> >>
>> >> 2017-12-05 9:16 GMT+01:00 Tobias Markmann <tmarkmann at googlemail.com>:
>> >> > You can happily do so without implementing the whole Jingle File
>> >> > Transfer
>> >> > XEP, you simply need to support parsing/serialization of the Jingle
>> >> > FT
>> >> > file
>> >> > element, which is there simply for the metadata. IMO it does not make
>> >> > much
>> >> > sense to duplicate this element again in every XEP that uses it.
>> >>
>> >> If that's true I find the wording »Thus a client supporting this XEP
>> >> MUST implement Jingle File Transfer (XEP-0234) [2] and HTTP File
>> >> Upload (XEP-0363) [4].« confusing to say the least.
>> >>
>> >
>> > Yes. This is for improved interoperability, but not just because we use
>> > the
>> > Jingle FT file element.
>> >
>> >>
>> >>
>> >> Also I noticed that thumbnails use BOB as a transfer method. I wonder
>> >> how this goes along with the statelessness premise of the XEP.
>> >
>> >
>> > According to https://xmpp.org/extensions/xep-0231.html#exchange :
>> >
>> >> If the data to be shared is particularly small (e.g., less than 1k),
>> >> then
>> >> the sender MAY send it directly by including a <data/> element directly
>> >> in a
>> >> <message/>, <presence/>, or <iq/> stanza.
>> >
>> >
>> > So, if the SIMS message contains the data element for the thumbnail, the
>> > SIMS message with the thumbnail remains stateless.
>>
>> If embedding the thumbnail directly into the message is the default
>> mode - or how the XEP is supposed to work - maybe the wording and the
>> examples should reflect that.
>
>
> Yes it could need an example on that.
>>
>>
>> Have you seen a 1KiB PNG image though?
>
>
> 1KiB was probably a sensible idea 10 years ago, nowadays it would probably
> be 10-20KiB JPEG or WebP.


WebP? Wait for the haters :)

But yes I agree that a 5KiB JPEG or something like that will probably
yield good enough results. Of course this depends on our requirements
for a thumbnail but IMHO a very rough, very blurry image is enough.
(Like the thumbnails in Whatsapp for example. Those are also pretty
blurry.)
However 10-20KiB is probably a bit much given the message overhead,
the SIMS overhead and the base64 overhead.

Some servers still have a stanza length limitation of 10000bytes
(Maybe server developer can what the current defaults are)

In any case; If embedding a JPEG below a certain size as a thumbnail
directly into the message then the XEP should reflect this and
recommended size and a file type.

cheers
Daniel


More information about the Standards mailing list