title: Bindings between Spark app (written in Java) to a C++ exe
body: <p>We are trying to call a C++ exe from a Spark app (written in Java). 
  I tried with .pipe() to pass arguments as "String" to C++, it works fine. 
  But we are working with more complex elements in the RDD : martrix + metadata. (each element of the RDD is a matrix (of int) + metedata (String, int, double, ...). 
  What is the best way to pass those elements to a C++ program (to perform scientific computations) ? I read some topics about Thrift, Avro, a few about JNI. Someone have already used those tools for this kind of task ? </p>
  
  <p>I already tried to save my data in Avro files, by the package 'spark-avro' from Databricks GitHub. But it uses SparkSQL. (I work with native RDDs : JavaRDD and JavaPairRDD ).</p>
  
  <p>I can add some stuf, like an interface in my C++ prograù, to catch a stream (or something like that) and deserialize it. </p>
  
  <p>To sum up, what is the best tool/method to serialize complex objects of RDDs, send them from spark to a C++ program , and send back the result to spark ? </p>
  
  <p>Thank you for your help ! </p>