Hello,
I'm currently thinking of implementing a IMAP Client module in pike,
which will further in line be integrated in a roxen module. I have
looked through several client module implementations, and also into
Protocols.Line.imap_style.
I'm now trying to decide between whether it is smart to use callbacks
internally or not. I've come up with a short list of pros and cons, and
was wondering some of the more hardened developers could shed some light
on the issue.
Pro's
* The IMAP protocol per default sends out-of-band data (meaning data which
was not requested by the client). This data needs to be handled.
In a webenvirenmont the actual client can not easily be notified,
but the client module needs to have this ready at least on a reload.
Using callbacks the data can be handled module internally.
* The module could use the new IMAP IDLE support which updates
the selected mailbox out-of-band so reducing the need for polling.
Con's
* The client needs to at least start the callback backend. If it doesn't
the module will never work
* Synchronisation. If a client wants to select a different mailbox, the
pagereload needs to block until the server reports back with mailbox
data.
Thanks for considering this,
Marc