You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Hut Carspecken <hu...@sbcglobal.net> on 2003/07/09 16:39:25 UTC

Location of InDepth Understanding of JAMES

Good Morning,

I am looking for more information about the "mechanics" of James so I decide or not decide if I can make a contribution or not.

Also, I have several questions concerning how James "holds" a message while the mailets process.  For instance, does James load an entire message, including an attachment, while it decides if a user even exists or does it simply read the the SMTP header?

I have plenty of questions, but I don't want to flood this mailing list.  Any ideas where I could do my research?

Many Thanks,

Hut

RE: resources (was Re: Location of InDepth Understanding of JAMES)

Posted by "Noel J. Bergman" <no...@devtech.com>.
> > James creates a Mail object which includes a MimeMessage object
> > which does indeed include the whole message.
> > This is then passed from mailet to mailet through the processors until
it is
> > finished with.

> > If it was important enough, one could always build a lazy-loading
> > MimeMessageProxy.

See MimeMessageWrapper.  There will likely be additional work to clean up
the current wrapper, but it does provide lazy loading.

> Then you need to know in configuration which mailet uses what so that
> you could optimize flow.

That would be an administative concern, but the code doesn't care.
MimeMessageWrapper will load headers whenever something asks for the
message's headers, and will load the body (the entire body) whenever
something asks for part of the message contents.

> You would need to consider whether content stays in memory once it has
> been loaded or if it should get released.

The Mail object, and the MimeMessage(Wrapper) are released between
processors.

	--- Noel


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


resources (was Re: Location of InDepth Understanding of JAMES)

Posted by tobe <to...@swipnet.se>.
>>Also, I have several questions concerning how James "holds" a
>>message while the mailets process.  For instance, does James load
>>an entire message, including an attachment, while it decides if a
>>user even exists or does it simply read the the SMTP header?
>>    
>>
>
>Basically? Yes.
>James creates a Mail object which includes a MimeMessage object which does
>indeed include the whole message.
>This is then passed from mailet to mailet through the processors until it is
>finished with.
>The other way, to only load the headers, would require some advance
>knowledge about what matchers and mailets intend to do, which we can't get.
>I would wholeheartedly support a good resource optimised way of handling
>messages, but fear that that is probably not practical without compromising
>the general flexibility of James.
>
>  
>
If it was important enough, one could always build a lazy-loading 
MimeMessageProxy.

Then you need to know in configuration which mailet uses what so that 
you could optimize flow.

You would need to consider whether content stays in memory once it has 
been loaded or if it should get released. In Java the rule used to be 
that you should have either short-lived objects or long-lived objects, 
not objects with medium life-span (longer than one gc-cycle), else 
garbage collection takes longer (if processor power is a short resource).

/tobe


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


RE: Location of InDepth Understanding of JAMES

Posted by Danny Angus <da...@apache.org>.

> I am looking for more information about the "mechanics" of James
> so I decide or not decide if I can make a contribution or not.

To be honest the only way you'll really manage it is to start meddling with
the source code and asking questions.


> Also, I have several questions concerning how James "holds" a
> message while the mailets process.  For instance, does James load
> an entire message, including an attachment, while it decides if a
> user even exists or does it simply read the the SMTP header?

Basically? Yes.
James creates a Mail object which includes a MimeMessage object which does
indeed include the whole message.
This is then passed from mailet to mailet through the processors until it is
finished with.
The other way, to only load the headers, would require some advance
knowledge about what matchers and mailets intend to do, which we can't get.
I would wholeheartedly support a good resource optimised way of handling
messages, but fear that that is probably not practical without compromising
the general flexibility of James.


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