Search code examples
rubyscalacross-platformthrift

Confused about Thrift, what does it really do?


Can someone explain to me what thrift really does?

Say i have a Rails app, and I also have some code written in Scala.

Could thrift be used to generate an interface for my Scala code so that I could call it from Ruby?

Would the Scala code have to be written as a daemon for this to work?

I'm not really sure what Thrift's job is, other than it is used to link between various languages. Does it communicate over a socket?


Solution

  • Thrift is simply a binary serialization protocol. It is cross-language, so you can serialize in Scala, and then unserialize in Ruby.

    Then you have to move the data, that's another story. You can use files, play directly with sockets, use a server, etc.