<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>/var/log/mind</title>
	
	<link>http://blog.dhananjaynene.com</link>
	<description>Dhananjay Nene's opinions on software programming, design, architecture and the internet</description>
	<lastBuildDate>Mon, 02 Nov 2009 09:19:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<creativeCommons:license>http://creativecommons.org/licenses/by/2.0/</creativeCommons:license><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/var/log/mind" type="application/rss+xml" /><feedburner:emailServiceId>var/log/mind</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Five important trends on the enterprise architect’s radar</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/ZrfVo4xE1Q4/</link>
		<comments>http://blog.dhananjaynene.com/2009/11/five-important-trends-on-the-enterprise-architects-radar/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 09:19:02 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[architecture]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[nosql]]></category>
		<category><![CDATA[polyglotism]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=912</guid>
		<description><![CDATA[It is no secret that the internet architectures are influencing enterprise architectures. This post attempts to summarise some of the recent trends in the internet space, which seem to be carrying some momentum sufficient enough to influence the enterprise. So without further ado, these trends are :

REST : The Representational State Transfer architecture style builds [...]]]></description>
			<content:encoded><![CDATA[<p>It is no secret that the internet architectures are influencing enterprise architectures. This post attempts to summarise some of the recent trends in the internet space, which seem to be carrying some momentum sufficient enough to influence the enterprise. So without further ado, these trends are :</p>
<ol>
<li><strong>REST :</strong> The <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">Representational State Transfer</a> architecture style builds on the essential elements of those constructs which made the internet so globally scalable. A detailed explanation of the rationale and strengths of REST are completely beyond the scope of this article. If your job requires you to be continuously aware of emergent trends and whether they fit your enterprise architecture needs &#8211; this is the one must explore trend.
<p><em>Impact : </em> Web based architectures, Service Oriented Architectures, wide availability and immediate usability of data and processing requests (resources) through simple HTTP URIs and minimal integration effort</li>
<li><strong>Interoperable Cloud :</strong> The interoperable cloud is the ability to create a private cloud and also leverage a public cloud. This has been made possible by offerings such as the <a href="http://www.ubuntu.com/cloud">Ubuntu Enterprise Cloud</a> which allows you to build a private cloud or use a public cloud such as <a href="http://aws.amazon.com/ec2/">Amazon EC2</a> while being able to access them using the same set of APIs thanks to open source efforts such as <a href="http://open.eucalyptus.com/">Eucalyptus</a>. This allows you the flexibility of initially using either a private or public cloud and then subsequently shifting to the other, or being able to use both simultaneously.
<p><em>Impact : </em> Large servers vs cluster of commodity servers, virtualisation, elastic deployments, flexible hardware procurement / provisioning, infrastructure management in organisational hierarchy.</li>
<li><strong>NoSQL :</strong> While I am unhappy with the name, it has stuck. This refers to a set of options now available to store your data unconstrained by many RDBMS requirements (eg. flexible schema, key value pairs etc.). Some of the databases also allow you to store data in a distributed manner over a number of servers with an intent to support high availability in write intense scenarios even as they may require you to move towards eventual consistency. These options increase your manouverability / flexibility as an architect even as they require you to meet a different set of challenges.
<p><em>Impact :</em> Relational databases, data storage strategies, data distribution strategies, vertical vs. horizontal scalability, transactionalisation, consistency and availability</li>
<li><strong>Polyglotism :</strong> Developer costs now occupy an increasing percentage of total costs, development time is being an increasingly dominant factor for time to market, and ability of software to change and adapt quickly to newer demands is now a critical success metric. One of the solutions is to write different parts of the software in a different languages most appropriately suited for concise and rapid coding as well as supporting quick reaction changes to each part appropriately. Thus it is conceivable to have some of the business rules written in a dsl written using jruby and some of the algorithms written in clojure in a software built on the JEE platform.
<p><em>Impact :</em>Development culture and processes, minimum developer skill and scalability, risk management for managing required vs. available skills.</li>
<li><strong>Decentralised processing :</strong> Thanks to many developments which are leading to increasingly distributed processing including REST and NoSQL, applications will need to be a set of collaborating network based components (we&#8217;ve heard this before with distributed objects as well). However especially given some of the lesser guarantees that such architectures can provide around immediate guaranteed processing, latency issues, distributed control and asynchronous processing, a particular piece of business logic may get satisfied in a staggered fashion across a number of collaborating components. This may increase challenges in terms of currency of available data even as it helps actually deliver on the vision of distributed objects and simplifies individual component development. While asynchronous capabilities such as those supported by MQ series and the like have been used in the enterprise for ages, I do anticipate increasing use of lighter messaging constructs such as <a href="http://en.wikipedia.org/wiki/PubSubHubbub">PubSubHubbub</a> within the enterprise.
<p><em>Impact :</em> Application partitioning, network based components, difficulty in supporting fully synchronous workflows.</li>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2009/06/rest-is-the-dbms-of-the-internet/' rel='bookmark' title='Permanent Link: REST is the DBMS of the Internet'>REST is the DBMS of the Internet</a></li><li><a href='http://blog.dhananjaynene.com/2009/06/why-rest/' rel='bookmark' title='Permanent Link: Why REST ?'>Why REST ?</a></li><li><a href='http://blog.dhananjaynene.com/2009/06/design-characteristics-of-rest-resource-oriented-server-frameworks-and-clients/' rel='bookmark' title='Permanent Link: Design Characteristics of REST / Resource Oriented Server Frameworks and Clients'>Design Characteristics of REST / Resource Oriented Server Frameworks and Clients</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=ZrfVo4xE1Q4:740DIcOFQ_o:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=ZrfVo4xE1Q4:740DIcOFQ_o:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=ZrfVo4xE1Q4:740DIcOFQ_o:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=ZrfVo4xE1Q4:740DIcOFQ_o:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=ZrfVo4xE1Q4:740DIcOFQ_o:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=ZrfVo4xE1Q4:740DIcOFQ_o:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/ZrfVo4xE1Q4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/11/five-important-trends-on-the-enterprise-architects-radar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/11/five-important-trends-on-the-enterprise-architects-radar/</feedburner:origLink></item>
		<item>
		<title>Service Oriented Architecture is primarily about business and not technology. Bollocks!</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/hAwfiGcjzbw/</link>
		<comments>http://blog.dhananjaynene.com/2009/10/service-oriented-architecture-is-primarily-about-business-and-not-technology.-bollocks/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 10:56:51 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[architecture]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[soa]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=902</guid>
		<description><![CDATA[There&#8217;s quite a few times I&#8217;ve heard / read a gross oversimplification of architecture in reference to business and technology. And while I believe I understand the &#8216;essential cause&#8217; which drives such a simplification, I&#8217;ve often felt quite frustrated at the resultant impression thats provided by such a simplification. In many ways and forms, it [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s quite a few times I&#8217;ve heard / read a gross oversimplification of architecture in reference to business and technology. And while I believe I understand the &#8216;essential cause&#8217; which drives such a simplification, I&#8217;ve often felt quite frustrated at the resultant impression thats provided by such a simplification. In many ways and forms, it boils down to the statement (not exactly the same since I&#8217;m not quoting directly), quite similar to the one below :</p>
<p><strong><em>Service Oriented Architecture is primarily about business and not technology</em></strong></p>
<p>This also reflected in the recent <a href="http://soa-manifesto.org/">SOA Manifesto</a> which states as its very first described value :</p>
<p><strong><em>Business value over technical strategy</em></strong></p>
<p>Allow me to straight away start picking some holes into this :</p>
<ol>
<li>Anything that a business does &#8211; whether it is soa, software architecture, building architecture or simple plant and machinery design, to the extent (which is exactly 100%), technology serves the business goals, all technology activities (and non-technology as well) are at the end of the day about achieving business objectives and therefore about business. So why single out architecture? And even more so why single out SOA?</li>
<li>Architecture is also about business. But its not the same as saying its primarily about business and not so much about technology. For a moment lets step away from Software/Hardware Architecture and look at Building Construction Architecture. The legendary creation of Ayn Rand &#8211; Howard Roark, for all his eccentricities and seemingly portrayed egocentric and egotistic behaviour did meet the test of business objectives to the extent of making the residents of his creations extremely satisfied. And at no point would you gather the impression that he in any manner put construction technology to any secondary position to his business context and objectives. At the end of the day thats what architecture is. It is not about making one of business or technology more important than or subservient to other. Its about effectively mapping the two to provide a strong technology solution appropriate to the business needs. </li>
</ol>
<p>I suspect one of the important causes here is that people have forgotten that the A in SOA stands for architecture, and therefore shorn of architecture, business and technology can be seen to be competing in a non win-win form. </p>
<p>So if SOA stands for Service Oriented <strong><em>Architecture</em></strong>, then I must submit that architecture is the art of getting the two working together. And I am of the opinion that an exercise suggesting one is more important than other is an exercise in a field unrelated to architecture. I suspect many practicing software architects will agree with this. I suspect Ayn Rand wouldn&#8217;t disagree as well.</p>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2009/10/service-oriented-rest-architecture-is-an-oxymoron/' rel='bookmark' title='Permanent Link: Service oriented REST architecture is an oxymoron'>Service oriented REST architecture is an oxymoron</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=hAwfiGcjzbw:YCxpklrekkI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=hAwfiGcjzbw:YCxpklrekkI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=hAwfiGcjzbw:YCxpklrekkI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=hAwfiGcjzbw:YCxpklrekkI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=hAwfiGcjzbw:YCxpklrekkI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=hAwfiGcjzbw:YCxpklrekkI:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/hAwfiGcjzbw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/10/service-oriented-architecture-is-primarily-about-business-and-not-technology.-bollocks/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/10/service-oriented-architecture-is-primarily-about-business-and-not-technology.-bollocks/</feedburner:origLink></item>
		<item>
		<title>Stop calling me NoSQL</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/gDeGmt9gBeY/</link>
		<comments>http://blog.dhananjaynene.com/2009/10/stop-calling-me-nosql/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 23:26:09 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[architecture]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[natural persistence]]></category>
		<category><![CDATA[nosql]]></category>
		<category><![CDATA[schemaless databases]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=884</guid>
		<description><![CDATA[Dear Reader,
Apologies for sending this note to you completely unannounced and out of the blue. However I find myself in a peculiar situation of having a very weird name being dumped upon me. While I am indifferent to the name per se, I am greatly pained as I realise that it is a completely inappropriate [...]]]></description>
			<content:encoded><![CDATA[<p>Dear Reader,</p>
<p>Apologies for sending this note to you completely unannounced and out of the blue. However I find myself in a peculiar situation of having a very weird name being dumped upon me. While I am indifferent to the name per se, I am greatly pained as I realise that it is a completely inappropriate name. What is even more confounding is the very bunch of people who have happily assigned me the name and continue to popularise it belong to that class of people some of whom actually are extremely particular about accurate nomenclature and have no hesitation in creating a 100 letter class or function name by concatenating 20 words just to make sure the name is unambiguous and conveys the intent clearly. </p>
<p>Ahh.. but I digress and impose upon you without introducing myself adequately first. I am a data storage style. I am not new, but lately far too many a software engineer have started taking a liking for me. Ever since I have been around, I have with great amounts of jealousy watched my cousin the RDBMS being courted by the finest of engineers (in all honesty there were some fine engineers interested in me too, but far too few compared to my cousin). But lately multiple concurrent developments have made a fair amount of attention come my way too. </p>
<p>You see unlike RDBMS, I don&#8217;t require that data be clearly split into tables, columns and rows. I can work with data the way it is most naturally represented. As a tree of individual data fields, lists, arrays, dictionaries etc. Also I do not require that you always clearly define each and every possible schema element before being able to store data corresponding to the schema. I can happily accept a schema dynamically or even work without a schema. Some of my early forms were based on key value pairs stored as B-Trees (eg. Berkeley DB). Over the years people have figured out ways to represent the data as a set of decomposed document elements, store data spread across a cluster, replicate it for better availability and fault tolerance, and even perform post storage processing tasks using map-reduce sequences. But really what separates me from my cousin and other storage systems is that I don&#8217;t make demands on the data &#8211; I take it in its naturally found form and then store it, replicate it, slice it, dice it and glean information out of it. And therein lies my true identity &#8211; I will work with data the way the data is best represented with all its arbitrary inconsistencies and inabilities to always clearly specify a constraining schema. And the engineers who&#8217;ve spent time with me seem to have enjoyed it quite a bit. </p>
<p>But the horror of it &#8211; they gave me a completely inappropriate moniker &#8211; &#8216;NoSQL&#8217;. First and foremost I exist to promote a storage style and thats what identifies me. I work with data in its natural and arbitrary forms. Therefore to make it seem like I represent a lack of something else is utterly missing the point. The SQL in NoSQL stands for Structured Query Language, which depends upon Fixed Structure Relational Data. Since I change the very nature of the data being stored, that SQL is not required or relevant is automatic and inconsequential. </p>
<p>Its like calling a under-the-ocean-mountain_range as NoIgloo. Its dead obvious igloos will not be found there. But calling that mountain range NoIgloo is a big disservice to visitors. You use that as a marketing term, attract people, then tell them that NoIgloo actually has nothing to do with Igloos &#8211; its got to do with mountains and oceans, and that they need to first unwind all the confusion they created in their minds due to NoIgloo and then go through a phase of reunderstanding mountains and oceans. And while they came prepared for a possibly warmer place given the name NoIgloo &#8211; it actually is a wet place so they need to again change their garments and equipment for the journey. A wholely avoidable situation.</p>
<p><em>Update: <a href="http://twitter.com/boorad">Brad Anderson</a> pointed out this interesting post <a href="http://voodootikigod.com/nosql-a-modest-proposal">NoSQL: A Modest Proposal</a> which traces the genesis of my name which leaves me very very disappointed. Almost seems to suggest that people are flocking together and naming me not based on something inherently powerful about me &#8211; but as a mechanism to demonise my cousin RDBMS. This is most unfortunate, since we actually end up being useful in very different situations and more often than not are likely to complement each other rather than compete with each other. I do hope a better moniker does prevail over time</em> </p>
<p>What I would like is to see a better / more appropriate name for me. Hmm .. call me free form storage, natural persistence or flexi schema storage or perhaps something else even more appropriate (this blog owner prefers &#8220;natural persistence&#8221;). Each of these conveys far more about me far more accurately than NoSQL does. Basically please please call me something better than NoSQL. So can I request you to carry forward my plea by further forwarding and retweeting this to your friends and ask them how they can so callously call me by such a silly name when they take the utmost precautions in properly naming their classes and methods. Plead with them to stop doing this and please work with others to give me a better name. I think it will cause less confusion over the coming months and years, and the field of software shall recover its glorious tradition of maintaining precision in communication by using accurate naming.</p>
<p>Sincerely,<br />
The one who doesn&#8217;t want to be called NoSQL</p>
<p>PS : As a background to this there was an interesting conversation earlier today between this blog owner <a href="http://twitter.com/dnene">dnene</a> and <a href="http://twitter.com/KentBeck">Kent Beck</a> on twitter, where Kent so kindly and graciously helped carry forward the thought process of helping identify my essential characteristics, and it is in no small part, thanks to this conversation that I was able to articulate myself and my grief. I reproduce that conversation below. (<em>Update: though in all likelihood Kent&#8217;s intent was to help clarify the thought rather than contest the names. In hindsight, it makes sense to ask for permission to reproduce conversations .. even when such are on the public twitter stream &#8211; something that wasn&#8217;t done in this case. <img src='http://blog.dhananjaynene.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  </em>)</p>
<table cellspacing="3" cellpadding="3">
<tr>
<th>Twitter ID</th>
<th>Tweet / Message</th>
</tr>
<tr>
<td valign="top">dnene</td>
<td>NoSQL is such an inappropriate name. NoTables at least makes a little more sense.</td>
</tr>
<tr>
<td valign="top">KentBeck</td>
<td>@dnene but what would nosql be called if you wanted to say something positive about it?</td>
</tr>
<tr>
<td valign="top">dnene</td>
<td>@KentBeck Thats a great question .. still thinking .. best thought so far &#8211; FlexiStore (though not good enough yet <img src='http://blog.dhananjaynene.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  )</td>
</tr>
<tr>
<td valign="top">KentBeck</td>
<td>@dnene what can you do with a nosql store that you can&#8217;t do with an sql database? why would you be excited to use one?</td>
</tr>
<tr>
<td rowspan="2" valign="top">dnene</td>
<td>@KentBeck I see where u r going with this (a) unconstrained &#038; composite storage (b) store resources not records (c) shard/scale horizontally</td>
</tr>
<tr>
<td>.@KentBeck I think there is a merit in attempting to define nosql in terms of what it is rather than what it isn&#8217;t</td>
</tr>
<tr>
<td valign="top">KentBeck</td>
<td>@dnene there are many more people confused about what datastore to use than who hate sql. the positive approach appeals to the former.</td>
</tr>
<tr>
<td valign="top">dnene</td>
<td>@KentBeck Agreed .. and I&#8217;m aware of many more who wonder why we need a different datastore than the RDBMSs. NoSQL as a name doesn&#8217;t help.</td>
</tr>
<tr>
<td valign="top">KentBeck</td>
<td>@dnene well, why *do* we need a different data store?</td>
</tr>
<tr>
<td rowspan="3" valign="top">dnene</td>
<td>@KentBeck Primary Need : We need support for flexible/arbitrary schemas with complex depths &#8211; RDBMSs don&#8217;t dance well in this space.</td>
</tr>
<tr>
<td>@KentBeck Secondary Need : Support for deferred processing required for analytics (eg. Map/Reduce). RDBMS don&#8217;t do too bad a job here</td>
</tr>
<tr>
<td>@KentBeck Tertiary Need (not one that I&#8217;ve felt strongly yet) : Distributed and horizontally scalable storage on commoditized h/w.</td>
</tr>
<tr>
<td valign="top">KentBeck</td>
<td>@dnene it seems like you&#8217;re looking for realistically structured data, not data twisted to fit a formula convenient for mathematicians.</td>
</tr>
<tr>
<td rowspan="2" valign="top">dnene</td>
<td>@KentBeck Yes.. thats it! I&#8217;m looking for realistically or naturally structured data storage / persistence. Rocks compared to the term nosql</td>
</tr>
<tr>
<td>@KentBeck Wonder if the term arbitrarily structured makes sense as well. This has been one heck of a conversation/Q&#038;A so far +1:)</td>
</tr>
<tr>
<td valign="top">KentBeck</td>
<td>@dnene glad you found it helpful. you get bonus points if the opposite of the name you pick is unattractive, a la &#8220;structured programming&#8221;</td>
</tr>
</table>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2009/10/nosql-a-fluid-architecture-in-transition/' rel='bookmark' title='Permanent Link: NoSQL &#8211; A fluid architecture in transition'>NoSQL &#8211; A fluid architecture in transition</a></li><li><a href='http://blog.dhananjaynene.com/2009/11/five-important-trends-on-the-enterprise-architects-radar/' rel='bookmark' title='Permanent Link: Five important trends on the enterprise architect&#8217;s radar'>Five important trends on the enterprise architect&#8217;s radar</a></li><li><a href='http://blog.dhananjaynene.com/2009/01/stop-making-soa-complex/' rel='bookmark' title='Permanent Link: Stop making SOA complex'>Stop making SOA complex</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=gDeGmt9gBeY:sFDOHza25Ew:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=gDeGmt9gBeY:sFDOHza25Ew:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=gDeGmt9gBeY:sFDOHza25Ew:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=gDeGmt9gBeY:sFDOHza25Ew:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=gDeGmt9gBeY:sFDOHza25Ew:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=gDeGmt9gBeY:sFDOHza25Ew:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/gDeGmt9gBeY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/10/stop-calling-me-nosql/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/10/stop-calling-me-nosql/</feedburner:origLink></item>
		<item>
		<title>NoSQL – A fluid architecture in transition</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/NPxdbON88Js/</link>
		<comments>http://blog.dhananjaynene.com/2009/10/nosql-a-fluid-architecture-in-transition/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 18:21:14 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[architecture]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[lightcloud]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[nosql]]></category>
		<category><![CDATA[riak]]></category>
		<category><![CDATA[tokyotyrant]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=867</guid>
		<description><![CDATA[Lot of talk about NoSQL. Much of it well deserved. And while lot of the excitement around it is well understood by those in the know, some of it may actually be confusing to those who are relatively new to the matter. This post is actually for the latter group &#8211; not to argue for [...]]]></description>
			<content:encoded><![CDATA[<p>Lot of talk about NoSQL. Much of it well deserved. And while lot of the excitement around it is well understood by those in the know, some of it may actually be confusing to those who are relatively new to the matter. This post is actually for the latter group &#8211; not to argue for or against NoSQL &#8211; just to put it in perspective.</p>
<p><strong>What is NoSQL : </strong>Some of the characteristics shared by most if not all the NoSQL engines are as follows :</p>
<ol>
<li><strong>Schemaless or Hierarchical Schema Storage</strong> NoSQL assumes at its very basis a schemaless or a hierarchichal schema storage system. In most cases this consists of a simple key value pair storage. While some storage engines excel at storing small values (LightCloud/Tokyo Cabinet), some are strong at storing large documents (CouchDB). </li>
<li><strong>Distributed storage :</strong> This is one of the driving forces of NoSQL growth, though not a distinguishing characteristic of NoSQL. One of the areas these storage systems separate themselves from RDBMS&#8217;s is their ability to allow better horizontal scalability. This varies from the simple master-master replication for MongoDB, to multi node sharding using consistent hashing with LightCloud (a la memcached) to a multiple master eventual consistency model of Riak. The basic premise in using some of the NoSQL engines is that storage will scale horizontally.</li>
<li><strong>Support for deferred processing :</strong>Many of these engines allow for some degree of deferred processing. Whether this be simple lua scripting in case of LightCloud or map-reduce scripts in case of CouchDB, the general assumption is that some amount of latency in computation times is acceptable, and some of the computations (especially related to analytics based views) will be performed post storage.</li>
<li><strong>Eventual Consistency :</strong> This may seem like a necessary feature of all NoSQL storage systems but it isn&#8217;t. While clearly some such as CouchDB (in terms of its map-reduce views) and Riak are better placed for supporting and implementing eventual consistency, it is quite feasible to use others such as LightCloud or MongoDB to implement immediate consistency using a single master-master pair. Suffice to note that eventual consistency is not a necessary side effect of using a NoSQL storage system, though it wouldn&#8217;t be incompatible for the two to work together. </li>
</ol>
<p>But the points I would really like to emphasize are :</p>
<ul>
<li><strong>NoSQL is not a direct competitor to RDBMS/SQL :</strong> It is actually a solution to many use cases where using RDBMS was perhaps a poor fit. Thus the decision for an architect is not which of the two competing options (RDBMS or NoSQL) <em>Update: <del datetime="2009-10-21T20:11:10+00:00">one should select</del><ins datetime="2009-10-21T20:11:10+00:00">should be the preferred standard storage strategy</ins></em>, &#8211; it simply is which one is the more appropriate storage system for the application under consideration.</li>
<li><strong>NoSQL is still at a fluid stage of its development : </strong> All the NoSQL storage systems (but for LightCloud/Tokyo Tyrant) are still being quite actively developed. These have not reached v 1.0 <em>(Update: MongoDB is at v 1.1)</em> and it is likely that some time will pass before any of these get beyond the beta and release candidate stage and get a 1.0 in-production stamp. While there is a lot of interest, there still is a substantial amount of experimentation in terms of the right feature sets leading to differently focused developments in different storage systems. To an architect this represents an interesting challenge. I think the way to approach this right now is to not use these in mission critical (eg. life or health impacting) systems, and to focus on reasonable expectation management in terms of ensuring the right kind of SLAs around their availability (simply because many of these haven&#8217;t yet been put to intense use in production the way say an Oracle or MySQL have been). This is not an attempt to spread &#8220;FUD&#8221; about NoSQL &#8211; far from it it is an exercise in setting appropriate expectations. i would also recommend that it would be appropriate to evaluate the available NoSQL choices only when reasonable SLAs can be worked out for their usage. It is certainly preferred to using NoSQLs rather than using RDBMS&#8217;s in an inappropriate manner (large objects serialised into BLOBs or into name-value pair tables). However, I would suggest that you do not deeply bind yourself into a particular NoSQL engine. The future development of most of the storage systems is still unknown to a certain extent, as is the future landscape including any shakeouts. Should one recommend usage of a NoSQL engine &#8211; it is important to have a clear plan for switching over to an alternative engine should a need arise in the future. While this is easier said than done, deciding the appropriate level of abstraction to use (ie. code to the API directly vs. use a layer of abstraction for engine independence) is best left to designer / architect to dwell upon.</li>
</ul>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2009/10/stop-calling-me-nosql/' rel='bookmark' title='Permanent Link: Stop calling me NoSQL'>Stop calling me NoSQL</a></li><li><a href='http://blog.dhananjaynene.com/2009/11/five-important-trends-on-the-enterprise-architects-radar/' rel='bookmark' title='Permanent Link: Five important trends on the enterprise architect&#8217;s radar'>Five important trends on the enterprise architect&#8217;s radar</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=NPxdbON88Js:LRIrmzvjZ3k:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=NPxdbON88Js:LRIrmzvjZ3k:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=NPxdbON88Js:LRIrmzvjZ3k:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=NPxdbON88Js:LRIrmzvjZ3k:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=NPxdbON88Js:LRIrmzvjZ3k:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=NPxdbON88Js:LRIrmzvjZ3k:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/NPxdbON88Js" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/10/nosql-a-fluid-architecture-in-transition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/10/nosql-a-fluid-architecture-in-transition/</feedburner:origLink></item>
		<item>
		<title>Configuring a secure Ubuntu Linux Virtual Private Server</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/ej6qH7i64xA/</link>
		<comments>http://blog.dhananjaynene.com/2009/10/configuring-a-secure-ubuntu-linux-virtual-private-server/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 13:56:20 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vps]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=852</guid>
		<description><![CDATA[This post is based on my notes for an initial configuration for an Ubuntu 9.04 Virtual Private Server with a focus on security. At that time I searched for a number of references on security, and while I have not kept the note of all their URLs, most of what I write below is as [...]]]></description>
			<content:encoded><![CDATA[<p>This post is based on my notes for an initial configuration for an Ubuntu 9.04 Virtual Private Server with a focus on security. At that time I searched for a number of references on security, and while I have not kept the note of all their URLs, most of what I write below is as a result of other documents even though I cannot specifically cite them (in other words, there is little originality except perhaps for attempting to cover the entire gamut of configuration activities into one article).</p>
<p>Keep in mind that these steps are based on my notes which might be a little incomplete especially around the part where acidbase is installed.</p>
<ul>
<li><a href="#InitialConfig">Initial Configuration</a> : Basic configuration when getting started up.</li>
<li><a href="#BasicSecurity">Setting up basic security</a> : Basic Security configuration</li>
<li><a href="#RootkitDetection">Setting up rootkit detection</a> : Setting up rootkit detection</li>
<li><a href="#BastilleSetup">Setting up Bastille</a> : Setting up Bastille</li>
<li><a href="#LampStack">Setting up the lamp stack</a> : Set up the LAMP stack including mysql and apache</li>
<li><a href="#SnortSetup">Setting up Snort and acidbase</a> : Configure Intrusion detection using Snort and Acidbase.</li>
<li><a href="#FileIntegrity">Setting up File Integrity using AIDE </a> : Setting up File integrity checks using AIDE</li>
</ul>
<p><a name="InitialConfig"></a></p>
<h2> Initial Configuration</h2>
<p>These steps cover the initial setup of a server</p>
<h3> Setup the hostname </h3>
<p>Lets say the hostname we want to setup is <em>vps</em>.</p>
<div class="console">
$ echo &#8220;vps.mydomain.com&#8221; > /etc/hostname<br />
$ hostname -F /etc/hostname
</div>
<p>Now update the <em>/etc/hosts</em> file to reflect the hostname and the fully qualified domain name<br />
<em>Replace 12.34.56.78 with the IP address of your host</em></p>
<div class="console">
127.0.0.1       localhost.localdomain  localhost<br />
12.34.56.78     vps.mydomain.com vps
</div>
<h3> Updating the ubuntu repositories </h3>
<p>You will need to update your ubuntu repositories to include jaunty-updates and universe repositories. This is so that you may install additional packages as required from these repositories as well. In my case, the earlier version of the file <em>/etc/apt/sources.list</em> was as follows.</p>
<p>However please note, that repository selection and its update strategy may be linked to your company or application strategy. Please make sure these steps are consistent with your policy. If not, kindly adapt consistent with your team / organisations policy. Also instead of us.archive.ubuntu.com, you may find other country specific server names. In that case you may want to continue to use the other server name as already listed in your file.</p>
<div class="console">
deb http://us.archive.ubuntu.com/ubuntu/ jaunty main restricted<br />
deb-src http://us.archive.ubuntu.com/ubuntu/ jaunty main restricted</p>
<p>deb http://security.ubuntu.com/ubuntu jaunty-security main restricted<br />
deb-src http://security.ubuntu.com/ubuntu jaunty-security main restricted
</p></div>
<p>Upon adding jaunty-updates and the universe repositories, the resultant file is as follows.</p>
<div class="console">
deb http://us.archive.ubuntu.com/ubuntu/ jaunty main restricted universe<br />
deb-src http://us.archive.ubuntu.com/ubuntu/ jaunty main restricted universe</p>
<p>deb http://security.ubuntu.com/ubuntu jaunty-security main restricted universe<br />
deb-src http://security.ubuntu.com/ubuntu jaunty-security main restricted universe</p>
<p>deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates main restricted universe<br />
deb-src http://us.archive.ubuntu.com/ubuntu/ jaunty-updates main restricted universe
</p></div>
<p>Now update the sources. This will scan all the repositories</p>
<div class="console">
$ sudo apt-get update
</div>
<p>Finally upgrade ie. replace any existing packages which have a newer upgrade</p>
<div class="console">
$ sudo apt-get upgrade
</div>
<h3> Download the language pack </h3>
<p>To add the necessary for the preferred language of your choice add the appropriate language pack. In my case I add support for english (en)</p>
<div class="console">
$ sudo apt-get install language-pack-en
</div>
<h3> Set the timezone </h3>
<p>Set the timezone of the server. You may choose to set it based on server location, or typical user location or to UTC.</p>
<div class="console">
$ dpkg-reconfigure tzdata
</div>
<p>That will start a small app, from which you can select the timezone. I selected <em>None of the Above</em> which offered me a choice of timezones based on UTC offsets and subsequently selected <em>UTC</em>.</p>
<h3> Setting up Mail sending </h3>
<p>I do not need this VPS to act as a mail server. However I do need to have capabilities to send email from this machine. Many unix tools routinely assume the existence of sendmail or equivalent MTA. However that is an overkill in this context. So we shall not be installing sendmail or postfix or exim or any other equivalent. Instead we shall configure this server to be only able to send out mail using an SMTP account on another mail server. For this we shall install a tool called mailx. <em>Note: If you have mailx already installed through another ubuntu package called mailutils, you may either continue with the same (in which case you will need to configure the remainder of the mail stack correspondingly eg. sendmail) or remove mailutils and add heirloom-mailx</em></p>
<div class="console">
$ sudo apt-get install heirloom-mailx
</div>
<p>We shall also configure a global configuration for sending out mail. In my case its all right to always send mail using only one account irrespective of the process or user who is sending it.</p>
<div class="console">
$ sudo vi /etc/nail.rc
</div>
<p>Note that in the above configuration, we shall be placing the mail account password in clear text. Make sure it is a mail account you do not use for any other purposes and that its password is not the same as used for any other purposes. Now enter the following as contents of the <em>/etc/nail.rc</em> file. Obviously change the relevant fields to appropriate values. Note that this file is configured for sending mail via gmail. You may need to configure it differently based on your own SMTP configurations.</p>
<div class="console">
set smtp-use-starttls<br />
set from=my_user_id@gmail.com<br />
set smtp=smtp.gmail.com:587<br />
set smtp-auth-user=my_user_id@gmail.com<br />
set auth-login=my_user_id@gmail.com<br />
set smtp-auth-password=my_password
</div>
<p>You can try testing whether this got set up successfully. Enter the following (replace youremailid@youremaildomain.com by the email id where you would like the mail to be sent to)</p>
<div class="console">
$ mail youremailid@youremaildomain.com<br />
Subject: This is a test mail<br />
Hello<br />
.
</div>
<p><a name="BasicSecurity"></a></p>
<h2>Basic Security</h2>
<p>In this section we shall make some basic configuration changes with a view to enhance the system security.</p>
<h3> Mounting the shared memory as read only </h3>
<p>Open and edit the file /etc/fstab to add an entry to mount shared memory in read only mode. The reason we do it is because many exploits use shared memory to attack other running services.</p>
<p>If you have a good reason to make shared memory writeable skip this step.</p>
<div class="console">
$ vi /etc/fstab
</div>
<p>Now add the following line at the end of the file</p>
<div class="console">
tmpfs           /dev/shm        tmpfs   defaults,ro     0       0
</div>
<h3> Tightening the passwords </h3>
<p>One of the easiest exploits is to attempt a brute force login using dictionary based attacks. In order to ensure strong ie. non-guessable passwords we shall update the password checking policy so that it allows only strong passwords. A simple way to ensure that is to ensure a reasonable minimum length and to ensure multiple character classes.</p>
<p>First lets install a new pam authentication module pam_cracklib. To install the same run the following</p>
<div class="console">
$ sudo apt-get install libpam-cracklib
</div>
<p>Answer &#8216;Y&#8217; to the prompt it asks for regarding continuing.</p>
<p><em>Note: if you did not add the universe repository to your sources.list file, you will not be able to install libpam-cracklib. In that case you will need to skip this step.</em></p>
<p>This should&#8217;ve resulted in the file <em>etc/pam.d/common-password</em> having an entry for pam_cracklib.so and pam_unix.so. Update the pam_cracklib.so entry to add one more requirement ie. <em>minclass=4</em>.</p>
<p>In my case, the resultant two lines in <em>/etc/pam.d/common-password</em> are as follows. Note that I added the minclass=4 clause manually.</p>
<div class="console">
password        requisite                       pam_cracklib.so retry=3 minlen=8 difok=3 minclass=4<br />
password        [success=1 default=ignore]      pam_unix.so obscure use_authtok try_first_pass sha512
</div>
<p>There. You now have a strong password scheme which will conduct a whole range of password checks in addition to ensuring that the password has a minimum length of 8 and each new password has at least one each of the four character classes. The four character classes are lower_case, upper_case, digit and special_characters (the last one being any non alpha-numeric character)</p>
<h3> Creating the first user </h3>
<p>Note: if you have already created at least one more non root user this step is not required. We are primarily creating the new user so that we shall eventually allow sudo and remote ssh login privileges to the user and disable remote ssh privileges for the root user.</p>
<p>Setup the first new user. One of the reasons you should create a new user is so that it will afford you the ability to allow him to perform root actions through sudo, and thus subsequently allow you to disable root access over ssh. By default when one creates a new user, another group gets created with the same name as well. In this case we shall create a new group &#8220;<em>dev</em>&#8221; and then create a new user associated with that group &#8220;<em>someuser</em>&#8220;. Use the groupname and the username as you would like to setup when executing the commands below. In the commands below we create a new home directory for the user, associate the <em>/bin/bash</em> shell with his account instead of the default <em>/bin/sh</em>, (I just prefer bash to the plain sh) and finally set the password for him.</p>
<div class="console">
$ groupadd dev<br />
$ mkdir /home/someuser<br />
$ useradd -d /home/someuser -s /bin/bash -g dev someuser<br />
$ chown someuser.dev /home/someuser<br />
$ passwd someuser
</div>
<p>We shall also create the .ssh directory for the user which we shall be using later</p>
<div class="console">
$ mkdir /home/someuser/.ssh<br />
$ chmod 700 /home/someuser/.ssh<br />
$ touch /home/someuser/.ssh/authorized_keys<br />
$ chmod 600 /home/someuser/.ssh/authorized_keys<br />
$ chown -R someuser.dev /home/someuser
</div>
<p>Now we shall create the keypair for the user to log in to the host remotely. Note that if you are going to do this for multiple users, then you might want to have each user run the next step locally and then copy over his public key onto the server before continuing to the ssh tightening operations described later.</p>
<p>The user should do the following on his <em>local workstation from which he is most frequently likely to connect to the server (not the server that we are hardening)</em>.</p>
<p><em>Note: the part after -C in ssh-keygen is just a comment to identify the keys &#8211; enter something to identify the user and his machine.</em><br />
Also make sure not to keep the passphrase blank though ssh-keygen will allow a blank passphrase. The reason is that if the user&#8217;s local machine is compromised the attacker can then get an easy access to the server being hardened.</p>
<p><em>change someuser and some.host.com below based on the user id and vps name correspondingly</em></p>
<div class="console">
$ mkdir ~/.ssh<br />
$ ssh-keygen -t dsa -b 1024 -C &#8220;some user on his desktop&#8221;<br />
$ scp ~/.ssh/id_dsa.pub someuser@some.host.com:/home/someuser/.ssh/someuser.pub
</div>
<p>Now the user should himself ssh to the remote server and on the remote server move his public key into the <em>authorized_keys</em> file. So execute the following command after being connected to the VPS</p>
<div class="console">
$ cd .ssh<br />
$ cat someuser.pub >> authorized_keys<br />
$ rm someuser.pub
</div>
<p>At this stage the user can disconnect from the VPS and attempt to reconnect using ssh. If all works well, he should get connected to the vps in a manner where it does not prompt him for a password but instead he does get prompted for the passphrase to his private key (assuming he did set one).</p>
<p>This stage of updating the authorized_key file can also be performed by an administrative user / root once we later reconfigure ssh to only allow public key based logins.</p>
<h3> Enabling the user to perform sudo operations </h3>
<p>We shall enable any group who belongs to the group &#8216;<em>admin</em>&#8216; to be able to conduct root operations through using sudo. </p>
<p>First create a group &#8216;<em>admin</em>&#8216;. subsequently associate the user with that group as well. Note : For best security ensure you allow associate only a very small number of users with the &#8216;admin&#8217; group since that will effectively allow them control over the whole machine (assuming you setup the privileges as I subsequently describe below).</p>
<div class="console">
$ groupadd admin<br />
$ adduser someuser admin
</div>
<p>Now we shall enable any user who belongs to the admin group to perform root actions by using sudo. To edit the sudo policy file do the following</p>
<div class="console">
$ sudo visudo
</div>
<p>At the end of the file which is now opened up &#8211; add the following line</p>
<div class="console">
%admin ALL=(ALL) ALL
</div>
<p>Note this grants all superuser privileges to the users who belongs to admin group when conducting operations using sudo. You can use the sudo policy configurations to set up far more fine grained set of privileges, but thats beyond the scope of this document.</p>
<p>To test whether the configuration worked successfully, you can login as <em>someuser</em> and execute the following command.</p>
<div class="console">
$ sudo cat /etc/shadow
</div>
<h3> Tightening up ssh </h3>
<p>To create the group and associate the users with them perform the following command (use the appropriate username instead of someuser for each user who you would like to allow SSH access).</p>
<div class="console">
sudo addgroup sshlogin<br />
sudo adduser someuser sshlogin
</div>
<p>Now that we have at least one user id which can conduct root operations using <em>sudo</em>, its time to disable root login from ssh. Go open the file <em>/etc/ssh/sshd_config</em>. Make the following changes</p>
<p>This one disables root login for ssh.<br />
<em>PermitRootLogin yes</em> to <em>PermitRootLogin no</em></p>
<p>Adding the following line allows only users of a particular group to login. <em>Note: if your user count is small, you could use <em>AllowUsers</em> instead</em>. We shall be separately creating the group and associating the users with the group.<br />
<em>AllowGroups sshlogin</em></p>
<p>This change reduces the login grace time (time before a user needs to login after making the ssh login request). This is to allow better protection to sshd against DOS or brute force attacks.<br />
<em>LoginGraceTime 20</em> to <em>LoginGraceTime 20</em></p>
<p>This changes the port number that <em>sshd</em> listens on from the default 22. Changing the default port takes away the ability of an attacker to easily guess the port on which to attempt to penetrate the system via ssh.<br />
<em>Port 22</em> to <em>Port 9999</em> (or any other suitable number) </p>
<p>This change disables X11Forwarding over the SSH connection. It will result in you not being able to run X11 GUI applications remotely. If you need that flexibility, do not make this change<br />
<em>X11Forwarding yes</em> to <em>X11Forwarding no</em></p>
<p>The next change disables password authentication (thus allowing only users with their public key being stored in the corresponding authorized_keys folder to connect using ssh). Thus passwords, which need to be transferred to the server in clear text no longer are a valid authentication mechanism. The only available choice is public key based authentication.<br />
<em>PasswordAuthentication yes</em> to <em>PasswordAuthentication No</em></p>
<p>The next change disables password authentication (thus allowing only users with their public key being stored in the corresponding authorized_keys folder to connect using ssh). Thus passwords, which need to be transferred to the server in clear text no longer are a valid authentication mechanism. The only available choice is public key based authentication.<br />
<em>PasswordAuthentication yes</em> to <em>PasswordAuthentication No</em><br />
<em>UsePAM yes</em> to <em>UsePAM no</em></p>
<p>The following change of uncommenting the banner allows a welcome message (not really a welcome one <img src='http://blog.dhananjaynene.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) to be displayed to SSH logins. It does not improve any aspect of the physical security but is more from a legal notice perspective.<br />
<em>#Banner /etc/issue.net</em> to <em>Banner /etc/issue.net</em></p>
<p>Now go update the contents of the file <em>/etc/issue.net</em> to something similar to following</p>
<div class="console">
***************************************************************************<br />
                                                        NOTICE TO USERS</p>
<p>This computer system is the private property of its owner, whether<br />
individual, corporate or government.  It is for authorized use only.<br />
Users (authorized or unauthorized) have no explicit or implicit<br />
expectation of privacy.</p>
<p>Any or all uses of this system and all files on this system may be<br />
intercepted, monitored, recorded, copied, audited, inspected, and<br />
disclosed to your employer, to authorized site, government, and law<br />
enforcement personnel, as well as authorized officials of government<br />
agencies, both domestic and foreign.</p>
<p>By using this system, the user consents to such interception, monitoring,<br />
recording, copying, auditing, inspection, and disclosure at the<br />
discretion of such personnel or officials.  Unauthorized or improper use<br />
of this system may result in civil and criminal penalties and<br />
administrative or disciplinary action, as appropriate. By continuing to<br />
use this system you indicate your awareness of and consent to these terms<br />
and conditions of use. LOG OFF IMMEDIATELY if you do not agree to the<br />
conditions stated in this warning.<br />
****************************************************************************
</p></div>
<p>Restart the ssh daemon and you will no longer be able to connect as root over ssh directly.</p>
<div class="console">
$ sudo /etc/init.d/ssh restart
</div>
<h3> Disabling su </h3>
<p>As per the policy being followed, only users belonging to the &#8216;<em>admin</em>&#8216; group will have any special privileges. For all other users, we shall attempt to lock down the system to the extent feasible. As an early step we shall disable the &#8216;<em>su</em>&#8216; (switch user) command for all but those users belonging to the admin group. <em>Note : since this disables sudo for a brief duration (between the commands), first switch over as a root before executing these commands</em></p>
<div class="console">
$ sudo su -<br />
$ chown root.admin /bin/su /usr/bin/sudo<br />
$ chmod 04750 /bin/su<br />
$ chmod 04550 /usr/bin/sudo
</div>
<p><a name="RootkitDetection"></a></p>
<h2> Install rootkit detection </h2>
<p>Install chkrootkit</p>
<div class="console">
$ sudo apt-get install chkrootkit
</div>
<p>Now create this file <em>/etc/cron.daily/chkrootkit.sh</em> and enter the following contents (replace sever.domain.com with the servername and emailid where you would like the report to be sent to).<br />
Since the mail is rather verbose, and may lead to useful alerts getting ignored, I&#8217;ve removed the lines with the common messages. You may change or not use the grep commands as per your preference.</p>
<div class="console">
#!/bin/bash<br />
/usr/sbin/chkrootkit | \<br />
grep -v &#8220;not found&#8221; | \<br />
grep -v &#8220;nothing found&#8221; | \<br />
grep -v &#8220;not infected&#8221; | \<br />
mail -s &#8220;Daily chkrootkit from server.domain.com&#8221; mailid@destination.com
</div>
<p>Allow execute permissions on the file, and test once by running .. you should get a mail with the report.</p>
<div class="console">
$ sudo chmod 755 /etc/cron.daily/chkrootkit.sh<br />
$ sudo /etc/cron.daily/chkrootkit.sh
</div>
<p><a name="BastilleSetup"></a></p>
<h2> Installing Bastille </h2>
<p>Bastille is a comprehensive package for security configuration.</p>
<p><strong> Bastille Bug? and workaround </strong></p>
<p><em>You may need to perform this workaround if your </em>/etc/debian_version<em> contains 4.0 and the current ubuntu bastille package has not resolved the issue. Ideally one should just need to install bastille from the ubuntu repositories</em></p>
<p>On Ubuntu 9.0.4 (jaunty) as of the day this document was written, I received the following error<br />
~&#038; ERROR:   &#8216;DB5.0&#8242; is not a supported operating system.</p>
<p>I&#8217;ve had a difficulty to install Bastille on Ubuntu 9.0.4. This is due to the fact that Bastille does not support the debian version number in <em>/etc/debian_version</em>. As per Bastille bug reports this got fixed in 3.0.8, but did not work for me in Bastille 3.0.9. Hence the following is a work around to install bastille.</p>
<p>This workaround involves downloading lynx to access internet, downloading the debian package directly, and then installing the debian package. When you reach the web page it will show you a list of mirrors. Download the .deb package from one of the mirrors</p>
<div class="console">
$ sudo apt-get install lynx libcurses-perl<br />
$ lynx http://packages.debian.org/squeeze/all/bastille/download<br />
# Download the package using lynx<br />
$ sudo dpkg &#8211;install bastille_3.0.9-12_all.deb
</div>
<p>Install psad which we shall need later and perl-gtk which we shall need to configure bastille with the following command</p>
<div class="console">
$ sudo apt-get install psad
</div>
<p>You will notice an error message :</p>
<p>To resolve the same execute the following :</p>
<div class="console">
$ echo -e &#8216;kern.info\t|/var/lib/psad/psadfifo&#8217; | sudo tee -a /etc/syslog.conf<br />
$ sudo /etc/init.d/sysklogd restart
</div>
<p>Now run bastille in an interactive mode</p>
<div class="console">
$ sudo bastille -c
</div>
<p>The resultant dialog with bastille is too long and I am just showing the final configuration file which is produced as a result of bastille configuration. <em>I&#8217;ve used the port 22 as a proxy for the SSH port which I assume you&#8217;ve changed to some other value &#8211; use the other value instead of 22</em></p>
<div class="console">
# Q:  Would you like to enforce password aging? [Y]<br />
AccountSecurity.passwdage=&#8221;Y&#8221;<br />
# Q:  Should Bastille disable clear-text r-protocols that use IP-based authentication? [Y]<br />
AccountSecurity.protectrhost=&#8221;Y&#8221;<br />
# Q:  Should we disallow root login on tty&#8217;s 1-6? [N]<br />
AccountSecurity.rootttylogins=&#8221;N&#8221;<br />
# Q:  Would you like to deactivate the Apache web server? [Y]<br />
Apache.apacheoff=&#8221;N&#8221;<br />
# Q:  Would you like to disable CTRL-ALT-DELETE rebooting? [N]<br />
BootSecurity.secureinittab=&#8221;N&#8221;<br />
# Q:  Should we restrict console access to a small group of user accounts? [N]<br />
ConfigureMiscPAM.consolelogin=&#8221;Y&#8221;<br />
# Q:  Which accounts should be able to login at console? [root]<br />
ConfigureMiscPAM.consolelogin_accounts=&#8221;root&#8221;<br />
# Q:  Would you like to put limits on system resource usage? [N]<br />
ConfigureMiscPAM.limitsconf=&#8221;N&#8221;<br />
# Q:  Would you like to set more restrictive permissions on the administration utilities? [N]<br />
FilePermissions.generalperms_1_1=&#8221;Y&#8221;<br />
# Q:  Would you like to disable SUID status for mount/umount?<br />
FilePermissions.suidmount=&#8221;Y&#8221;<br />
# Q:  Would you like to disable SUID status for ping? [Y]<br />
FilePermissions.suidping=&#8221;Y&#8221;<br />
# Q:  Do you need the advanced networking options?<br />
Firewall.ip_advnetwork=&#8221;N&#8221;<br />
# Q:  Interfaces for DHCP queries: [ ]<br />
Firewall.ip_b_dhcpiface=&#8221; &#8221;<br />
# Q:  DNS Servers: [0.0.0.0/0]<br />
Firewall.ip_b_dns=&#8221;0.0.0.0/0&#8243;<br />
# Q:  ICMP allowed types: [destination-unreachable echo-reply time-exceeded]<br />
Firewall.ip_b_icmpallowed=&#8221;destination-unreachable echo-reply time-exceeded&#8221;<br />
# Q:  ICMP services to audit: [ ]<br />
Firewall.ip_b_icmpaudit=&#8221; &#8221;<br />
# Q:  ICMP types to disallow outbound: [destination-unreachable time-exceeded]<br />
Firewall.ip_b_icmpout=&#8221;destination-unreachable time-exceeded&#8221;<br />
# Q:  NTP servers to query: [ ]<br />
Firewall.ip_b_ntpsrv=&#8221; &#8221;<br />
# Q:  Force passive mode? [N]<br />
Firewall.ip_b_passiveftp=&#8221;Y&#8221;<br />
# Q:  Public interfaces: [eth+ ppp+ slip+]<br />
Firewall.ip_b_publiciface=&#8221;eth+&#8221;<br />
# Q:  TCP service names or port numbers to allow on public interfaces: [ ]<br />
Firewall.ip_b_publictcp=&#8221;22 80 443&#8243;<br />
# Q:  UDP service names or port numbers to allow on public interfaces: [ ]<br />
Firewall.ip_b_publicudp=&#8221; &#8221;<br />
# Q:  Reject method: [DENY]<br />
Firewall.ip_b_rejectmethod=&#8221;DENY&#8221;<br />
# Q:  Enable source address verification? [Y]<br />
Firewall.ip_b_srcaddr=&#8221;Y&#8221;<br />
# Q:  TCP services to audit: [telnet ftp imap pop3 finger sunrpc exec login linuxconf ssh]<br />
Firewall.ip_b_tcpaudit=&#8221;telnet ftp imap pop3 finger sunrpc exec login linuxconf ssh&#8221;<br />
# Q:  TCP services to block: [2049 2065:2090 6000:6020 7100]<br />
Firewall.ip_b_tcpblock=&#8221;2049 2065:2090 6000:6020 7100&#8243;<br />
# Q:  UDP services to audit: [31337]<br />
Firewall.ip_b_udpaudit=&#8221;31337&#8243;<br />
# Q:  UDP services to block: [2049 6770]<br />
Firewall.ip_b_udpblock=&#8221;2049 6770&#8243;<br />
# Q:  Should Bastille run the firewall and enable it at boot time? [N]<br />
Firewall.ip_enable_firewall=&#8221;N&#8221;<br />
# Q:  Would you like to run the packet filtering script? [N]<br />
Firewall.ip_intro=&#8221;Y&#8221;<br />
# Q:  Would you like to set up process accounting? [N]<br />
Logging.pacct=&#8221;N&#8221;<br />
# Q:  Would you like to deactivate NFS and Samba? [Y]<br />
MiscellaneousDaemons.remotefs=&#8221;Y&#8221;<br />
# Q:  Alert on all new packets?<br />
PSAD.psad_alert_all=&#8221;Y&#8221;<br />
# Q:  psad check interval: [15]<br />
PSAD.psad_check_interval=&#8221;15&#8243;<br />
# Q:  Would you like to setup psad?<br />
PSAD.psad_config=&#8221;Y&#8221;<br />
# Q:  Danger Levels: [5 50 1000 5000 10000]<br />
PSAD.psad_danger_levels=&#8221;5 50 1000 5000 10000&#8243;<br />
# Q:  Email addresses: [root@localhost]<br />
PSAD.psad_email_alert_addresses=&#8221;mailid@destination.com&#8221;<br />
# Q:  Email alert danger level: [1]<br />
PSAD.psad_email_alert_danger_level=&#8221;1&#8243;<br />
# Q:  Should Bastille enable psad at boot time? [N]<br />
PSAD.psad_enable_at_boot=&#8221;N&#8221;<br />
# Q:  Enable automatic blocking of scanning IPs?<br />
PSAD.psad_enable_auto_ids=&#8221;N&#8221;<br />
# Q:  Enable scan persistence?<br />
PSAD.psad_enable_persistence=&#8221;N&#8221;<br />
# Q:  Port range scan threshold: [1]<br />
PSAD.psad_port_range_scan_threshold=&#8221;1&#8243;<br />
# Q:  Scan timeout: [3600]<br />
PSAD.psad_scan_timeout=&#8221;3600&#8243;<br />
# Q:  Show all scan signatures?<br />
PSAD.psad_show_all_signatures=&#8221;N&#8221;<br />
# Q:  Would you like to disable printing? [N]<br />
Printing.printing=&#8221;Y&#8221;<br />
# Q:  Would you like to disable printing? [N]<br />
Printing.printing_cups=&#8221;N&#8221;<br />
# Q:  Would you like to display &#8220;Authorized Use&#8221; messages at log-in time? [Y]<br />
SecureInetd.banners=&#8221;Y&#8221;<br />
# Q:  Should Bastille ensure inetd&#8217;s FTP service does not run on this system? [y]<br />
SecureInetd.deactivate_ftp=&#8221;Y&#8221;<br />
# Q:  Should Bastille ensure the telnet service does not run on this system? [y]<br />
SecureInetd.deactivate_telnet=&#8221;Y&#8221;<br />
# Q:  Who is responsible for granting authorization to use this machine?<br />
SecureInetd.owner=&#8221;Company Name&#8221;<br />
# Q:  Would you like to set a default-deny on TCP Wrappers and xinetd? [N]<br />
SecureInetd.tcpd_default_deny=&#8221;N&#8221;<br />
# Q:  Do you want to stop sendmail from running in daemon mode? [Y]<br />
Sendmail.sendmaildaemon=&#8221;Y&#8221;<br />
# Q:  Would you like to install TMPDIR/TMP scripts? [N]<br />
TMPDIR.tmpdir=&#8221;N&#8221;
</div>
<p><a name="LampStack"></a></p>
<h2> Installing the Lamp Stack </h2>
<p>Let us use the not so well known <em>tasksel</em> command to download all the packages necessary for a lamp stack. Note that <em>tasksel</em> is simply a convenience tool around <em>apt-get</em> and allows one to install a whole bunch of packages based on a class of necessity &#8211; in this case a <em>LAMP (Linux,Apache,MySQL,PHP)</em> stack.</p>
<div class="console">
$ sudo tasksel install lamp-server
</div>
<p>During the installation you will be required to create the password for the mysql <em>root</em> user. In interest of tight security do make sure to create a really strong password.</p>
<p>This actually sets up the basic LAMP stack and that should get you operational.</p>
<h3> Securing Apache </h3>
<h4> Change the user and group apache runs as </h4>
<p>You may be aware that installation of apache resulted in a new userid and group being created (both called <em>www-data</em>). I just find it a little bit more comforting to change the well known usernames to something that are less predictable. In the steps below I change <em>www-data</em> to <em>apache</em> but you may want to use something a little less predictable than <em>apache</em>.</p>
<div class="console">
$ sudo usermod -l apache www-data<br />
$ sudo groupmod -n apache www-data
</div>
<p>We shall need to change the same in the apache configuration file. Edit the file <em>/etc/apache2/envvars</em> and change the two lines as follows</p>
<div class="console">
export APACHE_RUN_USER=apache<br />
export APACHE_RUN_GROUP=apache
</div>
<h3> Install and configure mod_security </h3>
<p>Earlier when we configured, bastille and through it the iptables firewall, we allowed incoming public traffic on the SSH, HTTP and HTTPS ports. We&#8217;ve already covered the tightening of SSH security. However we still do not have a good way to control HTTP and HTTPS traffic. The solution to that is installing the apache module mod_security. It allows us abilities to inspect and if necessary reject or redirect HTTP/S traffic. The full description of mod_security is beyond the scope of this document, but a good example of how it can be used further to implement application level security as well can be had from the document <a href="http://www.modsecurity.org/documentation/Securing_Web_Services_with_ModSecurity_2.0.pdf">Securing web services with mod_security</a>. Another useful overview page is <a href="http://www.debuntu.org/2006/08/13/86-secure-your-apache2-with-mod-security">Secure your Apache2 with mod-security</a>.</p>
<p>We shall start off with installing mod_security.</p>
<div class="console">
$ sudo apt-get install libapache-mod-security
</div>
<p>You should notice a new file in <em>/etc/apache2/conf.d</em> called <em>security</em>. These are the global mod_security settings.</p>
<p>Change the following variables in the file to make server identification difficult. Note that while these settings do not enhance the security directly, they do make it harder for an intruder to easily identify the specific server and configuration, thus making it harder for him to attempt configuration specific exploits.</p>
<div class="console">
ServerTokens Prod<br />
ServerSignature Off<br />
TraceEnable Off
</div>
<p>Also uncomment the following four lines. Note that this may require you to configure other web applications which are not configured appropriately.</p>
<div class="console">
<Directory /><br />
                AllowOverride None<br />
                Order Deny,Allow<br />
                Deny from all<br />
</Directory>
</div>
<p>While not related to mod_security, to minimise server information leakage, you may consider changing these two variables to the shown values in <em>/etc/php5/apache2/php.ini</em></p>
<div class="console">
expose_php = Off<br />
display_errors = Off
</div>
<p>As mentioned above, there is a whole range of additional controls you can enforce using mod_security. Depending upon your specific requirements feel free to leverage mod_security much more.</p>
<h3> Disable apache modules you do not need </h3>
<p>In general it is better to turn off unrequired modules unless you really need them. The default configuration installs a number of modules which may not be required. The modules that have been enabled are in the <em>/etc/apache2/mods-enabled</em> directory which are all symbolic links to the modules that have been installed in the <em>/etc/apache2/mods-available</em> directory. Note that turning off some modules may affect some web applications you install, in which case you may choose to subsequently turn them on only if necessary. New modules can be enabled with <em>sudo a2enmod module_name</em> command and enabled modules can be disabled by <em>sudo a2dismod module_name command</em>.</p>
<p>Depending upon my requirements, I disabled the following modules</p>
<div class="console">
$ sudo a2dismod autoindex       # used to build directory indexes like the ls command<br />
$ sudo a2dismod cgi             # used to run cgi scripts<br />
$ sudo a2dismod env             # used to set environment variables for CGI &#038; SSI scripts
</div>
<h4> Chrooting apache </h4>
<p>This is an advanced topic that I shall skip. Note that if you do setup chrooting, there&#8217;s a lot of additional considerations which will need to be observed, considerations especially around shared libraries and configuration files which will make the overall process of configuration extremely difficult.</p>
<p><a name="SnortSetup"></a></p>
<h2>Setting up snort and acidbase</h2>
<p><em>Author&#8217;s Note: Careful &#8211; Very likely, there were a few things that I might have missed or incorrectly noted especially in the context of acidbase and following these instructions may not get acidbase running properly. You may have to do some steps outside these notes to get it all working properly. Unfortunately I am unable to rerun the process on a fresh server so am unable to immediately note the possible lacunae in the notes</em></p>
<p>Now that you have a mysql server going, create a new database for snort. In the following section I use <em>snortdb</em> as the database, <em>snort</em> as the user and <em>snortpwd</em> as the password for the database. However I do encourage you to replace the same with some non easily guessable names and passwords.</p>
<p>Here&#8217;s the commands to create a new snort database and user. In the following example &#8216;<em>$</em>&#8216; is the unix prompt while &#8216;<em>></em>&#8216; is the mysql prompt.</p>
<div class="console">
$ mysql -u root -p      # You will be prompted for the password for the mysql root account. Enter it<br />
> create database snortdb;<br />
> grant select, insert, update, delete, create, drop, index, alter, create temporary tables, lock tables on snortdb.* to &#8217;snort&#8217;@'localhost&#8217; identified by &#8217;snortpwd&#8217;;<br />
> flush privileges;<br />
> quit;
</div>
<p>Now we shall install snort.</p>
<div class="console">
$ sudo apt-get install snort-mysql
</div>
<p>The installation process will require you to enter the network that you wish to protect. Since in this case we are only protecting a single machine, enter the IP_Address/32 eg. 12.34.56.78/32</p>
<p>The process will prompt you whether you wish to configure the database. Select &#8220;Yes&#8221; .. the script will proceed but terminate abnormally with the error &#8220;subprocess post-installation script returned error exit status 6&#8243;</p>
<p>Now execute the following commands to setup the tables in the database. At the end you shall open the snort configuration file to enter the database configuration parameters</p>
<div class="console">
$ cd /usr/share/doc/snort-mysql<br />
# Enter the database password next when prompted for one<br />
$ sudo zcat create_mysql.gz | mysql -u snort -p snortdb<br />
$ sudo vi /etc/snort/snort.conf
</div>
<p>Uncomment the line that starts with <em>output database: log, mysql</em> and add the configuration information at the end as shown</p>
<div class="console">
output database: log, mysql, user=snort password=snortpwd dbname=snortdb host=localhost
</div>
<p>Now remove the file as shown below to indicate that the database configuration has been done and start snort. The subsequent command confirms that snort daemon is indeed up and running</p>
<div class="console">
$ sudo rm -rf /etc/snort/db-pending-config<br />
$ sudo /etc/init.d/snort start<br />
$ sudo /etc/init.d/snort status
</div>
<p>Now, lets install acid which is a web based application to be able to view snort alerts</p>
<div class="console">
$ sudo apt-get install acidbase
</div>
<p>Select No when it prompts you for configuring the database. By default it uses the database and userid &#8216;<em>snort</em>&#8216; and I prefer to keep these different from a predictable default, in which case acidbase database initialisation will fail.</p>
<p>Edit the file <em>/etc/dbconfig-common/acidbase.conf</em>.</p>
<p>Set the following values</p>
<div class="console">
dbc_dbuser=&#8217;snort&#8217;<br />
dbc_dbpass=&#8217;snortpwd&#8217;<br />
dbc_dbname=&#8217;snortdb&#8217;
</div>
<p>The default configuration allows acid data to be accessed only from the machine where it is involved. Since this shall be a VPS which we shall be accessing remotely, it is time to relax the constraint. If you have a good idea of the network IPs that you will be accessing the acid web application from, update the same in the <em>allow from</em> directive in <em>/etc/acidbase/apache.conf</em>, else relax it fully to <em>allow from all</em>.</p>
<p>Also protect the &#8216;<em>/acidbase</em>&#8216; url by http basic authentication. The resultant section in the file <em>/etc/acidbase/apache.conf</em> looks like :</p>
<div class="console">
<DirectoryMatch /usr/share/acidbase/><br />
  Options +FollowSymLinks<br />
  AuthType Basic<br />
  AuthName &#8220;Go Away World!<br />
  AuthUserFile /etc/acidbase/mypassword<br />
  Require valid-user<br />
  AllowOverride None<br />
  order deny,allow<br />
  deny from all<br />
  allow from all<br />
  <IfModule mod_php4.c><br />
        php_flag magic_quotes_gpc Off<br />
        php_flag track_vars On<br />
        php_value include_path .:/usr/share/php<br />
  </IfModule><br />
</DirectoryMatch>
</div>
<p>You will need to create a user id / password pair for the app or point AuthUserFile above to another file where you already have the ones set up for your server.</p>
<p>To do so you shall need to run the following command :</p>
<div class="console">
$ htpasswd -c /etc/acidbase/mypassword my_user_id
</div>
<p>If you need additional user ids to be installed use the command as shown above again with different user ids &#8211; but make sure not to use the <em>-c</em> switch since thats only used the first time to create the password file.</p>
<p>Now start the web application by restarting apache</p>
<div class="console">
$ sudo /etc/init.d/apache2 restart
</div>
<p>Goto the web page <em>http:</em>vps_fully_qualified_domain_name/acidbase/base_db_setup.php<em>, click on &#8216;</em>Create Base AG//&#8217; and you are on your way.</p>
<p><a name="FileIntegrity"></a></p>
<h2>File integrity checking using AIDE</h2>
<p>Install AIDE</p>
<div class="console">
$ sudo apt-get install aide
</div>
<p>Update the aide configuration file <em>etc/default/aide</em> to update your email id where you would prefer the integrity check reports sent (Look for the variable MAILTO)<br />
Now initialise the aide configuration</p>
<div class="console">
$ sudo aideinit<br />
$ cd /var/lib/aide<br />
$ mv aide.db.new aide.db
</div>
<p>Now run the process (which will be running once daily)</p>
<div class="console">
$ /etc/cron.daily/aide
</div>
<p>This process takes a long time (about 5 mins for me) and will at the end email you a report if any files changed compared to the ones in the default database.</p>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2009/06/opera-unite-a-model-for-server-disintermediation-on-the-internet/' rel='bookmark' title='Permanent Link: Opera Unite : A model for server disintermediation on the internet'>Opera Unite : A model for server disintermediation on the internet</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=ej6qH7i64xA:Lqx7nszeA4I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=ej6qH7i64xA:Lqx7nszeA4I:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=ej6qH7i64xA:Lqx7nszeA4I:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=ej6qH7i64xA:Lqx7nszeA4I:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=ej6qH7i64xA:Lqx7nszeA4I:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=ej6qH7i64xA:Lqx7nszeA4I:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/ej6qH7i64xA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/10/configuring-a-secure-ubuntu-linux-virtual-private-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/10/configuring-a-secure-ubuntu-linux-virtual-private-server/</feedburner:origLink></item>
		<item>
		<title>Service oriented REST architecture is an oxymoron</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/R2iR83i_aDY/</link>
		<comments>http://blog.dhananjaynene.com/2009/10/service-oriented-rest-architecture-is-an-oxymoron/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 21:34:41 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[architecture]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[rest-musings]]></category>
		<category><![CDATA[soa]]></category>
		<category><![CDATA[web services]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=835</guid>
		<description><![CDATA[It is infrequent for me to react with a level of consternation rather than agreement or disagreement that I felt upon reading [SOA] Boris on Service, Web and REST by Jean-Jacques Dubray. Not because I disagreed strongly with the arguments presented. It is that, I disagree substantially with the assumptions on which these arguments are [...]]]></description>
			<content:encoded><![CDATA[<p>It is infrequent for me to react with a level of consternation rather than agreement or disagreement that I felt upon reading <a href="http://www.ebpml.org/blog/200.htm">[SOA] Boris on Service, Web and REST</a> by Jean-Jacques Dubray. Not because I disagreed strongly with the arguments presented. It is that, I disagree substantially with the assumptions on which these arguments are made. And yet, as I recollect my own thoughts a year ago &#8211; a few months post my journey into REST, I realised that there was a time that I did actually believe some of these assumptions. I also realised that it is likely that many others who are dealing with a transition from SOA to REST are also likely to be perhaps sharing similar assumptions. Without much ado let me quickly get to the central assertion of this blog post.</p>
<p><strong><em>Service orientation is neither essential for, nor is it the intention of REST.<br/> Not only is REST not service oriented, service orientation is irrelevant for REST</em></strong></p>
<p><br/>There. But why was it so important to state that ? Allow me to quote from the blog post I referred to.</p>
<blockquote><p>I say not surprisingly because RESTafarians have no clear position on &#8220;service&#8221;, they just say REST is the right way to build a Service Oriented Architecture. Yet, REST has no concept of &#8220;service&#8221; anywhere, just resources and their shiny uniform interface, links and bookmarks. Indeed there are no services in REST. Just read the thesis.</p></blockquote>
<p>and it further goes on to state</p>
<blockquote><p>But I digress, let&#8217;s go back to &#8220;services&#8221;. Even Bill, in this REST-* proposal is talking about creating a RESTful interface to non RESTful services. That certainly begs the question, how can a service be non RESTful since REST is all about SOA and replaces in its entirety WS-*.</p></blockquote>
<p>The essential issue here is the flawed assumption that REST attempts to be service oriented or it is all about SOA. Its not. And why so ? Since it is resource oriented. And whats the difference ? Read on, because that&#8217;s what this post attempts to address.</p>
<p><strong>Service</strong></p>
<p>Wikipedia describes a <a href="http://en.wikipedia.org/wiki/Service_%28systems_architecture%29">service</a> as follows :</p>
<blockquote><p> the term service refers to a set of related software functionality, together with the policies that should control their usage.</p>
<p>OASIS (organization) defines service as &#8220;a mechanism to enable access to one or more capabilities, where the access is provided using a prescribed interface and is exercised consistent with constraints and policies as specified by the service description.&#8221;</p></blockquote>
<p>Now lets attempt to understand a service in a little more dumbed down fashion. Lets hark back to the good old construct of flow charts and process charts. In these charts one basically divided an overall set of functionality into discrete set of functionalities and chained them together through some sequences and decision points. As an example if we were to consider a simplified retail outlet system, it would consist of steps that would support (a) ordering items, (b) receiving and reviewing items, (c) selling items. In a SOA world, these could be mapped into a Ordering Service, Receipt Service and Sales Service (you could of course come up with better names and further decomposition). But each service is essentially one of the decomposed tasks of a larger workflow. If the interface to such service could be standardised and documented it would help it to be reusable across multiple contexts. And to the extent such services are reusable across multiple workflows, the advantage of Service Orientation become obvious. And finally if such a service interfaces are exposed over the web &#8211; it is a web service. At the end of the day, each service is a reusable, composable task (or tasklet) performer.</p>
<p><strong>Resources</strong></p>
<p>But REST does not attempt to be service oriented. Thats because it does not view the process as a sequence of tasks to be performed. It views it as a sequence of resources under modification. To put it differently, it views the process as a set of actors who exchange resources (or documents for better visualisation) and carry out activities based upon receipt of such resources. Though not as equally apt as a process chart, the analogy here would be a data flow diagram. And what might such resources be ? Well in the above scenario, there&#8217;s a Purchase Order, a Goods Receipt and an Invoice. Those are the essential abstractions that REST focuses on. These are Resources. Just like Services where there&#8217;s no one valid set of abstraction of services, one could work out a different set of resources rather than those I listed. But the bottom line is that the essential abstractions are resources *not* services.</p>
<p><strong>How are they different ?</strong></p>
<p>You could build a system either way &#8211; as services or resources. In terms of being able to successfully build, deploy and maintain a piece of software, both REST and SOA are likely to be equally successful at building the software. But the essential vocabulary through which they decompose their various parts (and therefore describe their interface elements) will be different. And how is that different ?</p>
<p>Let us imagine the ordering service we talked about above. One way to build a SOA ordering service is to establish a interaction procedure which combines an overall protocol and a series of steps (Service API). To reduce potential errors, there is a document upfront which describes in adequate detail how such an interaction should be conducted, what are the data elements to be exchanged at each stage, and what are the necessary sequencing requirements between various steps for such interactions to be concluded successfully (WSDL). The focus here is the tasks being done and the protocol for the task instructions. In case of REST the essential construct will be exchange of one Purchase Order. The purchase order would have sufficient in band instructions about the fact that it is a purchase order and the attributes it has (in-band metadata), and formal documentation if any would be restricted to the structure of the purchase order and its data than than to the sequencing, flow or any protocol level activities. (Thats why sometimes REST looks deceptively simple to be treated as just another CRUD). </p>
<p>More often than not when called upon to describe a service, the description will describe what the service does, and the service interface will mirror the steps required to perform the activities. Resources on the other hand will simply describe themselves and anyone who looks at a resource description will be none the wiser about what processing exactly happens behind the scene.</p>
<p>Thats why I believe even if both REST and SOA can be used to build software effectively, the essential focus on resources as the central abstraction makes REST much easier to use for the clients. But thats just my opinion &#8211; you may form your own.</p>
<p><strong>You cheated! REST meets the service orientation definitions you listed above</strong></p>
<p>Yeah, kind of (in theory). There is one way where REST over HTTP is service oriented. Imagine a document service which could store, update, fetch or delete documents. Now replace document with resource in the earlier statement. Thats your typical HTTP service that REST works off of to implement a resource management service &#8211; but thats just a single service which is standardised for REST over HTTP.  And all REST implementations will be service oriented to that extent. However the sheer simplicity and ubiquity of this service makes the associated service orientation of REST rather uninteresting and thus largely ignorable.</p>
<p>So next time one wants to debate the merits for REST and/or SOA &#8211; feel free to add to the tons of stuff thats already written. But don&#8217;t measure REST based on service orientation. Service orientation is largely irrelevant for REST. And that per se does not make one better than other &#8211; it just makes them different.</p>
<p><em>Note:</em> There were many other points in the blog post I referred to that I would want to offer different opinions on. But in this case, I believed it was important to keep this post focused on an essential thought that I really wanted to emphasize.</p>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2009/10/service-oriented-architecture-is-primarily-about-business-and-not-technology.-bollocks/' rel='bookmark' title='Permanent Link: Service Oriented Architecture is primarily about business and not technology. Bollocks!'>Service Oriented Architecture is primarily about business and not technology. Bollocks!</a></li><li><a href='http://blog.dhananjaynene.com/2009/06/design-characteristics-of-rest-resource-oriented-server-frameworks-and-clients/' rel='bookmark' title='Permanent Link: Design Characteristics of REST / Resource Oriented Server Frameworks and Clients'>Design Characteristics of REST / Resource Oriented Server Frameworks and Clients</a></li><li><a href='http://blog.dhananjaynene.com/2009/06/rest-soa-woa-or-roa/' rel='bookmark' title='Permanent Link: ReST : SOA, WOA or ROA ?'>ReST : SOA, WOA or ROA ?</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=R2iR83i_aDY:sF2Rn2Dobc0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=R2iR83i_aDY:sF2Rn2Dobc0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=R2iR83i_aDY:sF2Rn2Dobc0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=R2iR83i_aDY:sF2Rn2Dobc0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=R2iR83i_aDY:sF2Rn2Dobc0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=R2iR83i_aDY:sF2Rn2Dobc0:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/R2iR83i_aDY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/10/service-oriented-rest-architecture-is-an-oxymoron/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/10/service-oriented-rest-architecture-is-an-oxymoron/</feedburner:origLink></item>
		<item>
		<title>The best amount of polyglotism is that you can manage successfully</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/nzPGzuOKpdU/</link>
		<comments>http://blog.dhananjaynene.com/2009/09/the-best-amount-of-polyglotism-is-that-you-can-manage-successfully/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 13:05:20 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[management]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[polyglot]]></category>
		<category><![CDATA[polyglotism]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=829</guid>
		<description><![CDATA[Polyglotism was one topic I got into some discussions on twitter earlier this week. So this is to just pen down some of my thoughts on the same. Polyglotism is increasingly being talked about, ever more so since Java started moving from the realm of being a language into a runtime environment to host a [...]]]></description>
			<content:encoded><![CDATA[<p>Polyglotism was one topic I got into some discussions on twitter earlier this week. So this is to just pen down some of my thoughts on the same. Polyglotism is increasingly being talked about, ever more so since Java started moving from the realm of being a language into a runtime environment to host a number of languages. Yet polyglotism is not new. Most programmers have been mixing their favourite languages with SQL for ages. The advent of the web introduced HTML and javascript as additional languages that web programmers needed to know to be able to successfully write web programs. At the same time other tools started appearing which started to reduce your requirement to know these languages. <a href="http://en.wikipedia.org/wiki/Object-relational_mapping">Object Relationship Mappers</a> could help you get out of writing SQLs (at least so they claimed <img src='http://blog.dhananjaynene.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) in many cases. And one of the features of <a href="http://code.google.com/webtoolkit/overview.html">GWT</a> is to ensure that you work primarily on only one language.</p>
<p>But the goal of this post is to neither encourage nor discourage the use of polyglotism. It is to suggest that at the end of the day even if polyglotism really stimulates the technogeek sensors in us, it needs to be evaluated not in technology terms, but in business and economic terms. A point that is also partially supported by <a href="http://www.codecommit.com/blog/java/the-plague-of-polyglotism">The plague of polyglotism</a>. Unless we use tools like GWT and hibernate to keep us monoglots, (which is likely to be a very small proportion), polyglotism is the default state that we shall operate in. So its not worthwhile to fight that trend per se. The important aspect is to ensure that we understand the costs of supporting each new language in the mix. And the reason to do so is to evaulate whether the benefits of adding the language outweigh the costs in the medium to long term. So here are some of the costs (in no specific order)</p>
<ul>
<li><strong>Syntax and libraries</strong> : This is probably one of the lowest costs even though it is the most apparent. For every language we add to the mix, generally for a long running project, at least three developers (if you have reasonable risk management objectives) need to learn the new language syntax and the libraries they work with. Along with this is the cost of books, training courses and materials etc. (yes for many enterprises, many developers but those purely self motivated will need to be formally provided all of these).</li>
<li><strong>Idioms and Philosophies</strong> : Knowing the language is not adequate. You need to understand its philosophy, its design intent and its typical idioms. Being able to use a language to write code is not the same as being able to use it idiomatically. And while that may not constrain you in over small code bases in the short term, over a period of time for reasons such as performance, consistency and ability to understand other libraries that you may reuse, you will be forced to deal with these aspects of the language as well. The book<a href="http://en.wikipedia.org/wiki/Dreaming_in_code"> Dreaming in Code</a> talks about how Java programmers who started writing python could not write idiomatic python code, and thus a fair degree of code had to be redesigned or rewritten. And that is by no means the only such instance. I suspect similar trends are likely to be found if java programmers move to writing ruby or scala code. And its a trend you might have likely observed when people comfortable with writing relatively simpler languages such as Visual Basic or PL/SQL or even more complex languages like C++ moved to writing Java. Knowing the language is not the same as knowing it idiomatically &#8211; and that takes time. Which means &#8211; do not take on high risk activities when you absorb a new language, it will take a few iterations for your team to absorb the new language &#8211; far far more time than it will take to read a book or attend a training course.</li>
<li><strong>Skills to manage multiple idioms in one head </strong> : Unless you are going to have different programmers for different languages, the programmers working on multiple languages at a time will not only have to deal with the multiple idioms, but will need to concurrently apply them. In my experience, this is not a trait we are born with, and it takes some time and experience with it. It will take some time for them to learn that the best practices are not identical across various languages. It will take even more time to figure out why they are different. So there is a good likelihood, you will not be in a situation to have all your developers work on all the languages simultaneously &#8211; especially some of the Junior ones. </li>
<li><strong>Skill portfolio management will become more difficult</strong> : For typical enterprise or ISV teams, the managers need to ensure adequate skill availability across all teams. As the number of languages in use increase, this management process will become harder. Which means there is an automatic economic disincentive which rises is in magnitude, each time you add yet another language to the mix.</li>
</ul>
<p>So is polyglotism good or bad ? I submit such a value attribute cannot be assigned to polyglotism per se. It needs to be really evaluated in your context, preferably beyond a project window into the medium or a long term. What is indeed obvious is that each new language will bring in some very strong capabilities and aspects where it is superior to the other languages in the mix. Equally obvious is that each new language will bring in associated costs. Just like there is no perfect language, there is no perfect number of languages that make sense in every context. Just like you do your homework in terms of language selection, make sure you do the same for your language portfolio not just in technology but in management and economic terms as well.</p>


<p>No related posts.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=nzPGzuOKpdU:vdzIIzxdPi4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=nzPGzuOKpdU:vdzIIzxdPi4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=nzPGzuOKpdU:vdzIIzxdPi4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=nzPGzuOKpdU:vdzIIzxdPi4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=nzPGzuOKpdU:vdzIIzxdPi4:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=nzPGzuOKpdU:vdzIIzxdPi4:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/nzPGzuOKpdU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/09/the-best-amount-of-polyglotism-is-that-you-can-manage-successfully/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/09/the-best-amount-of-polyglotism-is-that-you-can-manage-successfully/</feedburner:origLink></item>
		<item>
		<title>Mind your language: Pragmatic programmers should not be re-termed duct tape programmers</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/7R4802NuZKs/</link>
		<comments>http://blog.dhananjaynene.com/2009/09/mind-your-language-pragmatic-programmers-should-not-be-re-termed-duct-tape-programmers/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 05:17:43 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[programming]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=825</guid>
		<description><![CDATA[The Duct Tape Programmer by Joel Spolsky makes for an interesting reading. However it suffers from one issue. A big issue. It attempts to take terms with a particular well associated meaning with it, assign it to something else which already has a better available term and in the process creates one big ball of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.joelonsoftware.com/items/2009/09/23.html">The Duct Tape Programmer</a> by Joel Spolsky makes for an interesting reading. However it suffers from one issue. A big issue. It attempts to take terms with a particular well associated meaning with it, assign it to something else which already has a better available term and in the process creates one big ball of confusion.</p>
<p>In my understanding which hasn&#8217;t changed for many years &#8211; a duct tape programmer is a programmer who always takes the shortest route from point A to point B without giving regards to longetivity or maintainability of the solution. When he applies a duct tape &#8211; he is ticking off a job as &#8220;done&#8221;. He has not accounted for how long will the solution last. Is it even the right solution or is it just something that on the face of things seems right. He is only pragmatic enough to make sure he can get home early or be in his bosses good books. Thats where his pragmatism ends. Thats why the term has a negative meaning. Thats why it is not meant to be a compliment.</p>
<p>Now what happens when you associate it in the way Joel just did in his blog post ? Suddenly it no longer seems to be a negative term. It gives rise to confusion. If someone now calls me a duct tape programmer &#8211; I&#8217;ll be tempted to take it as a compliment. On the other hand &#8211; when someone writes a shitty crappy piece of code &#8211; I now have to figure out a new term &#8211; since I can no longer term it duct tape programming. I mean if I do and he responds a link to the post &#8211; what chance would I stand compared to someone as esteemed as Joel. </p>
<p>I understand as bloggers we want to make a point. I also understand that there are ways to make the point in a manner that really really stands out. But at times there are risks and negative consequences when we go down that path. These include confusing the juniors, the post getting misunderstood, misconstrued or even misquoted. These also include possible positive spin on essentially negative characteristics. Lets stick to calling pragmatic programmers as pragmatic programmers and leave duct tape programming to the realm of the essentially short sighted, fragile and often brittle programming that it really stands for.</p>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2009/03/jerk-programmers-cant-be-managed-tactically/' rel='bookmark' title='Permanent Link: Jerk programmers can&#8217;t be managed tactically'>Jerk programmers can&#8217;t be managed tactically</a></li><li><a href='http://blog.dhananjaynene.com/2009/02/so-were-jeff-joel-uncle-bob-discussing-happiness-and-fitness/' rel='bookmark' title='Permanent Link: So were Jeff / Joel / Uncle Bob discussing happiness and fitness ?'>So were Jeff / Joel / Uncle Bob discussing happiness and fitness ?</a></li><li><a href='http://blog.dhananjaynene.com/2008/12/java-the-perpetually-undead-language/' rel='bookmark' title='Permanent Link: Java : the perpetually undead language'>Java : the perpetually undead language</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=7R4802NuZKs:-97C_QDmADo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=7R4802NuZKs:-97C_QDmADo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=7R4802NuZKs:-97C_QDmADo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=7R4802NuZKs:-97C_QDmADo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=7R4802NuZKs:-97C_QDmADo:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=7R4802NuZKs:-97C_QDmADo:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/7R4802NuZKs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/09/mind-your-language-pragmatic-programmers-should-not-be-re-termed-duct-tape-programmers/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/09/mind-your-language-pragmatic-programmers-should-not-be-re-termed-duct-tape-programmers/</feedburner:origLink></item>
		<item>
		<title>Why should I switch to Scala ?</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/hZ-V1Chy6Fc/</link>
		<comments>http://blog.dhananjaynene.com/2009/08/why-should-i-switch-to-scala/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 15:33:44 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[scala]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=815</guid>
		<description><![CDATA[This post is a role-play and does not reflect my individual opinion about scala accurately. I am convinced about the capabilities and features of Scala along with the fact that it deserves the mantle of a long term replacement for Java. However language adoption goes beyond technical capabilities, and this post is a speculation on [...]]]></description>
			<content:encoded><![CDATA[<p><em>This post is a role-play and does not reflect my individual opinion about scala accurately. I am convinced about the capabilities and features of Scala along with the fact that it deserves the mantle of a long term replacement for Java. However language adoption goes beyond technical capabilities, and this post is a speculation on what a typical manager might be dealing with when attempting to decide whether to switch to Scala.</em></p>
<hr/>
<p>So I have been reading a lot about Scala lately and even opinions about how it will be a <a href="http://macstrac.blogspot.com/2009/04/scala-as-long-term-replacement-for.html">long term replacement for Java</a>. I&#8217;ve also read some interesting writeups about Scala adoption such as <a href="http://antoniocangiano.com/2009/08/07/on-scalas-future/">On Scala&#8217;s Future</a> and <a href="http://fupeg.blogspot.com/2009/08/tipping-point-for-scala.html">A Tipping Point for Scala</a>. While I used to code a lot, my responsibilities today require me to interact with and address a lot of issues including those faced by our customers, our development teams and also engage with my peers and superiors on many other difficulties bedeviling our organisation. This gives me little time to try out Scala. I know I should be doing that, but sincerely I do not have the time. So I rely on the feedback of my team, the trade journals and other influential architects within and outside my organisation.</p>
<p>I have heard about many developers switching from Java to Python / Ruby. However I have heard of relatively only a smaller number of large Java shops which have done the shift &#8211; most of the switch stories I&#8217;ve heard reflect a smaller sized teams. I can feel the excitement Scala has generated amongst the development teams &#8211; the brevity, the functional programming model introduction, the exciting stuff being done concurrently et al. I have no doubt that, given so much excitement it must really be a good language. </p>
<p>To introduce my organisation &#8211; it is one of those shops which service many projects concurrently. Given the tremendous business and growth, I must confess we do not always have the luxury of being able to hire the most top notch talent. We do have a lot of projects we use Java for, and thats a language our customers are comfortable with. I&#8217;ve had some of the senior people check out Scala to gain some feedback into the language. But at this stage I must say I am inclined to evaluate the shift but not convinced enough to do so. I am sure that I could if convinced drive the change to Scala incrementally.  However my fear stems from the fact that if things don&#8217;t turn out well, despite all the great advice I&#8217;ve received &#8211; its going to be my rear end on the line. So here&#8217;s some of my concerns regarding evaluating the shift to Scala and there are many of them, so some of you might be able to help me through this thought process.</p>
<ul>
<li><strong>Functional Programming : </strong> I&#8217;m sure in many ways it rocks. But my guys tell me they are not sure how to use it in the typical bread and butter applications which read from database, do some processing and write back to the database. Does Functional Programming help me in this context ? Will my team scale into being able to write functions with no side effects assuming thats a desirable goal ? What if they tie themselves up in knots and my release to the customer is risked ? I can&#8217;t afford that. Is functional programming even desirable in such contexts ? So I am not sure if in these contexts I should just ditch functional programming and work with just normal imperative programming capabilities of Scala. I am so confused, and afraid.</li>
<li><strong>Different Syntax :</strong> While Scala runs on the JRE, its syntax is very different from Java. From what I could gather, it is much easier for a Java programmer to read (make sense of) simple Python code than to read Scala code. Is it true ? So even if I do get compatibility in terms of the runtime environment, would I be picking up a language that is syntactically so different a language that it would involve a substantial relearning curve ? I remember when we had to learn Java and Javascript. For better or for worse these were indeed relatively minor modifications of the C/C++ syntax, compared to what I sense as the syntactic shift between Java and Scala. Am I wrong ? If so, could you help point me to resources which help me understand that Scala code is not much different than Java ?</li>
<li><strong>Sample code :</strong> Guys, I need your help. I need to see some good sample code. Some code which reflects how a typical application is architected, designed and programmed in Scala. And I don&#8217;t need it for a complex multi threaded actor based processing &#8211; I just need to see simple J2EE server based departmental applications maybe a simple recruitment tracking or library maintenance application. If I find a good one, I&#8217;ll just take it and give it to my team and say &#8211; there, thats how we&#8217;re largely going to build it, and even if we make a few changes along the way we at least have a reasonable template that we can build from.</li>
<li><strong>Dumbed down environment :</strong> I remember my great adventures with C and vi and make. But my team today is very different. They want great IDEs. They must have syntax highlighting, autocompletion and nice refactoring capabilities. If I ask them to move, some of them might be excited about the change and be willing to overcome these short term hurdles. But there are some of them who will not be keen to do so and may be disinclined to support such a shift. And at the end of the day my ability to conduct this shift is a function of my ability to carry a large proportion of them along with me. Even when I considered a shift from svn to git, the IDE support was a big issue even though quite obviously git capabilities were really exciting. I couldn&#8217;t push along that change, and in this case we are talking of changing the language.</li>
<li><strong>Is this a good time to shift to Scala ? </strong> I remember the early adopters of Java from 1996 thru 2001. While they gained a lot of experience, JRE and J2EE really matured only post JRE 1.3. Scala seems to be coming out with so many enhancements so fast, I am not sure if it has stabilised. I am told there is a 2.8 coming out in a few months. So if I train my team and Scala continues to change rapidly will I have to keep on retraining my team regularly ? And what about the customers I take to production. Will the frequent upgrades mean I end up supporting multiple customers on multiple versions of Scala ? Maybe Scala is stable but it would be helpful for someone important enough to make a clear statement that there are no new major shifts anticipated anytime soon and that these version shifts are likely to be no faster than the JRE version upgrades (which were fast enough).</li>
<li><strong>Support from peers and superiors :</strong> I remember the day I decided to shift to Java. What made the move easy for me was the sheer fact that Java was a big paradigm leap away from the then dominant C++. Not only was it cross platform with binary compatibility thrown in for good measure, Sun ensured that it made all the right noises to appeal to the enterprise architects and all the business managers. I see the senior developers in my team clamouring for the shift to Scala, but my peer managers and my superiors don&#8217;t display even the fraction of the enthusiasm they displayed during the Java shift. The implication for me is that the risk cover I get when I order the shift is far lesser than what I had when I made the move to Java. Which means if things don&#8217;t quite work out well, I&#8217;m really going to be screwed.</li>
<li><strong>Business friendliness : </strong> I understand all the nice talk about the technical excellence of Scala. But I really need to translate all these great language features into a projected ROI that I can use to convince others about. So I would like to see actual case studies of applications that were moved to Scala and what impact it had on the time and cost so that I can use it to compute my ROI. And what scares me is that learning curve may risk the initial applications long enough to push my breakeven point of shifting to Scala well beyond a 12 month and perhaps even a 24 month period. I fear things might not be as difficult but in absence of known studies, I am likely to lean towards projecting a worst case scenario rather than an optimistic one.</li>
</ul>
<p>So folks, I am asking for your help. And while a lot of you may think that people like us who balk at the thought of limited IDE support are wimps, please remember that 80% of us don&#8217;t fit into the top 20%. And if you would like Scala to be popular, you need us as much as we need you. And if you are not too sure, please remember Lisp and Smalltalk are great languages as well.</p>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2009/04/a-brush-with-functional-programming-and-scala/' rel='bookmark' title='Permanent Link: A brush with Functional Programming and Scala'>A brush with Functional Programming and Scala</a></li><li><a href='http://blog.dhananjaynene.com/2008/12/java-the-perpetually-undead-language/' rel='bookmark' title='Permanent Link: Java : the perpetually undead language'>Java : the perpetually undead language</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=hZ-V1Chy6Fc:PN-ZZ3hwnuE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=hZ-V1Chy6Fc:PN-ZZ3hwnuE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=hZ-V1Chy6Fc:PN-ZZ3hwnuE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=hZ-V1Chy6Fc:PN-ZZ3hwnuE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=hZ-V1Chy6Fc:PN-ZZ3hwnuE:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=hZ-V1Chy6Fc:PN-ZZ3hwnuE:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/hZ-V1Chy6Fc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/08/why-should-i-switch-to-scala/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/08/why-should-i-switch-to-scala/</feedburner:origLink></item>
		<item>
		<title>CRUD is not only good for, but is the only consistent way to build REST over HTTP</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/ptAd_mpudwM/</link>
		<comments>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 08:35:45 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[rest]]></category>
		<category><![CDATA[crud]]></category>
		<category><![CDATA[interface]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=787</guid>
		<description><![CDATA[This is to comment on a perception forming that REST encourages exposing basic data elements through CRUD and that it encourages development of dumb applications (applications with shallow business logic).
Apart from some tweets I saw on the topic and some twitter conversations, the blog posts which perhaps set off the thought were

CRUD is bad for [...]]]></description>
			<content:encoded><![CDATA[<p>This is to comment on a perception forming that REST encourages exposing basic data elements through CRUD and that it encourages development of dumb applications (applications with shallow business logic).</p>
<p>Apart from some tweets I saw on the topic and some twitter conversations, the blog posts which perhaps set off the thought were</p>
<ul>
<li><a href="http://dobbscodetalk.com/index.php?option=com_myblog&amp;show=CRUD-is-bad-for-REST.html&amp;Itemid=29">CRUD is bad for REST</a> by Arnon Rotem-Gal-Oz</li>
<li>A summarisation of the same on InfoQ : <a href="http://www.infoq.com/news/2009/07/CRUDREST">Is CRUD bad for REST?</a></li>
<li><a href="http://hinchcliffe.org/archive/2009/08/06/17119.aspx">Can We REST For A Minute? 6 Lessons From The CRUD vs. Hypermedia Debates</a> by Dion Hinchcliffe</li>
</ul>
<p>The underlying fear and rationale for these posts makes a lot of sense &#8211; the fear of creating real dumb passive and shallow applications. I submit, that the problem however is not CRUD &#8211; it is resource identification and scoping, and CRUD is not only good for but is the right way to build intelligent, active and deep applications.</p>
<p><strong>CRUD supports Uniform Interface :</strong> The primary reason why CRUD gets used is because it supports a uniform interface. At the end of the day, a consistent Create/Read/Update/Delete or POST/GET/PUT/DELETE interface makes things easy. It makes things easy for the development team because of the consistency it introduces in their applications. It makes things easy for the clients who have a simple and consistent interface to deal with. At the interface level CRUD breeds consistency, and at the risk of broad generalisation, consistency is good.</p>
<p><strong>So why do we end up creating shallow applications at times with REST ? </strong> CRUD in general works with simple forms built on simple tables. Quite often this style of programming gets elevated into simple forms over simple domain objects. Standardised CRUD helps a lot at the lower end of application development and most database driven application developers are likely to have at some stage in their early development life attempted to build a small CRUD library or framework to help themselves substantially. The reason why we are likely to be ending up creating shallow applications is not because we apply CRUD, but because we continue to apply CRUD on tables or simple domain objects. And therein lie the distinctions</p>
<ul>
<li><em>REST is not about CRUD on tables &#8211; its about CRUD on resources</em></li>
<li><em>CRUD is the interface &#8211; not the implementation</em></li>
</ul>
<p>I attempt to bring up the difference in the example that I detail below.</p>
<p><strong>Simple Account Transfer Example</strong></p>
<p>Lets say we want to build the software to transfer amount X from account A into account B. Lets further specify that a transfer is not effected immediately and requires one more explicit approval. Lets also specify that while a transfer is waiting to be approved, it could be amended. Thats the simple scenario that we shall deal with.</p>
<p>In order to implement this, we shall define a datastructure / table / object for Account which shall contain a field called balance. Further there shall also be Transfer table / object which shall contain the fields sourceAccount, destinationAccount, amount and status. The possible status values shall be Initiated and Completed.</p>
<p>In a simple service oriented application we shall perhaps have a transfer service. Ignoring error handling, SOA wrapping etc., the service interface will probably boil down to the following equivalent Java interface.</p>
<pre name="code" class="java">
public interface TransferService
{
    public Long transfer (Long sourceAccountId,
                                Long destinationAccountId,
                                BigDecimal amount);
    public Transfer get(Long transferId);
    public void amend(Long transferId,
                             Long sourceAccountId,
                             Long destinationAccountId,
                             BigDecimal amount);
    public approve(Long transferId)
}
</pre>
<p>Lets think of these might get modeled in a REST environment. The important thing to remember is &#8211; don&#8217;t think about services or functions or methods &#8211; think about what are the resources you choose to expose using a simple CRUD interface.</p>
<p><span class="console"><br />
<font color="grey"># The following creates a new transfer. The returned data shall include<br />
# the URI of the new transfer, and the URI to approve it</font><br />
<font color="green">POST </font><font color="blue">/transfer </font><br />
<font color="grey"># The following retrieves the status of a current transfer. If it has not<br />
# been approved the returned data shall include the URI to approve it.</font><br />
<font color="green">GET </font><font color="blue">/transfer/${id}</font><br />
<font color="grey"># The following modifies the transfer. The returned data shall also<br />
# include the URI to approve it</font><br />
<font color="green">PUT </font><font color="blue">/transfer/${id}</font><br />
<font color="grey"># The following approves and further processes the transfer. It shall<br />
# return the URI for the transfer</font><br />
<font color="green">POST </font><font color="blue">/transfer/${id}/approve</font><br />
</span></p>
<p>While most of this seems all right &#8211; what sticks out like a sore thumb to me is the approve URI. Its just so SOAish / RPCish. Plus at least the way this particular interface has been implemented, there is no way to access  the approval specific information, without actually accessing the transfer. Hence I suggest that we define a new resource TransferApproval to account for the same.</p>
<p><span class="console"><br />
<font color="grey"># The following creates a new approval. If successfully executed<br />
# the transfer is complete and no future amendments or approvals<br />
# are allowed. the returned data shall include the TransferApproval<br />
# URI and the transfer URI</font><br />
<font color="green">POST </font><font color="blue">/transfer/${id}/approval</font><br />
<font color="grey"># The following gets an existing approval</font><br />
<font color="green">GET </font><font color="blue">/transfer/${id}/approval/${approvalId}</font><br />
</span></p>
<p>Please note that the &#8220;${approvalId}&#8221; at the approval URI simply wasn&#8217;t required &#8211; since there exists a 1-1 relationship with the transfer. I just included it for easier understanding. If I had to implement the functionality as is I would choose to skip it however if I knew I would very soon need to build in multi-stage approval (as in most banking systems), I would keep it so that each approval against a transfer can also be listed.</p>
<p>But the really interesting method above is the POST. This is a seemingly simple new (in RDBMS parlance) insert into TransferApproval table. But if you are building a REST service, you might be tempted to encourage your clients to not only create the new TransferApproval resource, but also go back and update the Transfer table to update a status to Approved. That would be a smell. Once the POST on the approval is processed, all side effects on other tables should be handled while servicing the POST request. In other words the POST request is not just an insert &#8211; its an insert with an associated trigger to conduct all the necessary downstream processing. And its essential one looks at request servicing in this manner so that CRUD can be used effectively. Servers should be designed this way, and clients should anticipate it and we should be on our way to build non-shallow applications.</p>
<p>So finally &#8211; <em>CRUD is good. It makes things easy for the clients. Stick to CRUD.</em> Just remember that it is CRUD on resources and not on tables, and the resources shall handle all the downstream changes necessary so that you don&#8217;t have to. And finally <em>CRUD is the interface, not the implementation</em>.</p>
<p>Note: Some might notice that this post is just a much more detailed elucidation of one of my earlier posts &#8211; <a href="http://blog.dhananjaynene.com/2009/06/rest-is-the-dbms-of-the-internet/">REST is the DBMS of the internet</a>.</p>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2009/06/rest-is-the-dbms-of-the-internet/' rel='bookmark' title='Permanent Link: REST is the DBMS of the Internet'>REST is the DBMS of the Internet</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=ptAd_mpudwM:CVR6Lj-f_dA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=ptAd_mpudwM:CVR6Lj-f_dA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=ptAd_mpudwM:CVR6Lj-f_dA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=ptAd_mpudwM:CVR6Lj-f_dA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=ptAd_mpudwM:CVR6Lj-f_dA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=ptAd_mpudwM:CVR6Lj-f_dA:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/ptAd_mpudwM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/</feedburner:origLink></item>
		<item>
		<title>The Microsoft Word injunction has nothing to do with XML</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/B_02zu-Z0ew/</link>
		<comments>http://blog.dhananjaynene.com/2009/08/the-microsoft-word-injunction-has-nothing-to-do-with-xml/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 21:36:23 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[patents]]></category>
		<category><![CDATA[word]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=778</guid>
		<description><![CDATA[Obviously the development community is buzzing loudly about a injunction issued by a court against Microsoft disallowing it apparently from marketing Word. However what foxes me is that most articles give the impression that it is an issue with XML documents. As an example :

CNet.com : Judge orders Microsoft to stop selling Word
Crunchgear : Texas [...]]]></description>
			<content:encoded><![CDATA[<p>Obviously the development community is buzzing loudly about a injunction issued by a court against Microsoft disallowing it apparently from marketing Word. However what foxes me is that most articles give the impression that it is an issue with XML documents. As an example :</p>
<ul>
<li><a href="http://news.cnet.com/8301-10805_3-10308013-75.html">CNet.com : Judge orders Microsoft to stop selling Word</a></li>
<li><a href="http://www.crunchgear.com/2009/08/12/texas-judge-rules-microsoft-cant-sell-word-anymore/">Crunchgear : Texas Judge rules Microsoft can’t sell Word anymore</a></li>
<li><a href="http://techdirt.com/articles/20090811/2330285852.shtml">Techdirt.com : Judge Bars Sale Of Microsoft Word For Patent Infringement (Though It Won&#8217;t Stick)</a></li>
</ul>
<p>I also came across many other tweets bemoaning the verdict and expressing the opinion that it is a sad turn of events &#8211; it being related to storage of documents as XML. I did take a quick look at the said patent :<a href="http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&#038;Sect2=HITOFF&#038;p=1&#038;u=%2Fnetahtml%2FPTO%2Fsearch-bool.html&#038;r=12&#038;f=G&#038;l=50&#038;co1=AND&#038;d=PTXT&#038;s1=5,787,449&#038;OS=5,787,449&#038;RS=5,787,449"> Patent 5787449</a>.</p>
<p>And therein I thought there&#8217;s seems to be a big misunderstanding (at least to my lay reading). The patent itself has nothing to do with storing data or documents or XML. Its got to do with a particular implementation of data storage which requires maintaining a <del datetime="2009-08-12T23:19:10+00:00">metadata</del><ins datetime="2009-08-12T23:19:10+00:00">metacode</ins> map. I shall use an example from the patent itself.</p>
<p>Lets say the XML is as follows :</p>
<blockquote><p>&lt;Chapter&gt;&lt;Title&gt;The Secret Life of Data&lt;/Title&gt;&lt;Para&gt;Data is hostile. &lt;/Para&gt;The End&lt;/Chapter&gt;</p></blockquote>
<p>The patent  suggests a storage which would maintain a metacode map as follows :</p>
<table>
<tr>
<th>Element Number</th>
<th>Element</th>
<th>Character Position</th>
</tr>
<tr>
<td>1</td>
<td>&lt;Chapter&gt;</td>
<td>0</td>
</tr>
<tr>
<td>2</td>
<td>&lt;Title&gt;</td>
<td>0</td>
</tr>
<tr>
<td>3</td>
<td>&lt;/Title&gt;</td>
<td>23</td>
</tr>
<tr>
<td>4</td>
<td>&lt;Para&gt;</td>
<td>23</td>
</tr>
<tr>
<td>5</td>
<td>&lt;/Para&gt;</td>
<td>39</td>
</tr>
<tr>
<td>6</td>
<td>&lt;/Chapter&gt;</td>
<td>46</td>
</tr>
</table>
<p>The metacode map essentially stores a tag along with its position. You can also see the same clearly on page 15 of the <a href="http://www.google.com/patents?id=y8UkAAAAEBAJ&#038;printsec=abstract&#038;zoom=4&#038;source=gbs_overview_r&#038;cad=0#v=onepage&#038;q=&#038;f=false">patent document on google patents</a>.</p>
<p>My reading suggests that the patent and alleged infringement if any has got nothing to do with storage of XML documents per se. In fact, that the tags being used are XML/SGML like is probably completely coincidental &#8211; these could very well be ${chapter} instead of &lt;chapter&gt;. And XML documents are stored with the tags embedded along with the content &#8211; this patent actually refers to maintaining a map of these tags and the positions they should be inserted into.</p>
<p>Could I be wrong in my interpretations ? Perhaps, since I haven&#8217;t seen anyone else point this out and would prefer to be corrected. But the fact remains that at this point in time as I write this post, I believe that XML and storage of XML documents are completely orthogonal to the patent and the case around it &#8211; that centers around a metacode map, and metacode maps are not a characteristic of typical XML storage at all. So there&#8217;s probably one big misunderstanding about what this case is about and if the injunction upsets you because you are against patents in principle, thats fair. But if you are disappointed about the possibility that this somehow substantially impacts XML storage, the way I interpret it &#8211; there&#8217;s no such implication.</p>
<p>I shall keep my fingers crossed and hope no one points out a seemingly obvious flaw in my interpretation.</p>


<p>No related posts.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=B_02zu-Z0ew:gqCy5pUBMxw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=B_02zu-Z0ew:gqCy5pUBMxw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=B_02zu-Z0ew:gqCy5pUBMxw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=B_02zu-Z0ew:gqCy5pUBMxw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=B_02zu-Z0ew:gqCy5pUBMxw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=B_02zu-Z0ew:gqCy5pUBMxw:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/B_02zu-Z0ew" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/08/the-microsoft-word-injunction-has-nothing-to-do-with-xml/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/08/the-microsoft-word-injunction-has-nothing-to-do-with-xml/</feedburner:origLink></item>
		<item>
		<title>Presentation : ReST explained</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/xrR-WUMcpI4/</link>
		<comments>http://blog.dhananjaynene.com/2009/07/presentation-rest-explained/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 09:05:13 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[rest]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=771</guid>
		<description><![CDATA[My presentation as a part of TechWeekend, Pune last Saturday. Note that it is a very long presentation. It was designed for a 3 hour slot and attempted to introduce ReST to users who had relatively little exposure to ReST.
ReST (Representational State Transfer) Explained
View more presentations from Dhananjay Nene.



No related posts.]]></description>
			<content:encoded><![CDATA[<p>My presentation as a part of TechWeekend, Pune last Saturday. Note that it is a very long presentation. It was designed for a 3 hour slot and attempted to introduce ReST to users who had relatively little exposure to ReST.</p>
<div style="width:600px;text-align:left" id="__ss_1690251"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/dnene/rest-representational-state-transfer-explained" title="ReST (Representational State Transfer) Explained">ReST (Representational State Transfer) Explained</a><object style="margin:0px" width="600" height="501"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=rest-090707035705-phpapp01&#038;rel=0&#038;stripped_title=rest-representational-state-transfer-explained" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=rest-090707035705-phpapp01&#038;rel=0&#038;stripped_title=rest-representational-state-transfer-explained" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="600" height="501"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/dnene">Dhananjay Nene</a>.</div>
</div>


<p>No related posts.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=xrR-WUMcpI4:crQ5kb2BA8w:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=xrR-WUMcpI4:crQ5kb2BA8w:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=xrR-WUMcpI4:crQ5kb2BA8w:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=xrR-WUMcpI4:crQ5kb2BA8w:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=xrR-WUMcpI4:crQ5kb2BA8w:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=xrR-WUMcpI4:crQ5kb2BA8w:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/xrR-WUMcpI4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/07/presentation-rest-explained/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/07/presentation-rest-explained/</feedburner:origLink></item>
		<item>
		<title>Most american graduates are unemployable because …</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/46VuJ4PGKUw/</link>
		<comments>http://blog.dhananjaynene.com/2009/06/most-american-graduates-are-unemployable-because-.../#comments</comments>
		<pubDate>Tue, 23 Jun 2009 15:25:09 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[management]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[business processes]]></category>
		<category><![CDATA[innovation]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=748</guid>
		<description><![CDATA[Came across this post Top Indian CEO: Most American Grads Are ‘Unemployable’ leading to some substantial discussion (not all of it impassionate). I would first like to clarify that I am assuming the content in the post to be accurate based on the fact that other Indian sites are reporting that &#8220;No response or clarification [...]]]></description>
			<content:encoded><![CDATA[<p>Came across this post <a href="http://www.informationweek.com/blog/main/archives/2009/06/top_indian_ceo.html">Top Indian CEO: Most American Grads Are ‘Unemployable’</a> leading to some <a href="http://www.reddit.com/r/programming/comments/8uiuq/top_indian_ceo_most_american_grads_are/">substantial discussion</a> (not all of it impassionate). I would first like to clarify that I am assuming the content in the post to be accurate based on the fact that other Indian sites are reporting that &#8220;No response or clarification from Nayar has as yet been issued&#8221;. Moreover it is not targeted against Mr. Nayar or HCL but to the suggested thought process which attempts to make process orientation so critically important overriding many other qualities.</p>
<p>What perhaps hasn&#8217;t been clearly stated but is important is that that the standards for employability here are set by the employing organisation based on its context and preferences which may be different from standards required by many other organisations and I would submit that the statement ought to be looked at in that context as well.</p>
<p>To quote from the article :</p>
<blockquote><p>The official wanted to know why HCL, a $2.5 billion (revenue) company with more than 3,000 people across 21 offices in 15 states, wasn&#8217;t hiring more people in his state. Vineet&#8217;s short answer: because most American college grads are &#8220;unemployable.&#8221; (In fairness to HCL, the company recently announced plans to open a delivery center in another state, North Carolina, and invest $3.2 million and hire more than 500 employees there over the next five years under a Job Development Investment Grant.)</p>
<p>Many American grads looking to enter the tech field are preoccupied with getting rich, Vineet said. They&#8217;re far less inclined than students from developing countries like India, China, Brazil, South Africa, and Ireland to spend their time learning the &#8220;boring&#8221; details of tech process, methodology, and tools&#8211;ITIL, Six Sigma, and the like.</p>
<p>As a result, Vineet said, most Americans are just too expensive to train&#8211;despite the Indian IT industry&#8217;s reputation for having the most exhaustive boot camps in the world. To some extent, he said, students from other highly developed countries fall into the same rut.</p></blockquote>
<p>So why are some graduates are unemployable ?</p>
<p>Some of these are folks who are working on creating tons of new languages (Java, C#, Scala, Closure, Erlang, Python etc.), Operating Systems (Linux, Mac and Windows), frameworks for web applications, clustering, fault tolerance and scalability, schemaless and distributed databases to ensure availability and fault tolerance at a wide scale, competing messaging architectures that each service a particular problem differently etc. etc. Would you believe it some have set up clusters of  hundreds of thousands of machines and service search requests very rapidly. And some others are working on creating innovative and disruptive models in social networking, application integration, peer to peer networking etc. Many are working out next generation mobile technologies including building (not building on) android, iphone OS and the palm (whatever OS it has). And so many in their spare time are spending a whole bunch of time creating open source software, blogging and micro blogging about all the work they have done and sharing it with the wide world so that they can learn off it. And if these are consumer and technology stories, there are a whole bunch of people building critical business infrastructure architectures and frameworks and solutions as well. Even after you complete reading this post and come back to it a month from now, I shall still be busy trying to figure out what exactly India has been able to deliver that can challenge this. Of course let&#8217;s not miss out on the fact that most of these activities are conducted by fairly small sized teams. (I am aware some of the examples I quote could have non-american heritage, but that per se is not likely to detract from the issue)</p>
<p>Let&#8217;s call a spade a spade. When you have large or very large software construction and maintenance contracts, there are multiple ways to deal with it. In my experience, many Indian companiess have honed to a fine art the process of recruiting, deploying and juggling large armies of programmers to service such expectations (not all Indian companies are based on the same model). Many companies have indeed managed to acquire, retain and expand customer engagements through a combination of technology and business innovation. And they have done a good job of it in the context they&#8217;ve defined for themselves. In my limited understanding and experience it is not technology innovation, creativity or extraordinary technical prowess that is at the top of the list of skills that get deployed (though these are indeed found in sufficient levels across the board and some of the prowess can be impressive) &#8211; it&#8217;s the clockwork project management and business methodologies, techniques and innovation (and even these do result in projects with delays) with their reliance on &#8220;another brick in the wall&#8221; that gets the customer serviced.</p>
<p>So, if true, the &#8220;employable&#8221; was perhaps in that context.  If so based on the earlier two paragraphs, I submit it reflects positively and negatively on the employing organisation. Perhaps even more so than the graduates themselves. I do wonder if &#8220;incompatible&#8221; would have been a better choice of word. And I wonder what it reflected more poorly upon, as well who should be feeling more sad about it.</p>
<p><em>Disclaimer :</em> These views are mine, mine alone and should not be puported to be shared by any other people or companies I&#8217;ve been associated with in the past, present or the future.</p>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2009/10/service-oriented-architecture-is-primarily-about-business-and-not-technology.-bollocks/' rel='bookmark' title='Permanent Link: Service Oriented Architecture is primarily about business and not technology. Bollocks!'>Service Oriented Architecture is primarily about business and not technology. Bollocks!</a></li><li><a href='http://blog.dhananjaynene.com/2009/04/is-a-large-corporate-making-money-off-open-source-or-open-standards-an-oxymoron-in-a-sun-java-context/' rel='bookmark' title='Permanent Link: Is a large corporate making money off open source or open standards an oxymoron ? In a Sun / Java Context'>Is a large corporate making money off open source or open standards an oxymoron ? In a Sun / Java Context</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=46VuJ4PGKUw:ze_gx3blV-o:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=46VuJ4PGKUw:ze_gx3blV-o:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=46VuJ4PGKUw:ze_gx3blV-o:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=46VuJ4PGKUw:ze_gx3blV-o:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=46VuJ4PGKUw:ze_gx3blV-o:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=46VuJ4PGKUw:ze_gx3blV-o:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/46VuJ4PGKUw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/06/most-american-graduates-are-unemployable-because-.../feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/06/most-american-graduates-are-unemployable-because-.../</feedburner:origLink></item>
		<item>
		<title>Opera Unite : A model for server disintermediation on the internet</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/jdjwIJfbTgw/</link>
		<comments>http://blog.dhananjaynene.com/2009/06/opera-unite-a-model-for-server-disintermediation-on-the-internet/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 09:22:14 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[Internet and Social Media]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[software]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=737</guid>
		<description><![CDATA[Since Opera Unite got introduced a couple of hours ago. I had a chance to do a quick review of the functionality. As I begin to play with it, couldn&#8217;t but help write a short post on what it seems to be doing.
Here&#8217;s what my preliminary look into Opera Unite suggested :

It has a web [...]]]></description>
			<content:encoded><![CDATA[<p>Since <a href="http://unite.opera.com/">Opera Unite</a> got introduced a couple of hours ago. I had a chance to do a quick review of the functionality. As I begin to play with it, couldn&#8217;t but help write a short post on what it seems to be doing.</p>
<p>Here&#8217;s what my preliminary look into Opera Unite suggested :</p>
<ul>
<li>It has a web server bundled into the browser.</li>
<li> It allows you to write (what would be in current parlance be called) serverside apps using javascript which are hosted by the web server.</li>
<li> Sample applications include photosharing apps to share photos on your desktop or fridge which allows internet users to post notes to you.</li>
<li> It allows these apps to be accessed across a router on a dynamic IP using a subdomain on a centralised operaunite service ..operaunite.com (not sure yet whether across a firewall as well but seems so)</li>
<li> It allows these applications to be shared / published using the config.xml file (similar to google widgets ?). There&#8217;s also a central opera directory for the same, but I don&#8217;t think sharing is restricted to that service alone (apple are you listening ?)</li>
<li> These applications can be further installed by other users of Opera Unite (which is the web server service running inside the Opera browser).</li>
</ul>
<p>So why is this such a big deal ? Without going into any further elaboration let us just imagine user&#8217;s used it for following (for desktop-to-desktop or peer-to-peer) communication :</p>
<ul>
<li>Send mails to each other &#8211; disintermediates email services</li>
<li>Send short burst messages to each other &#8211; potentially disintermediates twitter</li>
<li>Share files with each other &#8211; disintermediates ftp servers and shares characteristics with gnutella, kazaa etc.</li>
<li>Share resume, product profiles etc. &#8211; disintermediates traditional static web hosts</li>
<li>Build networks of other interested users &#8211; disintermediates linkedin, facebook</li>
</ul>
<p>The constraint it introduces is that there is no global list of user ids to search from &#8211; you need to know the URL upfront (like the facebook vanity URL). </p>
<p>The possibilities are many. As are the interesting uses this model could be put to. And the characteristics of improved privacy, data ownership and control (including fine grained access control or selectivity). And there does remain a potential for malicious actors and virus writers to ride on popular apps to exploit vulnerabilities to tend to their nefarious needs.</p>
<p>As I put it differently in another tweet &#8211; this opens up the possibility for a google wave without the google in it.</p>
<p><strong>References :</strong></p>
<ul>
<li><a href="http://labs.opera.com/news/2009/06/16/">Taking the web into our hands one computer at a time</a> : An introductory writeup</li>
<li><a href="http://dev.opera.com/articles/view/an-introduction-to-opera-unite/">An introduction to Opera Unite</a> : A get started guide</li>
<li><a href="http://dev.opera.com/articles/view/opera-unite-developer-primer/">Opera Unite developer&#8217;s primer</a> : A primer for writing server side applications</li>
</ul>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2009/06/design-characteristics-of-rest-resource-oriented-server-frameworks-and-clients/' rel='bookmark' title='Permanent Link: Design Characteristics of REST / Resource Oriented Server Frameworks and Clients'>Design Characteristics of REST / Resource Oriented Server Frameworks and Clients</a></li><li><a href='http://blog.dhananjaynene.com/2009/02/why-i-deleted-my-facebook-data-commentary-on-internet-data-privacy-rules/' rel='bookmark' title='Permanent Link: Why I deleted my Facebook data. Commentary on Internet data privacy rules.'>Why I deleted my Facebook data. Commentary on Internet data privacy rules.</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=jdjwIJfbTgw:cTNHntZj0f0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=jdjwIJfbTgw:cTNHntZj0f0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=jdjwIJfbTgw:cTNHntZj0f0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=jdjwIJfbTgw:cTNHntZj0f0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=jdjwIJfbTgw:cTNHntZj0f0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=jdjwIJfbTgw:cTNHntZj0f0:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/jdjwIJfbTgw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/06/opera-unite-a-model-for-server-disintermediation-on-the-internet/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/06/opera-unite-a-model-for-server-disintermediation-on-the-internet/</feedburner:origLink></item>
		<item>
		<title>Improve your web based software development and maintenance ROI with dynamic programming languages</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/pwOzh8TLDEE/</link>
		<comments>http://blog.dhananjaynene.com/2009/06/improve-your-web-based-software-development-and-maintenance-roi-with-dynamic-programming-languages/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 07:43:53 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[dynamic languages]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=725</guid>
		<description><![CDATA[This is a cross post of my article which appeared in PuneTech in March 2009 here. The article is reproduced verbatim including the editor&#8217;s notes (in italics). I had already posted the slides referred to in the talk that was proposed in this article in the blog postTalk Slides : Programming Language Selection.
After we carried [...]]]></description>
			<content:encoded><![CDATA[<p><em>This is a cross post of my article which appeared in <a href="http://punetech.com">PuneTech</a> in March 2009 <a href="http://punetech.com/improve-your-web-based-software-development-and-maintenance-roi-with-dynamic-programming-languages/">here</a>. The article is reproduced verbatim including the editor&#8217;s notes (in italics). I had already posted the slides referred to in the talk that was proposed in this article in the blog post<a href="http://blog.dhananjaynene.com/2009/03/talk-slides-programming-language-selection/">Talk Slides : Programming Language Selection</a>.</em></p>
<hr /><em>After we carried a few quick articles on <a href="http://punetech.com/why-you-need-to-learn-ruby-and-rails/">why you should learn more about Ruby and Ruby on Rails</a> (<a href="http://punetech.com/why-you-need-to-learn-ruby-and-rails/">take 1</a>, <a href="http://punetech.com/why-ruby-is-cool-take-2/">take 2</a>) last month, we decided that we wanted to give people a much deeper article on why these new languages (Ruby, Python, PHP) and frameworks (Rails, Django) are setting the web world on fire. We invited <a href="http://punetech.com/wiki/Dhananjay_Nene">Dhananjay Nene</a> to write an article with an in depth discussion of the technical reasons how these new languages differ from the older ones and when to choose one over the other. He responded with this article which, as an added bonus, also includes the business reasons for your decisions. At the <a href="http://twitter.com/d7y/statuses/1267599217">request of the community</a>, Dhananjay is also <a href="http://upcoming.yahoo.com/event/2166183">giving a talk on the relative strengths and weaknesses of different programming languages</a> on Saturday, 28th March, 4pm, at SICSR. All those who found this article interesting should definitely attend.<br />
</em></p>
<h3>Introduction</h3>
<p>Programing language selection is often a topic that elicits a lot of excitement, debate and often a bit of acrimony as well. There is no universally superior programming language that one can recommend, so I tend to generally disregard most language opinions which say ‘X language is the best’, without specifying the context under which it is superior. Finally most language debates often deal with the technical issues and not the ROI issues. Hopefully I shall be able to address this topic without being guilty of any of these problems.</p>
<div>
<p><strong>So what languages are we referring to here ?</strong></div>
<div style="margin: 1em; display: block;">
<div>
<dl style="width: 152px;">
<dt><a href="http://en.wikipedia.org/wiki/Image:Ruby-%28programming-language%29-logo-2008.png"><img title="Official Ruby logo" src="http://upload.wikimedia.org/wikipedia/en/d/de/Ruby-%28programming-language%29-logo-2008.png" alt="Official Ruby logo" width="142" height="163" /></a></dt>
<dd style="font-size: 0.8em;">Image via <a href="http://en.wikipedia.org/wiki/Image:Ruby-%28programming-language%29-logo-2008.png">Wikipedia</a></dd>
</dl>
</div>
</div>
<p>The range of languages that fall under <a href="http://en.wikipedia.org/wiki/Dynamic_programming_language#Languages" target="_blank">Dynamic Programming Languages</a> category is rather extensive. My experience is primarily limited to <a href="http://en.wikipedia.org/wiki/Python_%28programming_language%29" target="_blank">Python</a> and to a lesser extent <a href="http://en.wikipedia.org/wiki/PHP" target="_blank">PHP</a>, <a href="http://en.wikipedia.org/wiki/Ruby_%28programming_language%29" target="_blank">Ruby</a>, <a href="http://en.wikipedia.org/wiki/Javascript" target="_blank">Javascript</a>, and <a href="http://en.wikipedia.org/wiki/Groovy_%28programming_language%29" target="_blank">Groovy</a>. For the rest of this article, I shall be primarily referring to Python or Ruby when I use the word dynamic languages, though many of the references may continue to be applicable and relevant for a number of other <a title="Dynamic programming language" rel="wikipedia" href="http://en.wikipedia.org/wiki/Dynamic_programming_language">dynamic programming languages</a>.</p>
<p>As I describe the technical characteristics, I shall also continue to attempt to address the business aspects as well, so you might find this article at a little techno-business level. Assuming I am able to excite their interest, the tech guys would not find sufficient technical details and would be hungry to hunt for more, and while the business guys would get a little teased with the possibilities, they will not quite get the ROI served in the traditionally formatted excel spreadsheets. Being aware of that, I continue down this path with a feeling that this perhaps will be the most appropriate level for me to abstract this article to.</p>
<div>
<h3>Characteristics of Dynamic Programming Languages.</h3>
<p>Let us quickly review some of the characteristics :</p></div>
<div style="margin: 1em; display: block;">
<div>
<dl style="width: 212px;">
<dt><a href="http://en.wikipedia.org/wiki/Image:Python_logo.svg"><img title="CPython" src="http://upload.wikimedia.org/wikipedia/en/thumb/0/06/Python_logo.svg/202px-Python_logo.svg.png" alt="CPython" width="202" height="48" /></a></dt>
<dd style="font-size: 0.8em;">Image via <a href="http://en.wikipedia.org/wiki/Image:Python_logo.svg">Wikipedia</a></dd>
</dl>
</div>
</div>
<p><strong><a href="http://en.wikipedia.org/wiki/Object-oriented" target="_blank">Object Oriented</a> :</strong> Many dynamic languages support full object orientation. There are many who don’t necessarily buy the benefits of Object Orientation, but it is my strong belief, that once a piece of software grows beyond a certain threshold of complexity and / or size, Object Orientation starts delivering very strong dividends. There are a few areas such as highly complex, algorithmic processing which might be better suited for functional programming. However a majority of the medium-to-large sized web applications are better served by OO. The empirical evidence at least bears out the fact that most of the most popular languages today (except C) are Object Oriented. However this still is a very very large class of languages which in them include <a title="C++" rel="wikipedia" href="http://en.wikipedia.org/wiki/C%2B%2B">C++</a>, Java, PHP, Python, Ruby etc. The one area where some dynamic languages separate themselves from the others is in the notion of “everything is an object”, ie. primitives such as numbers, functions are all objects by themselves.</p>
<p><em>Business implications:</em> OO code well designed and implemented allows for a substantial reduction in maintenance costs. When working with a team which is up the curve on OO, it is likely to lead to lower costs and time on inital coding as well. On the other hand, both training costs and skill requirements are higher for fully OO languages. If you are already using partialy OO / hybrid languages such as PHP, C++ or Java, and are convinced about OO, using fully OO languages such as Python or Ruby will help you leverage the OO capabilities even further.</p>
<p><strong><a href="http://en.wikipedia.org/wiki/Duck_typing" target="_blank">Duck Typing</a> :</strong> In very loose terms, duck typed languages do not require you to declare an explicit interface. You send an object a message (ie. invoke a function or access an attribute) and if it can respond to it, it will, and if it can’t it will result in an error. Duck typing is a specific typing system which is a subset of a broader system called Dynamic Typing, which often makes for an interesting debate with its counterpart &#8211; Static typing : <a href="http://en.wikipedia.org/wiki/Dynamic_typing#Static_and_dynamic_type_checking_in_practice" target="_blank">Static and Dynamic Type checking in practice</a>. For people well grounded in static typing alone, this can sometimes seem to be sacrilegious. I am convinced that duck typing makes writing code much much faster for two reasons &#8211; a) You now require to write fewer lines of code and b) You often don’t have to keep on regularly waiting for the compiler to do its work. There is also a substantial capability enhancement that dynamic typing makes to the language type system, which allow the frameworks to build dynamic types on the fly. This in turn offers the framework users many more capabilities than frameworks written in other languages. That is why it is nearly impossible to write frameworks like Rails or Django in Java (You can modify the class loaders and use byte code generation to generate the new types, but the compiler can’t see them so you cant use them). That is also why there is a lot of anticipation of using <a title="JRuby" rel="homepage" href="http://jruby.codehaus.org/">JRuby</a>, <a title="Jython" rel="homepage" href="http://www.jython.org/">Jython</a> and <a title="Grails (framework)" rel="homepage" href="http://grails.org/">Grails</a> on the <a title="Java Virtual Machine" rel="wikipedia" href="http://en.wikipedia.org/wiki/Java_Virtual_Machine">JVM</a> since the languages underlying them (Ruby, Python and Groovy respectively) bring the dynamic typing capabilities to the JVM platform.</p>
<p><em>Business Implications :</em>Writing code is much much faster. Maintenance depending upon the situation can sometimes be more or less difficult in case of dynamic typed languages. Refactoring is usually a lot more difficult in case of <a title="Type system" rel="wikipedia" href="http://en.wikipedia.org/wiki/Type_system">dynamically typed</a> languages since the underlying type system is not able to infer sufficiently about the code to help the refactoring tools, as is possible in case of statically typed languages. It is my opinion that a skilled and trained development team using dynamic languages can generally substantially outperform another equally capable team using static languages. Insufficiently or poorly skilled development teams however can lead to very very different kind of pitfalls in these class of languages. In both cases the code becomes difficult to change or maintain due to a) cryptic code in case of dynamically typed languages and b) extremely large code bases in case of statically typed languages. Both are undesirable situations to be in but if I had to choose between one of the two, I would go for being in the cryptic mess since it is at least manageable by bringing in external skilled help.</p>
<div>
<p><strong>Metaprogramming :</strong> Metaprogramming is in loose terms the ability of programs to write programs. A large proportion of developers may not use this capability too frequently. Specifically in web application development it gets used as a mechanism to transform one set of datastructures which a programmer specifies into code at runtime. As I point out later in this article, it in fact is a very important element in designing common frameworks and libraries which in turn offer substantial capabilities including small code and easier maintenance. A quick note to state that metaprogramming is not code generation. In case of code generation, one uses the generator to generate code which is then compiled. A big limitation with this is the fact that often people modify the generated code leading to really tough maintenance nightmares and the fact that it is a two stage process which is prone to more errors. Metaprogramming results in new code “coming to life” so to speak while your program is running.</div>
<p><em>Business Implications :</em> Read on, they will get covered in the final roundup. They are large and they are positive.</p>
<div>
<p><strong>Function blocks/objects, iterators, closures, continuations, generators: </strong> I will not go into any substantial details of this issue except to say that small pieces of code logic can be handled in a much much more concise way than if these weren’t supported. While many situations may not need closures support, you will be glad to have them on your side when needed.</p>
<p><em>Business Implications : </em> Helps having shorter, cleaner code leading to lesser development and maintenance costs. Another significant positive is that your developers are just likely to be so much happier since they get some truly nice building blocks for concise and elegant expression of their logic. Can’t think of any significant negatives.</p>
<p>There are a full range of other capabilities, but none come to mind immediately as something that have strong business implications as well.</p>
<h3>The role of frameworks</h3>
</div>
<div style="margin: 1em; display: block;">
<div>
<dl style="width: 212px;">
<dt><a href="http://commons.wikipedia.org/wiki/Image:Ruby_on_Rails_logo.jpg"><img title="Ruby on Rails" src="http://upload.wikimedia.org/wikipedia/commons/thumb/9/9c/Ruby_on_Rails_logo.jpg/202px-Ruby_on_Rails_logo.jpg" alt="Ruby on Rails" width="202" height="240" /></a></dt>
<dd style="font-size: 0.8em;">Image via <a href="http://commons.wikipedia.org/wiki/Image:Ruby_on_Rails_logo.jpg">Wikipedia</a></dd>
</dl>
</div>
</div>
<p>When did these languages say Ruby and Python originate ? Most people are likely to be a little surprised if the answer is in the last millenium. Yet Guido von Rossum started working on Python in 1986 and Ruby was released in 1992. Python has been rather well known within the scientific community and perhaps a bit within the systems / OS utility programming communities for quite some time. However both languages grabbed a large mindshare only post 2005. A big reason for their popularity (especially in case of Ruby’s case) came from the popularity the frameworks which used them. <a href="http://rubyonrails.org/" target="_blank">Ruby on Rails</a> for ruby and <a href="http://www.djangoproject.com/" target="_blank">Django</a> (to the best of my knowledge) for python. These frameworks combined the language capabilities with the learnings of good design practices for internet applications (eg MVC, declarative validations, simple ORM etc) into a simple usable package, which developers could take and build web applications quickly. There are examples of people having built simple web apps within a day and medium complexity apps in 1-3 weeks using these frameworks. The languages are the ingredients, the frameworks are the cooks &#8211; a great combination for serving great meals. Now you will find many such frameworks in these languages, including some which have better capabilities for building more sophisticated / complex applications eg. <a href="http://merbivore.com/" target="_blank">Merb</a> and <a href="http://www.pylonshq.com/" target="_blank">Pylons</a>.</p>
<p>I am not too sure of how many people are exactly aware of the role of metaprogramming in the frameworks’ successes. I am willing to believe that but for metaprogramming, these frameworks simply would not have achieved anywhere close to the success they achieved. It is metaprogramming which takes the datastructures as defined by a developer and converts it into runtime code implicitly, saving the developer lots of time and effort. So even if most developers don’t actively write metaprograms, their lives are so much easier. Metaprogramming capabilities are also the reason why it is virtually impossible to write similar frameworks in Java. However if you are on the .NET or JVM environments, things are definitely looking encouraging with the possibilities to use IronPython or IronRuby on .NET or JRuby or Jython or Groovy+Grails on the JVM.</p>
<p><em>Business implications :</em> If you are focused on scientific or desktop or highly algorithmic applications, where python especially is used extensively, you are likely to get benefits from these languages on their own merit alone. For web applications you will see the maximum benefits by using the web MVC frameworks along with the languages. I submit that on the whole you are likely to see very substantial reduction in development, enhancement and maintenance times &#8211; sweet music for any end user, investor or project manager.</p>
<h3>Increased Business Agility</h3>
<p>There is one more reason why I believe these languages are especially helpful. They help by increasing development agility to an extent where it now allows for the business to be more agile. You can get a first prototype version up in weeks, take it around to potential users, and gather feedback on the same. Incorporate elements of this feedback into the next release of working code quickly. The business benefits of such a scenario are tremendous. You might wonder that this is a process issue, so what does it have to do with a language selection. I would submit, that languages which allow changes to be made faster, help support this process in a far superior way. Another equally important facet is the superior risk management. Since you are able to build features with lower investments, you are able to get a series of customer feedbacks into your decision making process much faster. This helps being able to come up with a product that really meets the customer expectations much earlier. This happens by allowing the better features to come in earlier and also by allowing the lesser important or lesser relevant features to be decided to be deferred earlier. That’s precisely the reason why the dynamic languages have found a strong acceptance in the startup world. I believe the increasing agility which is often required in the startup world, is and will continue to be increasingly required of established enterprises. Precisely the reason why I believe these languages will continue to do better in the enterprise space as well. Finally, these languages make it relatively easier to tell your business sponsor &#8211; We will work with you on imprecise requirements rather than spending months on nailing down requirements which anyways are likely to change later. This has both a pro and a con especially for outsourcing situations. It is likely to allow for tremendous customer delight in terms of a vendor that works with him in such a flexible manner, yet it does introduce challenges in terms of how the commercials and management of the project are handled.</p>
<p>The reason I would like to especially point out increased business agility is because programmers don’t often visualise or evangelise it much, but when I wear a manager’s hat, it is perhaps the most compelling benefit of these languages.</p>
<div>
<h3>Concluding</h3>
<p>As I said earlier, there is no single universal language which is the best for all scenarios. There are some scenarios where using dynamic languages will not be helpful</p>
<div><a href="http://radar.oreilly.com/2009/02/state-of-the-computer-book-mar-22.html"><img src="http://farm4.static.flickr.com/3569/3377871146_700f422281_o.jpg" alt="Programming language book sales 4Q2008" /></a></p>
<div>A Treemap view of sales of programming language books by O’Reilly Media in 4Q2008. The size of a box represents the total sales of a book. The color represents the increase or decrease in sales compared to same quarter in 2007. Green = increase, bright green = big increase, red = decrease, bright red = large decrease. See <a href="http://radar.oreilly.com/2009/02/state-of-the-computer-book-mar-22.html">full article at O’Reilly Radar</a> for lots of interesting details.</div>
</div>
<p><strong>When not to use these languages</strong></div>
<ul>
<div>
<li>You are building a simple / small application and don’t have the available skill sets. One exception to this is where you decide to use it in a simple application to allow yourself a non risky mechanism of building these skillsets.</li>
</div>
<div>
<li>Extremely High performance requirements. However please make sure that you really need the high performance capabilities of say a C, C++ or Java. In my experience 80% of developers like to believe that they are building highly performant applications where the maximum speed is a must have. Yet the top 10% of them are facing far far more critical performance requirements than the remainder. Unless you are convinced you are in the top 10%, you should certainly consider dynamic languages as an option. Moreover in case of most high performance requirements, these can sometimes be boiled down to a few inner loops / algorithms. Consider implementing the same in C, / Java or other .NET languages (depending upon the choice of your dynamic language interpreter implementation)</li>
<li>You have an architecture standard in place which does not allow using these languages. If you are convinced your applications are better served by using dynamic languages both from your individual application and an overall enterprise perspective, consider taking the feedback to your standards setting body to see if you can pilot a different approach. Also evaluate if the .NET or JVM versions can help you comply with the architecture guidelines.</li>
<li>You are unable to commit to the retraining requirements. While these languages are easy and powerful to use, leveraging that power can require some amount of retraining. If that does not fit your business plans, since the retraining effort could impact immediate and urgent requirements, that could be a reason to not use these languages. However in such situations do consider investing in building this skill sets before you get to another similar decision point.</li>
</div>
<li>You need a very high levels of multithreadinging as opposed to multi processing support. While this is not a typical situation for web applications, you should be aware that most dynamic languages have some limitations in terms of multi threading support. This actually is not necessarily an issue with the language as with the implementation eg. the C implementation of python has the notorious Global Interpreter Lock which constrains you from being able to use more than a handful of threads per processes efficiently. However the same restriction is not present in Jython (the jvm implementation of python). This is likely to be an issue for a miniscule percentage of the web applications market for the primary reason that multi process / shared nothing architecture styles often work quite well for many web applications and they don’t really need multi threading.</li>
</ul>
<div>
<p><strong>So where’s my return on investment ?</strong></div>
<p>First of all lets talk of the investment part. If you get into it in a paced approach, the investment may not be that great. Start with a team size of anywhere between 2-6 people (depending upon your organisation and project size). Think of 15 days of intensive training followed by a 2-6 months coming up the curve effort (more likely 2 than 6). Make sure your first project is not a critical one under tremendous business pressure. This can be subsequently followed by more people getting retrained as necessary. In the longer term it might actually help reduce your incremental investment, since it might be much easier to ramp up new programmers in Ruby or Python than say Java or C#.</p>
<p>Secondly lets look at the incrementally higher costs. You are likely to need people who are a little bit more capable in terms of understanding and debugging the same logic expressed in fewer lines of code (that sometimes can be a challenge) and then be able to modify and enhance the same. This may increase your testing and fixing costs in the earlier days. Finally while the fewer lines of code can make refactoring easier, you could find that your total refactoring costs are a little higher.</p>
<p>Now the returns part. I am convinced that the increased business agility is the strongest return in business terms. Immediately after that is the substantial reduction in development, enhancement and maintenance times. If neither of these benefits are appealing, when contrasted with some other issues that you might perceive, maybe considering dynamic languages in your context is not such a great idea.</p>
<p>One more factor that I would of course encourage you to evaluate from a business perspective are the implications for you if your competition (assuming it is not already using them) started using these languages. The implications would vary from case to case, but it could also help you decide how important this issue is for you.</p>
<h3><em>About the author &#8211; Dhananjay Nene</em></h3>
<p><em>Dhananjay is a Software Engineer with around 17 years of experience in the field. He is passionate about software engineering, programming, design and architecture. He did his post graduation from Indian Institute of Management, Ahmedabad, and has been involved in Senior Management positions and has managed team sizes in excess of 120 persons. His <a href="http://blog.dhananjaynene.com/">tech blog</a>, and <a href="http://twitter.com/dnene">twitter stream</a> are a must read for anybody interested in programming languages or development methodologies. Those interested in the person behind the tech can check out his <a href="http://dhananjay.nene.in/">general blog</a>, and <a href="http://twitter.com/d7y">personal twitter stream</a>. For more details, check out <a href="http://punetech.com/wiki/Dhananjay_Nene">Dhananjay’s PuneTech wiki profile</a>.</em></p>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2009/03/talk-slides-programming-language-selection/' rel='bookmark' title='Permanent Link: Talk Slides : Programming Language Selection'>Talk Slides : Programming Language Selection</a></li><li><a href='http://blog.dhananjaynene.com/2009/04/a-brush-with-functional-programming-and-scala/' rel='bookmark' title='Permanent Link: A brush with Functional Programming and Scala'>A brush with Functional Programming and Scala</a></li><li><a href='http://blog.dhananjaynene.com/2008/12/java-the-perpetually-undead-language/' rel='bookmark' title='Permanent Link: Java : the perpetually undead language'>Java : the perpetually undead language</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=pwOzh8TLDEE:rqvq9jrYY6w:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=pwOzh8TLDEE:rqvq9jrYY6w:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=pwOzh8TLDEE:rqvq9jrYY6w:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=pwOzh8TLDEE:rqvq9jrYY6w:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=pwOzh8TLDEE:rqvq9jrYY6w:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=pwOzh8TLDEE:rqvq9jrYY6w:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/pwOzh8TLDEE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/06/improve-your-web-based-software-development-and-maintenance-roi-with-dynamic-programming-languages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/06/improve-your-web-based-software-development-and-maintenance-roi-with-dynamic-programming-languages/</feedburner:origLink></item>
		<item>
		<title>Musings on REST</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/7vsdzANqAOo/</link>
		<comments>http://blog.dhananjaynene.com/2009/06/musings-on-rest/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 00:16:41 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[architecture]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[rest-musings]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=710</guid>
		<description><![CDATA[This is a summarisation of a four part series of posts I wrote on REST over the past week. This post lists each of them along with a very high level summary and a small snippet from each hopefully sufficient enough to tickle your thoughts and interests.

Why REST ?This is a rather long post which [...]]]></description>
			<content:encoded><![CDATA[<p>This is a summarisation of a four part series of posts I wrote on REST over the past week. This post lists each of them along with a very high level summary and a small snippet from each hopefully sufficient enough to tickle your thoughts and interests.</p>
<ol>
<li><strong><a href="http://blog.dhananjaynene.com/2009/06/why-rest/">Why REST ?</a></strong>This is a rather long post which provides a narrative of the history of web and service architectures eventually coming together into web services. It refers to many of the strengths that made web architectures so omnipresent, and to the uneasy coming together of the two architectures as web services. It details many REST characteristics, describes how REST provided a style by which the strengths of the web architectures could be retained even as the processing aspects of service architectures could be supported, and finally enumerates some of the benefits of REST.
<p><strong>On the coming together of Web and Service oriented architectures.</strong></p>
<blockquote><p>Clearly as WWW started getting used far more, people were only too keen to use it for much more than storing or retrieving documents. This led to the development of CGI and subsequently other dynamic web application technologies (eg. LAMP, J2EE etc.) which would allow us to use the web to ‘do something’. Since these were clearly offshoots of the SOA world, being mapped onto the WWW infrastructure, the characteristics of such dynamic applications often had a lot in common with SOA, and they started dropping many characteristics of the traditional static WWW. Thus was born the child of the world wide web and distributed service oriented architectures – web services. This led to newer SOA technologies such as WS-* and SOAP.</p>
<p>Like the typical scenarios after the discovery of any highly profitable opportunity, the early rush was to leverage the opportunity and it was only a little later when the dust died down, that people started wondering if they had sacrificed something in the heat and dust of the moment. That stock taking resulted in the realisation, that some of the very basic characteristics of the extraordinarily successful internet technologies (FTP / SMTP / WWW) had been diluted, and even if such dilution still allowed immediate progress to have occurred, some of them would need to be corrected to be able to continue the explosive growth that had been seen so far. One such exercise in my opinion is the laying down of the REST architecture style.</p></blockquote>
<p><strong>On the aspect that even though REST is not as feature rich as SOA, its strength is the simpler abstractions it employs</strong></p>
<blockquote><p>I have generally found that simpler abstractions even though harder to deal with initially, often win in the long run. Notice the fact that the bare bones rendering functionality of HTML/WWW completely trounced the rich UI and application integration capabilities then available (eg. Windows/Java and DCOM/CORBA/RMI). This is not to suggest that the extra capabilities are not required. That is why Rich User Interfaces on WWW continue to be a dominant part of the internet technology wishlist. However the simpler, cleaner and minimalistic abstractions often are far more important than feature richness. A point I would want to make in favour of REST even as I admit that conventional SOA technologies are far more feature rich than REST.</p></blockquote>
</li>
<li><strong><a href="http://blog.dhananjaynene.com/2009/06/rest-is-the-dbms-of-the-internet/">REST is the DBMS of the Internet</a></strong>This post reflects the thought that since REST effective allows one to GET, PUT, POST and DELETE resources, it is similar to being a database which exposes its tables to many applications to SELECT, INSERT, UPDATE and DELETE from. In this analogy, each media type is effectively a new table and the REST interface is primarily of the nature of allowing basic operations on a set of tables (resources).<br />
<blockquote><p>To summarise the exchange differently<br />
<em><br />
“If WS-* is the RPC of the Internet, REST is the DBMS of the internet“</em></p>
<p>To expand on it a bit more :</p>
<p>Traditional SOA based integration visualises different software artifacts being able to interact with each other through procedures or methods. REST effectively allows each software artifact to behave as a set of tables, and these artifacts talk to each other using SELECT, INSERT, UPDATE and DELETE. (or if you wish GET, PUT, POST, DELETE). And where exactly is is the business logic ? Is it in the stored procedures ? Not Quite. Its in the triggers.</p></blockquote>
</li>
<li><strong><a href="http://blog.dhananjaynene.com/2009/06/design-characteristics-of-rest-resource-oriented-server-frameworks-and-clients/">Design Characteristics of REST / Resource Oriented Server Frameworks and Clients</a></strong>This post dwells into the many aspects of design of a REST or Resource Oriented Serverside Framework and attempts to enumerate a large number of their characteristics. One of the aspects it brings up is the role of the Controller. Since the a resource oriented interface primarily consists of basic primitive operations on resources, it suggests that the controller could either be merged with the Resource or support only basic operations and have a one to one relationship with a resource.<br />
<blockquote><p>This is where a potential differences with conventional frameworks arise. If I was to think of it from an EJB like perspective, I would model a OrderController as a Session bean and a Order as an entity bean. In case of lightweight POJO based model, I would have an OrderController as the endpoint exposed by say using Struts and model the Order as a entity POJO and map it to the database using Hibernate. In other non java frameworks, I would have a class to represent an OrderController and another one to represent the order along ActiveRecord pattern. But I would argue this separation is not entirely necessary, since what we want is something that implements a single abstraction mapping onto a Resource which also support the primarily lifecycle methods or resource operations of GET, PUT, POST and DELETE. But there is an issue to be worked through here. These resource operations are actually class level and not object level methods. Thus if we have an abstraction to represent the resource instance, the class level methods cannot be defined in the same class except as class level (static) methods. This is a tricky problem, and I would submit the designer may make one of two choices (a) Implement the resource operations as class level methods on the Resource abstraction (ie. they will get or return the resource references as method parameters and not rely on the ‘this’ or ’self’ qualifier for getting access to the resource variables or (b) Implement the resource operations as methods on a separate one-to-one mapped class on the resource abstraction (eg. an OrderHome in case of an EJB like analogy)</p></blockquote>
<p>Again to extend the analogy of a DBMS, it argues that instead of a lot of logic being in the controllers which are the entry points of the interface (stored procedures), the interface now changes to support basic operations on the resources (tables) and that the logic could perhaps be modeled in a separate class of handler functions (triggers).</p>
<blockquote><p>Before I get into the details of this, I encourage you to take a look at my earlier post REST is the DBMS of the internet in case you have not already done so. To summarise it quickly, I have drawn the analogy that a REST based system is like a DBMS where client applications can perform direct SQL such as SELECT, INSERT, UPDATE, DELETE (GET, PUT, POST, DELETE in case of HTTP/REST) on the Tables (Resources in case of REST), and the business logic is implemented as triggers. Thus the framework will need to allow the developer to define such triggers. Such methods will need to support ability to reject the request (in case of downstream validation failures), and update the resource state (to reflect the appropriate resource state after the completion of the downstream processing). It is also feasible to imagine scenarios where such methods are triggered asynchronously. Much of the logic of the traditional controllers which controlled interactions across multiple objects etc. is likely to now be shifted into these methods. I have no particularly good name for such methods. They could be referred to as triggers, event or message handlers, glue methods, extension points etc. For the rest of this post I shall refer to these methods specifically as ‘handlers’.</p></blockquote>
</li>
<li><strong><a href="http://blog.dhananjaynene.com/2009/06/rest-soa-woa-or-roa/">ReST : SOA, WOA or ROA ?</a></strong>This post dwells on how consistent REST is with Service, Web and Resource oriented architectures. It argues that REST could perhaps be argued to be SOA only in a most specific form, and that for all practical purposes REST should not be expressed as SOA.<br />
<blockquote><p>And these constraints make the field of use so narrow, that even though REST could be argued to be a teeny weeny specific use case of SOA, it could be argued to be Service Oriented to the same extent that a Database could be argued to be Procedure Oriented (since all tables support the procedures SELECT, INSERT, UPDATE, DELETE). In other words for all practical purposes REST is not Service Oriented.</p></blockquote>
<p>It brings out some potential inconsistencies in how WOA is currently not only portrayed to be a set of architectural elements in addition to REST but also as a extension of / future of SOA.</p>
<blockquote><p>My assessment is that if WOA is a collection of Web related architecture elements in addition to REST, then the only way to successfully and consistently resolve it is by saying if WOA builds on REST then it cannot be simultaneously extending SOA.</p></blockquote>
<p>&#8230;</p>
<blockquote><p>So even if in this case there is no violation of LSP, the essential inconsistency still remains. WOA cannot be REST and SOA at the same time. This inconsistency is a bit worrying.</p></blockquote>
<p>Finally it refers to ROA as the architecture (which actually is defined with REST as the basis) with which it is most consistent with.</p>
<blockquote><p>Since ROA is a set of guidelines of an implementation of a REST architecture, I think its a slam dunk conclusion that REST is consistent with ROA (for the silly reason that ROA seems to be defined using REST <img src='http://blog.dhananjaynene.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).</p>
<p>Per Wikipedia, Leonard Richardson and Sam Ruby further provide the guidelines for ROA in “RESTful Web Services“, but again since the evolution of ROA stems from REST, it is unsurprising that REST is consistent with ROA.</p></blockquote>
</li>
</ol>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2009/06/design-characteristics-of-rest-resource-oriented-server-frameworks-and-clients/' rel='bookmark' title='Permanent Link: Design Characteristics of REST / Resource Oriented Server Frameworks and Clients'>Design Characteristics of REST / Resource Oriented Server Frameworks and Clients</a></li><li><a href='http://blog.dhananjaynene.com/2009/06/rest-is-the-dbms-of-the-internet/' rel='bookmark' title='Permanent Link: REST is the DBMS of the Internet'>REST is the DBMS of the Internet</a></li><li><a href='http://blog.dhananjaynene.com/2009/06/rest-soa-woa-or-roa/' rel='bookmark' title='Permanent Link: ReST : SOA, WOA or ROA ?'>ReST : SOA, WOA or ROA ?</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=7vsdzANqAOo:7tvedEEOsF0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=7vsdzANqAOo:7tvedEEOsF0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=7vsdzANqAOo:7tvedEEOsF0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=7vsdzANqAOo:7tvedEEOsF0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=7vsdzANqAOo:7tvedEEOsF0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=7vsdzANqAOo:7tvedEEOsF0:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/7vsdzANqAOo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/06/musings-on-rest/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/06/musings-on-rest/</feedburner:origLink></item>
		<item>
		<title>ReST : SOA, WOA or ROA ?</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/pkPvhWhRQDE/</link>
		<comments>http://blog.dhananjaynene.com/2009/06/rest-soa-woa-or-roa/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 19:52:35 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[architecture]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[rest-musings]]></category>
		<category><![CDATA[roa]]></category>
		<category><![CDATA[soa]]></category>
		<category><![CDATA[woa]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=699</guid>
		<description><![CDATA[This is part 4 of a continuing series of posts on ReST. So you might want to read up the earlier ones as well (chronologically they are the three posts before this)
Nice alphabet soup indeed. But what style of architecture does ReST (Representational State Transfer) correspond to.
Before we get into any definitional issues which are [...]]]></description>
			<content:encoded><![CDATA[<p><em>This is part 4 of a continuing series of posts on ReST. So you might want to read up the earlier ones as well (chronologically they are the three posts before this)</em></p>
<p>Nice alphabet soup indeed. But what style of architecture does ReST (Representational State Transfer) correspond to.</p>
<p>Before we get into any definitional issues which are hugely referred to in case of such debates &#8211; I shall be referring to the currently available definitions and descriptions as available on Wikipedia viz. Service Oriented Architecture, Web Oriented Architecture and Resource Oriented Architecture.</p>
<p><strong>Service Oriented Architecture</strong></p>
<p>As per the definition on Wikipedia (emphasis is mine):</p>
<blockquote><p>In computing, service-oriented architecture (SOA) provides methods for systems development and integration where systems package functionality as interoperable services. A SOA infrastructure allows different applications to exchange data with one another.</p>
<p>Service-orientation aims at a loose coupling of services with operating systems, programming languages and other technologies that underlie applications. <em>SOA separates functions</em> into distinct units, or services, which developers make accessible over a network in order that users can combine and reuse them in the production of applications. These services communicate with each other by passing data from one service to another, or by coordinating an activity between two or more services.</p></blockquote>
<p>On the topic of Service Orientation, it further goes on to state</p>
<blockquote><p>Service-orientation is a design paradigm that specifies the <em>creation of automation logic in the form of services</em>. It is applied as a strategic goal in developing a service-oriented architecture (SOA). Like other design paradigms, service-orientation provides a means of achieving a separation of concerns.</p></blockquote>
<p>While REST does attempt to solve many similar goals as SOA, I believe there lies an important distinction. The essential focus of SOA is to separate functions or automation services. An example here is to separate an authentication service from authorisation, monitoring, logging etc. A SOA architecture that consists of a number of SOA services assembles such &#8220;<em>functionalities</em>&#8221; into one feature consistent whole. But is that how REST works ? Only in a very vague sense even if arguably so. REST standardises the functions ie. GET, PUT, POST and DELETE in case of HTTP connectors. It is arguable that REST could be used with a different set of functions, but even in that case the function set is likely to remain consistent. This is further supported by Roy Fielding&#8217;s post &#8220;<a href="http://roy.gbiv.com/untangled/2009/it-is-okay-to-use-post">It is Okay to use POST</a>&#8221; in which he argues</p>
<blockquote><p>Some people think that REST suggests not to use POST for updates.  Search my dissertation and you won’t find any mention of CRUD or POST. The only mention of PUT is in regard to HTTP’s lack of write-back caching.  The main reason for my lack of specificity is because the methods defined by HTTP are part of the Web’s architecture definition, not the REST architectural style. Specific method definitions (aside from the retrieval:resource duality of GET) simply don’t matter to the REST architectural style, so it is difficult to have a style discussion about them. <em>The only thing REST requires of methods is that they be uniformly defined for all resources (i.e., so that intermediaries don’t have to know the resource type in order to understand the meaning of the request). As long as the method is being used according to its own definition, REST doesn’t have much to say about it.</em></p></blockquote>
<p>So across the board the functions remain the same and the data types (or media types) change. Sounds familiar ? Thats like supporting SELECT, INSERT, UPDATE, DELETE on a broad range of tables each having a different schema. An argument I make in an earlier post <a href="http://blog.dhananjaynene.com/2009/06/rest-is-the-dbms-of-the-internet/">REST is the DBMS of the Internet</a>. Moreover Roy further goes on to elaborate that in &#8220;REST intermediaries don&#8217;t have to know the resource type in order to understand the meaning of the request&#8221; and that &#8220;method is being used according to its own definition&#8221;. Each of this further introduces constraints into traditional service orientation. And these constraints make the field of use so narrow, that even though REST could be argued to be a teeny weeny specific use case of SOA, it could be argued to be Service Oriented to the same extent that a Database could be argued to be Procedure Oriented (since all tables support the procedures SELECT, INSERT, UPDATE, DELETE). In other words for all practical purposes REST is not Service Oriented.</p>
<p><strong>Web Oriented Architecture</strong></p>
<p>This is not yet a particularly widely used term yet, but I did come across a reference to it on a recent article in InfoQ &#8220;<a href="http://www.infoq.com/news/2009/06/hinchcliffe-REST-WOA">REST is a Style &#8211; WOA is the architecture</a>&#8220;. Looking it up on Wikipedia leads us to the same sources as referred to by InfoQ &#8211; articles written by Dion Hinchcliffe. Wikipedia states it as follows</p>
<blockquote><p>Web Oriented Architecture (WOA) is a style of software architecture that extends service-oriented architecture (SOA) to web based applications, and is sometimes considered to be a light-weight version of SOA. WOA is also aimed at maximizing the browser and server interactions by use of technologies such as REST and POX.</p></blockquote>
<p>But I just argued in the earlier section that REST is only a very very specific use case of SOA, whereas the statement above says WOA extends SOA to web based applications. If we were dealing with objects and not architectural styles here, an argument that X is a specific (constrained) sub type of Y and X extends Y would instantaneously be flagged off as a violation of Liskov&#8217;s Substitution Principle (LSP). So something isn&#8217;t quite right here and the whole situation does not add up to a consistent whole for me. I will leave it to the reader to decide whether there exists a flaw in my reasoning here or elsewhere. My assessment is that if WOA is a collection of Web related architecture elements in addition to REST, then the only way to successfully and consistently resolve it is by saying if WOA builds on REST then it cannot be simultaneously extending SOA.</p>
<p>To be fair I couldn&#8217;t quite find the same worlds (WOA extends SOA) in Hinchcliffe&#8217;s writings. Referring to one of them &#8220;<a href="http://hinchcliffe.org/archive/2008/02/27/16617.aspx">What is WOA ? Its the future of Service Oriented Architecture (SOA)</a>&#8220;, he refers to another of his post <a href="http://hinchcliffe.org/archive/2005/08/27/1817.aspx">&#8220;Beating a Dead Horse: What&#8217;s a SOA Again? All About Service-Orientation&#8230;&#8221;</a> which in turn states</p>
<blockquote><p>It&#8217;s here that John Reynolds&#8217; well-known SOA Elevator pitch comes tantalizingly close to capturing the essence:</p>
<blockquote><p>SOA is an architectural style that encourages the creation of loosely coupled business services. Loosely coupled services that are interoperable and technology-agnostic enable business flexibility. An SOA solution consists of a composite set of business services that realize an end-to-end business process. Each service provides an interface-based service description to support flexible and dynamically re-configurable processes.</p></blockquote>
<p>This business view is right on, and doesn&#8217;t mean business in a traditional, white-collar way. In this context, &#8220;business&#8221; means the actual functionality of the system, apart from technical details.</p></blockquote>
<p>There we go again on services. But Business Services cannot be  GET, PUT, POST, DELETE. I would emphasise again that REST does not expose business services &#8211; it exposes some very basic CRUD services. So even if in this case there is no violation of LSP, the essential inconsistency still remains. WOA cannot be REST and SOA at the same time. This inconsistency is a bit worrying. But it is likely that Hinchcliffe meant that WOA is built on REST and is similar to SOA in terms of the goals when he says WOA is the future of SOA. But honestly I could not quite figure out how exactly he would want to describe the relationship between WOA and SOA.</p>
<p><strong>Resource Oriented Architecture</strong></p>
<p>The wikipedia page states :</p>
<blockquote><p>Resource Oriented Architecture (or, ROA) is a specific set of guidelines of an implementation of the REST architecture.</p>
<p>REST, or Representational State Transfer (see Roy Thomas Fielding&#8217;s Doctoral Thesis &#8220;Architectural Styles and the Design of Network-based Software Architectures&#8221;), describes a series of architectural constraints that exemplify how the web&#8217;s design emerged. Various concrete implementations of these ideas have been created throughout time, but it has been difficult to discuss the REST architecture without blurring the lines between actual software, or the architectural principals behind them.</p></blockquote>
<p>Since ROA is a set of guidelines of an implementation of a REST architecture, I think its a slam dunk conclusion that REST is consistent with ROA (for the silly reason that ROA seems to be defined using REST <img src='http://blog.dhananjaynene.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).</p>
<p>Per Wikipedia, Leonard Richardson and Sam Ruby further provide the <a href="http://en.wikipedia.org/wiki/Resource_Oriented_Architecture#Guidelines_for_Clarification">guidelines for ROA</a> in &#8220;<a href="http://books.google.com/books?as_isbn=0596529260">RESTful Web Services</a>&#8220;, but again since the evolution of ROA stems from REST, it is unsurprising that REST is consistent with ROA.</p>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2009/10/service-oriented-rest-architecture-is-an-oxymoron/' rel='bookmark' title='Permanent Link: Service oriented REST architecture is an oxymoron'>Service oriented REST architecture is an oxymoron</a></li><li><a href='http://blog.dhananjaynene.com/2009/06/musings-on-rest/' rel='bookmark' title='Permanent Link: Musings on REST'>Musings on REST</a></li><li><a href='http://blog.dhananjaynene.com/2009/06/design-characteristics-of-rest-resource-oriented-server-frameworks-and-clients/' rel='bookmark' title='Permanent Link: Design Characteristics of REST / Resource Oriented Server Frameworks and Clients'>Design Characteristics of REST / Resource Oriented Server Frameworks and Clients</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=pkPvhWhRQDE:mYaT28hGTzA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=pkPvhWhRQDE:mYaT28hGTzA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=pkPvhWhRQDE:mYaT28hGTzA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=pkPvhWhRQDE:mYaT28hGTzA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=pkPvhWhRQDE:mYaT28hGTzA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=pkPvhWhRQDE:mYaT28hGTzA:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/pkPvhWhRQDE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/06/rest-soa-woa-or-roa/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/06/rest-soa-woa-or-roa/</feedburner:origLink></item>
		<item>
		<title>Design Characteristics of REST / Resource Oriented Server Frameworks and Clients</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/wkbKt3bDMR0/</link>
		<comments>http://blog.dhananjaynene.com/2009/06/design-characteristics-of-rest-resource-oriented-server-frameworks-and-clients/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 14:04:51 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[architecture]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[rest-musings]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[frameworks]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=690</guid>
		<description><![CDATA[This post is the third part of continuing series of articles on REST. The first one was Why REST ? and the next one was REST is the DBMS of the internet with hopefully some more to follow in the coming weeks.
Struts, Django, Ruby on Rails. We&#8217;ve worked with these and many other similar frameworks. [...]]]></description>
			<content:encoded><![CDATA[<p>This post is the third part of continuing series of articles on REST. The first one was <a href="http://blog.dhananjaynene.com/2009/06/why-rest/">Why REST ?</a> and the next one was <a href="http://blog.dhananjaynene.com/2009/06/rest-is-the-dbms-of-the-internet/">REST is the DBMS of the internet</a> with hopefully some more to follow in the coming weeks.</p>
<p>Struts, Django, Ruby on Rails. We&#8217;ve worked with these and many other similar frameworks. Some time back I started thinking of what would a completely new ground up REST / Resource oriented framework would look like (ground up to ensure it had no legacy design to deal with). Would such frameworks be similar to the ones dominantly used today ? What about the ecosystem that surrounds and interacts with them (client libraries) ? And finally what about the implications on the fine grained object model (assuming there is one) and its relationship with the resource model ? This post deals with some of the thoughts.</p>
<p>There are some specifics the post does not address and is agnostic about :</p>
<ul>
<li>Language : I shall be avoiding language issues as much as possible. Wherever I do bring in code constructs these may be assumed to be in Java (or pseudo-Java)</li>
<li>Convention or Configuration : I think both are valid choices in their appropriate contexts, and I don&#8217;t specifically emphasise one over the other in this post</li>
</ul>
<p>The frameworks mentioned above are not the only ones out there. There are many, and some actually are very REST specific eg. Apache CXF JAX-RS or Restlet. It would certainly be interesting to contrast my thoughts with these, but for reasons of insufficiently detailed knowledge about them, I shall choose to skip it (better to not make any statements than making incorrect ones).</p>
<p>I shall be assuming a HTTP connector with GET, PUT, POST and DELETE as the constant set of operations. These four operations shall be collectively referred to as Resource Operations.</p>
<p>We shall first start with the server side characteristics, and the term <em>ROF shall refer to a Resource Oriented (server side) Framework</em></p>
<p><strong>A ROF will have a resource oriented interface : </strong>Certainly not a profound statement, but it was important to lay that down upfront. So what is a Resource Oriented Interface. Given a particular resource, a Resource Oriented Software will support or consume end points which allow you GET, PUT, POST or DELETE the resource. There is one reason why this particular constraint is relaxed just a little bit. Modern browsers do not support all the four methods easily eg DELETE and make it just slightly hard to use the PUT method. Hence these methods can also be invoked by using a URI segment containing the method name eg. delete.</p>
<p><strong>A ROF will have an abstraction to represent a resource as an end point :</strong> Again, that seems to be pretty obvious. But there is a reason why I make it explicitly. In many situations we see controllers acting as end points. To the extent a controller acts as an abstraction for a resource end point which essentially only has the resource operations as public methods, it would fit this requirement. However if I was using an Order as a resource and if I introduced an approve method on the OrderController that would not be consistent with this requirement. That would need to be modelled as an OrderApproval resource which may on successful completion, effect a state change on the Order resource to the status &#8216;approved&#8217;.</p>
<p>This is where a potential differences with conventional frameworks arise. If I was to think of it from an EJB like perspective, I would model a OrderController as a Session bean and a Order as an entity bean. In case of lightweight POJO based model, I would have an OrderController as the endpoint exposed by say using Struts and model the Order as a entity POJO and map it to the database using Hibernate. In other non java frameworks, I would have a class to represent an OrderController and another one to represent the order along ActiveRecord pattern. But I would argue this separation is not entirely necessary, since what we want is something that implements a single abstraction mapping onto a Resource which also support the primarily lifecycle methods or resource operations of GET, PUT, POST and DELETE. But there is an issue to be worked through here. These resource operations are actually class level and not object level methods. Thus if we have an abstraction to represent the resource instance, the class level methods cannot be defined in the same class except as class level (static) methods. This is a tricky problem, and I would submit the designer may make one of two choices (a) Implement the resource operations as class level methods on the Resource abstraction (ie. they will get or return the resource references as method parameters and not rely on the &#8216;this&#8217; or &#8217;self&#8217; qualifier for getting access to the resource variables or (b) Implement the resource operations as methods on a separate one-to-one mapped class on the resource abstraction (eg. an OrderHome in case of an EJB like analogy)</p>
<p><strong>Given consistent expectations of the Resource Operations these will actually be auto-magically implemented :</strong> Thats a bit of a turnaround from what I was just describing in the earlier paragraph. What I mean to suggest is that the class level methods I just referred to will be implemented within the framework. What the framework will allow are plugins to provide extended functionality at specific points. Thus a &#8220;public static Order Order.put(Order order)&#8221; method will be implicitly implemented by the framework. But before a put can be processed it needs to be validated. Thus the framework will allow the developer to plug in / override his own implementation for an Order.validate(Order order). There are multiple ways such plug-ins could be implemented. Depending upon the nature of abstraction, it could be an overridden method as I just described, or it could be a standalone method that is registered into the overall workflow (either through convention or configuration). The latter might be especially useful in case one wants to implement the functionality as stand alone methods or in case of functional programming languages. The plugin points provided could be framework specific. eg, One may want to validate a resource for consistency even at it is being read from the database. For the rest of the post I shall refer to these as plugins. In addition, framework will most certainly provide methods for for downstream handling of impact of PUT, POST or DELETE. This is covered in the next point. In case the framework  chooses to not deal with persistence, it may choose to allow capabilities for integration with other persistence frameworks.</p>
<p><strong>A ROF will provide capabilities to a developer to override or register methods to handle downstream impact of PUT, POST and DELETE : </strong> Before I get into the details of this, I encourage you to take a look at my earlier post <a href="http://blog.dhananjaynene.com/2009/06/rest-is-the-dbms-of-the-internet/">REST is the DBMS of the internet</a> in case you have not already done so. To summarise it quickly, I have drawn the analogy that a REST based system is like a DBMS where client applications can perform direct SQL such as SELECT, INSERT, UPDATE, DELETE (GET, PUT, POST, DELETE in case of HTTP/REST) on the Tables (Resources in case of REST), and the business logic is implemented as triggers. Thus the framework will need to allow the developer to define such triggers. Such methods will need to support ability to reject the request (in case of downstream validation failures), and update the resource state (to reflect the appropriate resource state after the completion of the downstream processing).  It is also feasible to imagine scenarios where such methods are triggered asynchronously. Much of the logic of the traditional controllers which controlled interactions across multiple objects etc. is likely to now be shifted into these methods. I have no particularly good name for such methods. They could be referred to as triggers, event or message handlers, glue methods, extension points etc. For the rest of this post I shall refer to these methods specifically as &#8216;handlers&#8217;.</p>
<p>Note that the actual invocations to select, insert, update, delete the resource are *NOT* to be programmed by the developer. These are automatically handled by the framework. The developer essentially fills in the necessary logic to the plugin methods (eg. Order.validate) or handlers (eg. Order.onCreate)</p>
<p><strong>A ROF will provide a mechanism to describe or map a resource abstraction to to the actual programming constructs :</strong> There are a number of ways this could be achieved. XML, YAML, DSL, Annotation &#8211; take your pick. Also the actual class could be defined (as in case of a POJO) and the resource characteristics mapped onto it, or the class may manifest itself at runtime based on metaprogramming around the metadata. Sample possibilities here are Hibernate like Resource-to-Object-to-Relation mapping (using either Annotations or XML) or a a completely metaprogrammed ActiveResource. One important aspect that the framework will need to cover is the situations where a Resource is a composite of many or partial underlying business objects. eg. an Order resource instance could theoretically span one Order instance and many OrderItem instances. Thus a one to one relationship between a resource and underlying business objects (or datastructures) is not assumed. What is assumed is that the framework will allow such relationships to be described or introspected.</p>
<p><strong>A ROF will allow resources to be mapped onto URI or URI segments : </strong> This is too obvious an requirement to be explained and is mentioned here only for completeness.</p>
<p><strong>A ROF will allow foreign keys across resources which manifest themselves as URIs to be mapped onto the underlying business object references : </strong> Resources refer to each other through URIs. The underlying business objects refer to each other through object references. Given the resource descriptions and URI mappings, the framework should allow for a transparent referencing/dereferencing between such URIs and the object references.</p>
<p><strong>A ROF will allow factory methods for locating or allow injection of other resources / business objects :</strong> Within the handler functions, developers will need references to the associated resources or business objects. I say resources or business objects, since the developer may choose to interact with these at a coarse grained (resource) or fine grained (business object) level. The framework should allow the necessary support for such activities.</p>
<p><strong>A ROF may provide additional support for typical aspects of lifecycle (eg. validation) :</strong> While I mentioned validate as a possible plugin function. However given the omnipresence of validations, the framework may provide additional support for such activities. Thus the framework may choose to automatically implement such capabilities using the resource descriptions.</p>
<p><strong>A ROF may provide capabilities for domain specific extension of resource capabilities : </strong> Certain domains have standardised mechanisms of working with resources. As an example most banking systems based on the four eyes principle require approval activities. While this particular aspect is much tougher than it seems, a ROF may choose to allow extension of such capabilities using template like functions or mix ins. As an example in this situation, once an Order resource is defined, an OrderApproval resource will be automatically made available as will the GET and PUT methods on it (POST and DELETE in this particular case may not be relevant), as will the necessary and appropriate handler functions on OrderApproval.</p>
<p><strong>A ROF will provide capabilities for automatically generating the resource representation from the resource and vice-versa : </strong> Resources manifest themselves in multiple possible formats eg. XML, JSON etc. An ROF will allow such transformations between the representation and the resource/business object instance automatically.</p>
<p><strong>A ROF will provide capabilities for assembling more complex representations using templates :</strong> In many situations, especially when the representations are being composed for manual (browser based) consumption, additional resources may need to be pulled into a view. A ROF will allow for such assembly of resources to be composed into a final view using templates.</p>
<p><strong>A ROF will allow for introduction of appropriate additional URIs in views using templates : </strong> Thanks to HATEOAS (I&#8217;ve really avoided it thus far <img src='http://blog.dhananjaynene.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ), the framework will need to allow some mechanism of describing what are the additional context specific URIs to be included in the final representation. The template logic should allow the developer to specify such URIs.</p>
<p><strong>A ROF should allow for the resource / media-type descriptions to be shipped in band with the resource representation :</strong> Since REST allows media types to be auto discovered and auto described, the framework should allow for the metadata for such media types to be also presented to the client. While I think it is essential that such in band information should be conveyed on demand, the framework may also optionally support upfront interrogation for media types and their details, which will require such information to be shipped out of band as well. I am not aware of any specific standards around such interrogation APIs so the framework could implement a custom API for the same. The actual metadata could be represented using any of the typical appropriate standards such as RDFa, XML Schema snippets etc.</p>
<p><strong>A ROF should optionally allow support for auto generation of bindings for clients :</strong> I really really cringe as I write this. I cringe because to me the great attraction of REST is the simplicity and the ease of introducing incremental integration. The client binding generation (especially if it is statically generated) flies in the face of many accepted lightweight design scenarios. However I think there are likely to be some situation where availability of such client side bindings would be helpful. When possible (eg. with dynamically typed, metaprogramming capable languages like Python or Ruby), such bindings should be dynamic. In such cases the client can automatically introspect the server side media types and make available the necessary client side objects on the fly. In cases where statically typed languages such as Java or Scala are used, the client side may choose to expose everything as generic datastructures (e.g trees of name value pairs) or may allow for generation and compilation of client side bindings. I have no specific thoughts around the API support needed on the client side, except that quite obviously this would include support for the resource construction, resource operations etc. and that they would allow the client to interact with the server using the underlying language constructs rather having to work at a raw HTTP level.</p>
<p>In addition to the characteristics described above, I suspect frameworks will have many other optional characteristics such as support for monitoring, auditing / logging, transaction management, object pooling etc. etc. However these are unlikely to be particularly interesting when focusing on the framework aspects especially from a resource oriented perspective, which is indeed the focus of this post.</p>
<p><strong><em>Update : </em></strong> InfoQ covered this blog post here : <a href="http://www.infoq.com/news/2009/06/designing-rest-frameworks">Design Characteristics Of Resource Oriented Server Frameworks</a></p>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2009/06/why-rest/' rel='bookmark' title='Permanent Link: Why REST ?'>Why REST ?</a></li><li><a href='http://blog.dhananjaynene.com/2009/06/musings-on-rest/' rel='bookmark' title='Permanent Link: Musings on REST'>Musings on REST</a></li><li><a href='http://blog.dhananjaynene.com/2009/06/rest-is-the-dbms-of-the-internet/' rel='bookmark' title='Permanent Link: REST is the DBMS of the Internet'>REST is the DBMS of the Internet</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=wkbKt3bDMR0:OMwb0aPLKBk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=wkbKt3bDMR0:OMwb0aPLKBk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=wkbKt3bDMR0:OMwb0aPLKBk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=wkbKt3bDMR0:OMwb0aPLKBk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=wkbKt3bDMR0:OMwb0aPLKBk:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=wkbKt3bDMR0:OMwb0aPLKBk:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/wkbKt3bDMR0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/06/design-characteristics-of-rest-resource-oriented-server-frameworks-and-clients/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/06/design-characteristics-of-rest-resource-oriented-server-frameworks-and-clients/</feedburner:origLink></item>
		<item>
		<title>REST is the DBMS of the Internet</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/1zXPIO4yb6g/</link>
		<comments>http://blog.dhananjaynene.com/2009/06/rest-is-the-dbms-of-the-internet/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 15:32:26 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[architecture]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[rest-musings]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[web]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=675</guid>
		<description><![CDATA[After my fortunately rather successful post &#8220;Why REST ?&#8220;, I had planned to write another longish followup roughly titled &#8220;Implications of REST on software design and frameworks&#8221;. However I had an interesting exchange of Twitter DMs (direct messages) after the post which gave me the right words I was looking for to summarise this impact [...]]]></description>
			<content:encoded><![CDATA[<p>After my fortunately rather successful post &#8220;<a href="http://blog.dhananjaynene.com/2009/06/why-rest/">Why REST ?</a>&#8220;, I had planned to write another longish followup roughly titled &#8220;Implications of REST on software design and frameworks&#8221;. However I had an interesting exchange of Twitter DMs (direct messages) after the post which gave me the right words I was looking for to summarise this impact on software design. This simple example was so compelling, that I decided to make that into an independent post and delay the &#8220;Implications ..&#8221; post by another couple of days. So at the risk of giving away the very essence of my subsequent post, here&#8217;s the summary.</p>
<p>The Twitter DM&#8217;s exchanged were as follows :</p>
<blockquote><p><em>@sbidwai :</em> is REST like object oriented implementation for services, where as SOA is procedural ? thinking loud..</p></blockquote>
<blockquote><p><em>@dnene :</em> a slightly better analogy would be SOA is like invoking stored procedures, whereas REST is like invoking SQL on the table</p></blockquote>
<blockquote><p><em>@sbidwai :</em> agreed in parts.. but most impl will hv much more than CRUD.. eg, twitter rest apis..*</p></blockquote>
<blockquote><p><em>@dnene : </em>CRUD is the interface. To extend the analogy, logic is implemented as triggers not SPs. (My Opinion)</p></blockquote>
<p><em>* CRUD in our shared vocabulary stands for Create, Read Update, Delete.</em></p>
<p>As I subconsciously wrote the last DM, it suddenly dawned on me that this was the one concise way to express how REST architectures would impact software designs.</p>
<p>To summarise the exchange differently</p>
<p>&#8220;<strong><em>If WS-* is the RPC of the Internet, REST is the DBMS of the internet</em></strong>&#8221;</p>
<p>To expand on it a bit more :</p>
<p>Traditional SOA based integration visualises different software artifacts being able to interact with each other through procedures or methods. REST effectively allows each software artifact to behave as a set of tables, and these artifacts talk to each other using SELECT, INSERT, UPDATE and DELETE. (or if you wish GET, PUT, POST, DELETE). And where exactly is is the business logic ? Is it in the stored procedures ? Not Quite. Its in the triggers.</p>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2009/06/design-characteristics-of-rest-resource-oriented-server-frameworks-and-clients/' rel='bookmark' title='Permanent Link: Design Characteristics of REST / Resource Oriented Server Frameworks and Clients'>Design Characteristics of REST / Resource Oriented Server Frameworks and Clients</a></li><li><a href='http://blog.dhananjaynene.com/2009/06/musings-on-rest/' rel='bookmark' title='Permanent Link: Musings on REST'>Musings on REST</a></li><li><a href='http://blog.dhananjaynene.com/2009/06/why-rest/' rel='bookmark' title='Permanent Link: Why REST ?'>Why REST ?</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=1zXPIO4yb6g:d9lo4GhyUnQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=1zXPIO4yb6g:d9lo4GhyUnQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=1zXPIO4yb6g:d9lo4GhyUnQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=1zXPIO4yb6g:d9lo4GhyUnQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=1zXPIO4yb6g:d9lo4GhyUnQ:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=1zXPIO4yb6g:d9lo4GhyUnQ:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/1zXPIO4yb6g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/06/rest-is-the-dbms-of-the-internet/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/06/rest-is-the-dbms-of-the-internet/</feedburner:origLink></item>
		<item>
		<title>Why REST ?</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/S35IZfcE8tA/</link>
		<comments>http://blog.dhananjaynene.com/2009/06/why-rest/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 10:14:46 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[architecture]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[rest-musings]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[web]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=648</guid>
		<description><![CDATA[Introduction
It is becoming apparent that even as it becomes popular, REST (Representational State Transfer) is not yet as well understood. This might seem a surprising statement, but a lot of us use REST thanks to many frameworks supporting REST like interfaces, have a sense of what REST like interfaces are like (even if such an [...]]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>
<p>It is becoming apparent that even as it becomes popular, REST (Representational State Transfer) is not yet as well understood. This might seem a surprising statement, but a lot of us use REST thanks to many frameworks supporting REST like interfaces, have a sense of what REST like interfaces are like (even if such an understanding is not sufficiently accurate), and exercise our common sense in using such interfaces. Having said that, let me clarify that while the internet is full of documentation about the semantics of REST, its actually quite light on the rationale for REST (including <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm">Roy Fielding&#8217;s dissertation</a> which is <em>the reference document</em> for REST). Thus I have had to intersperse REST semantics and historical narrative with some personal opinions. So treat this as a part opinion and feel free to question my thought where you think it does not make sense.</p>
<p><strong>Audience</strong></p>
<p>If you are a REST expert, you are likely to have figured out much of this any ways by now. If you would like to understand specific technical semantics about REST, again this may not be the best article to read. However if you are curious about REST and would like to read a perspective on why and how it makes sense read on.</p>
<p><strong>Flow</strong></p>
<p>I shall be meandering through a historical narrative in the first half before starting to make the points I wish to make in the second. Lot of the points I make in the first half are likely to be those you already are aware of. However these are being made to allow an immediate recall when you read the second half. It is quite important to have read the first half to understand the perspective I put together in the second.</p>
<h2>Historical Narrative</h2>
<p><strong>FTP</strong></p>
<p>I am sure you have used <a href="http://en.wikipedia.org/wiki/File_Transfer_Protocol">FTP (File Transfer Protocol)</a> a few times even though nowhere as frequently as HTTP (HyperText Transfer Protocol). Let me quickly present some characteristics of FTP</p>
<ul>
<li>Given a FTP client, you can connect to any FTP server so long as you have a valid userid/password pair for the server (or anonymously if the server so supports).</li>
<li>The home directory on connecting to a FTP server is typically your starting point. At this point typically you can execute the <em>&#8216;ls&#8217;</em> or <em>&#8216;List Directory&#8217;</em> command to list all the files and directories within the home directory.</li>
<li>If a file interests you, you can get it by issuing a get command</li>
<li>If a subdirectory interests you, you can further navigate into that directory by issuing a <em>&#8216;cd&#8217;</em>or <em>&#8216;Change Directory&#8217;</em> (or often by double clicking on the directory in case of a graphical client).</li>
<li>If you would like to add a file to the current directory you can issue a <em>&#8216;put&#8217;</em> or <em>&#8216;Upload&#8217;</em> command.</li>
<li>While you have the flexibility to navigate from one directory to another, you soon realise that every file and directory is uniquely addressable by its fully qualified path (either absolute or relative) and you can refer to each file and directory by its path. You are also aware that a valid path will uniquely resolve to only one directory or file.</li>
<li>At each stage as you navigate into a separate directory, the server allows you to retrieve the list of subdirectories and files within your current directory. It always shows you the current state of that directory. Thus even if you were to list the same directory twice, and someone else uploaded a new file or created a new subdirectory successfully between the two requests, you will see the reference to the new file / directory when you request for the listing the second time.</li>
<li>At every stage you issue a command, the FTP client+server work together to service the request (or issue the appropriate error message as necessary), and then pretty much forget about what you did. In other word the server keeps no track of and shows no awareness of what you have done earlier in your session (though it does remember who you are primarily from a security perspective.</li>
<li>To work with a FTP server using a command line client, you primarily need to understand the usage of four commands (verbs) post a successful connection. These are <em>&#8216;ls&#8217;</em> to list the contents of a directory, <em>&#8216;cd&#8217;</em> to navigate to a different directory, <em>&#8216;get&#8217;</em> to download a file, and <em>&#8216;put&#8217;</em> to upload a file.</li>
</ul>
<p>So FTP allows us to upload and download files. But does it allow us to <em>&#8216;do things&#8217;</em> ? Sure, so long as you combine it with a few more pieces in the puzzle. Let us say, we are back in the late 80s (prior to the invention of HTTP) and I want to send and a list of purchase orders collected by a local office to a central office for further processing. This requires the following elements to be added to the mix.</p>
<ul>
<li>A shared understanding of where the files will be uploaded, how they will be uniquely named, their specific file extensions (optionally) and the specific format of the file eg. Comma Separated or Lotus 1-2-3 or WordStar or WordPerfect (the popular application software of the day) including the positioning of the various fields in the file, and</li>
<li>Preferably a daemon process on the central office computer (the FTP server) which regularly scans the directory, parses each file as it comes it, does the relevant processing on it, and generates the appropriate result files and places them in the appropriate directories using the shared understanding of the directory structure and the file naming convention to communicate back the results of the processing.</li>
</ul>
<p>Ho Hum. This was all stuff you knew. But the reason I brought it up is that FTP and how it was leveraged then has a lot to do with the principles that govern REST as we shall later see.</p>
<p><strong>RPC</strong></p>
<p>Back then in the 80&#8217;s FTP wasn&#8217;t the only mechanism to transfer data between machines. One more of the many other options was <a href="http://en.wikipedia.org/wiki/Remote_procedure_call">RPC (Remote Procedure Call)</a>. It not only allowed you to transfer data across machines, it actually had built into itself, a contract to remotely execute software. Unlike FTP which merely transferred data (in well understood units called files), RPC allowed you to invoke remote procedures by supporting an ability to pass messages which included the message name and the values for all the parameters necessary to be supplied to the message. Unlike FTP which was meant to do data transfer across a network, RPC was geared to <em>do things remotely</em>.</p>
<p><strong>A contrast between FTP and RPC</strong></p>
<p>If the objective of network computing is to use the computers and networks to &#8216;do things&#8217; one would assume that many more people would use RPC than FTP for the same. While RPC did get used as a technical substrate, at a business processing level FTP got used far more (eg. to send and remotely process the list of purchase orders). There are some important reasons that we need to understand here.</p>
<p>FTP required understanding of very few basic verbs (ls, cd, get, put). Thus the training required to understand FTP semantics was far less than that for RPC. This was partially due to the fact that RPC had a programmatic interface. To the best of my knowledge there are no widely used command line clients for human interaction with RPC services. In addition, each procedure required a set of semantic data (parameter) associated with it. This was no different than FTP which also required similar data to be shipped over the network. Turns out there were a few distinctions. First, the nature of design of RPC services often required combining application data with control data, and there was also often a sequential expectation due to the RPC business transaction being broken up into multiple RPC calls perhaps for the sake of efficiency. Moreover each time, new procedures were added or parameters added, these required programmatic changes. FTP on the other hand was simpler. In most cases the entire data (including some redundant data perhaps) was sent in one block (or file in FTP parlance). By dealing with a file as the least common denominator, the FTP stack decoupled itself from any application specific semantics. Moreover, depending upon the agreed upon format, the files could be edited at either end by by human actors using specific software such as plain text editors or word processors or spreadsheets. Moreover if the formats changed, wherever such files were being manually edited, no programmatic changes were required. Irrespective of the changes you made to the file formats, file processing software, the FTP stack itself did not change &#8211; it remained stable.</p>
<p><strong>Less is more</strong></p>
<p>A theme I shall come back to again is many a times less is more. FTP had far fewer training requirements (few basic verbs). FTP did not deal with parameter value formatting (though other pieces of software subsequently might have to). FTP was just so much easier to start working with. FTP did not actually preclude any of the capabilities of RPC from being introduced, it merely allowed this to be added subsequently as additional optional layers (or subsequent elements in the processing pipeline). Finally FTP allowed users to deal with the data in the units and the formats and the tools they understood the best &#8211; their day to day application software components and simply focused on only transferring files, while imposing only one requirement &#8211; each end should work with a file as a unit, and both ends should understand the file formats. By focusing on file as a unit, each business user could focus on the data he/she wanted to deal with in the format that was most appropriate (an analogy in REST would be a resource .. but I&#8217;m getting ahead of myself). And at the end of the day, by doing less, FTP ended up being much more popular and thus doing more.</p>
<p><strong>Email</strong></p>
<p>Other protocols widely used on the net were SMTP / POP which were used for email. Email eventually was considered the killer app for the internet. Similar to FTP email focused on the users getting to learn only a few basic verbs and exchanging the basic unit of data transfer (messages) using these verbs. Again, even though email itself didn&#8217;t get things done, it contributed far more heavily than RPC to getting things done, by having other manual or software actors at either end of the messages who did the necessary processing required.</p>
<p><strong>WWW (World Wide Web)</strong></p>
<p>While email was the killer app for the internet, the one that really brought it to masses was the world wide web which was based on the HTTP protocol. While HTTP could be used to ship documents of a variety of types (often classified by their mime-types), the defacto type of document used the HyperText Markup Language (HTML). Unlike FTP and email, this required the authors to understand a new language, but used a simple markup syntax to keep the learning curve to the minimum. It however introduced a very powerful element &#8211; the embedded hyperlink. While the earlier technologies supported a uniform identifier for each document / message, the hyperlink allowed references to other documents / messages to be embedded thus converting the document pool into a document web. We now had the ability to navigate from one document to another and such navigation retained the contextual relevance by embedding the hyperlinks. There were other enhancements as well such as introduction of more verbs (eg. POST and DELETE, the latter not really being supported by any of the browsers). Allow me to state the salient points of WWW despite the obvious duplications with some of the points I listed under FTP (for the sake of emphasis). Note that the scenario I describe below is primarily describing static web serving (except to the extent of file uploads) and does not address the presence of a dynamic web application.</p>
<ul>
<li>Given a web browser you can connect to any web server optionally using the appropriate authentication credentials.</li>
<li>Typically the home page of the web server is your starting point. At this point you are shown the document which usually include embedded hyperlinks to other associated documents on the web server.</li>
<li>You can get/view/download/save a document by clicking on a hyperlink pointing to the document.</li>
<li>Some web servers may be configured to allow you to browse a directory. Clicking a hyperlink pointing to the directory allows you to see a directory listing which shows all the subdirectories and documents within the current directory. Each such subdirectory or document is also shown as a hyperlink to allow you to navigate to it.</li>
<li>Some documents have an form including an embedded file field and a button which allow you to upload a new document onto the web server.</li>
<li>Each document (and directory if directory browsing is turned on) has at least one identifier which uniquely identifies the document &#8211; the URL. It is feasible to directly navigate to the document if you are aware of the URL.</li>
<li>Navigating to a different document often provides you with a different list of embedded hyperlinks which are contextually relevant to the document being viewed.</li>
<li>At each stage the web server is not aware of any other information about you apart from your authentication credentials, and is not generally aware of your browsing history (except what may be stored for audit purposes on the web server logs).</li>
<li>As a user the primary skills you need to grasp is the ability to enter a starting URL, and then being able to navigate from document to document by clicking on the hyperlinks. If you are uploading documents, you may in addition need to know how to specify a local file path and press the Submit button to upload the file.</li>
<li>While HTML documents are the defacto default, the same capabilities can be used to serve any types of documents. The server usually identifies the document types by the registered mime types, and the browser may either render the document itself or call upon the necessary add-on plugin application to render the document based on the appropriate type or may in some cases simply save the document locally in case no such application is available for further processing.</li>
<li>Usually but not necessarily the document name have the characteristics of a noun</li>
</ul>
<p>Again the reason I listed these characteristics is that these have a tremendous commonality with those of REST (except that what I refer to as a document above may get referred to as a resource in REST parlance).</p>
<p><strong>SOA : DCE, Tuxedo, CORBA, RMI</strong></p>
<p>Even as the web was evolving other technologies which allowed for more sophisticated remote service invocations were being developed. Along with RPC, these were essentially different technical manifestations of Service Oriented Architecture (SOA) principles. While these are substantial developments in their own right, the relevant points to be made in the context of this article are :</p>
<ul>
<li>Each SOA service supported the ability to define a set of service semantics which included the service name, the parameters to the service, an ability to expose the metadata of such semantics, an ability to leverage such metadata and invoking such services either statically or dynamically from a remote client.</li>
<li>Many services were usually expected to &#8220;do something&#8221; though quite often some services would simply return the requested data. Usually but not necessarily the services were identified by using &#8216;verbs&#8217;.</li>
<li>Some of the SOA services allowed maintenance of a client state on the server, and allowed the server to do processing conditional on the client state.</li>
<li>These technologies almost invariably required some kind of programmatic effort at both the client and the server end. Manual specification of the service parameters and manual invocation of the service was simply not a typical use case. Neither was a default rendering of the results easily available to be manually viewed by an end user.</li>
<li>Unlike retrieving or storing a document, these services often were expected to have a far more complex functionality.</li>
</ul>
<p><strong>CGI, dynamic web applications and Web Services</strong></p>
<p>Clearly as WWW started getting used far more, people were only too keen to use it for much more than storing or retrieving documents. This led to the development of CGI and subsequently other dynamic web application technologies (eg. LAMP, J2EE etc.) which would allow us to use the web to &#8216;do something&#8217;. Since these were clearly offshoots of the SOA world, being mapped onto the WWW infrastructure, the characteristics of such dynamic applications often had a lot in common with SOA, and they started dropping many characteristics of the traditional static WWW. Thus was born the child of the world wide web and distributed service oriented architectures &#8211; web services. This led to newer SOA technologies such as WS-* and SOAP.</p>
<p>Like the typical scenarios after the discovery of any highly profitable opportunity, the early rush was to leverage the opportunity and it was only a little later when the dust died down, that people started wondering if they had sacrificed something in the heat and dust of the moment. That stock taking resulted in the realisation, that some of the very basic characteristics of the extraordinarily successful internet technologies (FTP / SMTP / WWW) had been diluted, and even if such dilution still allowed immediate progress to have occurred, some of them would need to be corrected to be able to continue the explosive growth that had been seen so far. One such exercise in my opinion is the laying down of the REST architecture style.</p>
<h2>REST Semantics</h2>
<p>While REST brings back many of the characteristics that made internet so successful back to application design, it should be noted that many of these are not precluded by Web Services or SOA. However what are mandatory characteristics in REST are in some cases missing from but in most cases quite feasible to implement in traditional (non REST) web services by using additional best practices. Also note that each characteristic is not necessarily universally superior. So do evaluate it in your context to see if it makes sense. However before we get to the benefits of REST, a quick synopsis of REST technical characteristics might be in order.</p>
<p>While a full description of the REST technical aspects is completely beyond the scope of this post, I summarise these below. You might notice the strong parallels between the characteristics of FTP and WWW and those of REST even as REST adds a few more capabilities. The reason I portray them in the form below in a manner quite similar to the way I portrayed the characteristics of FTP and WWW is to emphasise that REST actually continues to leverage the same characteristics that made these technologies so popular and globally scalable, even as it just adds those few minimally necessary capabilities to achieve the same scalability for not just transferring documents or rendering pages but to &#8216;do something&#8217;. In other words it brings together the characteristics which made the internet technologies so popular and applies them to the inter application integration, component and service orientation, and application mashup scenarios to allow them to achieve similarly large adoption and to perform the tasks necessary in the given context (or &#8216;do someting&#8217; as I have continuously referred to).</p>
<p><strong>REST characteristics</strong></p>
<ul>
<li><strong>Resource and media types as the basic units :</strong> REST treats a resource as the basic unit of data transfer. Such resources could refer to anything in the particular context eg. a flight reservation, an invoice, a video etc.</li>
<li><strong>Unique resource identifiers :</strong>REST requires that each resource have at least one identifier which uniquely identifies that resource. This makes it easy to be able to bookmark resources or make them searchable.</li>
<li><strong>Each resource has at least one representation :</strong>Each resource can be expressed using a variety of representations. This could include HTML, XML, CSV, JSON etc.</li>
<li><strong>Each resource has often one default manually readable representation :</strong> In most cases but not all, each resource has a representation that can be manually consumed using a web browser. Such manual representations are often either XHTML representation with associated CSS, but could theoretically be some custom representation rendered by a delivered on demand custom javascript or Java applet. Note that this is not a requrement of REST but is a practice often followed.</li>
<li><strong>Each resource has a type. REST supports self describing media types :</strong> Each resource has a type (referred to as media type since REST refers to the resource web itself as hypermedia). The type influences the data semantics of the resource, and the type itself can be self documenting using a variety of technologies (eg. one possible way is to specify XML schema descriptors).</li>
<li><strong>Each resource representation optionally includes contextually relevant hyperlinks to other resources :</strong>This not only allows the clients to auto discover associated resources, but also allows the server to clearly communicate the contextually relevant links based on an application state.</li>
<li><strong>REST resources are indexable and search engine friendly :</strong> A consistent resource naming and representation allows for easy indexation and search engine integration.</li>
<li><strong>REST requires minimal starting point intelligence :</strong> Typically one only needs the initial URL for being able to integrate with a REST implementation. All newer resources are often dynamically discovered. Since these media types also document their own metadata, client agents can automatically discover more information about them. Thus media type metadata rather than being compiled into the REST client can be dealt with dynamically or by using code on demand agents for dealing with the appropriate media type (similar to browser plugins)</li>
<li><strong>REST encourages a uniform interface. :</strong>Typically this manifests itself by the minimal verbs being used to describe REST operations.When used with HTTP these are GET, PUT, POST and DELETE. This reduces the intelligence requirements on the client. Additionally clients may be capable of parsing metadata for the resources based on standard formats such as ATOM or XML schemas. The context specific intelligence required on the part of the client is no longer in the verbs it has to understand (method names) but is now in the resource types that it may need to manipulate. Thus if a client can deal with resource identification, resource representation, self descriptive messages and hypermedia, it can start dealing with REST.</li>
<li><strong>REST supports value addition by intermediate processors :</strong> REST supports the scenarios where intermediate processor units can provide additional value addition. These could include processors which provide caching support or those that provide resource enrichment capabilities.</li>
<li><strong>REST encourages usage of scalable practices :</strong>By precluding usage of conversational state and sequential assumptions, REST implementations tend to be easier to scale even as they compromise on efficiency at times (due to redundant data transfer or additional processing requirements)</li>
</ul>
<h2>REST benefits</h2>
<p>Having described many of the REST characteristics the following could be interpreted as the benefits of adopting a REST style architecture.</p>
<ul>
<li><strong>Default Rendering</strong>In case of most REST implementations, you can quickly provide a default HTML rendering capability. Thus even as you provide a REST interface to allow inter application integration, customers of such an interface do not have to wait for building the programmatic capabilities for leveraging it, they can get started immediately by being able to manually view all the resources and their states manually and by navigating around the interface by using a plain web browser. This substantially reduces the entry barriers for your customers, and allows them to get more conversant with your media types even as they are still figuring out how to programatically leverage the capabilities.</li>
<li><strong>Self describing / auto discovery of media types and capabilities</strong>The traditional web service semantics rely upon clear upfront documentation of media types, their schema and the API semantics. Thus the metadata about the service is often communicated &#8216;out of band&#8217; from the actual service itself. This is required so that the clients can understand all the valid end points and service semantics up front before they can leverage the services. Not so with REST. Given an initial starting point, REST greatly encourages a contextual provision of the relevant additional interfaces (hyperlinks) as a part of the the document / resource data itself. Thus clients do not upfront need to be aware of all the end points (resource URIs) to be able to leverage the services. Moreover REST supports self describing media types as well. Thus the schema information for the resources can be shipped &#8216;in band&#8217; with the resource representation itself. This allows for clients to discover new media types or changes to their schema and even allows the default rendering of the same without having to upgrade the programmatic components to leverage the newly discovered or modified media types / schemas. Finally the code on demand capabilities (these are optional) of REST can allow code to be downloaded to automatically parse or render such newly discovered or modified media types.</li>
<li><strong>Encourages scalability even at the cost of efficiency</strong>Aspects such as non maintenance of conversational state, greatly increase the scalability of REST applications even if they do incur a minor cost in efficiency (which can be due to repeated redundant communication of data elements, or additional processing requirements due to preclusion of conversation state). This makes it relatively easier to set up multiple servers as the demand for the REST capabilities increases. Having said that, let me quickly add a caveat that designing clustered applications even if with REST interfaces is not always trivial, and while REST makes it &#8220;easier to scale&#8221; that should not be confused with &#8220;easy to scale&#8221;.</li>
<li><strong>Resource / Data semantics are much easier to understand than Service semantics</strong>To put it differently an invoice structure is much easier to understand from a data perspective than an invoice processor API. This makes it easy for the clients. This often also makes it easier for the server side implementations. Service semantics often bring in issues of sequence, client state and other control information, most of which can be avoided using REST. Generally speaking expectations are simpler to lay down and meet when specifying resources rather than services.</li>
<li><strong>Clear naming and accessibility of each resource in your universe</strong>Web services don&#8217;t mandate clear unique identifier for all your resources. Thus sometimes it is not possible to reach a particular resource except through a convoluted series of steps. In some cases some resources are inaccessible for ever. As an example, many online shopping experiences end with an invoice being shown, but I have often found it impossible to later on pull up that invoice that was earlier shown to me at the end of a transaction.</li>
<li><strong>Extensible resource types which are optionally dealt with by clients</strong>Not only are resource types self describing, REST makes it easier to convey additional extensions to such resource types by using additional URIs within the resource representation as well. Thus even as a representation lays down a variety of field values (say for an invoice), there might be other associated resources which might either be optional or variable media types based on the context (eg. purchase order / quality report etc.) which can be easily referenced by simply including their URIs. Such additional information does not require the basic media type to be enhanced or by introducing attachments to the media types. These can be implemented as additional navigable out of band media types. Thus clients don&#8217;t have to deal with them, but they can do so easily when they choose to do so. Thus the client has a choice to not deal with the additional media types when they do not make sense in the client&#8217;s context.</li>
<li><strong>Search engine friendliness</strong>While resource directories help for smaller scale integration (eg. Yahoo when it started off, attempted to categorise the web), such directories or registries are often found to be tough to scale beyond a particular threshold (thats why Yahoo or Google now provide entry points by allowing us to search through all the web resources). Consistent resource naming and representation make REST resources search engine friendly and allow additional entry points into a REST service based on search criteria. This makes location of newer resources far easier than what might be feasible through a resource registry especially on a large scale.</li>
<li><strong>Easer layering</strong>While it is possible to add intermediate proxy services for enriching the capabilities of a REST implementation, it just makes it seem a lot easier to implement these as and when required when the underlying architecture is REST based. Thus while mashups can be readily implemented using both REST and traditional SOA implementations, I would submit that these are much easier to implement on REST based architectures.</li>
</ul>
<p>I have used the word scalability above in the context of the ability to service the runtime demands of a larger number of clients. However REST helps makes your software artifacts become scalable in one more way. By providing a basic and minimal uniform interface requirements, REST allows your applications / services / components a low entry barrier path into being a participant in a broad web of similar others who all agree on the basic REST semantics. This substantially increases the potential number of clients to your services since they can leverage these services easily and with low entry barriers. While traditional SOA technologies attempt to provide the universal access to all possible consumers, REST with its emphasis on minimalism, simplicity and low entry barriers actually makes it practical. Similarly REST makes it easy for you to start consuming other services and mashing them up with others to service your clients (pun intended) quickly. Finally REST takes the the very characteristics that made document and message sharing so easy to use and popular (characteristics which are not necessarily found in all conventional SOA implementations) and combines them with the necessary elements to achieve transaction processing, application integration and mashups (use the web to &#8216;do something&#8217;) on a truly global scale even as it makes these capabilities easily available and cost effective to leverage.</p>
<h2>Some concluding comments</h2>
<p>While not directly relevant as REST rationale or REST benefits, I thought it might be useful to add a few more associated comments within the context of REST usage and adoption.</p>
<p><strong>Simplicity and bottom up adoption</strong></p>
<p>I must confess, my biases show up quite strongly in this paragraph (so feel free to treat this as a partially prejudiced statement). Simplicity is not per se a characteristic of REST. However it does stem from the nature of genesis of the competing options. While most internet technologies using an incremental, evolutionary approach, most SOA technologies have been designed by a committee. This is why the consulting and development budgets required to implement FTP / email / Web especially on a per utility basis are far different than those likely for implementing DCE, Tuxedo, CORBA and SOAP. Part of the reason is also due to the fact that most internet technology adoption is bottom up, while that of SOA often is top down. While top down may seem attractive, it may seem sobering to realise that most top down processes break down beyond a particular scale. Thats why free markets on the whole have trounced centrally planned economies (though some recent happenings do point to limitations of the same as well). Thats why internet scale simple inter application API integration and mashups took off even as intranet scale application integration was mired in budgeting, territorial, enterprise modeling and governance issues. Thats why the LAMP stack (eg. PHP) which hasn&#8217;t been particularly strong in the non web arena, is deeply entrenched in the web based application space. Sometimes it just is more productive to quickly implement a simpler technology and incrementally enhance it rather than attempting to cover all possibilities, options, and border conditions by putting a committee in place. At its very core, REST requires only incremental understanding of newer technologies, is easier to incrementally adopt and is less likely to get mired in organisational issues. Precisely the characteristics that FTP, EMail and WWW had.</p>
<p><strong>Simpler abstractions win</strong></p>
<p>I have generally found that simpler abstractions even though harder to deal with initially, often win in the long run. Notice the fact that the bare bones rendering functionality of HTML/WWW completely trounced the rich UI and application integration capabilities then available (eg. Windows/Java and DCOM/CORBA/RMI). This is not to suggest that the extra capabilities are not required. That is why Rich User Interfaces on WWW continue to be a dominant part of the internet technology wishlist. However the simpler, cleaner and minimalistic abstractions often are far more important than feature richness. A point I would want to make in favour of REST even as I admit that conventional SOA technologies are far more feature rich than REST.</p>
<p><strong>REST is not SOA</strong></p>
<p>I must confess, for a long time I believed REST was merely a specific usecase of SOA. However recent thoughts lead me to believe otherwise. There is indeed a reason for such potential confusion. REST based architectures and SOA may often attempt to service similar goals. To the extent of servicing such goals, REST may look like a substitutable component for other SOA technologies such as SOAP. However even as they attempt to meet similar goals, REST attempts to view at your architecture artifacts differently. REST encourages you to view and model your architecture as a set of resources rather than services. There are important implications of this not just in terms of the many benefits I describe above available under REST but also in terms of the design and architecture characteristics of the implementation. Treating REST as just another way to implement SOA sometimes encourages one to miss out on the subtleties. These however are beyond the scope of this post, and I intend to cover the same apart from the implications of REST on software design in my next post.</p>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2009/06/design-characteristics-of-rest-resource-oriented-server-frameworks-and-clients/' rel='bookmark' title='Permanent Link: Design Characteristics of REST / Resource Oriented Server Frameworks and Clients'>Design Characteristics of REST / Resource Oriented Server Frameworks and Clients</a></li><li><a href='http://blog.dhananjaynene.com/2009/06/rest-is-the-dbms-of-the-internet/' rel='bookmark' title='Permanent Link: REST is the DBMS of the Internet'>REST is the DBMS of the Internet</a></li><li><a href='http://blog.dhananjaynene.com/2009/06/rest-soa-woa-or-roa/' rel='bookmark' title='Permanent Link: ReST : SOA, WOA or ROA ?'>ReST : SOA, WOA or ROA ?</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=S35IZfcE8tA:sNCLK2_sEWU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=S35IZfcE8tA:sNCLK2_sEWU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=S35IZfcE8tA:sNCLK2_sEWU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=S35IZfcE8tA:sNCLK2_sEWU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=S35IZfcE8tA:sNCLK2_sEWU:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=S35IZfcE8tA:sNCLK2_sEWU:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/S35IZfcE8tA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/06/why-rest/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/06/why-rest/</feedburner:origLink></item>
		<item>
		<title>Is a large corporate making money off open source or open standards an oxymoron ? In a Sun / Java Context</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/xaMsYWx4Ge0/</link>
		<comments>http://blog.dhananjaynene.com/2009/04/is-a-large-corporate-making-money-off-open-source-or-open-standards-an-oxymoron-in-a-sun-java-context/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 15:54:11 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[open standards]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[sun]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=642</guid>
		<description><![CDATA[The recent acquisition of Sun by Oracle reignited a thought that had been going through my mind for a long time. It simply boils down to whether a large corporate can make money off open source or open platforms. Now quite obviously it in itself is not a truism. But the point remains that large [...]]]></description>
			<content:encoded><![CDATA[<p>The recent acquisition of Sun by Oracle reignited a thought that had been going through my mind for a long time. It simply boils down to whether a large corporate can make money off open source or open platforms. Now quite obviously it in itself is not a truism. But the point remains that large corporates which have become large in the conventional economy do find the going a little difficult when trying to make money off open software.</p>
<p>The way I perceived it, Sun was going through similar difficulties. The hardware business was delivering dwindling margins post the dot com bust, and the software business was under threat from upstarts such as Linux which offered a substantially similar software stack at near zero licensing costs. One of the crown jewels asset Sun had in its stable was Java. And while it was (and continues to be) a wonderful asset, it just was incredibly difficult to make money off it. Now java hasn&#8217;t been open source exactly for most of its life, but it was a sufficiently open stack nevertheless to cause the same difficulties that open source software would in terms of monetisation.</p>
<p>There&#8217;s an excellent blog post written a year and half ago by Michel Bauwens, <a href="http://blog.p2pfoundation.net/can-the-experience-economy-be-capitalist/2007/09/27">Can the experience economy be capitalist?</a> which does refer to some of the underlying issues. I suggest you do read it, but would like to quote a few points from it below. </p>
<blockquote><p>First of all, in the field of the immaterial, we are no longer dealing with scarce goods, but with marginal reproduction costs and non-rival goods. With such goods, sharing does not diminish the enjoyment of the good, since all parties retain their ability to use them. The emergence of peer production shows a new form of creating value, that is in fundamental aspects &#8220;outside the market&#8221;. Typically, in commons-based production we have a common pool, accessible to everyone (Linux, Wikipedia), around which an ecology of business can form to create and sell scarcities (usually services and experiences). In sharing-oriented production (YouTube, Google documents), we have proprietary platforms that enable and empower the sharing, but at the same time, sell the aggregated attention (a scarcity), to the advertising market. Finally, in the third crowdsourcing mode, companies try to integrate participation in their own value chain and framework.</p>
<p>So the good news is that indeed business is possible. But I would like the readers to entertain the following proposition, nl. That:</p>
<p>1) The creation of non-monetary value is exponential</p>
<p>2) The monetization of such value is linear</p>
<p>In other words, we have a growing discrepancy between the direct creation of use value through social relationships and collective intelligence (open platforms create near infinite value through the operations of the laws of Metcalfe and Reed), but only a fraction of that value can actually be captured by business and money. Innovation is becoming social and diffuse, an emergent property of the networks rather than an internal R &#038; D affair within corporations; capital is becoming an a posteriori intervention in the realization of innovation, rather than a condition for its occurrence; more and more positive externalizations are created from the social field.</p></blockquote>
<p>Quite eloquently argued here that open platforms create near infinite value which is difficult to be captured by business and money. I still remember companies such as Borland, HP, Sun, IBM making a fair amount of money through selling C/C++ compilers and IDEs (I remember it used to be almost $5000 per seat). However this was in the days when the community capability of creating similar competing software stacks was only in its infancy. No longer so today. Now  communities, open standards, open processes and open source are fairly well established sources of delivering asymmetrically significant capabilities at a fraction of the cost, a fraction which is made even smaller when the same is incurred by a small motivated group of individuals or small highly agile companies. There in lies the difficulty. Companies are trained to and built to deliver linear and symmetric capabilities in the context of costs they incur. However they have a relatively poor handle on monetising in scenarios where small teams can deliver exponentially asymmetric capabilities.</p>
<p>The blog post I referred to above, identifies the right area to look at in this context &#8211; Identify what is scarce and Monetise the scarcity. So when any software has a sufficiently large utility and can be managed through open processes to be able to satisfy a globally substantial demand at a fraction of the cost (eg. apache httpd), that particular capability (eg. static and dynamic file serving over http) is no longer scarce enough for a commercially focused company to make money out off. Thats why the money shifts where the scarcity is &#8211; how to leverage such software and put it to good use. This is where the existing commercial successes around open source are based on eg. RedHat, JBoss, IBM, Oracle etc. They monetise the support, training, services and consulting around such software. In many ways Sun could be argued to be a victim of its own success. It not only went much further than any other large corporate in terms of creating open specifications, it also contributed substantially to sufficient knowledge dissemination and tooling to allow many other individual, SME and large corporates to be able to compete with Sun in these very areas that Sun could&#8217;ve monetised. Sun thus created its own competition for monetising the scarcity that got created around Java even as many others cried out hoarsely that Sun simply wasn&#8217;t open enough. Will there be an incentive for Oracle to reverse that somewhat ? I suspect that could be a logical option if it focuses on ensuring a good ROI for Sun&#8217;s Java investments and assets and more so to be able to make itself more capable in the space around Java than the competition (ie. IBM).</p>
<p>So is a large corporate making money off open source or open standards an oxymoron ? Viewed narrowly yes. Because while it is possible for a small team to make some money with adequate ROI off open source or open standards, it is unlikely to be feasible for large corporates. They really need to figure out what is the new scarcity that gets created off such initiatives, come to a judgment that the opportunity arising from such scarcity is large enough and worthy of their time, attention and investment, ensure that there is no current available capability of anyone else disruptively delivering exponentially asymmetric value in that space, and finally occupy that space before other large corporates do. </p>
<p>It does boil down to the fact that while individuals and small companies may find it easier to monetise open source and open standards, the same is going to be generally tough for large corporates. Or as Michel Bauwens said in the blog post I referred to (in my opinion perhaps a little exaggerated but not entirely off the mark)</p>
<blockquote><p>For all of this, we will need new policies, major reforms and restructurations in our economy and society.</p>
<p>But one thing is sure: we will have markets, but the core logic of the emerging experience economy, operating as it does in the world of non-rival exchange, is unlikely to have capitalism as its core logic.</p></blockquote>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2008/12/java-the-perpetually-undead-language/' rel='bookmark' title='Permanent Link: Java : the perpetually undead language'>Java : the perpetually undead language</a></li><li><a href='http://blog.dhananjaynene.com/2009/01/stop-making-soa-complex/' rel='bookmark' title='Permanent Link: Stop making SOA complex'>Stop making SOA complex</a></li><li><a href='http://blog.dhananjaynene.com/2009/06/most-american-graduates-are-unemployable-because-.../' rel='bookmark' title='Permanent Link: Most american graduates are unemployable because &#8230;'>Most american graduates are unemployable because &#8230;</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=xaMsYWx4Ge0:mucpu1nP6vM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=xaMsYWx4Ge0:mucpu1nP6vM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=xaMsYWx4Ge0:mucpu1nP6vM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=xaMsYWx4Ge0:mucpu1nP6vM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=xaMsYWx4Ge0:mucpu1nP6vM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=xaMsYWx4Ge0:mucpu1nP6vM:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/xaMsYWx4Ge0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/04/is-a-large-corporate-making-money-off-open-source-or-open-standards-an-oxymoron-in-a-sun-java-context/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/04/is-a-large-corporate-making-money-off-open-source-or-open-standards-an-oxymoron-in-a-sun-java-context/</feedburner:origLink></item>
		<item>
		<title>A brush with Functional Programming and Scala</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/btigeLqKJmo/</link>
		<comments>http://blog.dhananjaynene.com/2009/04/a-brush-with-functional-programming-and-scala/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 06:13:04 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[functional programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[scala]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=631</guid>
		<description><![CDATA[Initial Struggles
A few months ago I was working with using Python for complex data processing scenarios. This was stuff I was very well versed in Java, but was  working hard at to make sure that when I wrote code in Python, it would at least pass as half decent pythonic code. My initial struggles [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Initial Struggles</strong></p>
<p>A few months ago I was working with using Python for complex data processing scenarios. This was stuff I was very well versed in Java, but was  working hard at to make sure that when I wrote code in Python, it would at least pass as half decent pythonic code. My initial struggles with idiomatic Python, soon became a strong interest in functional programming. I initially considered it to probably have a niche applicability in traditional business transaction processing space and of primary importance in algorithmic code, and thats the state where I almost left it. Curiously even after reaching that conclusion I did persist in attempting to figure out how it could be used in a manner where it would be helpful to have functional programming constructs in typical transaction processing scenarios.</p>
<p><strong>Is functional programming useful in traditional business transaction processing ?</strong></p>
<p>One of the aspects of the struggle was that I didn&#8217;t want to have the functional programming code merely replace the existing code. I wanted to figure out if it would be possible to replace it in a manner where it would make a <em>substantial</em> positive difference, and that hunt proved a little elusive for a while. Another aspect was the fact that the traditional OO code depended so intensively on state, that to actually try to figure out how the same would work under Functional Programming was really requiring a substantial leap in terms of thought, a leap I had to really struggle with. Finally my language of choice was Python, a dynamically typed language, and some of the literature surrounding functional programming really assumed static typing, especially that related to patterns and constructs in Haskell (eg. Monads). Such patterns were difficult to apply since the underlying expected static typing support was simply at odds with a language like Python.</p>
<p>It was after persisting for a few weeks, that I started to see how one could apply these techniques <em>effectively</em>. I also started figuring out how to Pythonise constructs such as Monads. Once I was past the initial rather steep hurdles, the going became a lot easier, and the progress much much faster. In at least a subset of some typical financial transaction processing scenarios I did get some extremely encouraging (to myself I call them jaw dropping) results. The resultant code suddenly seemed smaller, far far more intuitive to understand and extremely easy to change.</p>
<p><strong>Working with Object Oriented and Functional Programming simultaneously</strong></p>
<p>I am not sure whether it was due to my abilities and experience or due to my inabilities to visualise, I decided that pure functional programming was simply not a choice in this context and thus one would need to combine traditional OO and FP constructs. Having reached that decision, it became a little easier to identify the areas which could be better leveraged by FP. However I believe I still have some ways to go before being able to be confident of writing OO and FP together the way each of them should be.</p>
<p><strong>Scala</strong></p>
<p>My focus on functional programming and fondness to Java also led me to investigate Scala. I made the mistake of actually reading the reference documentation on its web site first. My initial reactions were that it simply was a weird syntax language which was unlikely to be of help in reducing development time even when writing FP code. Thankfully, I did not give up at that stage and continued to read a lot more. I soon realised that type inferencing and other aspects (eg. no getter setters) really resulted in some substantial savings compared to traditional Java code (it probably cuts down the code size to half). And the syntax really wasn&#8217;t so cryptic after all, it just required a day to get used to. Moreover one had the entire arsenal of the the FP constructs along with traditional OO constructs to deploy. I did write some processing code and was very happy at the results I got. In this current state, I am excited about learning more about Scala as a language that would be an alternative to Java. It gives me some of the capabilities of more productive languages such as Python, while continuing to leverage the performance and stability of the JVM. Note that Scala&#8217;s compatibility with the JVM should be thought of differently from that of dynamic language implementations such as Jython on the JVM. Given Scala&#8217;s static typing capabilities, its runtime structures are far more similar to Java and thus are able to retain somewhat similar performance and memory footprint characteristics as traditional Java programs. I suspect the same is unlikely to be found for other dynamic languages on the JVM.</p>
<p><strong>Concluding Thoughts<br />
</strong></p>
<p>Prior to this entire exercise, in my mind there were two primary individual preferences to programming languages. For most scenarios, my preferred choice was Python especially due to the sheer speed with which one could write and maintain code, code that was really compact and readable. And if Python runtime performance was not going to be good enough, use Java. Coming out of this exercise, it does seem that there is a high potential that I might want to switch my preference to Scala instead of Java. I have already validated the positive benefits of functional programming and Scala coding in processing scenarios (those that do a lot of computation and processing in the background). I do need to validate the same for typical web based applications, but on the face of things, I believe I have already identified areas where FP can help in typical web application scenarios as well. And now I have two multi paradigm (OO and FP) languages to be able to leverage FP in alongside OO &#8211; Python and Scala.</p>
<p>This is something thats definitely going to be my interest area for the next few months and I intend to write many more specific posts on the topic. Should that be of any interest keep listening on this blog&#8217;s <a href="http://feeds.feedburner.com/var/log/mind?format=xml">RSS feed</a> and my <a href="http://twitter.com/dnene">twitter stream</a>.</p>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2009/08/why-should-i-switch-to-scala/' rel='bookmark' title='Permanent Link: Why should I switch to Scala ?'>Why should I switch to Scala ?</a></li><li><a href='http://blog.dhananjaynene.com/2009/06/improve-your-web-based-software-development-and-maintenance-roi-with-dynamic-programming-languages/' rel='bookmark' title='Permanent Link: Improve your web based software development and maintenance ROI with dynamic programming languages'>Improve your web based software development and maintenance ROI with dynamic programming languages</a></li><li><a href='http://blog.dhananjaynene.com/2009/03/talk-slides-programming-language-selection/' rel='bookmark' title='Permanent Link: Talk Slides : Programming Language Selection'>Talk Slides : Programming Language Selection</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=btigeLqKJmo:4jJ1pBPyYHs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=btigeLqKJmo:4jJ1pBPyYHs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=btigeLqKJmo:4jJ1pBPyYHs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=btigeLqKJmo:4jJ1pBPyYHs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=btigeLqKJmo:4jJ1pBPyYHs:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=btigeLqKJmo:4jJ1pBPyYHs:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/btigeLqKJmo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/04/a-brush-with-functional-programming-and-scala/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/04/a-brush-with-functional-programming-and-scala/</feedburner:origLink></item>
		<item>
		<title>What is statelessness in REST ?</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/Bnc15_9c09U/</link>
		<comments>http://blog.dhananjaynene.com/2009/04/what-is-statelessness-in-rest/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 16:43:15 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[architecture]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[statelessness]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=622</guid>
		<description><![CDATA[In my post Fomenting unREST : Is RESTfulness a semantics game ? Why does REST require statelessness ?, I had commented on some of my thoughts on dealing with some of the constraints prescribed by REST one of them being statelessness. Some of those thoughts continued to churn in my mind, and I had a [...]]]></description>
			<content:encoded><![CDATA[<p>In my post <a href="http://blog.dhananjaynene.com/2008/11/rest-fomenting-unrest-is-restfulness-a-semantics-game-why-does-rest-require-statelessness/">Fomenting unREST : Is RESTfulness a semantics game ? Why does REST require statelessness ?</a>, I had commented on some of my thoughts on dealing with some of the constraints prescribed by REST one of them being statelessness. Some of those thoughts continued to churn in my mind, and I had a few helpful interactions along the way which led me to what I believe to be the &#8220;Aha moment&#8221; on statelessness in REST. That doesn&#8217;t mean I&#8217;m necessarily right, feel free to comment on my thoughts in case you believe any differently or have a nuanced opinion.</p>
<p><strong>Background</strong></p>
<p>Per <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/net_arch_styles.htm#sec_3_4">section 3.4.3</a> of Roy Fielding&#8217;s dissertation</p>
<blockquote><p>The client-stateless-server style derives from client-server with the additional constraint that no session state is allowed on the server component. Each request from client to server must contain all of the information necessary to understand the request, and cannot take advantage of any stored context on the server. Session state is kept entirely on the client.</p></blockquote>
<p>The same thought is further commented upon in <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm#sec_5_1">section 5.1.3</a>.</p>
<blockquote><p>We next add a constraint to the client-server interaction: communication must be stateless in nature, as in the client-stateless-server (CSS) style of Section 3.4.3 , such that each request from client to server must contain all of the information necessary to understand the request, and cannot take advantage of any stored context on the server. Session state is therefore kept entirely on the client.<br />
&#8230;<br />
Like most architectural choices, the stateless constraint reflects a design trade-off. The disadvantage is that it may decrease network performance by increasing the repetitive data (per-interaction overhead) sent in a series of requests, since that data cannot be left on the server in a shared context. In addition, placing the application state on the client-side reduces the server&#8217;s control over consistent application behavior, since the application becomes dependent on the correct implementation of semantics across multiple client versions.</p></blockquote>
<p><strong>The potential confusion areas</strong></p>
<p>Given the clear prohibition of storing client state on server, there are some typical idioms which do get challenged as REST unfriendly. eg.</p>
<ul>
<li>Logging in to obtain a session token, which is subsequently a validation of an authentication status</li>
<li>Binding additional attributes to such a session token on the server side with variables such as :
<ul>
<li>Computed and cached access privileges of the user</li>
<li>Conversational state eg. fields entered on page 1 of a two page form</li>
</ul>
</li>
</ul>
<p>The question there is are all he above scenarios inconsistent with REST ? Many articles seem to suggest that that would indeed be the case. as an example one of them is <a href="http://www.ibm.com/developerworks/xml/library/wa-ajaxarch/#N100F0">Ajax and REST, Part 1 Section: Violating the &#8220;stateless server&#8221; constraint</a></p>
<p><strong>My thoughts</strong></p>
<p>Clearly in the above example computed data such as access privileges, or for that matter user&#8217;s time zone information are available to the server even if these are not in the session so long as the server has the user id. So long as a user id is being supplied (or a proxy such as the session token id), such data being stored in the session is simply a server optimisation and thus does not violate REST guidelines since this is application state and not conversational state.</p>
<p>To the extent the data is storing conversational state such as the fact that the user has authenticated himself and the fields that the user may have entered in page 1 of a two page form, such is incompatible with REST guidelines, and if such practices are adopted the resultant design may not be termed fully REST compliant. </p>
<p>So the existence of a user token does not make the design REST &#8220;uncompliant&#8221;. Storing conversational state in a user session usually associated with such a token does.</p>
<p>One way to ask if a data is conversational or application, may be to ask oneself, that can the request be satisfied properly if it was accidentally routed to a different server in a situation where the cluster was configured for session affinity. In a REST compliant design, the other server will have a capability to still be able to service the request. However this requires the presumption that the cluster is configured for session affinity and session state is not available to other servers. Should one configure the cluster with shared and distributed sessions, the cluster will be able to service the requests even when the APIs were not REST compliant. </p>
<p>The one thing that does leave me a little uneasy is that to be fully REST compliant one will need to always supply a userid / password with each API call instead of a server token. That does have implications on security, implications that I am not entirely comfortable with.</p>
<p><em>Update :</em>Surya in a <a href="http://blog.dhananjaynene.com/2008/11/rest-fomenting-unrest-is-restfulness-a-semantics-game-why-does-rest-require-statelessness/#comment-5656">comment in earlier post</a> refers to the fact that authentication need not be done through the URI but through the headers or through protocols such as OAuth. So what that leaves me with is the assessment that existence of a token or a session object is not a violation of REST but storage of conversational state in the same is.</p>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2008/11/rest-fomenting-unrest-is-restfulness-a-semantics-game-why-does-rest-require-statelessness/' rel='bookmark' title='Permanent Link: Fomenting unREST : Is RESTfulness a semantics game ? Why does REST require statelessness ?'>Fomenting unREST : Is RESTfulness a semantics game ? Why does REST require statelessness ?</a></li><li><a href='http://blog.dhananjaynene.com/2009/06/design-characteristics-of-rest-resource-oriented-server-frameworks-and-clients/' rel='bookmark' title='Permanent Link: Design Characteristics of REST / Resource Oriented Server Frameworks and Clients'>Design Characteristics of REST / Resource Oriented Server Frameworks and Clients</a></li><li><a href='http://blog.dhananjaynene.com/2009/06/why-rest/' rel='bookmark' title='Permanent Link: Why REST ?'>Why REST ?</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=Bnc15_9c09U:NTjWN_T9rTY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=Bnc15_9c09U:NTjWN_T9rTY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=Bnc15_9c09U:NTjWN_T9rTY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=Bnc15_9c09U:NTjWN_T9rTY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=Bnc15_9c09U:NTjWN_T9rTY:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=Bnc15_9c09U:NTjWN_T9rTY:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/Bnc15_9c09U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/04/what-is-statelessness-in-rest/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/04/what-is-statelessness-in-rest/</feedburner:origLink></item>
		<item>
		<title>JVM CLR unification : IBM Sun merger held up to complete CLR licensing</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/eKYJaCNGh-Q/</link>
		<comments>http://blog.dhananjaynene.com/2009/04/jvm-clr-unification-ibm-sun-merger-held-up-to-complete-clr-licensing/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 02:04:26 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[401]]></category>
		<category><![CDATA[gags]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=602</guid>
		<description><![CDATA[While the Sun acquisition by IBM has been doing rounds for so many days, it has been rather surprising why the deal even though being in news for so long has neither been denied nor completed. It apparently turns out the real value in the deal is based on a simultaneous perpetual licensing of the [...]]]></description>
			<content:encoded><![CDATA[<p>While the Sun acquisition by IBM has been doing rounds for so many days, it has been rather surprising why the deal even though being in news for so long has neither been denied nor completed. It apparently turns out the real value in the deal is based on a simultaneous perpetual licensing of the CLR. The goal is to then build a single unified runtime which will allow for simultaneous support for and complete interoperability between all the languages based on both the JVM and CLR environments. Thus Java / Scala / C# / VB.NET will be able to freely talk to each other. An interesting problem is going to be the fate of the languages which are simultaneously being implemented on both the platforms eg. Jython and IronPython, IronRuby and JRuby etc. These issues will be sorted out in due course. The spade work to talk to some of the developers and bloggers to get a good promotion as soon as the announcement happens has already begun. Some of the bloggers and publishers are worried that the unification of the two is likely to substantially reduce the eyeballs and interest in many of the technical writings since much of the &#8217;spice&#8217; would now be lost. I would imagine a huge PR campaign the moment the final issues in the perpetual CLR licensing issues are ironed out. Apparently some of the prepared press releases were published a bit too soon. These were subsequently not removed but have been put under temporary access control and result in a <em>401</em> error when accessed thus leading one to believe that their release is likely to be imminent.</p>
<p><strong>Update</strong> : Further breaking news on the topic can be found <a href="http://aprilfoolsdayontheweb.com/joke/6127/">here</a>. </p>


<p>No related posts.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=eKYJaCNGh-Q:RYb-hFtTnIA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=eKYJaCNGh-Q:RYb-hFtTnIA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=eKYJaCNGh-Q:RYb-hFtTnIA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=eKYJaCNGh-Q:RYb-hFtTnIA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=eKYJaCNGh-Q:RYb-hFtTnIA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=eKYJaCNGh-Q:RYb-hFtTnIA:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/eKYJaCNGh-Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/04/jvm-clr-unification-ibm-sun-merger-held-up-to-complete-clr-licensing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/04/jvm-clr-unification-ibm-sun-merger-held-up-to-complete-clr-licensing/</feedburner:origLink></item>
		<item>
		<title>Talk Slides : Programming Language Selection</title>
		<link>http://feedproxy.google.com/~r/var/log/mind/~3/p1mN3hmjIUY/</link>
		<comments>http://blog.dhananjaynene.com/2009/03/talk-slides-programming-language-selection/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 03:49:17 +0000</pubDate>
		<dc:creator>Dhananjay Nene</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[selection]]></category>
		<category><![CDATA[technical]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=591</guid>
		<description><![CDATA[Slides of my talk yesterday on programming language selection (from a technical and a business perspective)
Programming Language Selection
View more presentations from Dhananjay Nene.

Background article (not exactly same but on a similar topic) : Improve your web based software development and maintenance ROI with dynamic programming languages
Talk Announcement : Seminar: Strengths and weaknesses of various programming [...]]]></description>
			<content:encoded><![CDATA[<p>Slides of my talk yesterday on programming language selection (from a technical and a business perspective)</p>
<div style="width:425px;text-align:left" id="__ss_1215885"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/dnene/programming-language-selection?type=powerpoint" title="Programming Language Selection">Programming Language Selection</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=programming-language-selection-090328224352-phpapp01&#038;rel=0&#038;stripped_title=programming-language-selection" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=programming-language-selection-090328224352-phpapp01&#038;rel=0&#038;stripped_title=programming-language-selection" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/dnene">Dhananjay Nene</a>.</div>
</div>
<p>Background article (not exactly same but on a similar topic) : <a href="http://punetech.com/improve-your-web-based-software-development-and-maintenance-roi-with-dynamic-programming-languages/">Improve your web based software development and maintenance ROI with dynamic programming languages</a><br/><br />
Talk Announcement : <a href="http://punetech.com/seminar-strengths-and-weaknesses-of-various-programming-languages-28th-march/">Seminar: Strengths and weaknesses of various programming languages &#8211; 28th March</a></p>


<p>Related posts:<ol><li><a href='http://blog.dhananjaynene.com/2009/06/improve-your-web-based-software-development-and-maintenance-roi-with-dynamic-programming-languages/' rel='bookmark' title='Permanent Link: Improve your web based software development and maintenance ROI with dynamic programming languages'>Improve your web based software development and maintenance ROI with dynamic programming languages</a></li><li><a href='http://blog.dhananjaynene.com/2008/12/java-the-perpetually-undead-language/' rel='bookmark' title='Permanent Link: Java : the perpetually undead language'>Java : the perpetually undead language</a></li><li><a href='http://blog.dhananjaynene.com/2009/04/a-brush-with-functional-programming-and-scala/' rel='bookmark' title='Permanent Link: A brush with Functional Programming and Scala'>A brush with Functional Programming and Scala</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/var/log/mind?a=p1mN3hmjIUY:WqTVKy8UKQY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=p1mN3hmjIUY:WqTVKy8UKQY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=p1mN3hmjIUY:WqTVKy8UKQY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=p1mN3hmjIUY:WqTVKy8UKQY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/var/log/mind?i=p1mN3hmjIUY:WqTVKy8UKQY:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/var/log/mind?a=p1mN3hmjIUY:WqTVKy8UKQY:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/var/log/mind?d=cGdyc7Q-1BI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/var/log/mind/~4/p1mN3hmjIUY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.dhananjaynene.com/2009/03/talk-slides-programming-language-selection/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://blog.dhananjaynene.com/2009/03/talk-slides-programming-language-selection/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 3.805 seconds -->
