Thanks for the promt answer. My remarks are marked with HC: in the beginning
-----Original Message----- From: Danny Angus [mailto:[EMAIL PROTECTED] Sent: Wed 4/13/2005 3:44 PM To: James Developers List Subject: Re: JDBC Repository - Thoughts On 4/13/05, Hasan Ceylan <[EMAIL PROTECTED]> wrote: > Hello, > > I have recently downloaded and inspected james. I would like to congratulate > the hard work and effort > put into the product by all developers. > > Howeever, > > I have found some points in JDBC Repository that needs some care. > > Correct me if I am wrong in following > - James does not have a database connection pooling impl. Yes it does it uses dbcp from jakarta commons. HC: I am not so much knowledgable on dbcp I should look into that. What I did was just uncommenting the mysql inbox in the sample configuration file... > - When you connect to james pop3 server > a) It first fetches all the message headers > b) Then it fetches the message details for each of the message. This is pretty much the way that POP3 works, there is no requirement for messages to be returned just because the list is requested. HC: I agree. It is an enforcement of the protocol. But fecthing the full message in the second phase is done by one select at a time for each of the message in the table. These can be bundled into group of tens or hundreds. This can even be a parameter in the configuration. But while reading ahead the 5000+ mail into memory, clients timeout waiting for the first one to be returned the to the client so timeout counter resets to zero. On socket exhaustion this is client sockets to MYSQL server. > Sockets exhaust in the OS (OK you can enlarge the client socket port window > and reduce the time_wait value) What sockets? db connection or pop3 connection? > Takes hell a lot of time just to open the folder and causes the client to > timeout. If you mean it takes time to download the mail using pop3 I would suggest that this is a limitation of the protocol. It is a serial protocol only permitting one connection per account at any time and one command to be issued at a time on that connection. > Since most of the web mails and some humanbeings prefer the keep the messages > in the repository until its deleted permanantly, this way of implementation > lowers the usability of james. Sadly James is following the pop3 protocol, we would be wrong to load all of the mail from the database into memory if all that was requested was the list. and pop3 only allows one message to be retrieved at a time, by name or sequence number. We could try some kind of read-ahead optimisation, perhaps to allow James to have the next message, or set of messages, cached ready to send when the next pop3 RETR command is recieved. but this would require that we could guess what message was going to be requested. HC: I think, select -> send -> select -> send would solve the %90 problem taking 1/10th of development effort comparing to the above suggestion. HC: You haven't commented on the second part of mail which is about using dynamic email addresses to respond to transaction based requests. Any thoughts? Hasan Ceylan d. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
