thrift-protocol

Thrift Ruby gem

青春壹個敷衍的年華 提交于 2019-11-30 02:48:29
问题 I cannot, for the life of me, successfully run "gem install thrift", the thing fails when building the gem's native extensions; this is the output: (acib708) ~ -> gem install thrift Building native extensions. This could take a while... ERROR: Error installing thrift: ERROR: Failed to build gem native extension. /Users/acib708/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb extconf.rb:25:in `<main>': Use RbConfig instead of obsolete and deprecated Config. extconf.rb:25:in `<main>': Use

Thrift large file in messages

纵饮孤独 提交于 2019-11-28 08:25:34
问题 I am using thrift for binary protocol over tcp, for sending and reading files (maximum size of 64MB). Is thrift is capable for this? I have thought using: struct SomeMessage { 1: byte data } How thrift is efficient about this? marshaling/unmarshaling/sending over the wire? 回答1: Thrift is capable, and the recommended data type is binary . Using byte would transfer only one signed 8-bit number, and list<byte> is way less efficient. The question is, whether it makes sense to burden that load