Hi Andy,

Apologies both for this delayed response and the missing subject of the 
original message.

Thank you for your suggestions. 

Option # 1, I'm afraid, is not applicable. You see, working with Apache Thrift 
[1], similarly to Protocol Buffers [2], involves writing specifications of data 
types and service interfaces in a platform-independent "definition language", 
then "compiling" them into, e.g., Java, Python, or C++ code. The final result 
is a client program or library that can read/write only messages complying with 
those specific definitions. There is no generic client.
Option # 2 would be my first choice then, but Chris Herrera, who also replied 
to this thread, recommended Option #3, and for good reasons.
I know that binary protocols in general offer better serialization performance, 
but there are many valid use cases where employing more verbose formats like 
JSON or even XML (argh!) is fine, or at least good enough. I just wish that 
working with Thrift in NiFi was as easy as working with Avro. 
[1] http://thrift.apache.org/
[2] https://developers.google.com/protocol-buffers/


Thank you,
Marcio

On Tuesday, February 14, 2017 10:31 PM, Andy LoPresto <alopre...@apache.org> 
wrote:



Hello Márcio,

I have not used Thrift, but in reading the introduction from the link you 
provided, my first reactions would be as follows:

1. To communicate with a service defined by Thrift, I’d look at InvokeHTTP and 
see if it covers your needs. 
2. If not, I would try downloading the Thrift client and invoking it via Groovy 
in an ExecuteScript processor.
3. If that is not sufficient, you would have to build a custom processor and 
include Thrift as a dependency. 

Someone else may have more experience, but I would try in that order (from 
easiest to hardest). Good luck. 


Andy LoPresto
alopre...@apache.org
alopresto.apa...@gmail.com
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

On Feb 14, 2017, at 6:24 PM, Márcio Faria <faria.mar...@ymail.com> wrote:
>
>Dear NiFi users,
>
>Does anybody have an example of a NiFi component talking to a Apache Thrift 
>(https://thrift.apache.org/) -based webservice?
>
>Thank you,
>
>Marcio
>

Reply via email to