What is the difference between choosing Scala middleware?

Note: Unfortunately, this question has been closed, but I am trying to support it if someone else encounters the same question.

I was looking for a good solution to develop a service in Scala that will be hosted between mobile devices and existing web services.

Current list of viable options:

There are probably more options. How to decide which one to use? What are the features (sorry for the pun ;-) of a good Scala middleware choice. On the one hand, I would like to go to Akka, because it is part of the TypeSafe Scala stack, but on the other hand, something like Finagle has a rich set of libraries and simplifies the installation of plumbing. The spray looks beautiful and easy to use.

Any advice, ideas or experience are welcome. I am sure that someone there should have some experience with some of them that they will not mind sharing.

UPDATE:

I would like this question to be reopened. A good answer to this question will help new Scalateers avoid related errors.

UPDATE 2:

These are my own experiences, starting with the question:

Finagle - I used Finagle for the project and it is durable.

Spray - In my last project I use Spray and I am very satisfied. Recent releases are built on Akka 2, and you can run them directly using the Spray-can library, which eliminates the need for a web server. Spray is a collection of libraries, not a framework and very modular. Learn about Spray: Akka’s REST on video provides an excellent overview, and this Cakesolutions blog shows a really good development approach and architecture.

UPDATE 3:

Life moves pretty fast. If you do not stop and do not look around, you can skip this. - Ferris Buller

These days the choice has become easier. In my humble opinion, Spray won the battle. It is integrated into Akka to become the next Akka HTTP. I am using Spray now on several projects and I can honestly say that this is the fantastic and best supported software I have ever come across.

This does not answer the initial question, but at least gives some indications of why Spray seems to be the best choice in most cases. It is extremely flexible, non-blocking and very stable. It has both client and server libraries and an excellent test kit. Also, look at these statistics to get an idea of ​​performance: Web platform tests

+63
scala akka spray finagle
Jan 13 '12 at 8:59
source share
2 answers

I personally started with the spray a long time ago and tried everything else that was there for Scala. While Scala, spray, acca, shapeless and fairy tale, of course, have a little learning curve, as soon as you start digging and really learning how you should use technology, they make sense, and I immediately saw the benefits, especially for the kind of work I'm doing right now.

Personally, I think that nothing really resists splattering to create both servers and apriots, http clients and everything you want. What I like about the aerosol is what they built with Akka. It might have been a really early project when I first started using it, but architecture made sense. These guys knew what they were doing in terms of taking advantage of using the actor model and the absence of any blocking operations.

While the actors can get used to it, I like it. They made my systems very scalable and cheap to work because I do not need as promising equipment as in the past. Plus, the spray has a spray-traced DSL, so giving a rest api is relatively easy if you follow the rules ... don't block. This, of course, means that you do not go and try to connect to the apache commons http client to make client requests from api or participants, because you will return to blocking models.

Until now, I am very pleased with the spray, typical and acca. Their models simply naturally adapt to creating very resilient systems that come back on their own if something should happen and you take the wrong approach. One beef I have with a sprayer (and this is not a spray failure) is the robust IDE support for DSL routing. I absolutely despise Eclipse and have always been an IDEA user. When I started using the Scala plugin, everything looked fine. Then my dsl routing naturally turned into larger beasts. Something about how IDEA analyzes this code, it holds its pants at any time when confronted with something spraying or formless. It is to such an extent that it is not used (I type 2-3 letters and must wait 5 minutes to regain control).

So, for any atomized or heavy formless code, I run emacs with ensime, ensime-sbt and scala-mode2. Now, if I could only get the Cassandra library with astyanax quality and built using a more non-blocking architecture.

+2
Jun 24 '14 at 7:08
source share

Here you can find a great list of scala resources with a brief description of all the alternatives you have listed.

From my own experience I use Scalatra and it is tiny, simple and efficient for things like displaying uri and calling web services.

0
Jul 21 '14 at 21:03
source share



All Articles