Multicast server and client in Python

Python has complete support for sockets. Some of the APIs though have a different signature than the POSIX equivalents. It is therefore possible to write multicast servers and clients in Python. Multicasting is the ability to send data to select set of hosts. Broadcasting in a network is to send data to all the hosts, unicast is when data is transfered between two hosts (typical one-one communication). Multicasting is the ability to send data to a multicast address and the clients are provided the data. Now that an introduction to multicasting is complete, lets look at how to write a simple multicast server and a multicast client.

Multicast servers are written very similar to a standard unicast server, its the clients who have a slightly different code. The major change is made in setting socket options on the socket transmitting and receiving data.
Continue reading “Multicast server and client in Python”

Microsoft Research, India

Dr.Anandan Padmanabhan’s presenataion on the working on Microsoft India at the Washington University, is an interesting webcast to watch. Dr.Anand, takes the audience through the work that MS Research, India is doing. Most of the major software companies, having research divisions in India, work on localisation. That is rather obvious, given the number of languages that are spoken in India and the volume of the target customers. Also, India’s burgeoning rise in the acceptance of technology, makes it a good test spot for new technologies. Dr.Anandan’s presentation, does go into a little more detail [that is obvious given, he is not a suit 🙂 ].
Continue reading “Microsoft Research, India”

Building PyMedia on Windows

PyMedia is a Python module to enable one play various audio and video formats. Apart from playing the files, one can perform manipulations on the media files too. PyMedia can be used within Kamaelia to test the multicast and brodcast capabilities. I wanted to test these features and so set out to build the latest version of PyMedia. PyMedia, like most of the open source packages, is easy to build on Linux (and may be the other *nixes too). On Windows, its a different story altogether. Below is the description to build PyMedia from the source on Windows. *Beware*, there is a simple Exe installer of PyMedia which works fine, but I wanted to figure out how to build it from the source. So, unless and until you really want to build PyMedia from the source, don’t venture ahead. If you prefer a point and click installer, head to PyMedia on Windows.

  1. Python 2.4 or above
  2. Microsoft Visual Studio .NET’s VC7 compiler. I have tested with VC7 compiler.
    Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.00.9466 for 80×86. Copyright (C) Microsoft Corporation 1984-2001. All rights reserved.
  3. Devenv for opening the solution files and building the dependencies
  4. Download the source files for faad,lame,ogg,vorbis,pylame,pymedia. I have tested with the following versions of the files:
    • lame-3.97b2.tar.gz
    • pymedia-
  • FAAD2 (Freeware Advanced Audio Decoder) is a MPEG-2, MPEG-4 AAC decoder.FAAD2 is a ISO AAC audio decoder and has a slew of other features. You can download it from here
  • LAME (Lame Ain’t a MP3 Encoder) is used for encoding MP3s. You can download LAME from here.Vorbis is a patent-free lossless audio codec, and Ogg is the container for the Vorbis files. You can read more here and here. You can download the source for the ogg and vorbis here :Ogg, Vorbis
  • Then download the PyMedia source. PyMedia is a Python module for wav, mp3, ogg, avi, divx, dvd, cdda etc files manipulations. You can play these files, do manipulations on them. Get PyMedia PyMedia. Download the PyMedia source and that should be good enough.

Continue reading “Building PyMedia on Windows”

World War-I color photographs

Should war be seen in color ? That was the question I posed as I sent a mail to a bunch of good friends at work, pointing them to this site. After sending the mail, I got thinking about what I typed. I didn’t think about it when I said it, it was just a statement blurted out without much of pre-thought. Is it hedonistic to want to watch war photographs in color – is it an innate reaction that anything historical should be watched in black and white. I was watching the biography of Hitler on History Channel, wherein they mentioned that the allied forces retrieved color videos shot by Eva Braun – and that was a big thing. Again the same question – why ?
Continue reading “World War-I color photographs”

Can Bangalore kick Silicon Valley’s Butt?

Bangalore is touted as the silicon valley of the east, knowledge capital of India and lots of self gratifying titles. Why is it then that there is very little of innovation that comes out of this city ? I was reading Guy Kawasaki’s post about kicking silicon valley’s butt. I have never been to the valley, but have heard a lot about it. And Guy’s post, sort of gives away the answer to why this city is very far from being the silicon valley. Before I write about them, it is interesting to note his observations regarding the top cities, specifically Singapore. He believes that it is difficult for Singapore to parallel the valley’s innovation – but I think that is not really true. Agreed that there are very few software companies operating out of Singapore, but as one of the comments for the post mentions – If you understand what I am saying now, the aim is not push Singapore to become a Silicon Valley, but to grow Singapore towards achieving an identity of a technology cluster that made its own mark – Singapore is not trying to be another valley, rather it is trying to be a technology center. May be not a creator but a consumer of technology that is being created elsewhere. There is another post regarding what Singapore lacks, and I will write about my thoughts on this in a different post.
Continue reading “Can Bangalore kick Silicon Valley’s Butt?”