<?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>Shahbaz Khan</title>
	<atom:link href="http://shazkhan.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://shazkhan.wordpress.com</link>
	<description>Tactical Engineering and Consultancy: Smart, Secure and Scalable Systems</description>
	<lastBuildDate>Fri, 26 Aug 2011 09:29:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='shazkhan.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Shahbaz Khan</title>
		<link>http://shazkhan.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://shazkhan.wordpress.com/osd.xml" title="Shahbaz Khan" />
	<atom:link rel='hub' href='http://shazkhan.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Interesting Research Problem for Sensor Networks and Smart Spaces</title>
		<link>http://shazkhan.wordpress.com/2011/08/13/interesting-research-problem-for-sensor-networks-and-smart-spaces/</link>
		<comments>http://shazkhan.wordpress.com/2011/08/13/interesting-research-problem-for-sensor-networks-and-smart-spaces/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 19:28:51 +0000</pubDate>
		<dc:creator>shazkhan</dc:creator>
				<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[TinyOS]]></category>
		<category><![CDATA[WSN]]></category>

		<guid isPermaLink="false">http://shazkhan.wordpress.com/?p=626</guid>
		<description><![CDATA[Sensor technology in combination with pervasive computation and communication can significantly contribute to improvements in our way of living. Devising (decentralized) solutions for the construction and deployment of large-scale wireless (sensor) systems requires concentration on the application of geospatial social networking which id used for monitoring and managing crowds of people, with the aim of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=626&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Sensor technology in combination with pervasive computation and communication can significantly contribute to improvements in our way of living. Devising (decentralized) solutions for the construction and deployment of large-scale wireless (sensor) systems requires concentration on the application of geospatial social networking which id used for monitoring and managing crowds of people, with the aim of maintaining safety and comfort for the individuals. The central research question is how to devise a large-scale collaborative network of highly mobile, miniature, wireless devices collecting, disseminating, aggregating, and processing information to provide instant feedback to its users for the purpose of maintaining their safety and comfort.</p>
<p style="text-align:justify;">The goal is to achieve significant progress in scaling up solutions for the deployment of wireless distributed sensor/actuator systems. These systems consist of a large collection of sensor/actuator devices that need to be shared by high-level applications. The intention is to close the gap between the networks and the applications. Some aspects of this gap are ease of installation, (self-)configuration and maintenance; ease of application development and deployment, hiding complexities of the network; and harnessing the behavior of a large network of relatively primitive nodes (constraining the emergent behavior).</p>
<p style="text-align:justify;">This would require a cross disciplinary research effort in the following areas:</p>
<ul style="text-align:justify;">
<li>Technical research on wireless (sensor) networking</li>
<li>Research on geospatial social network data gathering and analysis</li>
<li>Research on human-systems interaction (including management of privacy aspects)</li>
</ul>
<address>An edited extract from http://ewids.distributed-systems.net/index.html.</address>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazkhan.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazkhan.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazkhan.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazkhan.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazkhan.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazkhan.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazkhan.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazkhan.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazkhan.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazkhan.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazkhan.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazkhan.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazkhan.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazkhan.wordpress.com/626/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=626&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazkhan.wordpress.com/2011/08/13/interesting-research-problem-for-sensor-networks-and-smart-spaces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ebe48981b5452abf20d48c98368f7fa2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazkhan</media:title>
		</media:content>
	</item>
		<item>
		<title>Software Frameworks</title>
		<link>http://shazkhan.wordpress.com/2011/06/04/software-frameworks/</link>
		<comments>http://shazkhan.wordpress.com/2011/06/04/software-frameworks/#comments</comments>
		<pubDate>Sat, 04 Jun 2011 19:54:22 +0000</pubDate>
		<dc:creator>shazkhan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://shazkhan.wordpress.com/?p=586</guid>
		<description><![CDATA[Introduction Definition: &#8220;A framework is mainly a product for developers used as an integrated development environment that facilitates, supports, guides, confines, and helps the developers in building application in a well defined domain.&#8221; Shai Ben-Yehuda. A Framework is a package of software libraries that abstracts computer software by wrapping them in a well-defined and reusable [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=586&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2 style="text-align:justify;">Introduction</h2>
<p style="text-align:justify;"><strong>Definition:</strong> &#8220;A framework is mainly a product for developers used as an integrated development environment that facilitates, supports, guides, confines, and helps the developers in building application in a well defined domain.&#8221; Shai Ben-Yehuda.</p>
<p style="text-align:justify;">A Framework is a package of software libraries that abstracts computer software by wrapping them in a well-defined and reusable application programming interface (API). In other words low level API are abstracted with high level API so that programmers comfortably deal with integrated and managed low level features without understanding their peculiarities and still keeping their code standardized and correct. However, frameworks contain key distinguishing features that separate them from normal libraries.</p>
<p style="text-align:justify;">For example, a web application framework may provide user session management, data storage, and a templating system. A desktop application framework may provide user interface functionality and widgets (common GUI elements). Almost all frameworks control at least some aspect of an application&#8217;s flow of execution.</p>
<h2 style="text-align:justify;">Why Frameworks</h2>
<ul style="text-align:justify;">
<li>Frameworks are for conceptual integrity</li>
<li>Reducing/Abstracting complexity</li>
<li>Reducing development time and effort</li>
<li>Reduce possibility of bugs and errors</li>
<li>Control the behavior for standardization</li>
</ul>
<h2 style="text-align:justify;">Features</h2>
<p style="text-align:justify;">Software frameworks have these distinguishing features that separate them from libraries or normal user applications:</p>
<ol style="text-align:justify;">
<li><strong>Inversion of control</strong> &#8211; The overall program&#8217;s flow of control is <em>not</em> dictated by the caller, but by the framework.</li>
<li><strong>Default behavior</strong> &#8211; A framework <em>has</em> a default behavior, which must actually be some useful behavior and not a series of no-ops.</li>
<li><strong>Extensibility</strong> &#8211; A framework <em>can be</em> extended by the user usually by selective overriding or specialized by user code providing specific functionality.</li>
<li><strong>Non-modifiable framework code</strong> &#8211; The framework code, in general, is not allowed to be modified. Users can extend the framework, but not modify its code.</li>
</ol>
<h2 style="text-align:justify;">Types</h2>
<p style="text-align:justify;">Following are some of the types of frameworks that we find in our development works:</p>
<ul style="text-align:justify;">
<li>Development: Eclipse. .NET, Java Development Kit, Mac&#8217;s Cocoa (AppKit and Foundation Kit)</li>
<li>Application runtime: Mac&#8217;s Cocoa Runtime, Windows Common Language Runtime, Android, Java Runtime Environment</li>
<li>Web Application: Apache-PHP</li>
<li>Security: RSBAC, GFAC, FLASK</li>
<li>Many others for specific application domain</li>
</ul>
<p style="text-align:justify;">Fundamentally, there are two kinds of frameworks:</p>
<ul style="text-align:justify;">
<li>A <strong>full-stack</strong> framework provides a single set of components, covering the entire spectrum of features needed to build the application. They ensure that the components work well with one another. Examples are Android, Django and Zend frameworks.</li>
<li>A <strong>glue</strong> framework provides a set of adapters and interface code. They are suppose to handle many different components at any part of the software stack. They ensure that the adapters will work well with any possible combinations of components. Examples are FLASK, GFAC, TurboGears, Twisted and Pylons.</li>
</ul>
<p>There will always be framework developers who prefer the full-stack and there will always be framework developers who prefer glue. There will also always be developers in each camp. There will always be frameworks that can either be glue or full stack depending on the need.</p>
<p style="text-align:justify;">There is no perfect framework. There are only different frameworks that suit different kinds of needs.</p>
<h1 style="text-align:justify;">Bibliography</h1>
<ol>
<li>http://en.wikipedia.org/wiki/Software_framework</li>
<li>http://docforge.com/wiki/Framework</li>
<li>http://www.b-list.org/weblog/2007/feb/19/python-framework-design/</li>
<li>http://c2.com/cgi/wiki?SoftwareFramework</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazkhan.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazkhan.wordpress.com/586/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazkhan.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazkhan.wordpress.com/586/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazkhan.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazkhan.wordpress.com/586/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazkhan.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazkhan.wordpress.com/586/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazkhan.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazkhan.wordpress.com/586/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazkhan.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazkhan.wordpress.com/586/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazkhan.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazkhan.wordpress.com/586/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=586&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazkhan.wordpress.com/2011/06/04/software-frameworks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ebe48981b5452abf20d48c98368f7fa2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazkhan</media:title>
		</media:content>
	</item>
		<item>
		<title>An email response to my family &#8211; Here for my students and friends</title>
		<link>http://shazkhan.wordpress.com/2011/04/19/an-email-response-to-my-family/</link>
		<comments>http://shazkhan.wordpress.com/2011/04/19/an-email-response-to-my-family/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 21:10:22 +0000</pubDate>
		<dc:creator>shazkhan</dc:creator>
				<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[philosophy]]></category>
		<category><![CDATA[Spirituality]]></category>

		<guid isPermaLink="false">http://shazkhan.wordpress.com/?p=508</guid>
		<description><![CDATA[My brother sent this to a discussion on Islamic Financial System that lead to further discussion on the efforts of our Ulema-e-karaam: Persistent people begin their success where others end in failure. ~Edward Eggleston Following is my response in a philosophical mindset: So true! Where does one get such strength and solid thought as flesh [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=508&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">My brother sent this to a discussion on Islamic Financial System that lead to further discussion on the efforts of our Ulema-e-karaam:</p>
<blockquote><address>Persistent people begin their success where others end in failure.</address>
<address>~Edward Eggleston</address>
</blockquote>
<p style="text-align:justify;">Following is my response in a philosophical mindset:</p>
<p style="text-align:justify;"><em>So true! Where does one get such strength and solid thought as flesh and material surely perish as it is beyond human power to control it. After baba&#8217;s death I decided to sort out how I could accept death? How I can perish with being sure I am a winner as a whole? The answer was to face myself and fix internal errors where perception and understanding is twisted with ones desires and misconceptions in the society. This can ruin both this life and the eternal one whereas both are important for a sane believer! Death is expected anytime so we have to make sure how we want to progress and what state of mind and heart is required during this long process so that we can embrace death and the eternal life with a strong desire anytime through this progress.</em></p>
<p style="text-align:justify;"><em>I made dua to Allah to lead me to the truth and give me eternal success. I made an honest and unbiased effort to find the best of whats possible. I found out things that would make me go through mental shocks for a long time till I could sort it out towards a positive meaning and action plan. In Aasil&#8217;s case I learned that the system is screwed up full time and my only way to fix it with all my responsibilities is to live effectively with least possible dependence on it.</em></p>
<p style="text-align:justify;"><em>At the moment I am learning various specifics of existence and it&#8217;s responsibilities, while I am clear at the conceptual level as a servant of my lord and a responsible family member apart from being part of the umma and human race. I am working out weaknesses and major problems prioritized on weight-age and practicality.</em></p>
<p style="text-align:justify;"><em>Desire is a powerful strength and it can be used to achieve some certain important goals. If you keep an insight on eternal life in your decisions than you are surely going to win in case you are honest to yourself. Material losses will matter less while eternal will be more important and it is based on the decisions, intentions and effort made! A proper balance is required because material losses also affect eternal life.</em></p>
<p style="text-align:justify;"><em>Above is an integral part of the juice of my learning and experiences but I do accept that I have been taking family  and friends&#8217; issues emotionally at times rather than practically. At the cost of some emotional and spiritual damages I have progressed a lot but it could have been a better experience if I had been more careful by discussing things with my sheikh and teacher before reacting to them. And a lot is still to be covered!</em></p>
<p style="text-align:justify;"><em>It would be nice if you guys also share such stuff so that we can strengthen our synergy easily. The future of our family, race, umma and the greater humanity depends on our best possible effort. We need to correct ourselves as well as deal our external matters in an organized way.</em></p>
<p style="text-align:justify;"><em>Love.</em></p>
<p style="text-align:justify;"><em>&#8211;</em></p>
<p style="text-align:justify;"><em>Shahbaz</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazkhan.wordpress.com/508/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazkhan.wordpress.com/508/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazkhan.wordpress.com/508/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazkhan.wordpress.com/508/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazkhan.wordpress.com/508/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazkhan.wordpress.com/508/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazkhan.wordpress.com/508/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazkhan.wordpress.com/508/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazkhan.wordpress.com/508/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazkhan.wordpress.com/508/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazkhan.wordpress.com/508/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazkhan.wordpress.com/508/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazkhan.wordpress.com/508/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazkhan.wordpress.com/508/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=508&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazkhan.wordpress.com/2011/04/19/an-email-response-to-my-family/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ebe48981b5452abf20d48c98368f7fa2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazkhan</media:title>
		</media:content>
	</item>
		<item>
		<title>Blink App in NesC</title>
		<link>http://shazkhan.wordpress.com/2011/03/12/blink-app-in-nesc/</link>
		<comments>http://shazkhan.wordpress.com/2011/03/12/blink-app-in-nesc/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 07:26:27 +0000</pubDate>
		<dc:creator>shazkhan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[TinyOS]]></category>
		<category><![CDATA[WSN]]></category>

		<guid isPermaLink="false">http://shazkhan.wordpress.com/?p=495</guid>
		<description><![CDATA[In this second article on TinyOS and NesC programming we will visit some of the earlier concepts that we introduced in the first article. This time we will look at them from a more technical perspective so that we can understand how the Blink application fits onto the platform that enables it. Our use case [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=495&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">In this second article on TinyOS and NesC programming we will visit some of the earlier concepts that we introduced in the first article. This time we will look at them from a more technical perspective so that we can understand how the Blink application fits onto the platform that enables it. Our use case application example, Blink, is basically equivalent to the &#8220;helloWorld&#8221; application that we use to learn PC targeted languages. But in our case the mote (sensor/actuator device) does not provide a keyboard or screen! Therefore we use the LEDs to <em>blink</em> in a manner that we command in our program.</p>
<p style="text-align:justify;"><strong>nesC</strong> (pronounced &#8220;NES-see&#8221;) is an extension to the C programming language designed to use the structuring concepts and execution model of <a href="http://www.tinyos.net/">TinyOS</a>. TinyOS is an event-driven operating system designed for sensor network nodes that have very limited resources (e.g., 8K bytes of program memory, 512 bytes of RAM).</p>
<p style="text-align:justify;">The basic concepts behind nesC are:</p>
<ul style="text-align:justify;">
<li>Separation of construction and composition: programs are built out of <em>components</em>, which are assembled (&#8220;wired&#8221;) to form whole programs. Components have internal concurrency in the form of <em>tasks</em>. Threads of control may pass into a component through its interfaces. These threads are rooted either in a task or a hardware interrupt.</li>
<li>Specification of component behaviour in terms of set of <em>interfaces</em>. Interfaces may be <em>provided or </em>used by components. The provided interfaces are intended to represent the functionality that the component provides to its user, the used interfaces represent the functionality the component needs to perform its job.</li>
<li>Interfaces are bidirectional: they specify a set of functions to be implemented by the interface&#8217;s provider (<em>commands</em>) and a set to be implemented by the interface&#8217;s user (<em>events</em>). This allows a single interface to represent a complex interaction between components (e.g., registration of interest in some event, followed by a callback when that event happens). This is critical because all lengthy commands in TinyOS (e.g. send packet) are non-blocking; their completion is signaled through an event (send done). By specifying interfaces, a component cannot call the <tt>send</tt> command unless it provides an implementation of the <tt>sendDone</tt> event.Typically commands call downwards, i.e., from application components to those closer to the hardware, while events call upwards. Certain primitive events are bound to hardware interrupts.</li>
<li>Components are statically linked to each other via their interfaces. This increases runtime efficiency, encourages rubust design, and allows for better static analysis of programs.</li>
<li>nesC is designed under the expectation that code will be generated by whole-program compilers. This should also allow for better code generation and analysis.</li>
</ul>
<p style="text-align:justify;">The image below shows the structure (components and their wiring) of a simple application, Blink, that blinks an LED once a second:</p>
<p style="text-align:justify;"><img title="Blink Graph" src="http://nescc.sourceforge.net/blink.gif" alt="" width="90%" align="center" /></p>
<p style="text-align:justify;">Following is the Blink.nc configuration:</p>
<pre>/*
 *  Copyright (c) 2000-2002 The Regents of the University  of California.
 *  and Copyright (c) 2002 Intel Corporation
 *  All rights reserved.
 */
configuration Blink {
}
implementation {
  components Main, BlinkM, ClockC, LedsC;

  Main.StdControl -&gt; BlinkM.StdControl;
  BlinkM.Clock -&gt; ClockC;
  BlinkM.Leds -&gt; LedsC;
}</pre>
<p style="text-align:justify;">Following is BlinkM.nc module:</p>
<pre>/*
 *  Copyright (c) 2000-2002 The Regents of the University  of California.
 *  and Copyright (c) 2002 Intel Corporation
 *  All rights reserved.
 *
 * Implementation for Blink application.  Toggle the red LED when the
 * clock fires.
 */
module BlinkM {
  provides interface StdControl;
  uses interface Clock;
  uses interface Leds;
}
implementation {
  bool state; /* the state of the red LED (on or off)   */

  /* Initialize the component.
   * @return Always returns SUCCESS */
  command result_t StdControl.init() {
    state = FALSE;
    call Leds.init();
    return SUCCESS;
  }

  /* Start things up.  This just sets the rate for the clock component.
   * @return Always returns SUCCESS */
  command result_t StdControl.start() {
    return call Clock.setRate(TOS_I1PS, TOS_S1PS);
  }

  /* Halt execution of the application.
   * This just disables the clock component.
   * @return Always returns SUCCESS */
  command result_t StdControl.stop() {
    return call Clock.setRate(TOS_I0PS, TOS_S0PS);
  }

  /* Toggle the red LED in response to the Clock.fire event.
   * @return Always returns SUCCESS */
  event result_t Clock.fire() {
    state = !state;
    if (state) {
      call Leds.redOn();
    } else {
      call Leds.redOff();
    }

    return SUCCESS;
  }
}</pre>
<p style="text-align:justify;"><strong>Bibliography</strong>:</p>
<p style="text-align:justify;">http://nescc.sourceforge.net/</p>
<p>http://tinyos.net</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazkhan.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazkhan.wordpress.com/495/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazkhan.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazkhan.wordpress.com/495/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazkhan.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazkhan.wordpress.com/495/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazkhan.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazkhan.wordpress.com/495/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazkhan.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazkhan.wordpress.com/495/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazkhan.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazkhan.wordpress.com/495/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazkhan.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazkhan.wordpress.com/495/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=495&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazkhan.wordpress.com/2011/03/12/blink-app-in-nesc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ebe48981b5452abf20d48c98368f7fa2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazkhan</media:title>
		</media:content>

		<media:content url="http://nescc.sourceforge.net/blink.gif" medium="image">
			<media:title type="html">Blink Graph</media:title>
		</media:content>
	</item>
		<item>
		<title>Basics of TinyOS and NesC</title>
		<link>http://shazkhan.wordpress.com/2011/03/11/basics-of-tinyos-and-nesc/</link>
		<comments>http://shazkhan.wordpress.com/2011/03/11/basics-of-tinyos-and-nesc/#comments</comments>
		<pubDate>Fri, 11 Mar 2011 08:18:22 +0000</pubDate>
		<dc:creator>shazkhan</dc:creator>
				<category><![CDATA[TinyOS]]></category>
		<category><![CDATA[WSN]]></category>

		<guid isPermaLink="false">http://shazkhan.wordpress.com/?p=481</guid>
		<description><![CDATA[TinyOS is an operating system for low power embedded devices, especially wireless sensor devices. It is open source with a strong developer community. Specifically it is a system, runtime environment, for nesC programs running on Mote hardware. Its features include: Resource management. Selected components are linked into program at compile time. Written in nesC and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=481&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;"><a title="TinyOS" href="http://www.tinyos.net/" target="_blank">TinyOS</a> is an operating system for low power embedded devices, especially wireless sensor devices. It is open source with a strong developer community. Specifically it is a system, runtime environment, for nesC programs running on Mote hardware. Its features include:</p>
<ul style="text-align:justify;">
<li>Resource management.</li>
<li>Selected components are linked into program at compile time.</li>
<li>Written in nesC and C.</li>
<li>All time-consuming commands are non-blocking.</li>
</ul>
<h2 style="text-align:justify;">Some salient components are:</h2>
<table>
<tbody>
<tr>
<td width="50%">
<ul>
<li>Analogue to digital conversion</li>
<li>Cryptography</li>
<li>Data logging</li>
<li>File system</li>
<li>I2C communication</li>
<li>LED control</li>
<li>Memory allocation</li>
</ul>
</td>
<td>
<ul>
<li>Random number generation</li>
<li>Routing</li>
<li>Sensor board input</li>
<li>Serial communication (wired and wireless)</li>
<li>Timers</li>
<li>Watchdog timer</li>
</ul>
</td>
</tr>
</tbody>
</table>
<h2 style="text-align:justify;">Programming TinyOS with NesC</h2>
<p style="text-align:justify;">NesC is a dialect of C with the basic unit of code being a component. Components connect via interfaces and the process is known as wiring.</p>
<h3 style="text-align:justify;">Components and Interfaces</h3>
<p style="text-align:justify;">A nesC application consists of one or more <em>components</em> assembled, or <em>wired</em>, to form an application executable. Components define two scopes: one for their specification which contains the names of their <em>interfaces</em>, and a second scope for their implementation. A component <em>provides</em> and <em>uses</em> interfaces. The provided interfaces are intended to represent the functionality that the component provides to its user in its specification; the used interfaces represent the functionality the component needs to perform its job in its implementation.</p>
<p style="text-align:justify;">Interfaces are bidirectional: they specify a set of <em>commands</em>, which are functions to be implemented by the interface&#8217;s provider, and a set of <em>events</em>, which are functions to be implemented by the interface&#8217;s user. For a component to call the commands in an interface, it must implement the events of that interface. A single component may use or provide multiple interfaces and multiple instances of the same interface.</p>
<p style="text-align:justify;">The set of interfaces which a component provides together with the set of interfaces that a component uses is considered that component&#8217;s <em>signature</em>.</p>
<h3 style="text-align:justify;">Modules and Configurations</h3>
<p style="text-align:justify;">There are two types of components in nesC: <em>modules</em> and <em>configurations</em>. Modules provide the implementations of one or more interfaces. Configurations are used to assemble other components together, connecting interfaces used by components to interfaces provided by others. Every nesC application is described by a top-level configuration that wires together the components inside.</p>
<p style="text-align:justify;">We will continue by looking at some simple examples in the next article.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazkhan.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazkhan.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazkhan.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazkhan.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazkhan.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazkhan.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazkhan.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazkhan.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazkhan.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazkhan.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazkhan.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazkhan.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazkhan.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazkhan.wordpress.com/481/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=481&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazkhan.wordpress.com/2011/03/11/basics-of-tinyos-and-nesc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ebe48981b5452abf20d48c98368f7fa2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazkhan</media:title>
		</media:content>
	</item>
		<item>
		<title>Parse, Traverse and Search XML Docs</title>
		<link>http://shazkhan.wordpress.com/2010/10/24/parse-traverse-and-search-xml-docs/</link>
		<comments>http://shazkhan.wordpress.com/2010/10/24/parse-traverse-and-search-xml-docs/#comments</comments>
		<pubDate>Sun, 24 Oct 2010 19:34:49 +0000</pubDate>
		<dc:creator>shazkhan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://shazkhan.wordpress.com/?p=447</guid>
		<description><![CDATA[In this series of articles you will learn XML processing with SAX and DOM. We will make sure that the practical examples are simple yet they give you the right amount of details to dive into professional development. It will be easier to get your hands on available training source code. I am not going [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=447&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">In this series of articles you will learn XML processing with SAX and DOM. We will make sure that the practical examples are simple yet they give you the right amount of details to dive into professional development. It will be easier to get your hands on available training <a href="http://diveintopython.org/download/diveintopython-examples-5.4.zip" target="_blank">source code</a>. I am not going to use any other example based on this source code in my following web services&#8217; tutorials. The web service example code uses obsolete libraries. The code can be used for other good purposes based on standard Python libraries.</p>
<p style="text-align:justify;">I assume that you are already familiar with Python interpreter, packages and modules and have some fluency with the language and syntax. I also assume that you have good understanding of data structures and you have used them in programming tasks.</p>
<h2 style="text-align:justify;">Parsing XML</h2>
<p style="text-align:justify;">Parsing an XML document is very simple. We use the &#8220;binary.xml&#8221; from the given example source code to demonstrate this.</p>
<pre>&gt;&gt;&gt; from xml.dom import minidom
&gt;&gt;&gt; binaryxml = minidom.parse('~/diveintopython/py/kgp/binary.xml')
<tt>&gt;&gt;&gt; </tt>binaryxml
&lt;xml.dom.minidom.Document instance at 0xb777c38c&gt;
<tt>&gt;&gt;&gt; </tt>print binaryxml.toxml()
&lt;?xml version="1.0" ?&gt;
&lt;grammar&gt;
&lt;ref id="bit"&gt;
  &lt;p&gt;0&lt;/p&gt;
  &lt;p&gt;1&lt;/p&gt;
&lt;/ref&gt;
&lt;ref id="byte"&gt;
  &lt;p&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;\
&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;/p&gt;
&lt;/ref&gt;
&lt;/grammar&gt;</pre>
<p style="text-align:justify;">First we have imported minidom module from xml.dom package. <tt>minidom.parse</tt> takes one argument and returns a parsed representation of the XML document.</p>
<p style="text-align:justify;">The object returned from <tt>minidom.parse</tt> is a <tt>Document</tt> object. It is a descendant of the <tt>Node</tt> class. This <tt>Document</tt> object is the root level of a complex tree like structure of interlocking Python objects that completely represents the XML document you passed to <tt>minidom.parse</tt>.</p>
<p style="text-align:justify;"><tt>toxml</tt> is a method of the <tt>Node</tt> class (and is therefore available on the <tt>Document</tt> object you got from <tt>minidom.parse</tt>. <tt>toxml</tt> prints out the XML that this <tt>Node</tt> represents. For the <tt>Document</tt> node, this prints out the entire XML document.</p>
<h2 style="text-align:justify;">Traversal</h2>
<p style="text-align:justify;">To understand traversal and nodes try the following example code.</p>
<pre>&gt;&gt;&gt; binaryxml.childNodes
[&lt;xml.dom.minidom.DocumentType instance at 0xb777c68c&gt;, &lt;DOM Element: grammar at 0xb777c6ec&gt;]
&gt;&gt;&gt; binaryxml.childNodes[0]
&lt;xml.dom.minidom.DocumentType instance at 0xb777c68c&gt;
&gt;&gt;&gt; binaryxml.firstChild
&lt;xml.dom.minidom.DocumentType instance at 0xb777c68c&gt;</pre>
<p style="text-align:justify;">Every <tt>Node</tt> has a <tt>childNodes</tt> attribute, which is a list of the <tt>Node</tt> objects. A <tt>Document</tt> always has only one child node, the root element of the XML document (in this case, the <tt>grammar</tt> element). To get the first, and in this case last as well, child node, just use regular list syntax. Remember, there is nothing special going on here; this is just a regular Python list of regular Python objects. Getting the first child node of a node is a common activity. The <tt>Node</tt> class has a <tt>firstChild</tt> attribute, which is synonymous with <tt>childNodes[0]</tt>. (There is also a <tt>lastChild</tt> attribute, which is synonymous with <tt>childNodes[-1]</tt>.)</p>
<pre><tt>&gt;&gt;&gt; </tt>grammarElement = xmldoc.firstChild
<tt>&gt;&gt;&gt; </tt>print grammarElement.toxml()
&lt;grammar&gt;
&lt;ref id="bit"&gt;
  &lt;p&gt;0&lt;/p&gt;
  &lt;p&gt;1&lt;/p&gt;
&lt;/ref&gt;
&lt;ref id="byte"&gt;
  &lt;p&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;\
&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;/p&gt;
&lt;/ref&gt;
&lt;/grammar&gt;</pre>
<p style="text-align:justify;">The <tt>toxml</tt> method is defined in the <tt>Node</tt> class therefore it is available to any (XML) node and not just the <tt>Document</tt> element.</p>
<pre><tt>&gt;&gt;&gt; </tt>grammarElement.childNodes
[&lt;DOM Text node "\n"&gt;, &lt;DOM Element: ref at 17533332&gt;, \
&lt;DOM Text node "\n"&gt;, &lt;DOM Element: ref at 17549660&gt;, &lt;DOM Text node "\n"&gt;]
<tt>&gt;&gt;&gt; </tt>print grammarElement.firstChild.toxml()
<tt>&gt;&gt;&gt; </tt>print grammarElement.childNodes[1].toxml()
&lt;ref id="bit"&gt;
  &lt;p&gt;0&lt;/p&gt;
  &lt;p&gt;1&lt;/p&gt;
&lt;/ref&gt;
<tt>&gt;&gt;&gt; </tt>print grammarElement.childNodes[3].toxml()
&lt;ref id="byte"&gt;
  &lt;p&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;
&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;/p&gt;
&lt;/ref&gt;
<tt>&gt;&gt;&gt; </tt>print grammarElement.lastChild.toxml()</pre>
<p style="text-align:justify;">The XML in <tt>binary.xml seems to have </tt>two elements/nodes in <tt>grammar</tt> the two <tt>ref</tt> elements. But you&#8217;re missing something! The carriage returns &#8230; After the <tt>'&lt;grammar&gt;'</tt> and before the first <tt>'&lt;ref&gt;'</tt> there is a carriage return and this counts as a child node of the <tt>grammar</tt> element. Similarly there is a carriage return after each <tt>'&lt;/ref&gt;'</tt>. These count as child nodes. Therefore <tt>grammar.childNodes</tt> has actually a list of 5 objects: 3 <tt>Text</tt> objects and 2 <tt>Element</tt> objects.</p>
<p style="text-align:justify;">The first child is a <tt>Text</tt> object representing the carriage return after the <tt>'&lt;grammar&gt;'</tt> tag and before the first <tt>'&lt;ref&gt;'</tt> tag. The second child is an <tt>Element</tt> object representing the first <tt>ref</tt> element. The fourth child is an <tt>Element</tt> object representing the second <tt>ref</tt> element. The last child is a <tt>Text</tt> object representing the carriage return after the <tt>'&lt;/ref&gt;'</tt> end tag and before the <tt>'&lt;/grammar&gt;'</tt> end tag.</p>
<pre><tt>&gt;&gt;&gt; </tt>grammarElement
&lt;DOM Element: grammar at 19167148&gt;
<tt>&gt;&gt;&gt; </tt>refElement = grammarElement.childNodes[1]
<tt>&gt;&gt;&gt; </tt>refElement
&lt;DOM Element: ref at 17987740&gt;
<tt>&gt;&gt;&gt; </tt>refElement.childNodes
[&lt;DOM Text node "\n"&gt;, &lt;DOM Text node "  "&gt;, &lt;DOM Element: p at 19315844&gt;, \
&lt;DOM Text node "\n"&gt;, &lt;DOM Text node "  "&gt;, \
&lt;DOM Element: p at 19462036&gt;, &lt;DOM Text node "\n"&gt;]
<tt>&gt;&gt;&gt; </tt>pElement = refElement.childNodes[2]
<tt>&gt;&gt;&gt; </tt>pElement
&lt;DOM Element: p at 19315844&gt;
<tt>&gt;&gt;&gt; </tt>print pElement.toxml()
&lt;p&gt;0&lt;/p&gt;
<tt>&gt;&gt;&gt; </tt>pElement.firstChild
&lt;DOM Text node "0"&gt;
<tt>&gt;&gt;&gt; </tt>pElement.firstChild.data
u'0'</pre>
<p style="text-align:justify;">As you saw in the previous example, the first <tt>ref</tt> element is <tt>grammarNode.childNodes[1]</tt>, since childNodes[0] is a <tt>Text</tt> node for the carriage return. The <tt>ref</tt> element has its own set of child nodes, one for the carriage return, a separate one for the spaces, one for the <tt>p</tt> element, and so forth. You can even use the <tt>toxml</tt> method here, deeply nested within the document. The <tt>p</tt> element has only one child node (you can&#8217;t tell that from this example, but look at <tt>pNode.childNodes</tt> if you don&#8217;t believe me), and it is a <tt>Text</tt> node for the single character <tt>'0'</tt>. The <tt>.data</tt> attribute of a <tt>Text</tt> node gives you the actual string that the text node represents. But what is that <tt>'u'</tt> in front of the string?</p>
<p style="text-align:justify;">The <tt>'u'</tt> means that the string has unicode encoding unlike the default ASCII in Python environment. The reason is that web services standardize encoding with unicode and that is the same reason why <tt>'u'</tt> precedes  <tt>'0'.</tt></p>
<h2 style="text-align:justify;">Searching for elements</h2>
<div style="text-align:justify;">
<p>Traversing XML documents by stepping through each node can be tedious. If you want to find and get to an element in a hige XML document then there is a smart way to do it. <tt>getElementsByTagName</tt>.</p>
</div>
<div style="text-align:justify;">
<pre><tt>&gt;&gt;&gt; </tt>from xml.dom import minidom
<tt>&gt;&gt;&gt; </tt>binaryxml = minidom.parse('binary.xml')
<tt>&gt;&gt;&gt; </tt>refList = binaryxml.getElementsByTagName('ref')
<tt>&gt;&gt;&gt; </tt>refList
[&lt;DOM Element: ref at 136138108&gt;, &lt;DOM Element: ref at 136144292&gt;]
<tt>&gt;&gt;&gt; </tt>print refList[0].toxml()
&lt;ref id="bit"&gt;
  &lt;p&gt;0&lt;/p&gt;
  &lt;p&gt;1&lt;/p&gt;
&lt;/ref&gt;
<tt>&gt;&gt;&gt; </tt>print refList[1].toxml()
&lt;ref id="byte"&gt;
  &lt;p&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;\
&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;/p&gt;
&lt;/ref&gt;</pre>
</div>
<p style="text-align:justify;"><tt>getElementsByTagName</tt> takes one argument, the name of the element you wish to find. It returns a list of <tt>Element</tt> objects corresponding to the XML elements that have that name. In this case you have two <tt>ref</tt> elements.</p>
<pre><tt>&gt;&gt;&gt; </tt>firstRef = refList[0]
<tt>&gt;&gt;&gt; </tt>print firstRef.toxml()
&lt;ref id="bit"&gt;
&lt;p&gt;0&lt;/p&gt;
&lt;p&gt;1&lt;/p&gt;
&lt;/ref&gt;</pre>
<p style="text-align:justify;">The first object in your <tt>refList</tt> is the <tt>'bit'</tt> <tt>ref</tt> element. You can use the same <tt>getElementsByTagName</tt> method on this <tt>Element</tt> to find all the <tt>&lt;p&gt;</tt> elements within the <tt>'bit'</tt> <tt>ref</tt> element. The <tt>getElementsByTagName</tt> method returns a list of all the elements it found (in this case 2).</p>
<pre><tt>&gt;&gt;&gt; </tt>pList = firstRef.getElementsByTagName("p")
<tt>&gt;&gt;&gt; </tt>pList
[&lt;DOM Element: p at 136140116&gt;, &lt;DOM Element: p at 136142172&gt;]
<tt>&gt;&gt;&gt; </tt>print pList[0].toxml()
&lt;p&gt;0&lt;/p&gt;
<tt>&gt;&gt;&gt; </tt>print pList[1].toxml()
&lt;p&gt;1&lt;/p&gt;<tt>&gt;&gt;&gt; </tt>pList = xmldoc.getElementsByTagName("p")
<tt>&gt;&gt;&gt; </tt>pList
[&lt;DOM Element: p at 136140116&gt;, &lt;DOM Element: p at 136142172&gt;, &lt;DOM Element: p at 136146124&gt;]
<tt>&gt;&gt;&gt; </tt>pList[0].toxml()
'&lt;p&gt;0&lt;/p&gt;'
<tt>&gt;&gt;&gt; </tt>pList[1].toxml()
'&lt;p&gt;1&lt;/p&gt;'
<tt>&gt;&gt;&gt; </tt>pList[2].toxml()
'&lt;p&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;\
&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;xref id="bit"/&gt;&lt;/p&gt;'</pre>
<p style="text-align:justify;">Note carefully that the difference between this and the previous example. Previously, you were searching for p elements within firstRef, but here you are searching for p elements within binaryxml, the root-level object that represents the entire XML document. This does find the p elements nested within the ref elements within the root grammar element. The first two p elements are within the first ref (the &#8216;bit&#8217; ref). The last p element is the one within the second ref (the &#8216;byte&#8217; ref).</p>
<p style="text-align:justify;">This article reduces theory and provides more focus on techniques by example. This tutorial has been derived from <a href="http://diveintopython.org/xml_processing/index.html" target="_blank">Dive into Python, Chapter 9</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazkhan.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazkhan.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazkhan.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazkhan.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazkhan.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazkhan.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazkhan.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazkhan.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazkhan.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazkhan.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazkhan.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazkhan.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazkhan.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazkhan.wordpress.com/447/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=447&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazkhan.wordpress.com/2010/10/24/parse-traverse-and-search-xml-docs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ebe48981b5452abf20d48c98368f7fa2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazkhan</media:title>
		</media:content>
	</item>
		<item>
		<title>Interesting Research Problem for Mobile Networks</title>
		<link>http://shazkhan.wordpress.com/2010/10/24/interesting-research-problem-for-mobile-networks/</link>
		<comments>http://shazkhan.wordpress.com/2010/10/24/interesting-research-problem-for-mobile-networks/#comments</comments>
		<pubDate>Sun, 24 Oct 2010 12:13:56 +0000</pubDate>
		<dc:creator>shazkhan</dc:creator>
				<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://shazkhan.wordpress.com/?p=460</guid>
		<description><![CDATA[Mobile network operations are very resource-intensive, and with a growing number of network elements and technologies, the cost will escalate unless a higher level of process automation is introduced. Network operators and system providers have been talking self-configuration, self-optimization, self-healing, and self-protection for more than a decade (see e.g. IBMs &#8220;Autonomic Vision &#38; Manifesto&#8221; from [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=460&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Mobile network operations are very resource-intensive, and with a  growing number of network elements and technologies, the cost will  escalate unless a higher level of process  automation is introduced.</p>
<p style="text-align:justify;">Network operators and system  providers have been talking self-configuration, self-optimization,  self-healing, and self-protection for more than a decade (see e.g. IBMs  &#8220;Autonomic Vision &amp; Manifesto&#8221; from 2001). Progress has been made,  but the inherent uncertainty of a mobile network has been a huge  obstacle in moving from research to practical applications. It often  turns out that only the human brain is able to handle the complexity  which comes from the size of the network as well as from uncertainty in  e.g. aggregated data (details are removed to keep the amount of data  manageable), randomness (e.g. a football match causes a sudden amount of  network traffic), missing data (for various reasons data is not always  available for all network elements), and conflicting data (data  indicating multiple problems).</p>
<p style="text-align:justify;">The solution for automated  troubleshooting by 2operate released in 2009 was a breakthrough and a  major step towards self-healing. By utilizing technology originally  developed for automation of medical diagnostic  problems, 2operate was able to provide a level of automation in the  mobile network troubleshooting processes which was higher than any  competing solution in the market. The key was a technology which was  sufficiently strong to cope with the complexity and mentioned sources of  uncertainty. The key technology used by 2operate is Bayesian network  (or more generally, Probabilistic Graphical Models = PGMs).</p>
<p style="text-align:justify;">This can be further exploited for self-healing and self-protection.  Troubleshooting is becoming increasingly complex with increased network  complexity from new communications  technology (e.g. LTE) which must co-exist and interact with old  technology (e.g. GSM and UMTS). Partly overlapping with troubleshooting  is network security (some problems may be due to intruders with a desire  to prevent or steal communication in the network). Security is becoming  increasingly important in the network management community. With more  automated operations (self-healing, self-optimization,  self-configuration), the network will be more vulnerable to intruders,  and automated detection and healing is necessary to keep costs down and  to reduce downtime.</p>
<ul style="text-align:justify;">
<li>Investigate the problem domain: Which types of technical and security  problems are foreseen? How are these prevented today?</li>
<li>Research  and Development in self-healing/self-protection solution: What are the  entities to monitor in an LTE network? What can be observed for an  entity (indicators)? What can be concluded (root causes)?</li>
</ul>
<p style="text-align:justify;"><em>Extract from a PHD Call for Application.</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazkhan.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazkhan.wordpress.com/460/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazkhan.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazkhan.wordpress.com/460/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazkhan.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazkhan.wordpress.com/460/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazkhan.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazkhan.wordpress.com/460/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazkhan.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazkhan.wordpress.com/460/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazkhan.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazkhan.wordpress.com/460/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazkhan.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazkhan.wordpress.com/460/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=460&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazkhan.wordpress.com/2010/10/24/interesting-research-problem-for-mobile-networks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ebe48981b5452abf20d48c98368f7fa2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazkhan</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing and Configuring UEC&#8217;s Eucalyptus</title>
		<link>http://shazkhan.wordpress.com/2010/10/17/installing-and-configuring-uecs-eucalyptus/</link>
		<comments>http://shazkhan.wordpress.com/2010/10/17/installing-and-configuring-uecs-eucalyptus/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 11:03:49 +0000</pubDate>
		<dc:creator>shazkhan</dc:creator>
				<category><![CDATA[Architectures]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Eucalyptus]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://shazkhan.wordpress.com/?p=343</guid>
		<description><![CDATA[In this article you will be dealing with the installation and configuration of a very basic Cloud topology with UEC. You will cover advance features and configurations after I cover an article on integration of the enterprise application with the cloud. I assume that the reader is a seasonal network and system administrator in Linux [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=343&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">In this article you will be dealing with the installation and configuration of a very basic Cloud topology with UEC. You will cover advance features and configurations after I cover an article on <em>integration of the enterprise application with the cloud</em>. I assume that the reader is a seasonal network and system administrator in Linux based environments. You should have at least one machine with hardware based virtualization as KVM is going to be used. This tutorial material should not be used at production systems at all because it is totally an experimental setup.<a href="http://shazkhan.files.wordpress.com/2010/10/basicuec.png"><img class="aligncenter size-medium wp-image-345" title="Basic UEC Configuration" src="http://shazkhan.files.wordpress.com/2010/10/basicuec.png?w=300&#038;h=109" alt="" width="300" height="109" /></a>The above diagram shows a minimalistic production topology. For simplicity and hardware constrained experimentation you <em>can</em> use only one server machine to host both CC and NC and this is the same use case that we have in this tutorial.</p>
<p style="text-align:justify;">The core eucalyptus packages  of UEC are:</p>
<ul>
<li style="text-align:justify;">eucalyptus-cloud &#8211; Cloud  controller</li>
<li>eucalyptus-cc &#8211; Cluster controller</li>
<li>eucalyptus-walrus &#8211; Walrus (S3)</li>
<li>eucalyptus-sc &#8211; Storage controller</li>
<li>eucalyptus-nc &#8211; Node  controller</li>
</ul>
<p style="text-align:justify;">If you are not aware of the architecture of Eucalyptus then please read <a href="http://shazkhan.wordpress.com/2010/10/15/intro-eucalyptus-uec/" target="_self">Introduction to Private Cloud Computing with UEC&#8217;s Eucalyptus.</a></p>
<p style="text-align:justify;">At this point you need to have a Ubuntu Server CD/DVD to  install UEC.</p>
<h2 style="text-align:justify;"><strong>Cluster Controller  Installation</strong></h2>
<ol>
<li>At boot menu select &#8220;Install Ubuntu Enterprise Cloud&#8221;</li>
<li>During installation, select Cluster installation. NC installation can be delayed easily.</li>
<li>Select the same “eth0″ interface as public and private interface.</li>
<li>Specify some arbitrary IP address range for Public IPs &#8211; 192.168.1.101 to 192.168.1.200. This can later be changed in  /etc/eucalyptus/eucalyptus.conf.</li>
</ol>
<h2><strong>Post-Installation</strong></h2>
<p>1. Install system updates.</p>
<pre> $ sudo apt-get update
 $ sudo apt-get dist-upgrade</pre>
<h2><strong>Network  Configuration</strong></h2>
<p style="text-align:justify;">At this point you start considering the NC. It expects a bridge so you will create a bridge  and add eth0 as an interface. For this purpose you will need brctl command from bridge-utils package.</p>
<p style="text-align:justify;">Configure the bridge for static IP with the following configuration in <em>/etc/network/interfaces</em>.</p>
<pre>auto eth0
 iface eth0 inet manual
auto br0
 iface br0 inet static
 address cc.uec.shaz
 netmask 255.255.255.0
 network uec.shaz.0
 broadcast uec.shaz.255
 gateway uec.shaz.1
 bridge_ports eth0
 bridge_fd 9
 bridge_hello 2
 bridge_maxage 12
 bridge_stp off</pre>
<h2><strong>Node Controller  Installation</strong></h2>
<p>1. Install Node Controller</p>
<pre>$ sudo apt-get install eucalyptus-nc</pre>
<h2><strong>Web Console</strong></h2>
<p><strong></strong>The CC can be accessed via a web console with  <a href="https://a.b.c.d:8443/">https://cc.uec.shaz:8443</a>. You will now be able to:</p>
<ul>
<li>download the account credentials</li>
<li>view currently installed images</li>
<li>make available or disable the installed images</li>
<li>browse through the store and install available images</li>
<li>add/edit/delete/enable/disable users</li>
<li>change the CC configuration</li>
<li>access external links of Ubuntu and Eucalyptus community</li>
<li>register the cloud with Landscape or RightScale</li>
</ul>
<h2><strong>Retrieving Credentials</strong></h2>
<p style="text-align:justify;">After installing CC and NC, users of the cloud will need to retrieve  their credentials. This can be done either from a web browser or from  a command line.<br />
For command line  use the following commands:</p>
<pre>$ mkdir -p ~/.euca
$ chmod 700 ~/.euca
$ cd ~/.euca
$ sudo euca_conf --get-credentials mycreds.zip
$ unzip mycreds.zip
$ cd -</pre>
<h2><strong>Using Your  Credentials</strong></h2>
<p style="text-align:justify;">After obtaining the credentials, you need to setup EC2 API and AMI tools  on the server using X.509 certificates. For this, source the included  “eucarc” file to set up the Eucalyptus environment</p>
<pre>$ . ~/.euca/eucarc</pre>
<p>This can be added to the ~/.bashrc file, so that the Eucalyptus  environment is set up automatically when you log in.</p>
<pre>$ echo "[ -r ~/.euca/eucarc ] &amp;&amp; . ~/.euca/eucarc" &gt;&gt; ~/.bashrc</pre>
<h2><strong>Node Registration</strong></h2>
<p>Execute following command to register the node:</p>
<pre>$ sudo euca_conf --no-rsync --discover-nodes</pre>
<p>The above command will prompt for adding the discovered nodes</p>
<pre>New node found on cc.uec.shaz; add it? [Yn]</pre>
<p>Now euca-describe-availability-zones cleanly reports the node  registration</p>
<pre>$ euca-describe-availability-zones verbose
AVAILABILITYZONE        uec-cloud       cc.uec.shaz
AVAILABILITYZONE        |- vm types     free / max   cpu   ram  disk
AVAILABILITYZONE        |- m1.small     0002 / 0002   1    128     2
AVAILABILITYZONE        |- c1.medium    0002 / 0002   1    256     5
AVAILABILITYZONE        |- m1.large     0001 / 0001   2    512    10
AVAILABILITYZONE        |- m1.xlarge    0001 / 0001   2   1024    20
AVAILABILITYZONE        |- c1.xlarge    0000 / 0000   4   2048    20</pre>
<h2><strong>Install store images</strong></h2>
<p style="text-align:justify;">You cab install image available from  the store. After installing from the store euca-describe-images shows  the image details.</p>
<pre>$ euca-describe-images
IMAGE   eri-0D4D117E    image-store-1268999725/ramdisk.manifest.xml     adminavailable       public  x86_64  ramdisk
IMAGE   eki-F8BF1114    image-store-1268999725/kernel.manifest.xml      adminavailable       public  x86_64  kernel
IMAGE   emi-E2861098    image-store-1268999725/image.manifest.xml       adminavailable       public  x86_64  machine</pre>
<h2><strong>Testing<br />
</strong></h2>
<p style="text-align:justify;"><strong></strong>Before running an instance of this image, you should first create a  keypair that can be used to log into the instance. Create a SSH keypair  using the command:</p>
<pre>if [ ! -e ~/.euca/mykey.priv ]; then
    touch ~/.euca/mykey.priv
    chmod 0600 ~/.euca/mykey.priv
    euca-add-keypair mykey &gt; ~/.euca/mykey.priv
fi</pre>
<p style="text-align:justify;">The default security group should be  configured to allow SSH access (port 22). If you plan to use a Windows VM allow access to RDP as well.</p>
<pre>$ euca-describe-groups
$ euca-authorize default -P tcp -p 22 -s 0.0.0.0/0
$ euca-authorize default -P tcp -p 3389 -s 0.0.0.0/0
$ euca-describe-groups
GROUP   admin   default default group
PERMISSION      admin   default ALLOWS  tcp     3389    3389    FROM    CIDR0.0.0.0/0
PERMISSION      admin   default ALLOWS  tcp     22      22      FROM    CIDR0.0.0.0/0</pre>
<p>From euca-describe-images, get the EMI ID.</p>
<pre>$ euca-describe-images
IMAGE   eri-0D4D117E    image-store-1268999725/ramdisk.manifest.xml     adminavailable       public  x86_64  ramdisk
IMAGE   eki-F8BF1114    image-store-1268999725/kernel.manifest.xml      adminavailable       public  x86_64  kernel
IMAGE   emi-E2861098    image-store-1268999725/image.manifest.xml       adminavailable       public  x86_64  machine</pre>
<p>Now launch the instance.</p>
<pre>$ euca-run-instances emi-E2861098 -k mykey</pre>
<h2><strong>Sample eucalyptus.conf</strong></h2>
<pre>EUCALYPTUS=”/”
EUCA_USER=”eucalyptus”
DISABLE_DNS=”Y”
ENABLE_WS_SECURITY=”Y”
LOGLEVEL=”DEBUG”
CC_PORT=”8774″
SCHEDPOLICY=”ROUNDROBIN”
POWER_IDLETHRESH=”300″
POWER_WAKETHRESH=”300″
NODES=” cc.uec.shaz”
NC_SERVICE=”axis2/services/EucalyptusNC”
NC_PORT=”8775″
HYPERVISOR=”kvm”
INSTANCE_PATH=”/var/lib/eucalyptus/instances”
VNET_PUBINTERFACE=”br0″
VNET_PRIVINTERFACE=”br0″
VNET_BRIDGE=”br0″
VNET_DHCPDAEMON=”/usr/sbin/dhcpd3″
VNET_DHCPUSER=”dhcpd”
VNET_MODE=”SYSTEM”</pre>
<pre># network configuration from the input configuration file
#VNET_MODE=”MANAGED-NOVLAN”
#VNET_SUBNET=”172.19.0.0″
#VNET_NETMASK=”255.255.0.0″
#VNET_DNS=”10.10.6.3″
#VNET_ADDRSPERNET=”32″
#VNET_PUBLICIPS=”A.B.C.xxx-A.B.C.yyy”</pre>
<p style="text-align:justify;">You should be able to get both SYSTEM and  MANAGED_NOVLAN modes. Remember to do a cleanstop and cleanstart of  eucalyptus services between changing network modes.</p>
<pre>$ sudo service eucalyptus stop CLEAN=1
$ sudo service eucalyptus-nc stop CLEAN=1
$ sudo service eucalyptus start CLEAN=1
$ sudo service eucalyptus-nc start CLEAN=1</pre>
<p style="text-align:justify;">This tutorial should get you started for a basic configuration without understanding much at this early stage. The objective  here is to get you started for further experimentation and learning. With my two more planned tutorials you will be able to understand the architecture more. Until next tutorial you are expected to practice the web console and play around with configurations and images.</p>
<p>For more details please visit <a href="https://help.ubuntu.com/community/UEC" target="_blank">Ubuntu UEC Community</a> and <a href="http://cssoss.files.wordpress.com/2010/06/book_eucalyptus_beginners_guide_uec_edition1.pdf">Beginners Guide to UEC</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazkhan.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazkhan.wordpress.com/343/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazkhan.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazkhan.wordpress.com/343/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazkhan.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazkhan.wordpress.com/343/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazkhan.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazkhan.wordpress.com/343/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazkhan.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazkhan.wordpress.com/343/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazkhan.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazkhan.wordpress.com/343/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazkhan.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazkhan.wordpress.com/343/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=343&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazkhan.wordpress.com/2010/10/17/installing-and-configuring-uecs-eucalyptus/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ebe48981b5452abf20d48c98368f7fa2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazkhan</media:title>
		</media:content>

		<media:content url="http://shazkhan.files.wordpress.com/2010/10/basicuec.png?w=300" medium="image">
			<media:title type="html">Basic UEC Configuration</media:title>
		</media:content>
	</item>
		<item>
		<title>Introduction to Private Cloud Computing with Eucalyptus UEC</title>
		<link>http://shazkhan.wordpress.com/2010/10/15/intro-eucalyptus-uec/</link>
		<comments>http://shazkhan.wordpress.com/2010/10/15/intro-eucalyptus-uec/#comments</comments>
		<pubDate>Sat, 16 Oct 2010 00:39:57 +0000</pubDate>
		<dc:creator>shazkhan</dc:creator>
				<category><![CDATA[Architectures]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Eucalyptus]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://shazkhan.wordpress.com/?p=313</guid>
		<description><![CDATA[In this article I will introduce the reader to private cloud computing, while discuss the nature of a private cloud with UEC based Eucalyptus as a case study to maintain order. Private Cloud A private cloud is a cloud computing infrastructure implemented as a service provider rather using a public cloud as a consumer of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=313&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">In this article I will introduce the reader to private cloud computing, while discuss the nature of a private cloud with UEC based Eucalyptus as a case study to maintain order.</p>
<h2>Private Cloud</h2>
<p style="text-align:justify;">A private cloud is a cloud computing infrastructure implemented as a service provider rather using a public cloud as a consumer of the service.</p>
<p style="text-align:justify;">The main thing that make private clouds  apart from a commercial public cloud is where the infrastructure implemented and how it’s deployed and maintained. A private cloud is typically hosted on the company  servers within their own network infrastructure and administrative domain.</p>
<p style="text-align:justify;">The  advantage  with a  private  cloud is direct control over every aspect of the cloud’s design and implementation and most importantly the way security is implemented.</p>
<h2>Ubuntu Enterprise Cloud</h2>
<p style="text-align:justify;">Ubuntu Enterprise Cloud (UEC) is a package stack of applications from Canonical (best with an Ubuntu server). UEC includes a number of open source tools to manage the infrastructure, apart from Eucalyptus. UEC makes cloud computing a set of friendly activities.</p>
<p style="text-align:justify;">By default UEC uses KVM. You would want to consider Xen based setup if you do not have any VT extensions. It would be better to go for a pure Eucalyptus server configuration but still Xen based kernels are difficult to find these days! You might survive Xen based setup on Fedora12.</p>
<h2>Eucalyptus</h2>
<p style="text-align:justify;">&#8220;<em><strong>E</strong>lastic <strong>U</strong>tility <strong>C</strong>omputing <strong>A</strong>rchitecture for <strong>L</strong>inking <strong>Y</strong>our <strong>P</strong>rograms <strong>T</strong>o  <strong>U</strong>seful <strong>S</strong>ystems</em>&#8221; is a GPL Licensed software, which provides tooling to create and manage a private cloud that can even be accessed as public cloud. It provides  Amazon EC-2 compatible  platform and S3 compatible  storage platform. It  makes its services available through EC2/S3 compatible APIs. Therefore the client tools  for Amazon Web Services (AWS) can be used with it as well.</p>
<p>Features:</p>
<ul>
<li>Interface compatibility with EC2</li>
<li><em> </em>Simple installation and  deployment using Rocks</li>
<li>Simple set of  extensible cloud allocation policies<em> </em></li>
<li><em></em>Overlay functionality  requiring no modification to the target Linux environment<em></em></li>
<li><em></em>Basic administrative tools for system management and user accounting<em></em></li>
<li>Configure multiple clusters with private   network addresses into a single Cloud</li>
<li>Portability</li>
</ul>
<h2>Components of Eucalyptus</h2>
<p>Eucalyptus has 3 major components:</p>
<ul>
<li><strong>Cloud  Controller (CLC)</strong>: includes the front-end  services and the Walrus storage  system.<strong></strong></li>
<li><strong>Cluster  Controller (CC)</strong>:  provides support for the virtual network overlay</li>
<li><strong>Node Controller (NC)</strong>: that interacts with VT to  manage individual VMs.</li>
</ul>
<p>And for storage management the following two components are utilized:</p>
<ul>
<li><strong>Storage Controller (SC):</strong> provide persistent block storage for the instances</li>
<li><strong>Walrus Storage Controller (WSC)</strong>: provide persistent and simple storage service</li>
</ul>
<p>Note: Packages provided by Ubuntu are:  eucalyptus-cloud,  eucalyptus-cc  and eucalyptus-nc, eucalyptus-sc, eucalyptus-walrus.</p>
<p style="text-align:center;"><img class="aligncenter" title="architecture diagram" src="http://open.eucalyptus.com/themes/eucalyptus/images/architecture-1.6.png" alt="architecture diagram" /></p>
<h6 style="text-align:center;">Component Model: http://open.eucalyptus.com/book/export/html/4263</h6>
<h3><span style="text-decoration:underline;">Node Controller (NC)</span></h3>
<p style="text-align:justify;">NC is a VT enabled server capable of running KVM as the hypervisor. UEC automatically installs KVM when the user chooses to install the UEC node. The VMs running on the hypervisor that are controlled by UEC are called <em>instances</em>.</p>
<p style="text-align:justify;">The NC runs on each node and controls the life cycle of instances running on the node. The NC interacts with the OS and the hypervisor running on the node, while on the other hand it also interacts with the Cluster Controller (CC).</p>
<p style="text-align:justify;">NC queries the OS  on the node to discover the node’s resources. These are the number of cores, memory, disk space. It also monitors the state of the VM instances running on the node to propagate this data  to the CC.</p>
<p>Features:</p>
<ul>
<li style="text-align:justify;"> Collection of data related to the resource availability and utilization on the node and reporting the data to CC</li>
<li>Instance life cycle management</li>
</ul>
<h3><span style="text-decoration:underline;">Cluster Controller (CC)</span></h3>
<p style="text-align:justify;">CC manages one or more Node Controllers to deploys and manages instances on them. CC also manages the networking for the instances running on the Nodes under certain types of networking modes of Eucalyptus.We will have to delay such advance topics for a while!</p>
<p>CC communicates with CLC and NCs as a managed middle tier.</p>
<p>Features:</p>
<ul>
<li>Receive CLC requests to deploy instances</li>
<li>Select NCs  for deploying the instances on</li>
<li>Control  virtual network availability to the instances</li>
<li>Audit the registered NCs and report accordingly to CLC</li>
</ul>
<h3><span style="text-decoration:underline;">Walrus Storage Controller (WS3)</span></h3>
<p>It provides a persistent and simple storage service. WS3 uses REST and SOAP APIs, which are compatible with S3 API.</p>
<p>Features:</p>
<ul>
<li>Store  machine images</li>
<li>Store snapshots</li>
<li>Store and serve files using S3 API</li>
</ul>
<p>It should be considered as a simple file storage system.</p>
<h3><span style="text-decoration:underline;">Storage Controller (SC)</span></h3>
<p style="text-align:justify;">It provides persistent block storage for the instances. SC is similar to the Elastic Block Storage  service from Amazon Web Services.</p>
<p>Features:</p>
<ul>
<li> Creates and manages  persistent block storage devices</li>
<li>Creates snapshots of volumes</li>
</ul>
<h3><span style="text-decoration:underline;">Cloud Controller (CLC)</span></h3>
<p style="text-align:justify;">CLC is the front end to the entire cloud infrastructure. It provides  EC2/S3 compliant web services interface to the client tools. It also interacts with the rest of the components of the Eucalyptus infrastructure. CLC also provides a web interface for users to manage delegated aspects of the UEC infrastructure.</p>
<p>Features:</p>
<ul>
<li style="text-align:justify;"> Monitor  resources of the cloud infrastructure. This includes hypervisor nodes and the cluster controllers that manage the hypervisor nodes.</li>
<li>Resource arbitration</li>
<li>Monitor running instances</li>
</ul>
<p style="text-align:justify;">CLC has a comprehensive knowledge of the state of the cloud with respect to availability and usage of resources primarily.</p>
<p style="text-align:center;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>For more details visit http://open.eucalyptus.com/book/export/html/4263</p>
<p>In the next article we will cover installation and configuration.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazkhan.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazkhan.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazkhan.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazkhan.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazkhan.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazkhan.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazkhan.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazkhan.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazkhan.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazkhan.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazkhan.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazkhan.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazkhan.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazkhan.wordpress.com/313/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=313&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazkhan.wordpress.com/2010/10/15/intro-eucalyptus-uec/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ebe48981b5452abf20d48c98368f7fa2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazkhan</media:title>
		</media:content>

		<media:content url="http://open.eucalyptus.com/themes/eucalyptus/images/architecture-1.6.png" medium="image">
			<media:title type="html">architecture diagram</media:title>
		</media:content>
	</item>
		<item>
		<title>Introduction to Amazon Web Services by Recluze and Toqeer, CSRDU</title>
		<link>http://shazkhan.wordpress.com/2010/10/15/nice-tutorials-from-recluze-csrdu/</link>
		<comments>http://shazkhan.wordpress.com/2010/10/15/nice-tutorials-from-recluze-csrdu/#comments</comments>
		<pubDate>Fri, 15 Oct 2010 19:50:55 +0000</pubDate>
		<dc:creator>shazkhan</dc:creator>
				<category><![CDATA[Architectures]]></category>
		<category><![CDATA[Blogroll]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://shazkhan.wordpress.com/?p=310</guid>
		<description><![CDATA[Getting Started with Amazon EC2 – Install, Configure, Connect. Auto-scale with Amazon Elastic Compute Cloud Ec2. Introduction to Amazon Web Services.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=310&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.csrdu.org/nauman/2010/09/30/getting-started-with-amazon-ec2-install-configure-connect/">Getting Started with Amazon EC2 – Install, Configure, Connect</a>.</p>
<p><a href="http://www.csrdu.org/nauman/2010/10/04/auto-scale-with-amazon-elastic-compute-cloud-ec2/" target="_self">Auto-scale with Amazon Elastic Compute Cloud Ec2</a>.</p>
<p><a href="http://www.csrdu.org/nauman/2010/09/26/introduction-to-amazon-web-services-video/" target="_blank">Introduction to Amazon Web Services</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shazkhan.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shazkhan.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shazkhan.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shazkhan.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shazkhan.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shazkhan.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shazkhan.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shazkhan.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shazkhan.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shazkhan.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shazkhan.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shazkhan.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shazkhan.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shazkhan.wordpress.com/310/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shazkhan.wordpress.com&amp;blog=980293&amp;post=310&amp;subd=shazkhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shazkhan.wordpress.com/2010/10/15/nice-tutorials-from-recluze-csrdu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ebe48981b5452abf20d48c98368f7fa2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shazkhan</media:title>
		</media:content>
	</item>
	</channel>
</rss>
