I am trying to get communication setup between Node.JS and Flume-NG over
thrift. I seem to keep running up against brick walls in the process
however. The first of those was that all of the existing projects that
seemed to do this were seemingly abandoned about 3 years ago. The next
problem came when I found that the javascript stubs for Thrift do not
support the CompactProtocol.
I finally settled on needing to write a C++ extension for node, and have
proceeded in that vein. I have now made it to the point where I can
send a message from javascript to Flume-NG using thrift in synchronous
mode. However as Node.Js needs non-blocking IO I now need to take the
next step and implement it with callbacks in async mode. I was at a
complete loss yesterday until I found one lone web post referring to the
ability to request the stubs be built with cob support, which I have now
done and feel like I am soo close, but I cannot see how to construct the
objects required to do so. There seems to be absolutely no
documentation or code samples available for this on the web, at least
according to the Google. I assume the archives of this list are
included in Google, and as such have not specifically consulted them.
If my question is largely answered within those, I will find another way
to search them.
At this point it looks like my stub constructor needs and TAsyncChannel,
and a TProtocolFactory for it's contstructor. While I think I can see
how to get the TProtocolFactory, I am not sure how to provide a Factory
that will contstruct Protocols with the proper TTransport,
TFramedTransport. With the TAsyncChannel it seems all the classes
provided in the distribution are virtual, and there was not one
generated from the .thrift file in the stubs. Is it expected for the
user to implement the TAsyncChannel?
Can anyone point me in the right direction on this? I feel like I am so
close, but just missing something, it has been a very long week trying
to solve this communication need.
Aaron
- Node.JS to Flume Aaron Mefford
-