<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Comfortably Geek</title>
	<atom:link href="http://lalith.in/feed/" rel="self" type="application/rss+xml" />
	<link>http://lalith.in</link>
	<description>Lalith Suresh</description>
	<lastBuildDate>Wed, 22 Feb 2012 18:08:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='lalith.in' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Comfortably Geek</title>
		<link>http://lalith.in</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://lalith.in/osd.xml" title="Comfortably Geek" />
	<atom:link rel='hub' href='http://lalith.in/?pushpress=hub'/>
		<item>
		<title>tcp_probe no workey?</title>
		<link>http://lalith.in/2012/02/22/tcp_probe-no-workey/</link>
		<comments>http://lalith.in/2012/02/22/tcp_probe-no-workey/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 17:52:30 +0000</pubDate>
		<dc:creator>lalithsuresh</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[tcp_probe]]></category>

		<guid isPermaLink="false">http://lalith.in/?p=1490</guid>
		<description><![CDATA[tcp_probe is a very handy utility in Linux to observe TCP flows. Implemented as a Linux kernel module, all you have to do is: $: modprobe tcp_probe [port=] $: cat /proc/net/tcpprobe &#62; logfile.out &#8230;and you&#8217;ll get clear statistics about whatever TCP flows go through &#8216;port&#8217; (and of all TCP flows if you specify the port [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1490&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>tcp_probe is a very handy utility in Linux to observe TCP flows. Implemented as a Linux kernel module, all you have to do is:</br></p>
<pre>
$: modprobe tcp_probe [port=]
$: cat /proc/net/tcpprobe &gt; logfile.out</pre>
<p></br><br />
&#8230;and you&#8217;ll get clear statistics about whatever TCP flows go through &#8216;port&#8217; (and of all TCP flows if you specify the port as 0).</p>
<p>Earlier today, I ran into a situation where tcp_probe would stop logging flows after a couple of seconds, and it always seemed to be around the 10th second in an experiment I was trying (which involved iperf-ing over a wireless link). Some quick searches made it clear that others were encountering it as well, but no one really had a solution for them. Odd.</p>
<p>And what do you do when Google can&#8217;t help you find the answer? You look through the source code of course!</p>
<p>Within a few seconds of going through <a href="http://lxr.free-electrons.com/source/net/ipv4/tcp_probe.c">tcp_probe.c</a>, I had my answer before me. Have a look at lines 47-49 and you&#8217;ll know what was wrong in my case.</br></p>
<pre>static int full __read_mostly;
MODULE_PARM_DESC(full, <em>"Full log (1=every ack packet received, 0=only cwnd changes)"</em>);
module_param(full, int, 0);</pre>
<p></br><br />
In short, I was on a wireless channel without any nodes apart from my wireless interface and the access point, and my congestion window size was getting maxed out around the 10th second. Since tcpprobe by default logs a packet only if the congestion window size changes, I couldn&#8217;t see any more packets of the flow I was looking at in /proc/net/tcpprobe.</p>
<p>So the solution?</br></p>
<pre>$: modprobe tcp_probe &lt;args&gt; full=1</pre>
<p></br><br />
Note that you might want to look at the log buffer size parameter (bufsize) as well, because tcp_probe happily ignores packets once your log buffer is filled.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalithsuresh.wordpress.com/1490/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalithsuresh.wordpress.com/1490/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalithsuresh.wordpress.com/1490/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalithsuresh.wordpress.com/1490/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalithsuresh.wordpress.com/1490/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalithsuresh.wordpress.com/1490/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalithsuresh.wordpress.com/1490/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalithsuresh.wordpress.com/1490/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalithsuresh.wordpress.com/1490/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalithsuresh.wordpress.com/1490/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalithsuresh.wordpress.com/1490/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalithsuresh.wordpress.com/1490/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalithsuresh.wordpress.com/1490/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalithsuresh.wordpress.com/1490/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1490&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalith.in/2012/02/22/tcp_probe-no-workey/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/15241e528f8730f06c58c9283d6fe6ce?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">lalithsuresh</media:title>
		</media:content>
	</item>
		<item>
		<title>Fun with TCP CUBIC</title>
		<link>http://lalith.in/2012/02/15/fun-with-tcp-cubic/</link>
		<comments>http://lalith.in/2012/02/15/fun-with-tcp-cubic/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 17:21:33 +0000</pubDate>
		<dc:creator>lalithsuresh</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[networks]]></category>
		<category><![CDATA[tcp cubic]]></category>

		<guid isPermaLink="false">http://lalith.in/?p=1456</guid>
		<description><![CDATA[I&#8217;ve been working with the folks at Deutsche Telekom Laboratories for my Masters thesis, where I&#8217;m dealing with software defined networking, wireless networks, and unicorns. It feels nice to be in a place where people understand both distributed systems AND networks (I still don&#8217;t understand why there isn&#8217;t an overlap there, but heck). From discussions on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1456&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working with the folks at <a href="http://www.net.t-labs.tu-berlin.de/">Deutsche Telekom Laboratories</a> for my Masters thesis, where I&#8217;m dealing with software defined networking, wireless networks, and unicorns. It feels nice to be in a place where people understand both distributed systems AND networks (I still don&#8217;t understand why there isn&#8217;t an overlap there, but heck). From discussions on rate adaptation around my desk, and all the way up to distributed state consistency around the coffee machine, this place has it all. I&#8217;m having a gala time here worrying about the registers on a wireless card, wading through the zillion 802.11 amendments, hacking device drivers, and pretty much analysing interactions at every layer of the network stack.</p>
<p>My work flow has mostly involved taking measurements to make sure that the problem I&#8217;m trying to solve is indeed a problem, trying to reason about the resulting measurements in terms of protocol behaviour/interleaving, and exploring what I can do to improve these measurements in a manner that is practical. As part of the work however, I needed some baseline measurements for TCP behaviour so that at the end of my thesis, I can say something like, &#8220;See? After what I did, we now have MOAR TCP AWESUM!!111&#8243;</p>
<p>Of course, TCP and wireless are two things that don&#8217;t really get along well. TCP sees packet loss and delays as &#8220;congestion&#8221;, and depending on the congestion avoidance algorithm, will back down upon hitting such a situation. However, wireless networks suck (and will continue to suck). You can make it suck less probably, but it&#8217;ll always stay above the suck-thresh. Interference in the physical channel will always be there (like memories of The Phantom Menace, which will haunt us forever). Furthermore, if there&#8217;s another station on the same channel communicating over a lower bit rate, your station&#8217;s performance can be degraded real bad (known as the <a href="http://www.cs.utexas.edu/~lili/classes/F11/reading2/5.pdf">802.11 performance anomaly</a>). This means that Murphy in the physical layer (only your first hop in most cases!), can end up causing TCP to believe that there is congestion at any of the many links that lead to the destination, and actually back down.</p>
<p>Linux uses TCP CUBIC as the default congestion control algorithm since kernel version 2.6.19. Without going into details of how the different TCP thresholds work in CUBIC, let&#8217;s look at how its congestion window (CWND) curve looks like.</p>
<p><a href="http://lalithsuresh.files.wordpress.com/2012/02/blah1.png"><img class="aligncenter size-full wp-image-1466" title="blah" src="http://lalithsuresh.files.wordpress.com/2012/02/blah1.png?w=700" alt=""   /></a></p>
<p>The above is a measurement of the CWND size on a per packet basis, for a flow generated using <a href="http://en.wikipedia.org/wiki/Iperf">iperf</a>. The test network comprised of my laptop running the iperf client with an access point one hop away, bridging all traffic to a server behind it via a switched LAN. I&#8217;m sharing a wireless channel with a whole bunch of other nodes. The red line is the CWND size, and the green line is the slow-start threshold (ssthresh) value. As for some quick TCP background, the red line indicates how many bytes TCP is willing to keep outstanding, and the green line indicates the threshold at which TCP says, &#8220;Ok, I think I should not get too greedy now, and will back-out if I feel the network is congested&#8221;.</p>
<p>The graph above is a typical TCP CUBIC graph. When the congestion window (red) is less than the ssthresh value (green), the CWND increases in a concave manner (really fast). This can be seen by the near vertical spikes around seconds 3, 9, 35, and 37. When the CWND value is higher than the ssthresh value, TCP CUBIC plays safe, and tries to increase very slowly. For instance, look at how slowly the stretch between 22 and 30 is growing.</p>
<p>As you can see, TCP is detecting congestion multiple times, thanks to a noisy channel, and adjusts itself accordingly.</p>
<p>Next, we look at the curve in a channel where there is no contention at all (that is, no else on the channel except my wireless interface, and the access point I&#8217;m talking to).</p>
<p><a href="http://lalithsuresh.files.wordpress.com/2012/02/blah2.png"><img class="aligncenter size-full wp-image-1468" title="blah" src="http://lalithsuresh.files.wordpress.com/2012/02/blah2.png?w=700" alt=""   /></a></p>
<p>Clearly there is no congestion here. The CWND value crosses the slow-start threshold very early (around the 1st second), plateaus since that point, and then goes convex around the 5th second. It then keeps probing for more bandwidth, finds it, and increases the window size steadily over time.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalithsuresh.wordpress.com/1456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalithsuresh.wordpress.com/1456/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalithsuresh.wordpress.com/1456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalithsuresh.wordpress.com/1456/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalithsuresh.wordpress.com/1456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalithsuresh.wordpress.com/1456/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalithsuresh.wordpress.com/1456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalithsuresh.wordpress.com/1456/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalithsuresh.wordpress.com/1456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalithsuresh.wordpress.com/1456/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalithsuresh.wordpress.com/1456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalithsuresh.wordpress.com/1456/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalithsuresh.wordpress.com/1456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalithsuresh.wordpress.com/1456/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1456&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalith.in/2012/02/15/fun-with-tcp-cubic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/15241e528f8730f06c58c9283d6fe6ce?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">lalithsuresh</media:title>
		</media:content>

		<media:content url="http://lalithsuresh.files.wordpress.com/2012/02/blah1.png" medium="image">
			<media:title type="html">blah</media:title>
		</media:content>

		<media:content url="http://lalithsuresh.files.wordpress.com/2012/02/blah2.png" medium="image">
			<media:title type="html">blah</media:title>
		</media:content>
	</item>
		<item>
		<title>Towards a Scalable and Highly Available HDFS Namenode</title>
		<link>http://lalith.in/2011/12/15/towards-a-scalable-and-highly-available-namenode/</link>
		<comments>http://lalith.in/2011/12/15/towards-a-scalable-and-highly-available-namenode/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 10:23:16 +0000</pubDate>
		<dc:creator>lalithsuresh</dc:creator>
				<category><![CDATA[Distributed Systems]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[hadoop]]></category>
		<category><![CDATA[hdfs]]></category>
		<category><![CDATA[namenode availability]]></category>
		<category><![CDATA[namenode scalability]]></category>

		<guid isPermaLink="false">http://lalith.in/?p=1436</guid>
		<description><![CDATA[After 3 months of intense hacking, I&#8217;m pleased to be writing about a little something I worked on for a project course here at KTH. The premise So we&#8217;re all familiar with Hadoop, right? It&#8217;s the little yellow elephant that provides an excellent platform for distributed computing, which is seeing rapid adoption by the industry, and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1436&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After 3 months of intense hacking, I&#8217;m pleased to be writing about a little something I worked on for a project course here at KTH.</p>
<h3><span style="text-decoration:underline;"><strong>The premise</strong></span></h3>
<p>So we&#8217;re all familiar with <a href="http://hadoop.apache.org/">Hadoop</a>, right? It&#8217;s the little yellow elephant that provides an excellent platform for distributed computing, which is seeing rapid adoption by the industry, and involvement from major players like Yahoo!, Facebook and recently, Microsoft. Well, Hadoop and friends use the <a href="http://hadoop.apache.org/hdfs/">Hadoop Distributed File System</a> (HDFS) as their underlying storage layer. Given the kind of jobs that are expected to run on top of it, HDFS is designed to store large files, and is optimised for throughput as opposed to latency.</p>
<p>HDFS is a single-master-server based distributed file system. Architecturally speaking, HDFS comprises of three important entities:</p>
<ol>
<li>Clients, who read/write files from/to the filesystem.</li>
<li>Datanodes, which actually store the data (blocks) associated with the files.</li>
<li>The Namenode, which is a central server that stores all the metadata associated with the files, and blocks.</li>
</ol>
<p>This division between metadata storage and data storage is important, because typical use cases of HDFS are data intensive, and not metadata intensive. That&#8217;s fine, but the problem is, if the Namenode crashes, the entire file system becomes inoperable because clients and Datanodes still need the metadata to do anything useful. Furthermore, since the Namenode maintains all the metadata only in memory, the number of files you can store on the filesystem is directly proportional to the amount of RAM the Namenode has. As if that&#8217;s not enough, the Namenode will be completely saturated under write intensive workloads, and will be unable to respond to even simple client side queries like &#8220;ls&#8221;. Have a look at <a href="http://www.usenix.org/publications/login/2010-04/openpdfs/shvachko.pdf">Shvachko&#8217;s paper</a> which describes these problems at great length and depth, on which we&#8217;ve based our work.</p>
<p>Long story short, the needs of the hour are:</p>
<ul>
<li>High availability for the Namenode, i.e, no single point of failure.</li>
<li>Horizontal scalability for the Namenode, i.e, to handle heavier loads, one would need to only add more Namenodes to the system than having to upgrade a single Namenode&#8217;s hardware.</li>
</ul>
<h3><span style="text-decoration:underline;"><strong>Our solution</strong></span></h3>
<p>In order to recover from crashes, the Namenode maintains a <a href="http://en.wikipedia.org/wiki/Journaling_file_system">journal</a> of all changes that it makes to the metadata. This pretty much involves logging every operation made to disk, and there is quite a huge piece of code related to this as well. However, the database community has been doing journaling, checkpointing and replicated storage since quite a while. So if you haven&#8217;t guessed our solution yet, here it is:</p>
<p><em>&#8220;Move all of the Namenode&#8217;s metadata storage into an in-memory, replicated, share-nothing distributed database.&#8221;</em></p>
<p><em></em>In short, Namenodes themselves are reduced to a stateless frontend to the database, and fetch state into memory only when required. This comes with the added advantage of being able to have multiple stateless Namenodes for the same filesystem namespace. We chose <a href="http://www.mysql.com/products/cluster/">MySQL Cluster</a> as our database because of its wide spread use and stability. So for the filesystem to scale to a larger number of files, one needs to add more MySQL Cluster Datanodes, thus moving the bottleneck from the Namenode&#8217;s RAM to the DB&#8217;s storage capacity. For the filesystem to handle heavier workloads, one needs to add only more Namenode machines and divide the load amongst them. Another interesting aspect is that if a single Namenode machine has to reboot, it needn&#8217;t fetch any state into memory and will be ready for action within a few seconds (although it still has to sync with Datanodes). Another advantage of our design is that the modifications will not affect the clients or Datanodes in anyway, except that we might need to find a way to divide the load among the Namenodes.</p>
<div></div>
<h3><span style="text-decoration:underline;"><strong>How we did it</strong></span></h3>
<p>We first dissected all the internal protocols being used in HDFS, i.e, the client-Namenode, Namenode-Datanode, and client-Datanode protocols. Next, we stripped out all the Namenode code that we didn&#8217;t need. This was pretty much the code related to journaling, checkpointing, the secondary Namenode and so forth.</p>
<p>Next, we identified the key data structures we needed to move to the DB. We picked the two most memory intensive data-structures to migrate first: the Inodes, and the Blocks.</p>
<p>Since we were heavily time constrained (three months to deliver the project and the report), we decided to focus on functional correctness first, and then optimise later. So the easiest course of action seemed to be to modify the lowest levels of the call chain, replacing reads/writes from/to memory with query, insert, update and delete operations on the DB. We developed two helper classes, one each for Inodes and Blocks, and interfaced with the DB through these methods. We used the <a href="http://dev.mysql.com/doc/ndbapi/en/mccj-using-clusterj.html">ClusterJ connector</a> to talk to MySQL. This obviously meant that we needed a flat row representation for Inodes and Blocks in the DB, and we had some other problems to think of as well on the way. How do we index Inodes? How do we index Blocks? What about Triplets?</p>
<p>All in all, we tackled the problem of scaling the Namenode with a set of design decisions which we later found to be consistent with Shvacko&#8217;s <a href="http://www.usenix.org/publications/login/2011-06/openpdfs/Shvachko.pdf">update paper</a> on the Namenode&#8217;s scalability, except that he suggests using HBase as the DB.</p>
<h3><span style="text-decoration:underline;"><strong>Current status</strong></span></h3>
<ul>
<li>Multiple stateless Namenodes run merrily, which store Inode and Block related metadata in MySQL Cluster. As a validation test, Clients can do an &#8220;ls&#8221; query to any Namenode and see a consistent view of the filesystem regardless of which Namenode updated the DB with the content.</li>
<li>We&#8217;re trying to ensure functional correctness using the HDFS unit tests. We got the most important ones to pass, and decided to keep some more bug fixing until later because we needed to evaluate the system as part of the course.</li>
<li>We&#8217;ve been evaluating the system using the Synthetic Load Generator. Horizontal scalability has been clearly achieved; adding more Namenodes improves the average number of operations per second for different work loads. With write intensive work loads, the scalability is linear in terms of total operations/sec that are executed.</li>
</ul>
<h3><span style="text-decoration:underline;"><strong>Current limitations</strong></span></h3>
<p>Obviously, our work isn&#8217;t rainbows and sunshine; there&#8217;s a long way to go. Here&#8217;s what we don&#8217;t have yet and are currently addressing:</p>
<ul>
<li>Performance improvements. With a single load-generator thread throwing requests at the Namenode, we&#8217;re within a 10th of the original Namenode&#8217;s performance because read/writes from/to memory now go over a network to a database cluster (which is OK, I guess). But with more LoadGen threads, we&#8217;re experiencing a hefty bottleneck, which I&#8217;ll describe in the next point.</li>
<li>The Namenode isn&#8217;t fully stateless yet. The most important data structures we&#8217;re yet to move are the DatanodeDescriptor entities and the file leases. There&#8217;ll surely be more, but these are the most crucial ones. Once full statelessness is achieved, we can eliminate the read-write locks in the code which are absolutely not needed any more in our implementation (the Namenode currently uses a multiple-reader-single-writer concurrency model). Profiling experiments indicated that the Namenode spends around 70% of its time waiting to acquire write locks. If we keep the Namenode fully stateless, we can wrap FSNamesystem operations into Database transactions which can be batched, and let MySQL cluster handle serialisability for us (which can handle write-heavy transactions really well). We can even break away from the single-writer model that the Namenode currently uses. Will this lead to a higher throughput for write operations than the original Namenode? Maybe. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>Clients and Datanodes have to be statically partitioned as of now (it sufficed for our evaluations). We need a way for them to pick a random Namenode to perform their operations with.</li>
</ul>
<h3><span style="text-decoration:underline;"><strong>Talk is cheap, show me the code!</strong></span></h3>
<p>The <a href="https://github.com/lalithsuresh/Scaling-HDFS-NameNode">code is publicly available here</a> for thy scrutiny. You&#8217;ll also need to have a MySQL cluster setup in order to test this (we have a hard coded set of defaults in DBConnector.java which you can politely ignore). <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Here&#8217;s our <a href="https://docs.google.com/presentation/pub?id=16JsCmNDplMIPm1-x455zqxpEd9g-k386ZgAlqi1AKsE&amp;start=false&amp;loop=false&amp;delayms=3000#slide=id.p">presentation</a> on it as well. We&#8217;ve dubbed our prototype implementation KTHFS (because we&#8217;re students at KTH, but yes, no points for creativity on that one).</p>
<h3></h3>
<h3><span style="text-decoration:underline;"><strong>Future work</strong></span></h3>
<p>As an academic obligation, here&#8217;s future work (and no I&#8217;m not going to write stuff we&#8217;ll never do).</p>
<p>One member (not me) from the team will be continuing this work as part of his Masters thesis, and plans to address the above mentioned limitations as part of his work. I&#8217;ll try to contribute as well during my free time (what are weekends for anyway?). Let&#8217;s see how this goes. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalithsuresh.wordpress.com/1436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalithsuresh.wordpress.com/1436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalithsuresh.wordpress.com/1436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalithsuresh.wordpress.com/1436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalithsuresh.wordpress.com/1436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalithsuresh.wordpress.com/1436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalithsuresh.wordpress.com/1436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalithsuresh.wordpress.com/1436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalithsuresh.wordpress.com/1436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalithsuresh.wordpress.com/1436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalithsuresh.wordpress.com/1436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalithsuresh.wordpress.com/1436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalithsuresh.wordpress.com/1436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalithsuresh.wordpress.com/1436/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1436&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalith.in/2011/12/15/towards-a-scalable-and-highly-available-namenode/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/15241e528f8730f06c58c9283d6fe6ce?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">lalithsuresh</media:title>
		</media:content>
	</item>
		<item>
		<title>Let&#8217;s make metros more interesting</title>
		<link>http://lalith.in/2011/11/15/lets-make-metros-more-interesting/</link>
		<comments>http://lalith.in/2011/11/15/lets-make-metros-more-interesting/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 15:41:03 +0000</pubDate>
		<dc:creator>lalithsuresh</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[Non-Tech]]></category>
		<category><![CDATA[cartoons]]></category>
		<category><![CDATA[metro]]></category>

		<guid isPermaLink="false">http://lalith.in/?p=1404</guid>
		<description><![CDATA[After moving to Europe for my masters, I&#8217;ve been accustomed to finding my way around cities using the subway trains. They&#8217;re convenient, relatively cheap (unless you&#8217;re in Stockholm, where using the word cheap throws an exception), and usually fast enough as well. The only problem I have with metros is that they&#8217;re boring as shit [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1404&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After moving to Europe for my masters, I&#8217;ve been accustomed to finding my way around cities using the subway trains. They&#8217;re convenient, relatively cheap (unless you&#8217;re in Stockholm, where using the word cheap throws an exception), and usually fast enough as well. The only problem I have with metros is that they&#8217;re boring as shit to travel in, especially when you&#8217;re alone. Sure you can carry a book with you or invest in a tab/pad/slate/smartphone/whatever, but we definitely need to do something about the view from the windows.</p>
<p><a href="http://lalithsuresh.files.wordpress.com/2011/11/solution.png"><img class="aligncenter size-medium wp-image-1407" title="solution" src="http://lalithsuresh.files.wordpress.com/2011/11/solution.png?w=212&#038;h=300" alt="" width="212" height="300" /></a></p>
<p>Given that there&#8217;s hardly anything interesting about rocks and the occasional flash of light in a metro tunnel, I think there&#8217;s a lot that can be done to make the metro experience better. Here&#8217;s one idea I have to solve this international crisis which is oh-so-more-important than anything else on this planet. I call it, metro cartoons (the animated ones).</p>
<p><a href="http://lalithsuresh.files.wordpress.com/2011/11/train.png"><img class="aligncenter size-medium wp-image-1408" title="solution" src="http://lalithsuresh.files.wordpress.com/2011/11/train.png?w=212&#038;h=300" alt="" width="212" height="300" /></a></p>
<p>The basic idea is to insert cartoon panels between the tunnel walls and the tracks. Since we know the approximate speed at which the trains move, you can estimate the minimum spacing between the panels that would be required to provide a reasonable frame rate required for the animation. I&#8217;m sure artists understand these aspects better (thus, I don&#8217;t), and can come up with the right kind of drawings for this setting.</p>
<p>What say? I&#8217;m pretty sure someone must have tried this already, so let me know if you&#8217;ve heard of any such attempt.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalithsuresh.wordpress.com/1404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalithsuresh.wordpress.com/1404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalithsuresh.wordpress.com/1404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalithsuresh.wordpress.com/1404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalithsuresh.wordpress.com/1404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalithsuresh.wordpress.com/1404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalithsuresh.wordpress.com/1404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalithsuresh.wordpress.com/1404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalithsuresh.wordpress.com/1404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalithsuresh.wordpress.com/1404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalithsuresh.wordpress.com/1404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalithsuresh.wordpress.com/1404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalithsuresh.wordpress.com/1404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalithsuresh.wordpress.com/1404/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1404&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalith.in/2011/11/15/lets-make-metros-more-interesting/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/15241e528f8730f06c58c9283d6fe6ce?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">lalithsuresh</media:title>
		</media:content>

		<media:content url="http://lalithsuresh.files.wordpress.com/2011/11/solution.png?w=212" medium="image">
			<media:title type="html">solution</media:title>
		</media:content>

		<media:content url="http://lalithsuresh.files.wordpress.com/2011/11/train.png?w=212" medium="image">
			<media:title type="html">solution</media:title>
		</media:content>
	</item>
		<item>
		<title>Lagom</title>
		<link>http://lalith.in/2011/10/31/lagom/</link>
		<comments>http://lalith.in/2011/10/31/lagom/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 21:05:05 +0000</pubDate>
		<dc:creator>lalithsuresh</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Non-Tech]]></category>
		<category><![CDATA[lagom]]></category>
		<category><![CDATA[stockholm]]></category>

		<guid isPermaLink="false">http://lalith.in/?p=1384</guid>
		<description><![CDATA[Lagom (pronounced [ˈlɑ̀ːɡɔm]) is a Swedish word with no direct English equivalent, meaning &#8220;just the right amount&#8221;. &#8211; Wikipedia If you&#8217;re in Sweden and there&#8217;s one word you should know, it would be &#8216;lagom&#8217;, a word that defines the essence of everything that is Swedish. More than two months into Stockholm and I must say [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1384&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<blockquote>
<p style="text-align:left;">Lagom (pronounced [ˈlɑ̀ːɡɔm]) is a Swedish word with no direct English equivalent, meaning &#8220;just the right amount&#8221;. &#8211; Wikipedia</p>
</blockquote>
<p>If you&#8217;re in Sweden and there&#8217;s one word you should know, it would be &#8216;lagom&#8217;, a word that defines the essence of everything that is Swedish.</p>
<p>More than two months into Stockholm and I must say it&#8217;s been pretty lagom so far. The city itself is beautiful, with the only downside being that everything is at least twice as expensive as in Lisbon. Maybe that&#8217;s what you get for everything around here being so perfect and systematic. And unlike Lisbon, you actually have easy access to a *large* collection of beers, which is definitely a plus.</p>
<p><img class="aligncenter" style="text-align:center;border-color:initial;border-style:initial;" src="http://farm7.static.flickr.com/6113/6299612257_231d4601de_m.jpg" alt="" width="240" height="161" /></p>
<p>It&#8217;s autumn here right now, and the scenery outside is fabulous. Sadly though, the weather in Sweden is not-so-lagom. Temperatures are already hovering around 5 degrees celsius, and for an Indian like me, this is pretty cold in itself (heck, it never gets lower than 20 in my town back home). The funny thing is, this weather is cute for the Swedes. Let&#8217;s see how winter ends up looking like.</p>
<p>Meanwhile, <a href="http://www.flickr.com//photos/lalithsuresh/sets/72157628021837718/show/">here</a> are some pictures I took from Stockholm over the last two months.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalithsuresh.wordpress.com/1384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalithsuresh.wordpress.com/1384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalithsuresh.wordpress.com/1384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalithsuresh.wordpress.com/1384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalithsuresh.wordpress.com/1384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalithsuresh.wordpress.com/1384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalithsuresh.wordpress.com/1384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalithsuresh.wordpress.com/1384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalithsuresh.wordpress.com/1384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalithsuresh.wordpress.com/1384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalithsuresh.wordpress.com/1384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalithsuresh.wordpress.com/1384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalithsuresh.wordpress.com/1384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalithsuresh.wordpress.com/1384/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1384&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalith.in/2011/10/31/lagom/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/15241e528f8730f06c58c9283d6fe6ce?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">lalithsuresh</media:title>
		</media:content>

		<media:content url="http://farm7.static.flickr.com/6113/6299612257_231d4601de_m.jpg" medium="image" />
	</item>
		<item>
		<title>Fourth Annual Workshop on NS-3, 2012</title>
		<link>http://lalith.in/2011/10/21/fourth-annual-workshop-on-ns-3-2012/</link>
		<comments>http://lalith.in/2011/10/21/fourth-annual-workshop-on-ns-3-2012/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 11:01:12 +0000</pubDate>
		<dc:creator>lalithsuresh</dc:creator>
				<category><![CDATA[NS-3]]></category>
		<category><![CDATA[cfp]]></category>
		<category><![CDATA[ns3]]></category>
		<category><![CDATA[simutools 2012]]></category>
		<category><![CDATA[wns3 2012]]></category>

		<guid isPermaLink="false">http://lalith.in/?p=1369</guid>
		<description><![CDATA[We&#8217;re organising the fourth annual Workshop on NS-3, to be held in conjunction with SIMUTools 2012. The workshop will be held on March 23rd, 2012, in Sirmione, Italy. Details regarding the important dates, submission guidelines, and the scope of the workshop is available on the WNS3 2012 site. The workshop serves as an annual gathering of ns-3 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1369&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re organising the fourth annual Workshop on NS-3, to be held in conjunction with <a href="http://simutools.org/2012/">SIMUTools 2012</a>. The workshop will be held on March 23rd, 2012, in Sirmione, Italy. Details regarding the important dates, submission guidelines, and the scope of the workshop is available on the <a href="http://www.nsnam.org/wns3/wns3-2012/">WNS3 2012 site</a>.</p>
<p>The workshop serves as an annual gathering of ns-3 users and developers to share ideas, and brainstorm over future directions for the project. We&#8217;re inviting conference style full paper submissions, which will be made available in the ACM and EU digital proceedings. Furthermore, we&#8217;re also hosting an interactive session comprising of demos and posters. So start working on your papers and proposals as soon as possible! If you have any queries, feel free to <a href="http://www.nsnam.org/wns3/wns3-2012/contact/">contact</a> the workshop chairs.</p>
<p>Like previous editions of the workshop, we also plan to conduct a day long ns-3 developers&#8217; meeting around the same time. More details will be out soon. Keep an eye on our mailing lists and website to not miss any announcements.</p>
<p><span style="text-decoration:underline;"><strong>Important dates</strong></span></p>
<p>Papers submission deadline : December 2, 2011<br />
Notification of acceptance : January 20, 2012<br />
Camera-ready deadline : February 10, 2012<br />
Demos and posters proposal deadline : February 24, 2012<br />
Workshop in Sirmione : March 23, 2012<br />
Developers’ meeting : TBA</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalithsuresh.wordpress.com/1369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalithsuresh.wordpress.com/1369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalithsuresh.wordpress.com/1369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalithsuresh.wordpress.com/1369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalithsuresh.wordpress.com/1369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalithsuresh.wordpress.com/1369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalithsuresh.wordpress.com/1369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalithsuresh.wordpress.com/1369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalithsuresh.wordpress.com/1369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalithsuresh.wordpress.com/1369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalithsuresh.wordpress.com/1369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalithsuresh.wordpress.com/1369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalithsuresh.wordpress.com/1369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalithsuresh.wordpress.com/1369/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1369&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalith.in/2011/10/21/fourth-annual-workshop-on-ns-3-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/15241e528f8730f06c58c9283d6fe6ce?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">lalithsuresh</media:title>
		</media:content>
	</item>
		<item>
		<title>Comic: Deciphering Academic Presentations</title>
		<link>http://lalith.in/2011/10/16/comic-deciphering-academic-presentations/</link>
		<comments>http://lalith.in/2011/10/16/comic-deciphering-academic-presentations/#comments</comments>
		<pubDate>Sun, 16 Oct 2011 18:52:19 +0000</pubDate>
		<dc:creator>lalithsuresh</dc:creator>
				<category><![CDATA[Comic]]></category>
		<category><![CDATA[academic presentations]]></category>
		<category><![CDATA[yanc]]></category>

		<guid isPermaLink="false">http://lalith.in/?p=1351</guid>
		<description><![CDATA[YANC 4: Deciphering academic presentations<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1351&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><span style="text-decoration:underline;"><strong><strong>YANC 4: Deciphering academic presentations</strong></strong></span></p>
<p style="text-align:center;"><span style="text-decoration:underline;"><strong><a href="http://lalithsuresh.files.wordpress.com/2011/10/presentations4.png"><img class="aligncenter size-large wp-image-1359" title="presentations" src="http://lalithsuresh.files.wordpress.com/2011/10/presentations4.png?w=371&#038;h=1024" alt="" width="371" height="1024" /></a><br />
</strong></span></p>
<div><strong><br />
</strong></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalithsuresh.wordpress.com/1351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalithsuresh.wordpress.com/1351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalithsuresh.wordpress.com/1351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalithsuresh.wordpress.com/1351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalithsuresh.wordpress.com/1351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalithsuresh.wordpress.com/1351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalithsuresh.wordpress.com/1351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalithsuresh.wordpress.com/1351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalithsuresh.wordpress.com/1351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalithsuresh.wordpress.com/1351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalithsuresh.wordpress.com/1351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalithsuresh.wordpress.com/1351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalithsuresh.wordpress.com/1351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalithsuresh.wordpress.com/1351/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1351&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalith.in/2011/10/16/comic-deciphering-academic-presentations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/15241e528f8730f06c58c9283d6fe6ce?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">lalithsuresh</media:title>
		</media:content>

		<media:content url="http://lalithsuresh.files.wordpress.com/2011/10/presentations4.png?w=371" medium="image">
			<media:title type="html">presentations</media:title>
		</media:content>
	</item>
		<item>
		<title>How to extend ns-3 for your research</title>
		<link>http://lalith.in/2011/10/13/how-to-extend-ns-3-for-your-research/</link>
		<comments>http://lalith.in/2011/10/13/how-to-extend-ns-3-for-your-research/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 22:34:25 +0000</pubDate>
		<dc:creator>lalithsuresh</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[NS-3]]></category>
		<category><![CDATA[extend]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[ns3]]></category>

		<guid isPermaLink="false">http://lalith.in/?p=1342</guid>
		<description><![CDATA[Having been busy with coursework lately, I hadn&#8217;t gone through our users&#8217; list in a while. Wading through a week&#8217;s worth of posts today, it seems to me like a good deal of questions are from users who are trying to get started with extending ns-3. This is indeed quite expected; as a research tool, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1342&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Having been busy with coursework lately, I hadn&#8217;t gone through our users&#8217; list in a while. Wading through a week&#8217;s worth of posts today, it seems to me like a good deal of questions are from users who are trying to get started with extending ns-3. This is indeed quite expected; as a research tool, ns-3 is most useful only when built upon. These extensions usually take one of the following forms:</p>
<ol>
<li>a tweak to an existing protocol to make it simulate some specific scenario (try <a href="http://groups.google.com/group/ns-3-users/search?group=ns-3-users&amp;q=attacks&amp;qt_g=Search+this+group">searching for &#8220;attacks&#8221; on our users list</a>),</li>
<li>adding some functionality X to an existing module, (for instance, RRC messages support for LTE)</li>
<li>or writing an entirely new module from scratch.</li>
</ol>
<p>Before you do *anything* with ns-3, go through the <a href="http://www.nsnam.org/docs/tutorial/singlehtml/index.html">tutorials</a> first.</p>
<p>Now, for cases 1 and 2 mentioned above, the *only* way to proceed is:</p>
<ol>
<li>Go through the literature about what you&#8217;re trying to implement &#8212; &#8220;What do I want to achieve?&#8221;</li>
<li>Understand the scope and limitations of the ns-3 module you&#8217;re trying to deal with (go through the <a href="http://www.nsnam.org/docs/models/singlehtml/index.html">model documentation</a> at least) &#8212; &#8220;Does ns-3 have the necessary base for me to build on top of?&#8221;</li>
<li>If the answer to the above is &#8220;yes&#8221;, then start reading through the respective module&#8217;s code to figure out where you&#8217;ll need to insert your modifications. &#8212; &#8220;Where does my extension/tweak fit within the existing source code?&#8221;</li>
<li>Implement.</li>
<li>Profit.</li>
</ol>
<p>Case 3, on the other hand, requires a lot more work:</p>
<ol>
<li>Go through the literature about what you&#8217;re trying to implement &#8212; &#8220;What do I want to achieve?&#8221;</li>
<li>Understand how your module would fit within ns-3. This is usually the tricky part. To this end, it&#8217;s very important to understand how packets flow through a node within ns-3. This <a href="http://www.nsnam.org/docs/release/manual/html/internet-stack.html#example-path-of-a-packet">figure</a> from our manual is usually the only thing you&#8217;ll need to know to get started.</li>
<li>At this point, I&#8217;ll make things easier for myself and assume that you&#8217;re going to implement something that fits into the above mentioned architecture (rather than trying to modify the architecture itself). The first step is as simple as deriving from the right class. This gives you the virtual methods you need to implement in order to maintain a particular component&#8217;s semantics. So if you&#8217;re trying to write a new application, derive from ns3::Application. If it&#8217;s a new routing protocol, derive from ns3::Ipv4RoutingProtocol or ns3::Ipv6RoutingProtocol. If it&#8217;s a new NetDevice, derive from ns3::NetDevice. The easiest thing to do is to find another example of the component type you&#8217;re trying to develop and reflect its basic structure.</li>
<li>Now to get started writing your new module, have a look at Gustavo Carnerio&#8217;s <a href="http://code.nsnam.org/ns-3-dev/file/81ca9a7671bb/src/create-module.py">create-module.py</a> script (inside src/)  which generates a skeleton for your new module. This includes the necessary sub-folders for the module, and also the all important wscript file. For most use cases, it would suffice to peek into some other module&#8217;s wscript file to get an idea of what to do. If you&#8217;re going to need some fancy external libraries, you&#8217;ll need to go through the waf documentation a bit. Look into src/click/wscript to get an idea of how to do external linking.</li>
<li>Now once you start developing your new simulation model, you&#8217;ll need to attach this object to a node to get it to do something. This mode of attachment varies from component to component. Some objects are &#8216;aggregated&#8217; to the node, some are added to a list of similar components (like applications being added to a node&#8217;s &#8216;ApplicationList&#8217;) and so forth. The best places to look in order to understand this are the helpers for each module. So for instance, if you want to figure out how to add your routing protocol to a node, look at src/olsr/helper/ to get an idea.</li>
<li>Lastly, you&#8217;ll need to write simulation scripts to see your module in action. Copying off and editing existing example scripts from the examples/ folder or the src/*/examples/ folders should suffice for most cases.</li>
<li>If you&#8217;re going to propose this new module for merge, look at our <a href="http://www.nsnam.org/developers/contributing-code/">contributing code page</a>. Keep in mind that we won&#8217;t merge code which doesn&#8217;t have any documentation, or tests (validation or unit tests, as is applicable).</li>
<li>Merge. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalithsuresh.wordpress.com/1342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalithsuresh.wordpress.com/1342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalithsuresh.wordpress.com/1342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalithsuresh.wordpress.com/1342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalithsuresh.wordpress.com/1342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalithsuresh.wordpress.com/1342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalithsuresh.wordpress.com/1342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalithsuresh.wordpress.com/1342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalithsuresh.wordpress.com/1342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalithsuresh.wordpress.com/1342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalithsuresh.wordpress.com/1342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalithsuresh.wordpress.com/1342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalithsuresh.wordpress.com/1342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalithsuresh.wordpress.com/1342/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1342&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalith.in/2011/10/13/how-to-extend-ns-3-for-your-research/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/15241e528f8730f06c58c9283d6fe6ce?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">lalithsuresh</media:title>
		</media:content>
	</item>
		<item>
		<title>Comic: Seals</title>
		<link>http://lalith.in/2011/09/09/seals/</link>
		<comments>http://lalith.in/2011/09/09/seals/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 16:20:06 +0000</pubDate>
		<dc:creator>lalithsuresh</dc:creator>
				<category><![CDATA[Comic]]></category>
		<category><![CDATA[seals]]></category>

		<guid isPermaLink="false">http://lalith.in/?p=1321</guid>
		<description><![CDATA[3. YANC &#8211; Seals<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1321&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><strong>3. YANC &#8211; Seals</strong><a href="http://lalithsuresh.files.wordpress.com/2011/09/seals.png"><img class="size-full wp-image-1327 aligncenter" title="seals" src="http://lalithsuresh.files.wordpress.com/2011/09/seals.png?w=700&#038;h=560" alt="" width="700" height="560" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalithsuresh.wordpress.com/1321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalithsuresh.wordpress.com/1321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalithsuresh.wordpress.com/1321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalithsuresh.wordpress.com/1321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalithsuresh.wordpress.com/1321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalithsuresh.wordpress.com/1321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalithsuresh.wordpress.com/1321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalithsuresh.wordpress.com/1321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalithsuresh.wordpress.com/1321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalithsuresh.wordpress.com/1321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalithsuresh.wordpress.com/1321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalithsuresh.wordpress.com/1321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalithsuresh.wordpress.com/1321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalithsuresh.wordpress.com/1321/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1321&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalith.in/2011/09/09/seals/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/15241e528f8730f06c58c9283d6fe6ce?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">lalithsuresh</media:title>
		</media:content>

		<media:content url="http://lalithsuresh.files.wordpress.com/2011/09/seals.png" medium="image">
			<media:title type="html">seals</media:title>
		</media:content>
	</item>
		<item>
		<title>Comic: Utility</title>
		<link>http://lalith.in/2011/08/29/comic-utility/</link>
		<comments>http://lalith.in/2011/08/29/comic-utility/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 15:37:40 +0000</pubDate>
		<dc:creator>lalithsuresh</dc:creator>
				<category><![CDATA[Comic]]></category>
		<category><![CDATA[networking research]]></category>
		<category><![CDATA[utility]]></category>
		<category><![CDATA[yanc]]></category>

		<guid isPermaLink="false">http://lalith.in/?p=1307</guid>
		<description><![CDATA[&#160; 2. YANC - Utility<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1307&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p style="text-align:center;"><strong><strong><strong>2. </strong></strong>YANC - <strong>Utility</strong></strong></p>
<p style="text-align:center;"><a href="http://lalithsuresh.files.wordpress.com/2011/08/dido.png"><img class="aligncenter size-full wp-image-1308" title="dido" src="http://lalithsuresh.files.wordpress.com/2011/08/dido.png?w=700&#038;h=2379" alt="" width="700" height="2379" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lalithsuresh.wordpress.com/1307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lalithsuresh.wordpress.com/1307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lalithsuresh.wordpress.com/1307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lalithsuresh.wordpress.com/1307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lalithsuresh.wordpress.com/1307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lalithsuresh.wordpress.com/1307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lalithsuresh.wordpress.com/1307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lalithsuresh.wordpress.com/1307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lalithsuresh.wordpress.com/1307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lalithsuresh.wordpress.com/1307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lalithsuresh.wordpress.com/1307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lalithsuresh.wordpress.com/1307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lalithsuresh.wordpress.com/1307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lalithsuresh.wordpress.com/1307/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lalith.in&amp;blog=4169371&amp;post=1307&amp;subd=lalithsuresh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lalith.in/2011/08/29/comic-utility/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/15241e528f8730f06c58c9283d6fe6ce?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">lalithsuresh</media:title>
		</media:content>

		<media:content url="http://lalithsuresh.files.wordpress.com/2011/08/dido.png" medium="image">
			<media:title type="html">dido</media:title>
		</media:content>
	</item>
	</channel>
</rss>
