Re: [Platemail-developer] Re: whatzzup
Status: Pre-Alpha
Brought to you by:
batneil
|
From: Neil C. <ba...@th...> - 2005-03-30 12:32:51
|
On Wednesday 30 March 2005 12:08, David Stocks wrote:
> > Ahh, then I am confused. I thought you'd suggested that Outlook's folly
> > was its use of separate connections? Perhaps I've misunderstood.
>
> The stupid thing with outlook is that it chooses the worst of all
> possible worlds. It opens a large number of connections, thus placing a
> high load on the server, but then doesn't actually use them concurrently
> when downloading mail. That saves on bandwidth for modem users
> (probably a small audience given Outlook's commercial base). The only
> advantage of doing this is that it allows the IMAP server to ping the
> client with new messages, though even that's fairly daft given that
> normally only one mailbox is likely to be updated (inbox).
Ahh, I get you now. Thanks.
> > Telnet just has the connection refused. The problem was documented on a
> > Courier mailing list when someone was trying to use Thunderbird against a
> > similarly configured Courier server, because Thunderbird defaults to
> > using 5 concurrent connections. I couldn't reproduce the problem with
> > Thunderbird though, so perhaps more recent ones handle it better.
>
> Did you try a larger number of connections through thunderbird? 10, 20?
> If you have the energy you could look through the thunderbird source
> and see if it still uses this number of connections.
I tried setting it higher, but I don't know that I was throwing enough at it
to test it.
> It seems odd, since the client should be reactive I think. Having a
> present number of connections is half-baked; too few and you're going to
> be unresponsive because you'll be redoing SELECTs, too many and you're
> going to hit the same problem and thus need to dynamically accept this.
Well, Javamail has a pool of connections, but no actual limit as far as I can
tell. You can change the size of the pool, but this only controls how many
unused connections it keeps around, not the maximum number it will open
concurrently.
> Actually, what you could do is this:
>
> conn = openNewConnection(host, port)
> if(!conn) {
> // connection refused, take heroic measures
> reuseConn = pickExistingConnection(connections, FEWEST_MESSAGES)
> response = send(reuseConn, NOOP)
> if(response == "OK" || "NO" || "BAD") {
> // host is still there, not real failure
> conn = reuseConn;
> }
> }
>
> I'm wary of assuming a connection refusal means resource limiting; I
> can't think of other failure reasons that would cause it but it's a bit
> of generalisation.
>
> Of course this is all probably hidden inside Javamail so it's probably
> not an option. Do you actually have any flexibility about this at all?
Not a lot. I could write it all myself, which is vaguely tempting because I
don't entirely like Javamail. I could use the gnu version of javamail which
would give me more visibility, and I could modify the implementation of its
IMAP provider (although given that I've already had to modify it to fix a
couple of bugs, I don't know how stable it is).
There may well be a way to handle this nicely through Javamail, but I haven't
found it yet.
> Someone else has had this problem:
> http://archives.java.sun.com/cgi-bin/wa?A2=ind0204&L=javamail-interest&F=&S
>=&P=74
>
> however, infuriatingly, I couldn't find any replies to it.
Well found! This is precisely what I'm seeing. I suppose it's unlikely to
get many new replies now though, given that it's nearly three years old.
> This does sound like it's a problem in Javamail's domain, so perhaps you
> should ask a question on the javamail list?
I probably will eventually. I had a look through various lists and couldn't
find anything too revealing.
> >>>>Why on earth would anyone want a vi plugin? Lot of crazies out there.
> >>>
> >>>You could put one into emacs to improve it, for a start.
> >>
> >>Emacs already has a vi emulation mode, which I imagine has been in there
> >>since the days we first drew breath. Bring on the pain.
> >
> > Finally, a feature worth using :-)
>
> God, you're not one of _them_ are you? I thought you spent all your
> time in the world of bimbo interfaces like eclipse.
I use jedit at work, eclipse for Platemail, and vim for when I use VPN
because my connection isn't fast enough to use jedit remotely.
Emacs remains firmly at the bottom of my list.
Neil
|