8 ms·
Trapperkeeper is a new Clojure framework for long-running applications, services
- SmileyKeith 12y agoI'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.
- siscia 12y agoYou can follow planet clojure [1] on twitter[2] or even facebook[3]. [1]: http://planet.clojure.in/ http://planet.clojure.in/ [2]: https://twitter.com/planetclojure https://twitter.com/planetclojure [3]: https://www.facebook.com/clojurian https://www.facebook.com/clojurian
- AlwaysBCoding 12y agoClojure 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.
- hga 12y agoI haven't found that true, especially compared to any other language at this stage of development (complicated by the lack of the modern Internet, but I'm thinking especially about C++). E.g. I'm helping someone with a web application and I've found no need whatsoever for Datomic (PostgreSQL + korma is just fine), I gather that means Edn is irrelevant, Core.async appears to be less than a year old, so I'm not surprised it might be lacking in documentation, and I don't see it as critical for a lot of applications, including mine. Clojurescript: we'll see, I do engines, and would prefer to continue to have others do almost all of that side of things. Granted, it did take me a while to find and get up to speed on a set of libraries to do the web app I'm working on (mostly CRUD with some non-real time backend external communications), but it's been relatively pain free. I started with a recommended set, then as I found I needed to do something new, like JSON, I found a good library in a few minutes with Google and didn't find it at all difficult to fold it in. Did change after a bit my form validation library to Red Tape, which modulo one detail (limited data available to form level cleaners (functions that act on more than one item in the form)) is superb. And "superb" in general describes my experience doing all this. And I fully expect documentation and other learning resources to continue to improve as Clojure gets greater acceptance. (Disclaimer: I'm an old Lisp and Scheme hand, e.g. not someone who had to learn anything conceptually new to use loop and recur. I could see the above plus learning basic functional Lisp concepts to be brutal if you're new to everything. On the other hand, I can remember the days when learning MACLisp required reading an old David Moon manual and then the archives of a mailing list following it's publication; thank goodness there was a really great Lisp Machine Lisp manual and they were just starting to be somewhat available to use and learn on.)
- siscia 12y agoI am definitely not the best developer you will ever find, however I learn clojure by myself and it wasn't so hard... (This is exactly the behaviour you are point as wrong, and I know it.) The resource I had (back in the 2011/2012) were just a book, `The joy of Clojure`, my background was some C and mostly python, nothing about FP. I don't see any of ClojureScript, Edn (???) nor core.whatever so fundamental... Those are just other tools, you can write any webserver using the old JS, JSON and any other lib you may need... (Anyway you should not try to learn clojure building web server, are the less clojure-y piece of software you can build IMHO) IMHO, the biggest problem is the paradigm shift that most developer need to have in order of learn clojure.
- brunov 12y agoAphyr's Clojure from the ground up [1] series is the best place to start in my opinion. [1]: http://aphyr.com/tags/Clojure-from-the-ground-up http://aphyr.com/tags/Clojure-from-the-ground-up
- platz 12y agoThis course on pluralsight wasn't half bad and covers a lot of a basics. I knew how clojure felt and behaved, but IMHO you still have to memorize most of the core library, or most code will look confusing. http://pluralsight.com/training/courses/TableOfContents?courseName=clojure-fundamentals-part-one http://pluralsight.com/training/courses/TableOfContents?cour...
- puredanger 12y agoI find http://clojure.org/cheatsheet http://clojure.org/cheatsheet to be a great help in getting an overview of what's in the core library.
- platz 12y agoYes the cheat sheet is great once you 'have a foot in the door', so to speak. For beginners, getting familiar with namespaces in the REPL quickly is key, if you're trying to load a sample of code froma file. Also another gotcha is multiple arity functions which I haven't seen before (in a dynamically typed language).
- base698 12y agoI have ample Java experience and had been using JavaScript and Node for three years now. I have spend quite a lot of time programming in Clojure with just toy examples and am building a simple game to get a handle on it from a more practical standpoint. That said I too still can't figure out how to use leiningen and it seems clunky and slow. It's also easy to find examples that don't work. I'm not sure if getting it to work with as little hassle as npm would help it's growth, but seems like it couldn't hurt.
- technomancy 12y agoPlease open a bug report in the Leiningen issue tracker if the problems you encountered came from the official documentation.
- a-saleh 12y agoWe have been using clojure for 2 years for testing web apps in our q/a team. My journey looked ~like this: 1) Managed to get counter-clockwise working, played around with http://tryclj.com/ http://tryclj.com/, solved most of the http://clojurekoans.com/ http://clojurekoans.com/, and first ~15 of 99 functional problems that float around the web. 2) what helped, that I have already gone through a course of haskell while undergrad, so functional paradigms weren't that foreign :-) (immutability, laziness, partial application, e.t.c), so if you want to give it a try, you can look at Learn You a Haskell :P 3) we have since moved to python, and when I am sad, I try to write my code without loops, but using (for in) generator for everything, pretending I am still using lisp :P 4) clojuredocs.org/clojure_core/ were quite helpfull but after a year, clojure 1.5 was already out, and lots of functions recieved updated counterparts, so I spent quite a lot of time reading their sources ...
- neverminder 12y agoI'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.
- gress 12y agoFirst of all, you haven't indicated any problems with Clojure - just a circular argument about lisp. Second, Typesafe is a tiny company, and the most prolific committer to the Scala compiler just quit - not just Typesafe, but Scala altogether. Doesn't seem rock solid to me. Clojure has several companies behind it.
- teacup50 12y ago> Second, Typesafe is a tiny company, and the most prolific committer to the Scala compiler just quit - not just Typesafe, but Scala altogether. Doesn't seem rock solid to me. Paul Phillips did NOT quit Scala altogether: https://github.com/paulp?tab=activity https://github.com/paulp?tab=activity This is a surprising bit of FUD that has taken hold amongst gleeful Scala haters.
- virtualwhys 12y agoIn all fairness paulp has been bashing the shizazz out of Scala since his departure. And yes, he's still involved, but far less so than before when he was working full-time on the compiler at TypeSafe. On the plus side, Dotty, the new "simplified" Scala compiler, is in the works and collections library will likely be overhauled in the process. as for Clojure, typed Clojure looks interesting, but otherwise the little rascal Haskell is my Scala escape hatch for the time being.
- gress 12y agoI'm not a scala hater. I've used it in production, and produced more than one open source library, and attended scala conferences at my own expense. I'm simply pointing out that it doesn't have a rock solid base. I would like to use scala more, but I found clojure easier to use and equally powerful in practice.
- sharms 12y agoThis 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.
- ams6110 12y agoTrapper 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 12y agoUnless 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 12y agoI'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.
- Karunamon 12y agoNobody's going to go looking for paper organizers and end up on a programming website or vice versa.
- Turing_Machine 12y agoUnless they Google it, you mean? Edit: right now Googling "trapper keeper" brings up the Mead product. That could change if this product gets sufficient Google juice. I can't imagine that Mead would be happy about that. Mead has annual revenues of $6 billion, so they could hire enough lawyers to make life plenty miserable, even if they didn't wind up winning in the end.
- Luyt 12y agoA 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-Hickey http://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hic...
- gmjosack 12y agoI'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 12y agoOne is Python, one is Clojure. Different namespaces; no collision.
- Twirrim 12y agoGiven both are in the field of Sysadmin/Operations, I can definitely see there being confusion.
- shittyanalogy 12y agoSo you both are re-appropriating someone else's trademark.
- codeonfire 12y agoDoes 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 12y agoI 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 12y agoGood 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.
- bloat 12y agoNot sure where you're getting this. The article says they currently do a lot of Ruby work, and they're moving to Clojure for most new back-end projects. It also talks about how Trapperkeeper works with Clojure, JRuby and Java modules. You may well be right about single language companies, but I'm not seeing any evidence that Puppet Labs is one of them.
- nigelk 12y ago
- rch 12y agoI'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 12y agoScala 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%29#Companies http://en.wikipedia.org/wiki/Scala_%28programming_language%2...
- joaomsa 12y agoBecause 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.
- mwcampbell 12y agoPerhaps 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.
- discreteevent 12y agoDebugging: You can step from one service into another in the same debugging sesssion. Profiling: Analyse one snapshot to find the main bottleneck across a number of services. Performance, security etc. etc. Basically the ability to use a lot of the things that make the JVM powerful and save you time and money. (Not only that but the things that make clojure powerful like its concurrency mechanisms etc across services) Besides one process is often simpler than many. Interprocess communication suffers from some of the "Fallacies of Distributed Computing." If you like to keep your UNIX process mental model just think of JVM threads as processes. (One other thing: Running services in multiple JVMs uses more heap than multiple services in one)
- dsl 12y ago> One other thing: Running services in multiple JVMs uses more heap than multiple services in one That sounds like a failure of the JVM. You are also putting multiple independent services in the same fault domain.
- 12y ago
- estebanrules 12y agoMaybe I'll actually use Puppet now. Very cool news.
- midas007 12y agoNot a big shocker. Last time I spoke with Luke, he mentioned client agents (facter, puppet) might eventually need to be non-Ruby compiled binaries.
- mrmondo 12y agoThis 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 12y agoThe 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.
- cprice404 12y agoTo be clear: these changes should be totally invisible to most or all of our end users. We'll still be packaging our server-side applications as rpms/debs/etc., and none of the client-side tools are changing at all as a result of this. So you won't need to learn any new syntax. If you're using PuppetDB, then you're already using this new technology stack; we're just making it more modular so that we can re-use it in other places.
- walterheck 12y agoAs 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-investigation http://www.olindata.com/blog/2014/04/clojure-outsiders-inves...