0

I am working on a project where we are looking to build a REST API from scratch. So my initial thoughts were to utilise one of the relatively new aysnc non-blocking I/O frameworks.

I've been looking at the Typesafe framework (Scala, Akka, Play). Is this a good solution for a RESTful API?

Are there any good (up to date) tutorials/examples that people could provide links to?

Also, I came across spray.io. From what I can gather this seems to be a good alternative to using Play if all I want to build is a REASTful API? Is that true? Any good tutorials for this?

I would really like to use Akka and its Actors model from the outset.

Separately I read that Typesafe acquired spray.io to integrate it into the Typesafe framework. Has this been done yet? If I download the latest version of Typesafe do I get spray bundled in with it?

Finally, hosting. What would people suggest for hosting such an API with this type of framework? AWS, Google, Cloud Foundry, Heroku? The service will ultimately need to be extremely scalable.

Does anyone know of any good links that cover a lot of the above? i.e. deploying a spray based API on Cloud Foundry for example?

Thanks for the help.

1 Answer 1

2

Your question is far too broad, prone to opinion-based answers. Anyway, my two cents:

I've been looking at the Typesafe framework (Scala, Akka, Play). Is this a good solution for a RESTful API?

IMHO, the best current solution if you want to both grow your system and sleep in peace.

Are there any good (up to date) tutorials/examples that people could provide links to?

Plenty of them, all around. Check the following, for example:

http://akka.io/docs/ (the official Akka documentation, which I find great) https://typesafe.com/activator/templates (templates for almost anything you would want to learn/do, including Akka, Play, Spray, and many more) https://www.playframework.com/documentation/2.3.x/Home (official Play documentation, in case you want to use it)

Also, I came across spray.io. From what I can gather this seems to be a good alternative to using Play if all I want to build is a REASTful API? Is that true? Any good tutorials for this?

If you are planning to do only a RESTful API, yes, seems like a good way to go. For tutorials, see the official site and the activator templates listed above.

Separately I read that Typesafe acquired spray.io to integrate it into the Typesafe framework. Has this been done yet? If I download the latest version of Typesafe do I get spray bundled in with it?

As far as I understand, Akka is implementing its very own http module, based on the work of spray.io team. See here for more details. Play will be eventually built upon the Akka streams and http modules. It's still marked as experimental and the process is still going. You can use spray in your project just adding the dependencies. There's no such thing as "latest version of Typesafe", unless you are speaking about the Typesafe Activator, which is the bundle of tools (including Play and Akka and some nice web interface) provided by Typesafe. Normally, what you need will be downloaded automatically. See the examples for more information.

Finally, hosting. What would people suggest for hosting such an API with this type of framework? AWS, Google, Cloud Foundry, Heroku?

No idea. Until now I have been using AWS successfully, but since I have not tried other options, I can not give opinion on that.

Does anyone know of any good links that cover a lot of the above? i.e. deploying a spray based API on Cloud Foundry for example?

For Cloud Foundry specifically, I don't know one.

Hope it helped!

P.S.: your question is too broad. Try in the future to present real concrete problems and your attempts to (unsuccessfully) solve it.

Not the answer you're looking for? Browse other questions tagged or ask your own question.