Just to throw a wrench in this thread :)))
a) We AOT our stuff to avoid shipping our sourde code to customer sites
(:aot [regex...]), this requirement is the basis for what follows.
b) We filter classes using lein to remove from our artifacts classes
from other libs so only our AOT code is shipped in our jar files
(:jar-exclusions [regex...]). This prevents mixing compiled classes
of third party in our own jars which I agree can be pretty confusing
(from which jar comes this compiled class ? Euuuhhhhh....)
c) We are strict on version control and obviously will not ship
Clojure code compiled with different versions of Clojure, this is
a recipe for disaster when there are feature changes in Clojure.
We follow Orson's advice here, "We will sell no wine before its time".
We skipped some Clojure releases in the past and we moved to 1.5.1
by mid 2013.
d) Most of the source code shipped comes from the open source
libs we build upon. We can deploy site patches as source code and
get them applied at app startup time when we need quick fixes in prod
but they are not part of the build (otherwise they would not be called
patches :)
e) We also have Clojure data/code stored as part of the configuration and
loaded on demand, it's been mixing fine with our AOT compiled
aritfacts.
e) We use an integrated nrepl console embedded in our apps and
attach to it. We can investigate live in prod, apply patches live
albeit with some limitations but as far as I can see AOT is
not bitting us here. Restrictions have more to do with the app life cycle
which we are improving along the way.
f) We obvisously do integration tests using AOT compiled artifacts while dev
testing is not to avoid time travels to stone age (edit compile restart hell)
In our design most of the stuff is done in our supervisor process and each
supervisor auto configures itself differently using plugins according to the
local configuration and it has to run 24/7. I think we kept most of the
dynamic benefits while meeting the goal in a).
We have been using AOT for 4 years now. It's not at as hard as people
think it is but you need a minimal understanding of the underlying
machinery and if you come from a non Java background I agree
100%, it's not easy to find a path between the sand traps to get you
to putt in the hole from dev to prod.
End of the wrench throwing :)))
Luc P.
--
Softaddicts<
lprefo...@softaddicts.ca> sent by ibisMail from my ipad!