Questions tagged [thrift]

Thrift is a software framework for scalable cross-platform, cross-language services development available from Apache.

Thrift combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, C, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, Smalltalk, Delphi, Graphviz, Go and OCaml.

Thrift's primary goal is to enable efficient and reliable communication across platforms and programming languages by abstracting the portions of each language that tend to require the most customization into a common library that is implemented in each language.

Originally developed at Facebook, Thrift was open sourced in April 2007 and entered the Apache Incubator in May, 2008. Thrift graduated from the Incubator in October, 2010.

1849 questions
10
votes
1 answer

What is the purpose of Thrift parameter numbering?

What is the purpose of the numbers before each parameter (field identifiers)? Why does it jump from 5 to 16? struct Tweet { 1: required i32 userId; 2: required string userName; 3: required string text; 4: optional Location loc; …
Daniel Que
  • 1,684
  • 3
  • 17
  • 30
10
votes
1 answer

How to write c++ spout/bolt on Storm and Thrift usage in Storm

From here: Storm was designed from the very beginning to be compatible with multiple languages. Nimbus is a Thrift service and topologies are defined as Thrift structures. The usage of Thrift allows Storm to be used from any language. I see that a…
weima
  • 3,929
  • 5
  • 30
  • 51
10
votes
4 answers

Thrift transport in javascript client

I'm trying to build a javascript client for my Thrift server. The server is up and running and I can get calls to the server working with a PHP client. I just can't figure out the javascript client. In particular, instantiating the transport baffles…
The Demigeek
  • 693
  • 3
  • 12
  • 25
10
votes
1 answer

Using Apache Thrift with Node.js

I'm trying to use Apache Thrift as an RPC mechanism for node.js. However, the official Thrift tutorial for node.js appears to be incomplete, and doesn't describe how to access Thrift services from node.js. Is it yet possible to use Apache Thrift…
Anderson Green
  • 25,996
  • 59
  • 164
  • 297
10
votes
5 answers

Thrift: Is it possible to do only serialization with C++ Thrift library?

With C++ Apache Thrift library, is it possible to use only Serialization/Deserialization and not use RPC services? As I understand from this page, it is possible to do with Java library. However, I could not find the similar classes for C++ library.
Lazylabs
  • 1,374
  • 14
  • 23
9
votes
8 answers

Would you recommend Google Protocol Buffers or Caucho Hessian for a cross-language over-the-wire binary format?

Would you recommend Google Protocol Buffers or Caucho Hessian for a cross-language over-the-wire binary format? Or anything else, for that matter - Facebook Thrift for example?
Vihung
  • 11,505
  • 15
  • 52
  • 76
9
votes
3 answers

How thread safe is thrift? re: I seem to have requests disrupting one another

edit Apparently what I was hoping to do is outside of the scope of thrift... If I make sure there is never more than one client on the port, everything is a-ok. Of course this kind of defeats the purpose as I'd like to have several reusable…
juhanic
  • 753
  • 6
  • 15
9
votes
3 answers

Using C++ for backend calculations in a web app

I'm running a PHP front end to an application that does a lot of work with data and uses Cassandra as a data store. However I know PHP will not give me the performance I need for some of the calculations (as well as the management for the sheer…
Stephen Holiday
  • 695
  • 4
  • 11
9
votes
3 answers

Type has not field or method Read (but it does)

I'm stumped on this one. In the project that I'm working on, we generate go code from Thrift. The code gets created in the package A/B/thriftapi (which used to be A/B/thrift which was causing problems because all of the generated code was…
FuriousGeorge
  • 3,849
  • 4
  • 23
  • 47
9
votes
2 answers

Cancelling a blocking read operation in Thrift

I am using Apache thrift in C++ on Windows and I would like to ask for your help with cancellation of a blocking read operation that is in progress. The read operation (for example – TProtocol::readByte) is blocked until the data is received. When I…
Alex Shtof
  • 2,622
  • 1
  • 20
  • 50
9
votes
1 answer

Requests hang when using Hiveserver2 Thrift Java client

This is a follow up question to this question where I ask what the Hiveserver 2 thrift java client API is. This question should be able to stand along without that background if you don't need any more context. Unable to find any documentation on…
Daniel Koverman
  • 2,445
  • 1
  • 19
  • 30
9
votes
6 answers

Cassandra-cli cant connect to remote cassandra server

I have a cassandra server running on a server(serv1). cassandra-cli can connect to it when run on serv1. However, when i try to connect to it through some other server(serv2), i get the following…
Chander Shivdasani
  • 9,259
  • 17
  • 71
  • 100
9
votes
2 answers

PHP long integers for thrift

My Thrift service expects to receive a Long integer representing a timestamp in milliseconds, but coming from PHP, I know PHP thrift is supposed to automagically turn my PHP types into thrift types, but which PHP type does it expect for Long…
nnythm
  • 3,190
  • 3
  • 23
  • 35
8
votes
3 answers

High performance object serialization library supporting sum types

I wonder if any of the high performance serialization libraries (like Google protocol buffers) support sum types. Sum types are tagged unions, basically the ability to say that something is either A, B, or C. Sum types are used in languages such as…
user239558
  • 6,096
  • 1
  • 25
  • 33
8
votes
2 answers

Load balanced service using Zookeeper and Thrift

We have a computationally intensive service which is used to do a number of transformations. Its largely computationally bound (CPU bound) process. Essentially what happens is we have a message broker which sends messages to the processing service…