http_upload vs http_file_share

157 views
Skip to first unread message

Thomas Wagner

unread,
Apr 5, 2021, 4:53:15 AM4/5/21
to prosod...@googlegroups.com
Hello!

I want my prosody server to support XEP-0363 (http file upload).
The documentation says that there are two modules which can do that, http_file_share and http_upload, both having a
documentation page at https://prosody.im :
* https://prosody.im/doc/modules/mod_http_file_share
* https://modules.prosody.im/mod_http_upload.html
However, both modules they seem really redundant and do quite the same thing.

Can anyone please explain, why there are two modules doing the same thing and which one is preferred to be used with the
latest version of prosody 11?

best regards

Thomas



Kim Alvefur

unread,
Apr 5, 2021, 8:52:01 AM4/5/21
to prosod...@googlegroups.com
Hi,

On Mon, Apr 05, 2021 at 10:53:13AM +0200, Thomas Wagner wrote:
>I want my prosody server to support XEP-0363 (http file upload).
>The documentation says that there are two modules which can do that, http_file_share and http_upload, both having a

Which documentation are you referring to?

>documentation page at https://prosody.im :
>* https://prosody.im/doc/modules/mod_http_file_share
>* https://modules.prosody.im/mod_http_upload.html
>However, both modules they seem really redundant and do quite the same thing.

The confusion seems to stem from how https://modules.prosody.im/
might look like it's part of https://prosody.im but it's really not.

It is the repository of modules submitted by, and maintained by the
community, meaning anyone can write modules and submit them there. They
are not included when installing Prosody so some extra steps are
required to install and enable them.

As the text at the top of the page says, they vary a lot in development
status, from proof-of-concept to polished modules that could be lifted
into Prosody if someone cared enough.


Modules listed at https://prosody.im/doc/modules *are* included with
Prosody, requiring no extra steps to enable and are maintained and
officially supported by the core Prosody team.

>Can anyone please explain, why there are two modules doing the same thing and which one is preferred to be used with the latest version of prosody 11?

TL;DR: Of those, your only option is mod_http_upload, because
mod_http_file_share does not work with Prosody 0.11.x.

For background, in chronological order, it went something like this:

## mod_http_upload

The initial proof of concept, answering the question "can this be done
using Prosody's built-in http server?". The answer turned out to be
"yes, but ...", as there many people experienced memory usage issues
when they took the built-in http server to its limits.

Prosody, being a chat server, wasn't really designed to handle large
binary HTTP uploads, the http server was originally made to support
BOSH, aka XMPP over HTTP, which consists of relatively small messages.

## mod_http_upload_external

Made to allow offloading large uploads to something that could be
optimized to handle that.

## mod_http_file_share

This one will be the officially recommended implementation once 0.12.x
is done and released. It does not work with earlier versions, currently
only with trunk builds. It takes advantage of improvements made to
Prosody's built in http server in order to handle very large uploads
efficiently, and solves some long-standing problems with
mod_http_upload.

--
Regards,
Kim "Zash" Alvefur
signature.asc

Thomas Wagner

unread,
Apr 6, 2021, 10:11:18 AM4/6/21
to prosod...@googlegroups.com
Hi Zash!

Thank you for your explanations. By "documentation" i meant the two links I had in the enumeration in my initial mail.

I didn't know that the separation between official and user-submitted modules is reflected by the domain name in the
URL. Thanks for pointing that out.

Thank you also for all the background information.
With your explanation, I decided to stick with the http_upload module while being on prosody 0.11, since at the moment I
don't experience any memory issues.

best regards

Thomas

Am 05.04.21 um 14:51 schrieb Kim Alvefur:
Reply all
Reply to author
Forward
0 new messages