This is a continuation from Part 1.
As of writing this I already had complete solution (as far as getting tracking data is concerned), a multi-process TCP server with a mysql database back-end.
The server code itself is not pretty thus I am cautious about sharing it at this stage (I will “open-source” it once I cleaned it up).
One caveat: my solution does not support batch mode (where the payload contain multiple concatenated location and other packets).
The assumption is that the reader is somewhat familiar with python and sockets.