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

Android your (my) way

During my work I was requested by my boss to create a cellular site survey application for Android.
The requirements were simple: display the cell id, location area code, signal level, network type (2G/3G), a ping button and a lock on 2G/3G buttons.

Android has an internal application (you can call it technician code, or whatever) that gives you all of that stuff, but is not user-friendly.
You can see it on your own, simply dial “*#*#4636#*#*” on your Android phone, then navigate to “Phone information”.

Basically, my goal is to get the same app, but with a simpler, more user-friendly interface. I don’t need a lot of stuff in there on my application.

The radio information stuff (signal, cid, lac, network type) are simple. They’re exposed through the API for easy query. The 2G/3G lock with a single button click is the tricky part.

Read more of this post