You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Robert Burrell Donkin <ro...@gmail.com> on 2007/11/24 23:48:15 UTC
[Users] Split into components
i've been experimenting with modularisation of the code related to
users. i'd like to split into separate api, library and implementation
components.
the list is a little long to fit comfortably in an email so i've
posted it to the wiki (1) . below are some comments and questions
1 the granularity of the components is debatable. including user
repositories, stores and virtual user tables together seemed
reasonable to me but perhaps there are better arrangements.
2 the basic rule is that libraries can not depend on each other but
only on api's. as well as user-api, it was necessary to move domain
and dns interfaces from core into an api component. putting them
together into a domain-api seemed reasonable to me but i don't have a
deep understanding.
3 the management interfaces have been placed into user-library. i'm
unsure whether the right place for the management interfaces is in the
api or in the library.
4 XMLVirtualUserTable, UsersFileRepository, UsersLDAPRepository were
provisionally included in library. not sure this is right but i'm not
sure that there's enough critical mass to create components to contain
them yet
5 unsure about the granularity of avalon-user-function and
jdbc-user-function. lots of small components allows precision but
perhaps might be better to aggregate into large units including all
backend implementation of the same type. for example,
avalon-backend-function including all the avalon* implementations
(AvalonRepository and so on).
opinions?
- robert
1. http://wiki.apache.org/james/Development/Modularisation#users
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: [Users] Split into components
Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Nov 24, 2007 11:08 PM, Danny Angus <da...@apache.org> wrote:
> ...
> P.S. I like the "Store" entitity because it would allow the mailet API
> to expose multiple different sets of respositories, but they're
> (stores & repository access) used inconsistently in James at the
> moment. And I think we need to be more consistent with some of our
> abstrations & implementations in this area. Its all a bit
> philosophical, but I think a good spring-clean of this stuff would
> reap rewards.
+1
these changes are concerned with clarity - understanding what JAMES
uses and expressing that through a system of modules rather than
changing code. IMHO it's too hard ATM to understand the coupling in
the system.
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: [Users] Split into components
Posted by Danny Angus <da...@apache.org>.
...
P.S. I like the "Store" entitity because it would allow the mailet API
to expose multiple different sets of respositories, but they're
(stores & repository access) used inconsistently in James at the
moment. And I think we need to be more consistent with some of our
abstrations & implementations in this area. Its all a bit
philosophical, but I think a good spring-clean of this stuff would
reap rewards.
d.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: [Users] Split into components
Posted by Danny Angus <da...@apache.org>.
On 24/11/2007, Robert Burrell Donkin <ro...@gmail.com> wrote:
> 1 the granularity of the components is debatable. including user
> repositories, stores and virtual user tables together seemed
> reasonable to me but perhaps there are better arrangements.
This is another area I've been thinking about in relation to mailet, I
started trying to model the whole thing, but didn't get far before I
got confused! I still think we could do with modelling the whole thing
again from 1st principles, even if we come up with the same answer at
least we would understand (and have documented) the reasoning a bit
better.
d.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: [Users] Split into components
Posted by Danny Angus <da...@apache.org>.
On 11/12/2007, Robert Burrell Donkin <ro...@gmail.com> wrote:
> this process will inevitably go too far. (IMAP has too many modules.)
+1 I've seen this at work too, but it is still a useful way to explode
the big ball of mud.
> but this is an exercise in comprehension. once the code has been
> broken down and the dependencies fixed then we can reaggregate.
We can, but I'm betting that by the time we should we won't want to anymore.
If the build-test-release cycle is efficient enough there's no real
incentive, and it helps stop the ball of mud from reforming.
>
> > IMHO too many modules is an anti pattern.
>
> define too many without selecting an arbitrary numeric value :-)
Literally? n+1 where n is the optimum number. ;-) (Sorry!)
>
> i think that JAMES needs to move towards finely grained COP ATM. this
> will allow the dependencies to be fixed in an evolutionary manner.
+1 we need to expose our internal dependencies, which is where the
pain of making changes comes from, so that we can see them clearly and
manage them effectively.
> IMHO the future for trunk should be pruned releases. experimental and
> innovative code should be allowed in trunk without having to convince
> people of it's value a priori. first, the APIs are finalised on trunk.
> (hence API modules.) before a release, immature modules and general
> cruft would be pruned on the release branch. these modules which
> didn't make the cut would still be available by compilation of a tag.
Sounds like a sensible approach for managing this.
d.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: [Users] Split into components
Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Nov 30, 2007 7:52 PM, Stefano Bagnara <ap...@bago.org> wrote:
> Robert Burrell Donkin ha scritto:
> > On Nov 25, 2007 6:34 PM, Robert Burrell Donkin
> > <ro...@gmail.com> wrote:
> >> On Nov 25, 2007 6:06 PM, Stefano Bagnara <ap...@bago.org> wrote:
> >>> Robert Burrell Donkin ha scritto:
> >
> > <snip>
> >
> >>>> 5 unsure about the granularity of avalon-user-function and
> >>>> jdbc-user-function. lots of small components allows precision but
> >>>> perhaps might be better to aggregate into large units including all
> >>>> backend implementation of the same type. for example,
> >>>> avalon-backend-function including all the avalon* implementations
> >>>> (AvalonRepository and so on).
> >>>>
> >>>> opinions?
> >>> IMO it's better to aggregate jdbc-user-function to avalon-user-function.
> >> why?
> >
> > i've adopted stefano's suggestion but a longer explanation would be appreciated
> >
> > - robert
>
> My main motivation was about having a limited number of modules.
ok - so this is where the arguments about component granularity kick off ;-)
> IMHO we should keep the number of modules under the 20, otherwise it
> will become worse than the old all-in-one structure.
setting an arbitrary number defeats the whole purpose of the process :-)
separating JAMES out into logical components reveals and expresses the
coupling within the system. a finely grained component structure will
make dependencies more obvious.
it should be possible to assemble smaller, lighter applications from
the JAMES components. many users seem to want this. ATM it's not
really possible to do this safely.
it should be possible to retain a much more diverse, interesting and
useful codebase if a standard, lightweight JAMES can be cut by
removing components. users wanting optional or non-standard modules
would need to build from source.
> IMHO having modules with very few classes in there does not make too
> much sense: I prefer to use java packages for that.
the packaging in JAMES is very coursely grained and cuts across
functional devisions. for example, APIs for every sort of service are
packaged in org.apache.james.services and so if you want POP3 then you
have to take IMAP. i would like to fix the packaging but i understand
why people want to preserve config files. separating the codebase into
a finely grained component structure is a reasonable substitute and
can be done immediately.
this process will inevitably go too far. (IMAP has too many modules.)
but this is an exercise in comprehension. once the code has been
broken down and the dependencies fixed then we can reaggregate.
> IMHO too many modules is an anti pattern.
define too many without selecting an arbitrary numeric value :-)
i think that JAMES needs to move towards finely grained COP ATM. this
will allow the dependencies to be fixed in an evolutionary manner.
IMHO the future for trunk should be pruned releases. experimental and
innovative code should be allowed in trunk without having to convince
people of it's value a priori. first, the APIs are finalised on trunk.
(hence API modules.) before a release, immature modules and general
cruft would be pruned on the release branch. these modules which
didn't make the cut would still be available by compilation of a tag.
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: [Users] Split into components
Posted by Stefano Bagnara <ap...@bago.org>.
Robert Burrell Donkin ha scritto:
> On Nov 25, 2007 6:34 PM, Robert Burrell Donkin
> <ro...@gmail.com> wrote:
>> On Nov 25, 2007 6:06 PM, Stefano Bagnara <ap...@bago.org> wrote:
>>> Robert Burrell Donkin ha scritto:
>
> <snip>
>
>>>> 5 unsure about the granularity of avalon-user-function and
>>>> jdbc-user-function. lots of small components allows precision but
>>>> perhaps might be better to aggregate into large units including all
>>>> backend implementation of the same type. for example,
>>>> avalon-backend-function including all the avalon* implementations
>>>> (AvalonRepository and so on).
>>>>
>>>> opinions?
>>> IMO it's better to aggregate jdbc-user-function to avalon-user-function.
>> why?
>
> i've adopted stefano's suggestion but a longer explanation would be appreciated
>
> - robert
My main motivation was about having a limited number of modules.
IMHO we should keep the number of modules under the 20, otherwise it
will become worse than the old all-in-one structure.
IMHO having modules with very few classes in there does not make too
much sense: I prefer to use java packages for that.
IMHO too many modules is an anti pattern.
Also both jdbc and avalon user function are avalon functions.
AvalonUsersRepository should be probably better named FileUsersRepository.
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: [Users] Split into components
Posted by Danny Angus <da...@apache.org>.
On 29/11/2007, Robert Burrell Donkin <ro...@gmail.com> wrote:
> i've adopted stefano's suggestion but a longer explanation would be appreciated
+1 I'd like someone to take me through this, if that's OK?
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: [Users] Split into components
Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Nov 25, 2007 6:34 PM, Robert Burrell Donkin
<ro...@gmail.com> wrote:
> On Nov 25, 2007 6:06 PM, Stefano Bagnara <ap...@bago.org> wrote:
> > Robert Burrell Donkin ha scritto:
<snip>
> > > 5 unsure about the granularity of avalon-user-function and
> > > jdbc-user-function. lots of small components allows precision but
> > > perhaps might be better to aggregate into large units including all
> > > backend implementation of the same type. for example,
> > > avalon-backend-function including all the avalon* implementations
> > > (AvalonRepository and so on).
> > >
> > > opinions?
> >
> > IMO it's better to aggregate jdbc-user-function to avalon-user-function.
>
> why?
i've adopted stefano's suggestion but a longer explanation would be appreciated
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: [Users] Split into components
Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Nov 25, 2007 6:06 PM, Stefano Bagnara <ap...@bago.org> wrote:
> Robert Burrell Donkin ha scritto:
<snip>
> > 4 XMLVirtualUserTable, UsersFileRepository, UsersLDAPRepository were
> > provisionally included in library. not sure this is right but i'm not
> > sure that there's enough critical mass to create components to contain
> > them yet
>
> Creating modules with very few classes will only increase the complexity.
complexity isn't quite the right word. the level of complexity is
innate in the code and cannot be altered by re-arrangement.
creating small, focussed modules increases the granularity of the
components in the system. small components have the advantage that
they are each easy to understand since they are better focussed. they
also allow more precise control over dependencies.
a finely grained components system has some disadvantages. lots of
small, focussed components obscures high level relationships within
the system.
> > 5 unsure about the granularity of avalon-user-function and
> > jdbc-user-function. lots of small components allows precision but
> > perhaps might be better to aggregate into large units including all
> > backend implementation of the same type. for example,
> > avalon-backend-function including all the avalon* implementations
> > (AvalonRepository and so on).
> >
> > opinions?
>
> IMO it's better to aggregate jdbc-user-function to avalon-user-function.
why?
(other than an dislike of finely garined component systems)
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: [Users] Split into components
Posted by Stefano Bagnara <ap...@bago.org>.
Robert Burrell Donkin ha scritto:
> i've been experimenting with modularisation of the code related to
> users. i'd like to split into separate api, library and implementation
> components.
>
> the list is a little long to fit comfortably in an email so i've
> posted it to the wiki (1) . below are some comments and questions
>
> 1 the granularity of the components is debatable. including user
> repositories, stores and virtual user tables together seemed
> reasonable to me but perhaps there are better arrangements.
ok.
> 2 the basic rule is that libraries can not depend on each other but
> only on api's. as well as user-api, it was necessary to move domain
> and dns interfaces from core into an api component. putting them
> together into a domain-api seemed reasonable to me but i don't have a
> deep understanding.
make sense to me.
> 3 the management interfaces have been placed into user-library. i'm
> unsure whether the right place for the management interfaces is in the
> api or in the library.
IMO it's ok to put them in the library: we can move them to the API if
we'll need access from another library, right?
> 4 XMLVirtualUserTable, UsersFileRepository, UsersLDAPRepository were
> provisionally included in library. not sure this is right but i'm not
> sure that there's enough critical mass to create components to contain
> them yet
Creating modules with very few classes will only increase the complexity.
> 5 unsure about the granularity of avalon-user-function and
> jdbc-user-function. lots of small components allows precision but
> perhaps might be better to aggregate into large units including all
> backend implementation of the same type. for example,
> avalon-backend-function including all the avalon* implementations
> (AvalonRepository and so on).
>
> opinions?
IMO it's better to aggregate jdbc-user-function to avalon-user-function.
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org