title: How to interactive submit spark task in Web application's User interface?
body: <p><strong>BackGround:</strong></p>
  
  <ol>
  <li>Our project is build on PlayFrameWork. </li>
  <li>Front-end language: JavaScript</li>
  <li>Back-end language: Scala</li>
  <li>we are develope a web application,the server is a cluster.</li>
  </ol>
  
  <p><strong>Want to achieve:</strong></p>
  
  <ol>
  <li>In the web UI, User first input some parameters which about query, and click the button such as "submit".Then these parameters will be sent to backend. (This is easy，obviously)</li>
  <li>When backend get parameters, backend start reading and process the data which store in HDFS. Data processing include data-cleaning,filtering and other operations such as clustering algorithms,not just a spark-sql query. All These operations need to run on spark cluster</li>
  <li><strong><em>We needn't manually pack a fat jar and submit it to cluster and send the result to front-end</em></strong>（These are what bothering me!）</li>
  </ol>
  
  <p><strong>What we have done:</strong></p>
  
  <ul>
  <li>We build a spark-project separately in IDEA. When we get parameters, we manually assign these parameters to variables in spark-project.</li>
  <li>Then <strong>"Build Artifacts"->"Bulid"</strong> to get a fat jar.</li>
  <li><p>Then submit by two approaches: </p>
  
  <ol>
  <li><p><strong>"spark-submit --class main.scala.Test --master yarn /path.jar"</strong></p></li>
  <li><p>run scala code directly in IDEA on local mode (if change to Yarn, will throw Exceptions).</p></li>
  </ol></li>
  <li><p>When program execution finished, we get the processed_data and store it.</p></li>
  <li>Then read the processed_data's path and pass it to front-end.</li>
  </ul>
  
  <p><strong>All are not user interactively submit. Very stupid!</strong></p>
  
  <p>So if I am a user, I want to query or process data on cluster and get feedback on front-end conveniently.<br>
  What should i do?<br>
  Which tools or lib could use?</p>
  
  <p>Thanks!</p>