Nik's Logs
Technology, Art and Life

YouTube Live

Posted In: , . By Nikhilvishnupv


YouTube launched its first ever live streamed event yesterday (November 22, 2008). The event was from San Francisco, California. The event hosted a variety of You Tube celebrities. It includes stars such as rapper Will.i.Am and singer Katy Perry and YouTube sensations like 20-year-old Esmee Denters, who posted video of herself covering popular songs and became a star on the World Wide Web.The show was held in front of a live audience of 3000 people with millions of people worldwide to watch the first live-streamed event in YouTube’s history. You Tube also conduct this event in Tokyo, Japan but it was not streamed online.
YouTube Live in San Francisco attracted 700,000 concurrent live viewers. What does it means? Yeah! we are going to find it.

Behind the Curtain

YouTube Live is a grat idea from great Google. But there is one remaining in every one's mind, How they made it? . Serving a video to 700,000 users is not a simple task. So they used a Content Delivery Network to stream video online. Google has its own CDN for text/image contents but it cannot be used for streaming live video.
It was rumored that Google has met big three live streaming services — Mogulus, Ustream and Justin.TV — to discuss partnerships or for an acquisition. But at last they turned choosing Akamai instead of making their own CDN. Google won't confirm this,but it's very easy to detect( Check out the screenshot). However Akamai proved the strength of their CDN network by this event.



Contact Me

By Nikhilvishnupv


mail: ,

Linked in: Profile

orkut: Profile


About Me

By Nikhilvishnupv

Name: Nikhil Vishnu P.V Student, CTO Angelsvista



Connect to MySQL database using python

Posted In: , , . By Nikhilvishnupv

MySQL is the world's most popular open source database. Most web developers are using MySQL with php. Python can handle this database by using a module MySQL-Python. For connecting to MySQL you need MySQL-Python module,you can get it from .If you have a fedora or Debian Linux installation is bit easy.For installing MySQL-python in fedora type

#yum install MySQL-python

For installing in Debian do

#apt-get install MySQL-python

After installing the module we are going to do some codings for connecting to the database.

import MySQLdb

conn = MySQLdb.connect (host = "yourhost",
user = "user",
passwd = "password",
db = "database")
except MySQLdb.Error, e:
print "Error %d: %s" % (e.args[0], e.args[1])

The above script will connect to database so you have to provide necessary login informations such as host name,user name,password and database name.

For executing SQL commands we hace to make a cursor.For making a cursor use the following code

cursor = conn.cursor ()

MySQL commands can execute using this cursor for example see the below code

cursor.execute ("""INSERT INTO clg_register (roll_no, name, age)VALUES(%s, %s,%s,%s)""",("39","Nikhil","18"))

You can use variables in the script instead of given values in the cursor.execute() code.Any MySQL command can execute using this code.After executing MySQL commands close the connection to the database by using the below code

cursor.close ()
conn.close ()

A sample program is given below to insert data into a school register database.

import MySQLdb

conn = MySQLdb.connect (host = "localhost",
user = "root",
passwd = "password",
db = "college_register")
except MySQLdb.Error, e:
print "Error %d: %s" % (e.args[0], e.args[1])
cursor = conn.cursor ()
cursor.execute ("""
LastName varchar(30),
FirstName varchar(20),
Address varchar(30),
Age int(3)

cursor.execute ("""INSERT INTO Person(LastName,FirstNAME,Address,Age) VALUES("Vishnu","Nikhil","India,Kerala","18")""")
cursor.close ()
conn.close ()


Make a web server using python

Posted In: , . By Nikhilvishnupv

Making a web server using python is very easy. It is done by using web frameworks of python.Here we are using as a web framework. For using python first you have to install python in your system. In linux and unix os's python is a built in language. Windows version of python can be download from and install latest version of python. from download and install Installing is a very easy one. Extract the file in a folder using command prompt go to the folder and type.

>>python install

This will install

Writing the first application

import web
urls = ('/', 'index' )
class index:
def GET(self):
print "Hello World!"
if __name__ == "__main__":, globals())

This is a Hello world program. Copy this code and save it as "" . Run this file using command prompt by using the command


this will give you a message like the below one.


This tells us that our system became a server and it serve the data through the port 8080. You can see the "Hello World!" message by typing the address http://localhost:8080/ in your browser.If all thigs worked well you can see Hello World! message in your browser. You can use the python functionalities for making complex codes for the server. The html pages are served using templates.