3

My organization has chosen to adopt Thrift messaging as the lingua franca to integrate our clients and services. All our services are written (or will be written) in Scala while we have clients written in other languages.

Currently (to my knowledge) Scrooge is the only Thrift IDL compiler for Scala and it targets Finagle. I would like the option of building services on Spray.

What are my options using off-the-shelf (open source) software, if any?

Randall Schulz
  • 26,420
  • 4
  • 61
  • 81
  • Really, what is the objection to this question? It certainly fits the Stack Overflow criteria. It does not appear to repeat another question, as far as I could tell. – Randall Schulz Feb 04 '14 at 14:20

1 Answers1

5

We are avid Thrift/Finagle users and can honestly say there is nothing out there that compares to Finagle.

A few things you get out-of-the box with Finagle:

  • Automatic compilation of services and clients with Scrooge
  • Integration with both Java And Scala of data structures(again Scrooge)
  • Ability to add Thrift dependencies to a project.(Scrooge will extract and compile IDL for jars etc).
  • You have the maven-finagle-thrift plugin, which is a Maven flavour of Scrooge.

Now about Finagle, have a look here. Compared to Finagle, Spray is a toy. Finagle is by far the best Scala tool for distributed services:

  • Scalable centralized logging out of the box(Zipkin)
  • Automatic management, metrics and a lot more goodies with Twitter Server.
  • Out-of-the-box Zookeeper and Mesos integration
  • Highly efficient separation of concerns(ThriftMux and handlers etc.)
  • A plethora of protocols for high performance tools
  • A concurrency model that will easily outperform Akka on RPC requests(where actors can't be used).

I'm not aware of other Thrift options so deeply integrated with Scala and there's little reason to go outside of Finagle. You do however have to go with the full ecosystem to really benefit from it.

Community
  • 1
  • 1
flavian
  • 28,161
  • 11
  • 65
  • 105
  • 2
    I have plenty of Finagle fans around and am not looking for a Finagle vs. Spray comparison or persuasion. – Randall Schulz Jan 29 '14 at 16:24
  • @RandallSchulz Understandable, bottom line Scrooge is the only mature Thrift compiler for Scala, but it's deeply integrated with Finagle. If you want Spray you can probably go with Thrift to Java compilation – flavian Jan 29 '14 at 16:25
  • @RandallSchulz I left out Spindle. https://github.com/foursquare/spindle, looks good enough to get things done. You can avoid scrooge after all. – flavian Feb 16 '14 at 21:03