james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: new InputStream class for mail data
Date Wed, 16 Jul 2003 16:48:34 GMT

> In case you are considering using that class SMTPDataInputStream, you
> may want to know that I am now rewriting part of it, making what I
> consider to be an improvement, an improvement stimulated by the
> discussion of the last few days.

It all depends upon the RFC compliance.

The I/O handling architecture is going to change, anyway.  The pull model
does not scale to large numbers of connections.  The push model used in nio
means that:

  1) data arrives and is dispatched to a worker thread.
  2) the worker thread takes the data and processes it
     through an object associated with the connection.
  3) the worker then returns to process the next packet
     for whichever connection happens to be serving up
     data next.

Things like MailImpl(String, MailAddress, Collection, InputStream) cannot be
used the way we do today because you cannot sit on a socket and wait for
data.  But since so much code, including code we do not have control over,
relies upon InputStream, we will have to accomodate it.

It is do-able.  It is do-able in such fashion that it supports both java.io
and java.nio with a single set of handlers.  But it is a change.  And we're
going to need code that implements the filtering behavior in a fashion
compatible with that change.

	--- Noel

To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message