NIT-C Students Use PostgreSQL to Design Their Own Video Repository

6
5286
The trio who cooked up their own edu video repository
The trio who cooked up their own edu video repository
The trio who cooked up their own edu video repository
The trio who cooked up their own edu video repository
The students of NIT-C, who were one of the winners of the EnterpriseDB PostgreSQL contest, share with the LINUX For You team how they created an internal database of MIT and IIT video lectures, using open source tools.

Where there is enthusiasm, one sees no barriers. A bunch of enthusiastic young students from the National Institute of Technology, Calicut (NIT-C), have proved this adage true.

Every year, the IITs, the IISc and MIT upload to their website hundreds of useful lectures that other students can refer to. A club in NIT-C, “Team Unwired”, recently decided to participate in an inter-college car-designing competition, and the students referred to the video tutorials that were uploaded online.

One of the NIT-C students, Jaseem Abid, spotted a useful video and uploaded it on the college server, and it was a hit, achieving over hundreds of views in two weeks. This encouraged the students to upload more video tutorials to their server, and make it easily accessible to more people. Team Unwired asked the faculty for some more space to host videos on the college network, and since everyone would benefit from this move, NIT-C gave the team the green signal.

The initiative to upload videos on the NPTEL, OCW and TED Talks websites promotes quality learning, and the curriculum in these universities complements that of NIT-C. However, many students were downloading the same videos, and they found it was too slow to do so off the Internet. Hence, Team Unwired took up project “Paathshaala” to create an internal repository of tutorial videos for the college. This would mean saving bandwidth for the university while providing faster video access to the students.

FOSS enthusiasts Vipin Nair, along with Jaseem Abid, a fellow developer student, were assisted by Paul Alex, who dealt with the design and managed content (and the content team) of the site. The content team consisted of 20 students, who helped make the internal video repository a reality. NIT-C provided the students with a server, some systems to test on, and a room to work from, while the group was constantly guided by the faculty.

The college provided the group with an HP ProLiant server with 16 GB of RAM, AMD architecture, eight 64-bit processors, and a 1.2 TB hard disk, running Ubuntu LTS OS exclusively for this project. “This move motivated us further, and we knew we had to make this work,” Nair reports.

The students downloaded about 600 GB of videos and converted them into OGV (Ogg Vorbis video format) files. Nair explains, “Most videos online use the MP4 format, which is proprietary and comes with certain restrictions, but OGV is an open source format under a free software license. This format is supported by the Free Software Foundation. With OGV, we didn’t have to use any proprietary software to encode all videos. We used an HTML5 standard, which had a VIDEO tag, which enabled supporting browsers to play the video natively in the browser without requiring any external plugins like Flash.”

Moreover, converting files to this format also compressed videos to about 40 per cent of their actual size. This made a lot of difference, as each course took about 5 GB of disk space.

When the students started their academic year, they were used to working on MySQL. Their professors, Dr Madhu Kumar S D and Gopakumar G, suggested that they start working on PostgreSQL. “When we asked why, our professors asked us to experiment and find out the answer,” says Vipin Nair. The students soon realised that PostgreSQL was much richer in features than MySQL, and later decided that it would be apt for the video repository too.

The volume of data cannot be ascertained yet, as the project is only due for release next month. “But we are expecting students to visit our website often, especially before exams, as that is when most of us get to work,” jokes Nair.

In terms of concurrency, there are over 6,000 students in the college now, and the group expects a maximum of 2,000 to 3,000 to access the videos at any given time. “It will peak during exams, but our bandwidth is currently limited. If we get dedicated lines for the repository, we can serve a higher number. Right now, we are operating from a room with computer centres, and share bandwidth lines with the college labs. Scalability is not an issue for us, because at any point of time, we are not expecting over 10,000 videos. In a decade, we may increase the number of videos to a lakh, but even that is a small number for any database,” Nair confidently states.

Where PostgreSQL scores

After taking the time to understand and configure PostgreSQL, the students are satisfied with the database. The other option they considered was MySQL, but it comes with a default MyISAM engine that does not offer integrity constraints.

“For example, a video in the database will have tags for itself. If the tags are only for that video, I would like the loose tags to get deleted when I delete the video — but this is not possible with the MySQL default engine. PostgreSQL scores in this aspect, and ensures that there are no loose tags stored. Another feature that pushed us towards PostgreSQL is that it supports object-oriented databases, while MySQL has no support for this concept. Our database design had table inheritance, and PostgreSQL supports such designs natively; although it has a few bugs, I still consider it a good option,” says Nair.

He also believes that PostgreSQL has the majority of enterprise-level features, compared to other databases. Apart from integrity, it provides other useful features like schemas, which is useful while handling mission-critical work. “This feature allows us to give different people limited access to the database and, hence, provides flexibility to keep our data secure,” says a contented Nair.

The challenges

The students faced some problems regarding PostgreSQL in the implementation and installation stages, but they solved them easily by reading up on the matter.

Nair explains further, “We usually update from our command line, and in MySQL, it is pretty easy to do so. However, in this case, we were not familiar with the procedure, and there were too many extra steps. This was solved as soon as we read up on the topic, and we worked on it quickly. Another problem we are facing regarding the project is that our site may slow down when too many people access it at the same time. We are talking to our network admins about this problem, and we hope that they will give us a dedicated line in such a situation.”

Support system

At present, the group that forms Paathshaala has taken on the responsibility for providing support. “Once it is launched, we will bring our juniors into the group. We have documented every design aspect, policy decision, and all the necessary details of the project. We will pass it on to our juniors, who will handle the project when we pass out. We will also release the source code of this project as free software under GPLv3, which will help any student willing to contribute to the Paathshaala code base,” explains Nair.

Moreover, team members constantly interact with the online FOSS community, and their teachers have assisted them whenever they needed guidance.

The road ahead

In the future, NIT-C plans to make the video repository similar to YouTube, where students can upload content, rate it, and contribute their comments. They may even start producing their own videos and uploading them on the site. Who knows, students from the Harvards and Stanfords of the world may soon start referring to their lectures in the years to come!

6 COMMENTS

  1. Hi all ,

    I am one of the 3 developers of this project , Visit our facebook page for updates and queries on the project.

  2. Since me too from calicut. I am realy proud of u guys.
    But i think the data integrity in MySql can be achieved by changing the Engine into Innodb
    Any way nice job guys.
    gud luck

LEAVE A REPLY

Please enter your comment!
Please enter your name here