Dynamic Services with Content Centric Networking

Dhruva L Batni
Columbia University
New York
dlb2155@columbia.edu

Abstract

Content-centric networks have gotten a lot of interest recently, particularly due to the promise to address problems inherent in today's host-based networking architecture. But while content-centric networking aims to fulfill the concerns of networking that is evolving in the direction of serving content, it does not inherently address the issue of services, particularly service mobility, which is also an important part of networking. This project focusses on dynamic service mobility in content-centric networking, particularly on the CCNx implementation.

Introduction

Content-centric networking today aims to solve a trend in computer networking: that often times today, content is one of the key players in networking. Computer networking today is host-based, and aims to allow nodes to address each other. However, requests are more often made for a specific piece of content than for a specific node. Content-centric networking, such as the CCNx project, aims to solve this problem by specifically addressing content, and rewriting the entire networking stack by focusing on content requests.

However, content-centric networking, such as CCNx and similar implementations, do not address the issue of services which are at least as important as raw content. The popularity of services such as Facebook and Google allude to the fact that users are not only interested in a specific piece of content but are also interested in services.

Hence a complete networking paradigm will focus on not only content-centric networking, but will involve services as well. In this report, architecture and implementation of dynamic services and service mobility on top of an existing content centric networking framework, CCNx is presented. The report addresses how service modules are treated as content, thus leveraging the existing content-centric features of CCNx, thus naturally allowing for service mobility.

About CCNx[1]

CCNx is an open source software implementation of CCN protocols. It provides the core CCN protocol stack implementation along with a few sample application and utilities. Code version 0.3 was used in the development of "Dynamic services with CCN".

Architecture

The main components of the system are as follows:

1) ccnfileproxy: ccnfileproxy is a proxy for the filesystem that makes files on the local file system available over CCN network. It takes a directory from which to serve files, which it treats as the root of its content tree, and an optional ccnx URI to serve as the prefix for that file content as represented in CCNx. For example, if there is a directory /foo in the file system, with the following contents:
/foo/
    bar.txt/
    baz/
      box.txt
ccnfileproxy is called with the arguments- /foo ccnx:/testprefix, then asking for ccnx:/testprefix/bar.txt would return the file bar.txt (segmented appropriately), and asking for ccnx:/testprefix/baz/box.txt would return box.txt.

ccnfileproxy application is modified and the following functionalities added:

2) ccngetfile: A command-line utility for pulling files over CCN.
3) Services: A set of services which can be requested with the video. Each service functionality is bundled in a java jar file. The jar file is named after the service. For example, weather service jar file is named "weather.jar".
4) ccnd: ccnd is the main CCN daemon which forwards interest packets.
5) Filesystem: The file system on which the video and jar files reside.

Adding a new service

To add a new service following steps have to be followed:

  1. Create necessary java source files. Let each source file name end with *service.java i.e if "weather" is a service, then a source file with a name "Process.java" is named "processWeather.java". This is to avoid duplicate classes getting loaded during runtime. There is no way to dynamically unload java jar files during runtime. Hence it is highly advisable to have unique class names.
  2. Provide a public class with the same name as the service. This class should have a method called "run_<service>" defined. This method is invoked during runtime after loading the jar file. The signature of this method is String run_<service>(String). This "run_<service>" method is the entry point to the service code. The argument is usually a file path.
  3. Bundle all the service related class files into <service>.jar.
  4. Copy the jar file to a jars repository which is served by a different instance of ccnfileproxy.

Forwarding of interest and response packets

CCNx has been implemented over a TCP/IP stack. ccnd daemon, when started, creates what is called "faces" and assigns face ids to them. For each face id, it creates a datagram socket and waits for the packets. ccnd implements what is known as strategy layer in CCN.

ccnfileproxy and ccngetfile are applications which create their own "faces" and connect to the ccn daemon through them When a request for the content is made, ccngetfile generates an interest packet and floods it through all its faces. When ccnd gets the interest packet, it checks its content store for the data. If it finds it in the local store, the interest is satisfied with that data. Else it floods the interest through all its faces.

If ccnfileproxy receives an interest, it either serves the video or video+service depending on the content requested. In case a service is requested along with the video, corresponding service.jar file is downloaded using CCN protocol and dynamically loaded during runtime. The video is then processed and sent.

Simplified psuedocode

ccnfileproxy() {

  video = recieveRequest()

  if (no service requested) {

   SERVE(video)

  }

  else {

   ccngetfile(service.jar)

   load(service.jar)

   call run_service(video)

   SERVE(video+service)

  }

}

Demo

For the purpose of demo and testing, 4 services are provided -

  1. weather: It takes a video file as input and generates a SMIL[2] output. The actual video is served using a lighttpd server. Latest weather information from www.weather.gov is overlaid on the video.
  2. ads: It takes a video file as input an generates a SMIL output with a random video advertisement inserted.
  3. news: It takes a video file as input and generates a SMIL output with latest crawling news feed from BBC overlaid on the video.
  4. weather2: This service does actual processing of the video using Xuggler[3] Java library. It adds the latest weather information over the video.

Two ccnfileproxy applications are started. One for the video directory and the other for the jar file directory on the filesystem.

Videos are requested as shown below:

ccngetfile -timeout <value> --loggingoff ccnx://video.mp4+weather <output file>

Output videos are played as follows:

Testing

Testing was done with 1 physical machine running Ubuntu 10.04.

Screenshots

  1. Request for video and service.

  2. Request for service.jar received.

  3. Request for video and service being handled.

  4. Processed video received and played.

Conclusion

Services are central to network operations. In this project, we aimed to show that it is possible to integrate service functionality - including dynamic service invocation and service mobility - into the core of content-centric networking, thus extending its features. To this end, we have a working implementation of a dynamic services and service mobility architecture implemented on top of the CCNx protocol stack. Our implementation enables dynamic invocation of services and true service mobility in the network based on need. By exposing services in a content-centric networking framework, we will be able to have true service and content functionality in a future Internet that is centralized on services.

Future work

  1. Integration with NetServ.[4]
  2. Nested services.

Acknowledgments

I would like to thank Prof. Henning Schulzrinne for giving me an opportunity to work on this project and also guiding all along. I would also like to thank Suman Srinivasan for supervising and also providing valuable inputs whenever required.

References

[1] Project CCNxTM. http://www.ccnx.org, Sep. 2009
[2] SMIL
[3] Xuggler
[4] Srinivasan S, Lee J W, Liu E, Kester M, Schulzrinne H, Hilt V, Seetharaman S, Khan A, "NetServ: Dynamically Deploying In-network Services", ACM ReArch '09 (CoNEXT workshop), December 2009.