title: Integrating Play 2.1 and external game server
body: <p>I am developing chess playing server based on Java and Netty and client-application using C++. 
  Messaging process between client and server is based on Google Protobuf Protocol
  Now I want website to act as client for application server so that it would be tightly integrated with server app</p>
  
  <p>I have chosen Play 2.1(JAVA) framework for the website</p>
  
  <p>1)</p>
  
  <p>First i ran into trouble trying to run my Netty server instance from Play 2.1 application so I added next code to Global.java (Play framework startup file )</p>
  
  <pre><code>   public void onStart(Application app) {
      // ...
          new Thread() {
              public void run() {
                  new NettyServer().run();
              }
          }.start();
     }
  </code></pre>
  
  <p>Does it seem to be a good idea to run my own instance of Netty this way?</p>
  
  <p>2)
  I am not sure how to validate data, as app server gets data to be validated from both C++ client and website by different protocols
  Client sends it as binary-encoded data using protobuf protocol and website sends POST requestI want validation to be equal for both clients
  For validating data sent from the website I can use Form &lt; T > helper thought i can't use it for binary encoded protobuf data. Any ideas on how to manage validation?</p>
  
  <p>3)
  I use Messages.get() from i18n Play module to translate messages to user's language. Client using browser, Play determines user's language from client request headers, and chooses appropriate translations file.</p>
  
  <p>But what about my client? I don't know anything about user's language so i can't send it to my app.<br>
  Moreover i didn't manage to find a way to set language manually in Messages.get()</p>