Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Spray framework production ready? [closed]

Tags:

rest

scala

akka

Spray framework (spray.cc) seems to be a fun and productive way to build REST services using Scala & Akka. I come from Java + Spring school, where everything is well documented, mature and has good community support.

While Spray is fun to play with but it has its rough edges. I am skeptical about using it in a real application.

Has anyone used Spray in production environment? What about the open source community around Spray? Is it possible to get help easily?

UPDATE: How does Spray compare against BlueEyes (https://github.com/jdegoes/blueeyes)?

like image 672
Aravindan R Avatar asked Sep 13 '11 05:09

Aravindan R


3 Answers

We are using Spray in a telco middleware application and I would say Spray is production ready and,

  • lite weight and seamlessly integrates with Akka
  • Can easily test the services (No need to fire the container or Akka micro kernel)
  • Well documented comparing to BlueEyes
  • Marshaling/unmarshaling JSON is simple & efficient
  • Can get support from spray user mail group.

I think BlueEyes does not have seamless integration with Akka or good documentation. Not sure it can be deployed inside a web container or akka kernel. Spray's some features are copied from BlueEyes too.

-Jestan

like image 73
Jestan Nirojan Avatar answered Nov 18 '22 19:11

Jestan Nirojan


Althouh we are not yet in production, we are using spray for Shopolate, a new startup. So far our tests are showing an excellent throughput, and developing with it is very efficient.

We found no bugs so far.

Answers to questions on the Spray forum are coming quite quickly, but it still remains a starting community. I found the documentation to be quite complete and clear. One big plus is the lightweight / eleganc of the underlying design, which makes the spray source code very easy to grasp and extend.

The only downside that impacted us so far is the relative small sets of features, but it is increasing steadily.

I don't know BlueEyes, so I can't answer to the second part of the question.

like image 44
Julien Avatar answered Nov 18 '22 20:11

Julien


Spray is a really nice framework with some exceptionally smart guys behind it. It gives you simple code that scales well in terms of both features and concurrent users. If you want to end up with an application that reads well (good structure, easy to find which url maps to which feature etc), Spray is awesome.

Not all is great though.

The tight coupling with Akka is a two sided sword. For simple applications it adds unnecessary complexity. Think carefully if you want to embrace Akka before going for Spray.

At this moment Spray (1.1M4) has very limited documentation for the directives, so you're on your own mostly, reading advanced Scala code, scratching your head.

Backwards compatibility is not taken seriously so far. Expect to touch all your code when upgrading. This is as much to blame on Akka and Scala itself as on Spray. If you don't like this go with something boring and reliable like Spring MVC.

The Scala language constructs used are so hard to parse correctly that most IDE's get lost and you'll have to wait for the actual compiler to do its job before you know what you're up against. I said before that the code was easy to read, but that is only at a high level. You very easily sort of get what is going on, but to actually get what's going on you'll need a lot of stack space in your head.

I'm using Spray in production and sticking with it (probably), but it's not an easy ride. Expect to be frustrated and delighted in equal measures.

like image 32
iwein Avatar answered Nov 18 '22 19:11

iwein