Month: September 2015

  • Bidi vs Silk

    Bidi vs Silk

    In previous blog posts I mention that Bidi and Silk are essentially equivalent. I don’t believe this anymore. I now prefer Silk and I can show you why with a little example. First, let’s define some routes: (def silk-routes (domkm.silk/routes [[:home-page [[]]] [:about [[“about”]]]])) (def bidi-routes [“/” {“” :home-page “about” :about-page}]) When it comes to defining […]

  • Bidi vs Silk

    Bidi vs Silk

    In previous blog posts I mention that Bidi and Silk are essentially equivalent. I don’t believe this anymore. I now prefer Silk and I can show you why with a little example. First, let’s define some routes: (def silk-routes (domkm.silk/routes [[:home-page [[]]] [:about [[“about”]]]])) (def bidi-routes [“/” {“” :home-page “about” :about-page}]) When it comes to defining […]

  • Isomorphic JavaScript (with ClojureScript) for pre-rendering single-page-applications, part 2

    Isomorphic JavaScript (with ClojureScript) for pre-rendering single-page-applications, part 2

    In part 1 I covered the basic problem that SPA (single page applications) face and how pre-rendering can help. I showed how to integrate Nashorn into a Clojure app. In this second part, we’ll get to actually do the rendering as well as improving performance. Without further ado, part 2 of isomorphic ClojureScript. Rendering the […]

  • Isomorphic JavaScript (with ClojureScript) for pre-rendering single-page-applications, part 1

    Isomorphic JavaScript (with ClojureScript) for pre-rendering single-page-applications, part 1

    I don’t think I have found the ultimate solution for this problem yet but I have reached a level in which I’m comfortable sharing what I have because I believe it’ll be useful for other people tackling the same problem. The reason why I doubt this is the ultimate solution is because it has not […]

  • Using New Relic with Clojure

    Using New Relic with Clojure

    This post describes how I got New Relic to run with my Clojure project. I’m using Heroku but most of what I say here should be applicable in other environments and I’ll try to point you in the right direction when it doesn’t. Please, feel free to comment with improvements or corrections. There are already […]

  • jar-copier 0.1.0 released

    jar-copier 0.1.0 released

    jar-copier is a Leiningen plug in to copy jars from your dependencies to your source tree. It’s a very small simple utility that proved to be necessary to have a sane setup with Java agents (New Relic for example). It’s very simple to use. Put [jar-copier “0.1.0”]  into the :plugins  vector on your project.clj. To […]

  • Limiting threads (workers) with Jetty in Clojure

    Limiting threads (workers) with Jetty in Clojure

    While trying to understand the behaviour of my implementation of server side JavaScript execution for pre-rendering SPAs (Single Page Applications), something I’ll write about later on, I quickly run out of memory on Heroku. What I believe was going on is that my Heroku machine was trying to handle too many requests at the same […]