title: How to send double[][] array data using Apache Thrift from/to Java and C++
body: <p>I am working on an HPC project. My design consists of Java and C++ masters and workers. My basic experiment is to produce a matrix of 9000x9000 double elements, say double[9000][9000], at master side written in java, and then send it to some clients written in C++, do calculations and send back to master. I know Thrift supports lists, sets, and containers beside primitive types. I could do these steps:<br/></p>
  
  <ol>
  <li>convert the matrix into a list at master</li>
  <li>serialize it using Thrift</li>
  <li>send it to worker</li>
  <li>deserialize list and convert into matrix</li>
  <li>do computation and again convert the result into list</li>
  <li>serialize list and send back to java master</li>
  <li>desrialize list and convert into matrix.</li>
  </ol>
  
  <p>I think this is a long journey. Is there a better way so accomplish this task?
  How about representing the matrix as binary? If the binary representation is the best option, how can I effectively convert from double[][] to binary ad vice versa.<br/></p>