News for hackers. Stuff that matters.
Re:Scala School by MojoJolo on Monday August 19, 2013 @10:26AM (#6237381)
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.

Re:Scala School by lmm on Monday August 19, 2013 @11:25AM (#6237719)
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 )

Re:Scala School by theatrus2 on Monday August 19, 2013 @12:18PM (#6238025)
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.

Re:Scala School by terhechte on Monday August 19, 2013 @10:56AM (#6237539)
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.
Re:Scala School by brown9-2 on Monday August 19, 2013 @11:12AM (#6237642)
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).

Re:Scala School by atto on Monday August 19, 2013 @10:44AM (#6237481)
ReactiveMongo (http://reactivemongo.org/) is coming alone nicely as well, and has some great non-blocking and reactive features.
Re:Scala School by smrtinsert on Monday August 19, 2013 @10:54AM (#6237531)
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.
Re:Scala School by MojoJolo on Monday August 19, 2013 @12:41PM (#6238150)
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

Re:Scala School by mikegagnon on Monday August 19, 2013 @01:58PM (#6238595)
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.
Re:Scala School by cgag on Monday August 19, 2013 @02:39PM (#6238829)
Re:Scala School by gtani on Monday August 19, 2013 @10:58AM (#6237554)
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/

Re:Scala School by SubMachinePun on Monday August 19, 2013 @01:09PM (#6238298)
How do Rogue and Casbah stack up against each other?
Re:Scala School by rit on Monday August 19, 2013 @07:32PM (#6240608)
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.