Hi, Thank you for your reply. 'binary' data type would definitely be handy (which was not mentioned in tutorial.thrift) but it seems like writeBinary() is really expecting a 'string' rather than 'any' binary data with length. The custom processor is really a decorator, which would check the incoming message to decode proprietary stuff before forwarding it to thrift processor. Wrt using only the thrift transport layer, I do need to use thrift for other services where thrift needs to take care of both serialization and transport.
Cheers, Milton Mark Slee <[email protected]> 10/01/2009 00:45 Please respond to thrift-user To: "[email protected]" <[email protected]> cc: Subject: RE: Transferring Binary Data using Thrift This sounds reasonable. I assume you're sending it through a method? What do you mean by "intercepted" by your custom processor? Another option is: service DataService { async void sendData(1: binary data) } There is a 1st-class binary type. The other option if you really just want to send barebones data is to just use the TTransport interface directly. You can just use TSocket and TFramed/BufferedTransport to get your data. I'm not sure there's much benefit to having a Processor on top if all you're doing is just yanking the underyling stream data out of it. In that case it sounds like you're only really leveraging the transport layer. -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Thursday, January 08, 2009 3:27 AM To: [email protected] Cc: [email protected] Subject: Transferring Binary Data using Thrift Hi, We are using thrift for our project and it seems pretty neat in many ways. Thanks. I have a question related to its usage to transfer binary data : I need to send some binary data from client to server and I thought it to be better to use thrift services consistently rather than creating another data channel. To that end, at the moment, I created data() service which is being intercepted by my custom processor that decorates a thrift library processor to get the data out (similarly the data is being sent by a decorated client). I am wondering if there is any other known way to transfer binary data using thrift. Cheers, Milton This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual to whom they are addressed. If you have received this e-mail in error please notify your system manager. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this e-mail and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this e-mail. This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual to whom they are addressed. If you have received this e-mail in error please notify your system manager. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this e-mail and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this e-mail.
