0

I have couple of questions related to building high-scalable REST-API is scala domain.

  1. What is the recommended way of building high-scalable REST-API , spray.io or PLAY2-MVC
  2. Since Spray.io is getting converted to Akka-http, we have double mind on using the spray-library
  3. Is Play.MVC.Controllers actor based system, coz I don;t see actor reference in the class

trait Controller extends Results with BodyParsers with HttpProtocol with Status with HeaderNames with ContentTypes with RequestExtractors with Rendering

Thoughts please

Dave
  • 962
  • 5
  • 19
  • 44

1 Answers1

2

Play is a full stack framework (similar to RoR, but without many of the weakness's that RoR has). Play (by far) has the best support for client side tooling (i.e. stuff like coffee/less/require.js integration)

On the other hand, if you are strictly doing an API, akka-http/spray may be a better choice.

Akka-http is easy to understand and is quite scalable , so I would recommend using Akka-http.

For the answer of your third ques: Yes Play is itself built on akka : How is Akka used in Play?

For more info you can see this reddit page where many have given it a try: https://www.reddit.com/r/scala/comments/3qyg2m/which_should_i_use_to_build_my_restful_api/

Community
  • 1
  • 1
Shivansh
  • 3,454
  • 23
  • 46
  • @Manjesh: If you find the answer worthy enough please upvote and accept the answer ! – Shivansh Aug 05 '16 at 16:36
  • Agreed. Akka-http is the way to go, however since its experimental for now, it would be better to maintain a thin layer of abstraction between spray.io and your code, so that you can easily migrate to akka-http in future. Thanks – Dave Aug 13 '16 at 10:13