On 2013-05-20 08:59, Matthew Wild wrote:
> Hi Hugo,
Hi Matthew,
Sorry for the rather late reply. I wanted to take the time to reply
properly and I had a rather busy monday.
>
> On 20 May 2013 06:33, Hugo Osvaldo Barrera <
hu...@osvaldobarrera.com.ar> wrote:
> > I know that mod_archive is unsupported, but after playingaround with it
> > for a while, I didn't notice it either unstable nor broken (save this
> > small issue). Did I miss some major issue here?
> > I'd be willing to maintain this mod, if it's ok with everyone. By
> > "maintain" I mean "fix important issues", since I don't think there's
> > any huge work that needs to be done.
>
> First, a bit of background on the archiving situation...
>
> mod_archive was written as part of a Google Summer of Code project. It
> implements XEP-0136, but has some outstanding bugs that didn't get
> fixed. While the project was ongoing and I was helping the student, I
> realised what an ugly complex protocol XEP-0136 actually was (thus
> mod_archive, and other implementations I know, only implements a
> small part of it).
I know that XEP-0136 is rather huge, and I assumed it wasn't fully
implemented. However, as far as I can see, the important bits (I least
the bits I care about the most, and the bits I belive most users care
about the most are there).
>
> I decided the answer was a new, simpler, archiving specification
> (XEP-0313). My hope was (and is) that by making it as easy to
> implement as possible, more clients and servers will implement it than
> implemented XEP-0136 (of which I can count very very few...). XEP-0313
> is implemented in mod_mam.
While it would be great to have XEP-0313, client support is still missing
in most cases. While there's a XEP-0136 plugin for pidign, there's still
no suport for XEP-0313 yet. The same applies to a few other plugins. I
think it would be nice to have proper XEP-0313 support it prosody though,
since server support generally motivates clients to implement them,
however, in the meantime, partial-XEP-0136 is quite useful.
>
> Now, regardless of protocols and modules, there is another problem.
> Prosody's current storage API does not have any efficient way of
> storing a random-access, and potentially very large, list of stanzas.
> The closest we currently have is offline messages, but we never need
> to query those, modify them, or access them out of order.
>
> We are (I am) working on an extension to our storage API, which is
> also crucial for a number of other things, including pubsub
> persistence. Until it is implemented, large archives have the
> potential to bring a running Prosody to its knees, which is why none
> of the archiving modules are ready for production use at the moment
> (except mod_mam_sql, which bypasses the storage API). The modules at
> this point exist with the goal of helping client developers test
> against something when implementing the protocols.
Would a single-user installation, or an installation with just 2 or
three users still have that effect on Prosody?
>
> With the above issues, and people frequently installing and requesting
> support for mod_archive which was buggy, implemented a protocol we
> want to move away from, and also not recommended for general use, we
> decided to no longer support it.
>
> And now here you are :)
>
> As long as you understand all of the above, I think it's great if you
> want to fix and maintain mod_archive. I haven't yet looked at your
> patch, but I know at least one thing that causes issues and is
> probably related to what you see. The way mod_archive catches messages
> is wrong. It has a single event handler and tries to determine if it's
> an incoming or outgoing message. The correct thing to do is to have
> two handlers, and attach them to the correct events. I believe the
> current code will choke on any messages from remote servers, and
> actually cause them to be dropped. This is the most serious issue that
> people were hitting.
>
> You can take a look at mod_mam for the correct way to catch messages.
Actually, I will. I'll try to catch messages in mod_archive the same
way mod_mam does. Basically, for few reasons:
1) So that it doesn't eat up people's messages in any cases.
2) Because the current techique has some wierd issues (ie: when a message
is sent to oneself).
3) So as to clean up any bugs in mod_archive, laying some groundwork so
as to use the storage API in future.
What I don't honestly intend to do, is implement *all* of the XEP-0136
features. At least not for the time being.
>
> If you have a Google account then let me know, and I can give you push
> access to prosody-modules.
>
> Regards,
> Matthew
>
> --
>
By the way, do you think it would be wise for mod_archive and mod_mam to
use the same storage format in future? I haven't read XEP-0313 though,
so I don't even know it that's feasable, but I think that would be
useful, since it would allow users to easily move between XEP-0136 and
XEP-313 clients.