The aim of the project is to demonstrate the use of SMIL (Synchronized Multimedia Integration Language) as a part of ActiveCDN module to integrate different media objects.
NetServ is a signal driven modular network router. It breaks up the functions provided by Internet services and make these functionalities available as modular building blocks for network services. The project was conceived to address the limitations of services in the current Internet. It presents a clean state Internet architecture based on the concepts of service virtualization [1].
ActiveCDN is a NetServ application. ActiveCDN module is installed on a NetServ router on getting a signal from the content server. Content server sends a signal to install the module when it receives a request to serve some content. The NetServ router also caches the content. Subsequent requests to content server results in redirection to the NetServ router where the content is cached.
SMIL [2] is a multimedia integration, html like language. It is typically used for multimedia presentations which integrate audio, video with images, text or any other media type. In this project, we demonstrate how SMIL can be used to integrate different media objects on a NetServ router. This is done by extending the current ActiveCDN module implementation. In the current implementation Xuggler [3], a Java library, is used to do text overlay. Instead of this, we generate a SMIL presentation file which integrates different media along with the original video requested.
The module which serves the SMIL file is implemented as a Java servlet process. It receives the video requests and serves a SMIL file. It also fetches the video from the content server and caches it.
The architecture is a bit different from the actual NetServ architecture. The following are the differences -
1) There is no on path signalling.
2) The request for the video is sent directly to the NetServ node.
This deviation however, does not matter too much as we will see later it is a simple task to integrate the changes into the actual NetServ code.
The main components are a content server, a NetServ node running a servlet process, Ambulant plugin to Firefox
browser using which the user requests for videos. Ambulant[4] is an
open source SMIL player which supports SMIL 3.0 standard. The NetServ node stores a repository of text and video
advertisements. For each video request, it fetches the local weather information and also latest news feed from
BBC. IP address to geo location conversion is done by using IP address geo
location service provided by IPInfoDb. The latitude and
longitude information from IPInfoDb is then used to fetch zipcode for the geo location using the service provided
by Yahoo!. The zip code is then used to fetch weather information
using weather.com XML APIs. Sample requests are shown below -
1) BBC news feed - http://www.bbc.co.uk/news/rss.xml
2) IP address to geo location - http://api.ipinfodb.com/v2/ip_query.php?key=<api-key>
3) latitude / longitude to ZIP code - http://where.yahooapis.com/geocode?location=40.7619-73.9763&gflags=R&appid=<appid>
4) ZIP code to weather data - WeatherGateway.getFullForecast() API.
All XML data are parsed with SAXBuilder class of JDOM Java library.[5]
A. Handling of the first request for the video
B. Handling of the subsequent requests for the video
Server() {
video = recieveRequest()
if (video NOT in cache) {
GET(content-server/video)
return (generateSMIL(content-server/video))
}
else {
news = GET("www.bbc.co.uk/news/rss.xml")
weather = WeatherGateway.getFullForecast()
advt = SELECT-RANDOM(ad-videos)
return (generateSMIL(cached-video/video, news, weather, advt))
}
}
The below shown sample SMIL file is generated when the video is found in the cache of the NetServ node.
As we can see, all the media objects mentioned previously are present in the SMIL file.
Note: News feed has been deprecated to create a smaller image.