
Trapperkeeper is a new Clojure framework for long-running applications, services - lazyloop
http://puppetlabs.com/blog/new-era-application-services-puppet-labs
======
mwcampbell
Perhaps I've drunk too much of the Unix and Heroku 12-factor kool-aid, but I'm
skeptical of the usefulness of some of TrapperKeeper's features:

> a way to cohesively manage the lifecycle of the various components making up
> an application

I'd need a more specific example to understand exactly what this is talking
about, but shouldn't each component with an independent life cycle be a Unix
process?

> a common logging mechanism that wouldn't need to be set up and configured by
> each component

Just log to stderr. Don't even bother including timestamps; an external
utility like svlogd can do that (and rotate the logs too).

> a web server flexible enough to load multiple web apps

This one in particular strikes me as an anti-feature, common in JVM
environments. In the Heroku 12-factor approach, each app embeds a web server
(like Jetty), rather than the web server containing apps. Then you use a
front-end proxy like HAProxy or nginx to route requests to multiple apps.

> and to support a rich set of options for configuring SSL

That's the job of the front-end proxy, or maybe even a special-purpose SSL
termination daemon such as stud.

~~~
eikenberry
I agree with your points to a certain extent, but if you understand things
from a Java mindset the features make sense.

The thing to understand is that, much like Smalltalk, the JVM is its own
world. The underlying OS is only there to bootstrap the JVM, there is no Unix
underneath. So every time you think they would do better to use some feature
of the underlying OS you are breaking with the Java way of doing things.

~~~
twic
_a Java mindset_

I'd just like to point out that this is not _the only_ Java mindset. It's
certainly true that Java has a long and horrible tradition of people thinking
that everything and the kitchen sink should go in the app server (which can
then be managed with a SOAP interface!), but this is not intrinsic to Java,
and it's not the only way to work with Java. Some of us are actually pretty
keen on the 12 factor approach.

------
sharms
This is very cool, especially that they took the time to write up a series of
tutorials for "TrapperKeeper" which is really what the post is announcing:
[https://github.com/puppetlabs/trapperkeeper](https://github.com/puppetlabs/trapperkeeper)

It looks very quick and easy to spin up a service which has all benefits and
performance of running on clojure / jvm. Combining this with a website front
end using Clojurescript looks like it could be a sweet spot.

------
SmileyKeith
I've been looking at Clojure a lot lately. It's a really cool looking language
that appears pretty powerful. As an outsider I'd really like to see some more
"ramping up" kind of posts to get my head around all the basics of the tooling
(leiningen) and how to actually structure a program.

~~~
AlwaysBCoding
Clojure is a great language that has an achilles heel right now. The community
doesn't treat the lack of learning resources / documentation as a serious
problem. I've heard prominent members of the community say this exactly,
"Clojure is such a great language that the lack of learning resources doesn't
constitute a real problem in the grand scheme of things." I know what they're
trying to communicate, but to beginners it comes off like "We've created the
greatest thing since sliced bread - but we're not going to tell you how to use
it - and if you would just take our word for it and blindly follow with no
guidance you'll be a better developer". Which is really frustrating to hear,
because it's like this thing seems so great, and smart people are all about
it, but the only way to learn it is absolute misery. It's a tough perspective
to have when you're only a couple years in to your dev career.

Clojure gives you massive benefits, but god it's a brutal road to competence.
Things that should be simple like setting up a web server, adding user
authentication, making JSON API's, trying to find the best libraries, it's all
a time-consuming trudge through pain and suffering. And after some months when
you get somewhat competent with the language, you realize that in order to get
the full power of Clojure you need to not only learn the Clojure language, but
the entire Clojure ecosystem. So you need Clojure, Clojurescript, Datomic,
Edn, Core.async etc... And each piece of that puzzle is equally horribly
documented and has no beginner resources so you have to struggle at each point
in the process, praying to god that it's ultimately worth it.

It's frustrating as hell, but it really is rewarding, because you have to
learn every little piece at a low-level to ever make anything happen. There's
no Rails-like framework that makes things 'just-work' waiting for you. I find
that using Clojure is awesome, but learning Clojure is awful. I'm hoping to
play a role in fixing that second part pretty soon, but really wish the
community would be more active in helping to remedy the problem. The first
step is admitting that the problem exists and it matters, and not sure that
we're there yet.

~~~
puredanger
[context: I work at Cognitect on Clojure and community efforts]

I'll start by saying that documentation, examples, getting started, etc could
be better and efforts are ongoing to improve all of those to various degrees.

However, there are substantial and rapidly growing resources
([http://clojure.org/getting_started](http://clojure.org/getting_started)) for
learning Clojure and other parts of the ecosystem. Some of the more recent
beginner resources I'd recommend are "Clojure for the Brave and True"
([http://www.braveclojure.com/](http://www.braveclojure.com/)) and Kyle
Kingsbury's "Clojure from the ground up" series
([http://aphyr.com/posts/301-clojure-from-the-ground-up-
welcom...](http://aphyr.com/posts/301-clojure-from-the-ground-up-welcome)).
There are also many good Clojure books - I'd recommend any of them.

In the web area, the philosophy is different than other languages and it is
evolving rapidly (especially on the client side). Luminus
([http://www.luminusweb.net/](http://www.luminusweb.net/)) is a good effort to
provide a reasonable set of defaults that tie together the various Clojure web
libraries.

So yes, it could be better. However, there are significant resources now and
gaps continue to be filled.

~~~
gw
One thing I've always found bizarre is that ClojureDocs hasn't been updated
since 1.3. I know it isn't an official resource so you may not be able to do
anything about it, but it's always at the top of Google's results.

~~~
puredanger
I am working on that. :)

------
gmjosack
I've also released an opensource tool called TrapperKeeper which is for
storing and displaying SNMP traps. We use it at Dropbox to turn SNMP traps
into stateful alerts so that they can be polled by monitoring services. We
haven't really announced it publicly because I want to finish writing up docs
but it's been public on Github for about a month.

[https://github.com/dropbox/trapperkeeper](https://github.com/dropbox/trapperkeeper)

~~~
msellout
One is Python, one is Clojure. Different namespaces; no collision.

~~~
Twirrim
Given both are in the field of Sysadmin/Operations, I can definitely see there
being confusion.

------
Luyt
A talk by Rich Hickey (creator of Clojure) about what sets Clojure apart from
the usual object oriented languages, concurrency-wise:
[http://www.infoq.com/presentations/Are-We-There-Yet-Rich-
Hic...](http://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey)

------
neverminder
I've tried Clojure for a while, but it didn't stick. It's probably the whole
Lisp specific approach being the reason why Lisp never really took off as a
main stream language. I've tried Scala after that and stayed with it since.
Besides all the good points, Scala has Typesafe behind it - a solid
stack/platform that (to best of my knowledge) Clojure doesn't have.

~~~
JeanPierre
I've managed to do the opposite: Scala didn't stick, Clojure did. I guess
there's some subjective reason why or why not Clojure/Scala would stick with
someone.

However, it's false that Clojure doesn't have a company behind it: Cognitect
is certainly backing up Clojure by developing ClojureScript and Clojure
itself, Clojure consulting, the Datomic database and the Pedestal "framework".

~~~
elwell
Speaking of _Datomic_ , are there any alternatives that are completely free?

~~~
puredanger
Datomic has two free editions - Datomic Free and Datomic Pro Starter.
[http://www.datomic.com/pricing.html](http://www.datomic.com/pricing.html)

~~~
elwell
I know about those, but the key word in my post was _completely_.

~~~
puredanger
In what way are the free editions not free enough for you? (serious question,
not trolling)

~~~
nunb
I'm guessing he means the GPL sense of free as in freedom, not free as in
beer?

------
ams6110
Trapper Keeper is a long-established brand name for a type of loose-leaf
binder. I might expect a challenge on the name by Mead.

~~~
jballanc
Unless Puppet Labs gets into the business of office/school supplies, I don't.
Trademark protection is limited by the type of product, which is why "Apple"
the computer company and "Apple" the Beatles record label were able to coexist
(mostly) peacefully...until Apple Computer released a music player and entered
the music business.

~~~
crusso
I'm going to extend myself way into pure speculation IANAL-land, but I'd guess
that it depends on how common the term is and consumer confusion over similar
use of the term in another context.

Sure, "apple" can't be protected everywhere in all contexts, just like
"windows" can't be protected everywhere in all contexts... but what about
naming your erectile dysfunction company "Microsoft"?

That's a word used as a specific name, not a commonly used word just being
used as a name for a company in a different market. It would be pretty obvious
that you're leveraging the popularity and consumer brand confusion of
Microsoft.

~~~
hga
In addition to the principle Karunamon mentioned, made up names have greater
protection than words in common usage. Microsoft isn't as exotic as Xerox and
Kodak, deliberately completely made up, but it still gets a greater degree of
protection than, say, Apple.

~~~
crusso
Well, karunamon seems to be disagreeing with me where you are agreeing with
me. Any further clarification would be interesting. Thanks.

~~~
hga
In everything I've ever done or been involved with in startups, I'm not sure
anything besides people was more complicated than trademark law.

Unfortunately, my Amazon search and Google fu isn't good enough to find the
book I learned most of this from, but if you're really interested in this, it
requires a book level and length treatment. E.g. did you known Owens Corning
has a mark regarding the color pink? (Only, or at least originally in the
context of insulation.)

In between, I'm not sure, but try the usual suspects like Wikipedia:
[https://en.wikipedia.org/wiki/Trademark](https://en.wikipedia.org/wiki/Trademark)

~~~
Karunamon
That is a new one on me. I guess it makes sense though.. along those same
lines, UPS has a trademark on a very specific shade of brown (hex 644117).

------
joaomsa
Because of all the great benefits of centralized accounting of our
infrastructure and exported resources we started using PuppetDB when it was in
its relative infancy. We did make the mistake early on of using the built in
DB backend instead of the Postgres.

When I looked at migration strategies there wasn't a real migration tool
available. To interact with PuppetDB I ended up learing a bit of clojure and
rollng my own tool, the built in REPL helped wonders with this (granted it was
only enough to accomplish this task and haven't had a chance to touch Closure
since).

Only kept getting irritated by the startup time which I don't know if it can
be attributed to the JVM, Closure or PuppetDB itself.

------
codeonfire
Does anyone else see dedication to a single language as a flaw? When I read "X
is a Y language company" all I can think is "that company has a long ways to
go." I imagine the people or person there, having found their favorite pet
language and some political energy, forcing it upon everyone else and I feel
angry. I get recruiter emails "looking for a Java developer" and have to
ignore them. The companies just don't get it. Language Y is not going to fit
all needs and cases except for very, very small problems. A company dedicated
to one language is like a Popsicle with dirt all over it.

~~~
gmjosack
I agree with you but I also believe there needs to be limits. I like Google's
strategy of N approved languages.

From an operational perspective there's too much overhead to effectively
running any language in a production environment.

From a maintenance perspective you want to have common skill sets between a
large intersection of employees so you're not the only person doing bug fixes
on a system.

There needs to be a balance for sure.

~~~
crusso
Good points. I took over management of a software development group that had a
four server commercial product that was dependent upon having developers
knowledgeable in all of the following: Windows, Linux, MSSQL, PostgreSQL,
MySQL, C++, C, Java, C#, PHP, Perl, Bash, and Javascript.

The development team was very siloed. Nobody could work on anyone else's code,
not even a little bit.

When a new developer approached me with a module that he had written in
Jython, I almost lost it.

------
walterheck
As a clojure-n00b and a Puppet expert (ahum), this triggered me to do a bit of
research and write down my thoughts:
[http://www.olindata.com/blog/2014/04/clojure-outsiders-
inves...](http://www.olindata.com/blog/2014/04/clojure-outsiders-
investigation)

------
midas007
Not a big shocker. Last time I spoke with Luke, he mentioned client agents
(facter, puppet) might eventually need to be non-Ruby compiled binaries.

------
rch
I'm still trying to figure out how to allocate my attention between Clojure
and Scala, and this just rebalanced the situation (I had been leaning toward
the latter).

I do question their conclusions about OSGi though - it seems like a good fit
for their case despite the complexity. Apache Felix is particularly nice to
work with.

~~~
neverminder
Scala is static typed, clojure is not - that makes Scala faster in many cases.
Scala is also more widely used and adopted by quite a few major companies -
[http://en.wikipedia.org/wiki/Scala_%28programming_language%2...](http://en.wikipedia.org/wiki/Scala_%28programming_language%29#Companies)

------
estebanrules
Maybe I'll actually use Puppet now. Very cool news.

------
mrmondo
This is very disappointing.

Given how often 0-day vulnerabilities are discovered in the Java ecosystem I
can't see how this is a good choice for a critical piece of infrastructure.

We love using puppet, but one big issue we have is it's lack of consistency, a
big part of that is the fact that theres Puppet, Ruby, ERB syntax and
ideologies and now you also have thrown Java in the mix?!

When we saw this news several people in our team have already started looking
at alternatives.

~~~
bpodgursky
The security concerns of in-browser java and java on a server are completely
different. I rarely if ever see security problems for servers running on the
jvm. Almost all problems are with applets.

