Hacker News new | past | comments | ask | show | jobs | submit login

If you guys really into Scala, I really recommend trying Finagle (https://github.com/twitter/finagle). It was also created by Twitter. It was a lightweight HTTP server and client for Scala. It's my favorite. With just a "single" line of code, you can create an HTTP server in Scala.

I usually combine it with Rogue (https://github.com/foursquare/rogue), an "ORM"-like for MongoDB. I used Finagle and Rogue to build a fast and lightweight REST API.




Finagle doesn't tend to be so well integrated with the rest of the ecosystem - IIRC there isn't even a scala 2.10 release out yet. I'd recommend spray (http://spray.io ) if you want to do async http in scala.

(That said, I do think the twitter scala style guide is very good: http://twitter.github.com/effectivescala )


Finagle and "util" both have 2.10 builds available.

As for bridging Twitter Future with (now) Scala Future, that should be coming soon, once the execution context stuff is squared away.


Does it support Swagger now? For my last implementation, I wanted a good automatic API documentation, and I'd rather have the client code in a generated way, and of the three Scala microframeworks that I had a look at, only Scalatra had kinda solid Swagger support. Neither Spray nor Finagle did. Though in hindsight the Swagger release in the current Scalatra is a bit old and thus it has tons of bugs and issues that are fixed in current Swagger but I found it impossible to just update Swagger.


I believe that Twitter tends to define their services as Thrift interfaces, which forms it's own documentation for the application rather than having to crawl through code to find which REST URL endpoints are being listened to.

I could be wrong but I think Finagle reflects this in that Thrift is more of a first-class citizen than REST (although I'm sure the latter is possible).


ReactiveMongo (http://reactivemongo.org/) is coming alone nicely as well, and has some great non-blocking and reactive features.


As someone getting into scala, where can I find the list of top available libs? For clojure I just browsed github, but I feel there probably is some resource out there I'm missing.


What I love about Scala is that all (most, if not all) libraries built in Java can also be used. This includes those awesome apache libraries.

For Scala written libraries, here's a link to Github page: https://github.com/trending?l=scala


Whenever possible I avoid using Java libraries in Scala. Scala and Java have very different programming styles, which are codified in the APIs for libraries. You lose the benefit of Scala style when you are forced to program against a Java library.



this is a pretty good blog, but it's best to ask on mailing list or IRC if googling cant find something

http://notes.implicit.ly/


How do Rogue and Casbah stack up against each other?


Very differently (I'm the original author of Casbah, though I gave up maintainership a few months ago when I joined Typesafe).

Casbah was always created to be a straight MongoDB driver, with no ORM features. It has no dependencies on "external" projects other than the MongoDB Java driver, so that you can use it where-ever and write standard queries.

It has been awhile since I played with Rogue, so forgive any mistakes but the big one: Rogue is specifically built as an ORM, with integration into Lift.

Really, you are going to use Rogue vs. Lift to accomplish very different tasks. There is Salat (https://github.com/novus/salat), to provide ORM features on top of Casbah.

Pick which tool works best for your use case! I happen to think quite highly of Rogue as well, as there are some tremendously impressive features in it including detecting potential Table scans. Rogue is fairly well battle tested on the Foursquare systems, and the authors are both very, very good at what they do.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: