Python Tornado, Apache Thrift and Javascript

Hello everyone,
It’s been a while since my last post, a lot has been going on in my personal life.

I’ve recently started working on a project to implement a virtual joystick device on Microsoft Windows using open source software.
The idea is simple: your mobile phone can be used as a joystick on your Windows machine.The project is still under development, however, you can take peek at the code on Github and watch it working on Youtube, the architecture is as follows:

  1. Virtual joystick device driver from a Sourceforge project – controls a virtual joystick on your computer
  2. Python Tornado web server – receives RPC calls from the joystick client and hosts an HTML5 application – the joystick client itself
  3. HTML5 Joystick client

Note that the version shown on Youtube uses the phone accelerometer, the version currently on Github uses touch screen interface. I might upload a new video soon…

So, how does this relates to Thrift you’re asking? Well, the underlying transport protocol I’ve used for my RPC is a protocol I made up. I’ve used HTTP POST or Web sockets (depending on browser support. Apparently, Android’s native browser doesn’t support web sockets [tested on jellybean]) – and simple JSON for requests & responses.

Read more of this post

Advertisements