Any experience with transitioning from Rails?


#1

Hi All,

Does anyone here have experience in transitioning a Rails app to clojure? Currently my webapp is mostly divided into 3:

  1. static/rails generated pages
  2. api end points (via JSONAPI-Resources)
  3. several ember front-end (e.g. admin, dashboard, requests, …)

I’d like to migrate to use clojure for the entire thing. Several my immediate concerns are:

  1. how to transition authentication and session. I currently use devise and cookies. As a first step, I am thinking about moving to token/JWT. This will allow me to implement the same on the clojure side so I can start migrating the API endpoints.
  2. background job replacement. Currently I’m using sidekiq. Are there any good alternatives? Since I’m planning on using beanstalk/AWS in general, I am considering just use SQS. Any recommendations on library and job monitoring?
  3. logging/monitoring. Currently my service is hosted on Heroku. So for logs I use Papertrail. For monitoring I use Librato. However, since we’ve gotten a very sizable amount of AWS credit, I’d like to move the service onto AWS. Any suggestions on alternatives?

Finally, any general caveats?


#2

Hi @gniquil,

Thanks for the question.

I don’t have any experience with Rails, but I can throw in my two cents:

I recommend doing such a thing in pieces. Move parts of your service into Clojure that are easily separated out, one at a time.

I think you’re onto something there. I’m not sure how devise works, but regular HTTP cookies + sessions are possible in Clojure.

I’ve used SQS and it’s a decent service with a simple API. But I wonder if you need background jobs. Remember, the JVM has a lot of nice threading model. Often a move to the JVM allows you to get by without an external queue. Evaluate how many jobs you really need, or whether the sidekiq queue is used as a communication mechanism between servers.

Heroku is entirely possible for Clojure and a solution I prefer. I’ve also used Elastic Beanstalk. And of course EC2 is ok. Am an not familiar with the other computing services on AWS.

I just want to reiterate that you do one piece at a time! Otherwise you’re doing a big rewrite.

I hope that helps.
Eric