Question

Such questions have been asked before - but all of the answers are outdated now.

I am looking forward to work on a Scala based webapp. I understand this question can be split into two, but I am posting them as one because they rely on same context, there being a dependency on the hosting platform and frameworks used.

I have read multiple (awesome) debates on Play! and Lift, but cannot find a good comparison between Play! 2.1 and Lift. How do I decide which one is better for my scenario (a social network website) ?

Similarly, this discussion has some very good arguments as to which platform to use for if I go with Lift, but it's from 2010 and seems outdated. The recommended provider (stax.net) is dead (or I guess it's merged with cloudbees.com). I am personally inclined towards GAE, as they are quick to start with, but unsure if the issues still prevail :

  1. Support for actors (I am not sure if Akka helps us solve this problem)
  2. Requests for a given session being served by different JVMs without notice to running app
  3. Quoting David Pollak (lead author of Lift) :

GAE is slow and non-scalable, despite Google's claims (everyone I've spoken with that have tried to scale GAE apps have failed and gone elsewhere). GAE locks you into a tremendously suboptimal storage mechanism. GAE is free, but so is Stax and there are many inexpensive options including SliceHost. Next up, you've got Amazon EC2 and RackSpace. So, I haven't found a good reason for anyone to use GAE. And if there's no good reason to use GAE, devoting a pile of resources to code around the GAE JVM incompatibilities (e.g., no new threads) seems like a waste.

Another issue if I go with GAE is lack of Play! 2.1 support. I still don't see a module for that. Another issue is difficulty to migrate to other databases (although I hear migrating to MongoDB should be relatively easier) in the future. Worst case would be to move out of GAE and use AppScale.

Was it helpful?

Solution

Personally I use Lift, Cloudbees, and MongoLab as my first choice for most of my projects. I tried several cloud hosting services to no avail (Heroku and RedHat in particular. I don't think I tried GAE due to the post from David Pollak that you have already referenced). To use cloudbees, you just need an sbt plugin. Then it is as easy as running the cloudbees-deploy target. Within a minute, your code is up and running. I was floored by how easy it was. I went with Mongo primarily because of this excellent g8 template (note, there is now an SQL equivalent)

Another thing I really like about Cloudbees and MongoLab is they both have free services. It's great for me because I only work on these projects in my free time, so I don't want to spend any money while my ideas are half-baked.

As for Lift, I can't compare it much to Play. I downloaded/installed play and was immediately turned off by how MVC it is. I felt that the view-first approach, albeit foreign to me, seemed to be a much more intuitive and powerful way to build web applications. I love how Lift doesn't obscure from me the fact that I am indeed developing a web application. I often feel that MVC frameworks try to keep all of the HTML/CSS/JS etc at an arms-length.

OTHER TIPS

The question is quite open so I will share my experience and opinion regarding Scala web app development as it might help you with your decision.

I built my first scala web application using Scalatra and Scalate using Jetty as the server. The app is hosted on an Amazon EC2 instance and I've had no problems with this... it's been running since the end of 2011 with only one small blip that took 10 mins to resolve. I found it a good experience for learning to use Scala in web applications.

http://www.scalatra.org/

Typesafe (http://typesafe.com) appear to have opted for the Play Framework and so for my next scala based web app I am likely to go for Play. A book I have been reading on the Play Framework is "Play for Scala". It has just been published this month (Oct 2013).

http://www.manning.com/hilton/

My impression is that Lift was the go-to framework in the past but that this has shifted to the Play Framework.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top