+1

On 18/07/2019 14:25, Matthieu Baechler wrote:
> Hi community,
> 
> I've been working on the subject of the build time for James lately.
> 
> TL;DR;
> 
> I'd like to require JDK-11 as the default compiler for James to use the
> `-release` flag to fasten the build (while still targeting Java 8 for
> now) and drop animal-sniffer plugin.
> 
> Long version:
> 
> James is very modular. I mean, there are more than 200 modules to build
> because of the hexagonal architecture we implement.
> 
> Maybe it would make sense to describe a bit this design decision, I
> don't think it has been done publicly before and implicit decision
> record is usually a bad idea.
> 
> The problem is the following:
> 
>    We want James to be able to support various kind of technologies
>    because it's at the same time a standalone mail server, a mail
>    service that you can embed, a set of libraries you can reuse and a
>    mail processing framework.
> 
>    We would like it to be useful at the same time for single user
>    instances and for million users instance.
> 
> The design decision:
> 
>    Keep domain code clean, that is, not depending on a given
>    technology, so that we can switch non-core-domain modules when we
>    need a new technology. That's basically what Hexagonal Architecture
>    (or Onion Architecture, or Clean Architecture) is all about.
> 
> Consequence:
>  
>    For each non-core-domain requirements of a given module we introduce
>    an api module (something-api) to describe these requirements.
> 
>    We also provide a contract testsuite in api so that all
>    implementations have (as much as possible) a similar behavior.
> 
>    Then we implement at least two modules for any api: a memory one
>    that uses java datastructure as ArrayList or HashMap and a second
>    (more useful) one using the technology of the day.
> 
>    So any requirements means 3 more projects.
> 
> That's what led us to a 200+ modules project and a slow build.
> 
> One thing I found is that using the animal-sniffer maven plugin is kind
> of slow on James.
> 
> animal-sniffer is a plugin that checks, when we target java 8, that not
> only we respect the language specification but we also use only jdk8
> APIs.
> 
> Hopefully, this feature were added in java 9 openjdk compiler with the
> `-release` flag and it's way faster than animal-sniffer.
> 
> Then we finally come to my proposal:
> 
>    I'd like to require JDK-11 as the default compiler for James to use
>    the `-release` flag to fasten the build (while still targeting Java
>    8 for now) and drop animal-sniffer plugin.
> 
> In the (very near) future, we'll discuss the switch to Java 11 as a
> runtime platform, too, but it's not the proposal I make here.
> 
> 
> I do propose a vote to ensure consensus on it:
>  - Answer this mail with "+1" to require jdk-11 as build tool
>  - Answer this mail with "-1" to reject the idea
> 
> Regards,
> 

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

Reply via email to