james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harmeet Bedi" <harm...@kodemuse.com>
Subject Re: Repositories
Date Sun, 02 Feb 2003 06:20:41 GMT
----- Original Message -----
From: "Noel J. Bergman" <noel@devtech.com>


> > You seem to have fairly strong views on this subject.
>
> On that subject?  Yes.  The irony, Aaron, is that *I* was the one who
> suggested, last year, that JNDI might be our universal access method.
> Harmeet picked up that idea from me.  So when I say that it is a
> spectacularly bad idea, remember that the primary criticism is aimed at
me.

A bit of clarification: About 1-2 years back I cloned parts of James for a
project and changed repositories to be Jakarta Slide like. The reason I did
that was because I needed capabilities like DAV and that is where I started
from. Mail code was added to sit on the same repository. It worked out well,
although I admit I don't have comparative numbers.

JNDI is very similar and this general idea has worked well for me-
(a) hierarchical namespace and
(b) Name-Value attributes per node. One of the attributes of a node could be
InputStream or MimeMessages.

I however need namespaces which JNDI does not support directly but when Noel
suggested JNDI it did seem like a good idea to me for James.


I do think there are disadvantages to JNDI like repository. 2 I can think of
are
- JNDI like repositories may be a bit slower. There is need for a map lookup
- No strong typing. This can lead to maintainence problems and uglier code.

But I also think there are advantages. few I can think of are
- Very flexible. Easy to add capabilities etc.
- Easy for to implement for other mail containers. Easier to port across
languages.
- Very little need to evlove API or add other specific APIs for say Address
Book, IM, Calendar etc.

Again, JNDI like ideas have worked well for me, but that does not mean JNDI
is the best idea. If Javamail or something else is more promising let us do
that.
I think Pro and con comparison of different approaches would be good to
record maybe in a Wiki for posterity. I suspect this issue may come up
again.

I do like the idea of a strongly typed API, but not sure if flexibility is
significantly lost in doing that.

Harmeet


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


Mime
View raw message