0

I am new to apache thrift. Can someone tell me where I can find a good reference for learning thrift. Some of references i have found were somewhat outdated. it's appreciated if it is in Scala.

bula
  • 7,115
  • 5
  • 22
  • 39
  • I listed a number of references to various documents and tutorials just a few days ago (ok, not Scala, but does not really matter): http://stackoverflow.com/questions/20653240/what-is-rpc-framework-and-apache-thrift – JensG Dec 26 '13 at 17:36

1 Answers1

1

The best tooling available to date for Scala/Thrift servers is Twitter Finagle.

Start here for basic samples: http://twitter.github.io/finagle/

The bottom of the page goes in slightly more depth.

To get you started, you need:

  • SBT build definition

  • SBT Scrooge plugin: https://github.com/twitter/sbt-scrooge

  • scrooge-core + finagle-thrift dependency

  • There's also a Maven alternative if you prefer Maven

  • In your project/src/main/scala add a thrift folder.

    If it's a multi-project build, simply add com.twitter.ScroogeSBT.newSettings to a sub-project's settings.

Now you can start defining models in: project/subproject/src/main/thrift/.

namespace java company.firstthrift

struct Test {
   1: required i64 id
}
Community
  • 1
  • 1
flavian
  • 26,242
  • 10
  • 57
  • 95