<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7135775987068897205</id><updated>2024-10-18T21:42:38.685+05:30</updated><category term="JVM options"/><category term="checkpoint"/><category term="ipsec"/><category term="japanese anime"/><category term="java options"/><category term="java tuning"/><category term="openswan"/><category term="vpn tunnel"/><category term="URL named parameters"/><category term="animation"/><category term="anime"/><category term="based on a true experience"/><category term="brazil"/><category term="brazil defeat"/><category term="brazil lose to netherlands 2-1"/><category term="character development"/><category term="communication"/><category term="concurrent programming"/><category term="dijkstra"/><category term="distributed systems promo"/><category term="eureka seven"/><category term="fifa 2010"/><category term="filters"/><category term="grails"/><category term="importance of listening"/><category term="isd noaa"/><category term="isd sri lanka"/><category term="jvm arguments"/><category term="manga"/><category term="movies"/><category term="netherlands beat brazil"/><category term="office parody"/><category term="opinion"/><category term="parallel computing promo"/><category term="planetes"/><category term="poem"/><category term="rainfall"/><category term="review"/><category term="security filter"/><category term="seductress"/><category term="semaphores"/><category term="sri lankan weather"/><category term="temperature"/><category term="weather"/><category term="weather data"/><title type='text'>From Akonadi to Zanzibar</title><subtitle type='html'>Whatever that comes to mind.....</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://randomthoughtsofbloggerrandom.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Lasantha Fernando</name><uri>http://www.blogger.com/profile/08984637006949013349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWymArdtlcCMbwq6TMXHWzHwdhieVoonXXdSpThBuLodyEb7S1n-9cYuxm9eT5ZOi3fKv3aYNnVVGRROPWLJzdkhAOh2mI03WtfS-Pij8_sQ_tW_blGoIShArfKplmA/s220/mypic.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7135775987068897205.post-971540607188767564</id><published>2016-11-18T14:28:00.000+05:30</published><updated>2016-11-23T17:11:26.650+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="isd noaa"/><category scheme="http://www.blogger.com/atom/ns#" term="isd sri lanka"/><category scheme="http://www.blogger.com/atom/ns#" term="rainfall"/><category scheme="http://www.blogger.com/atom/ns#" term="sri lankan weather"/><category scheme="http://www.blogger.com/atom/ns#" term="temperature"/><category scheme="http://www.blogger.com/atom/ns#" term="weather"/><category scheme="http://www.blogger.com/atom/ns#" term="weather data"/><title type='text'>A Treasure Trove of Weather data for Sri Lanka (Or any other place as well)</title><content type='html'>I recently started my work for a research based MSc in Computer Science, and I soon realized, as am sure countless others have said before me, finding data for your research is a pretty hectic task. It involves heckling, negotiating, bribing, cajoling, pleading and begging from all kinds of data providers from the top to bottom of various organizations and even then, it is not guaranteed you would get the data at the end of the data. Some of these difficulties lie in the sensitivity of the data sources itself, and I understand and respect the cautionary nature adopted by the owners of these data sets. But for some data sets, the resistance is quite incomprehensible, at least from a researchers point of view. He is quite understandably stumped that these organizations are not lining up at his doorstep to give data for the continuity of his ground breaking research work, which is done for the social good and betterment of millions of people worldwide! Jokes aside, I really fail to understand how the amount of rainfall received by some obscure town in the suburbs of Colombo, 5 years back on a particularly bleak day can have any commercial or social sensitivity. Anyways, without getting into a political or philosophical discussion on bureaucracy and its demerits, which would lead to nowhere in the foreseeable future, let&#39;s jump to the point before I bore you all with irrelevant and pseudo-intellectual preambles.&lt;br /&gt;
&lt;br /&gt;
If you need archived Weather data from an authoritative source, I suggest going to &lt;a href=&quot;http://www.noaa.gov/&quot;&gt;NOAA&lt;/a&gt; website. It has all kinds of aggregated and raw weather data. For my purposes, I found the &lt;a href=&quot;https://www.ncdc.noaa.gov/isd&quot;&gt;Integrated Surface Database (ISD)&lt;/a&gt; to be a real treasure trove of weather data for Sri Lanka, which is usually pretty hard to obtain (online or otherwise). I will detail out the steps on obtaining the data from the NOAA ISD site below.&lt;br /&gt;
&lt;h3&gt;
Obtaining the data&lt;/h3&gt;
Go to the ISD site, select &#39;Data Access&#39; from the left side panel, and go to the &#39;Search Tool&#39;. If you think I should have simply given the URL for the tool instead of detailing the steps, &lt;a href=&quot;https://www7.ncdc.noaa.gov/CDO/cdopoemain.cmd?datasetabbv=DS3505&amp;amp;countryabbv=&amp;amp;georegionabbv=&amp;amp;resolution=40&quot;&gt;here it is!&lt;/a&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfi-VMmy7ZPde7IaQPcK5yBDKkaHrhV3DSy0DixCHFBZgj3XLMCTMKvAa_3NCFj3hhNEKD53lmKBeuNl6GhvTSuXrWjmWs2ooxNRa1Bnau3IMtKFiEc_6EY3x68eMZx5f12A-F7eIQjwM/s1600/isd_page.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;549&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfi-VMmy7ZPde7IaQPcK5yBDKkaHrhV3DSy0DixCHFBZgj3XLMCTMKvAa_3NCFj3hhNEKD53lmKBeuNl6GhvTSuXrWjmWs2ooxNRa1Bnau3IMtKFiEc_6EY3x68eMZx5f12A-F7eIQjwM/s640/isd_page.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;ISD Search Tool -&amp;nbsp;https://www7.ncdc.noaa.gov/CDO/cdopoemain.cmd?datasetabbv=DS3505&amp;amp;countryabbv=&amp;amp;georegionabbv=&amp;amp;resolution=40&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Continue with the simplified options (Or you are welcome to try the advanced options as well), agree to the conditions (without reading a word of it as is the accepted custom), select the country as &#39;Sri Lanka&#39; and simply click &#39;Continue&#39;. In the next screen, Sri Lanka will only have the weather station data, so let that chosen option be as it is, and proceed forward (Continue).&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNOZMgjohs9fWF-i8t70u7CJFjiXERf6KBBnXIPd7dFFzkkdJVWNFKZ2d7vMqj-FbUyPP131FThWiGvVAjPliOGyZDte4pVMtMqa_4NxyAfoGn_iE9C5bF1kFcRJx2JNGjihVdQ9RZSVM/s1600/isd_stations.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;592&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNOZMgjohs9fWF-i8t70u7CJFjiXERf6KBBnXIPd7dFFzkkdJVWNFKZ2d7vMqj-FbUyPP131FThWiGvVAjPliOGyZDte4pVMtMqa_4NxyAfoGn_iE9C5bF1kFcRJx2JNGjihVdQ9RZSVM/s640/isd_stations.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Select the required Weather Stations&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
You will get about 24 Sri Lanka stations along with the date ranges to which the data is available for each station. You&#39;ll be surprised to know that you can obtain data for the particular weather station in Colombo from 1944 itself, before we even got our independence and Sri Lanka was still called Ceylon. Of course, other weather stations will not have that much of a range, but still...&lt;br /&gt;
&lt;br /&gt;
Anyway, select the required weather stations and continue forward. Next you&#39;ll get a screen to select the time range for which you need the data. If you select a time range which includes time periods where data is not available, it will simply return only the available data. Now proceed forward and you will be presented with a summary page that includes a disclaimer, a captcha and box to put your mail address. Simply type in your preferred email account and submit your request. It will forward you to a request verification screen. Click the URL given there and you will go to the page where links to the requested data are available.&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtCV4PgUvCVR2tk2YtTh-PHP-fQJwSuSpyEzx3wfvoN_nMn3vDJxscBq2CO5XNe6p7LVMPtZcvunhLCBYsmXcFj8u11BsYSuL0x6AenYMnso-zoUyCBZg4l1zghQfcJ-HHbYTQ0jJIECU/s1600/data_screen.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;638&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtCV4PgUvCVR2tk2YtTh-PHP-fQJwSuSpyEzx3wfvoN_nMn3vDJxscBq2CO5XNe6p7LVMPtZcvunhLCBYsmXcFj8u11BsYSuL0x6AenYMnso-zoUyCBZg4l1zghQfcJ-HHbYTQ0jJIECU/s640/data_screen.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Wait till the data is processed and you will be able to access all these links&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
These links will work only after it has been processed and made available to you. For now, you will only get a confirmation mail first. All you got to do is sit tight and wait until...&lt;br /&gt;
&lt;h3&gt;
Getting the &#39;Processing Complete&#39; mail&lt;/h3&gt;
Sometime later, after processing, you will get another mail saying that your data is ready, which will be similar to below.&lt;br /&gt;
&lt;pre class=&quot;raw_message_text&quot; id=&quot;raw_message_text&quot; style=&quot;background-color: white; border-radius: 5px; border: thin solid rgb(224, 224, 224); color: #616161; font-size: 14px; height: 1000px; margin: 25px 25px; padding: 40px 30px; white-space: pre-wrap; word-break: break-word; word-wrap: break-word;&quot;&gt;From: CLASS Notification &lt;notification class.noaa.gov=&quot;&quot;&gt;
To: xxxxx@gmail.com
Subject: CLASS Order 2543408113 Processing Complete
Message-Id: &lt;20161022004035 .6c2712a04a=&quot;&quot; odom.class.ngdc.noaa.gov=&quot;&quot;&gt;
Date: Sat, 22 Oct 2016 00:40:35 +0000 (UTC)



             NOAA  COMPREHENSIVE LARGE ARRAY-DATA STEWARDSHIP SYSTEM

                          A SERVICE OF:
                   NOAA NATIONAL DATA CENTERS


CLASS has processed your order number 2543408113.  The total size of 
this order is 828539287 bytes.
Comments for this Order:  The following item(s) are available for you to ftp copy.  The procedure to copy is 
as follows:

      ftp ftp.class.ngdc.noaa.gov    - Logon to CLASS system
      anonymous         - FTP user id
      user@internet     - FTP password
      binary            - Changes transfer mode to binary
      cd 2543408113 get 001/GVF-WKL-GLB_v1r0_npp_s20151219_e20151225_c201512260752220.nc
 ...
 get 001/GVF-WKL-GLB_v1r0_npp_s20160101_e20160107_c201601080722310.nc
                        - Copies data to your system
      bye (or quit)     - Ends FTP session

Alternatively, you can also pick up your data  via

 http://download.class.ngdc.noaa.gov/download/2543408113

NOTE: You must pick up your data within 96 hours of this notice.



Thank you.


DO NOT reply to this e-mail as it is automatically generated. 
Please direct questions to the Help Desk:


                   NOAA/CLASS User Assistance
                   National Centers for Environmental Information
                   151 Patton Avenue
                   Asheville, NC 28801-5001
                   Phone: 828-271-4850 x3183
                   Internet: class.help@noaa.gov.&lt;/20161022004035&gt;&lt;/notification&gt;&lt;/pre&gt;
That is it. You can simply get those files, or actually browse the data as well with URL provided in the confirmation screen of the search tool.&lt;br /&gt;
&lt;h3&gt;
Caveats on the Data&amp;nbsp;&lt;/h3&gt;
The data is comprehensive and you can obtain various other formats as well. One point to note is that the temperature values obtained are converted to Fahrenheit and rounded to the nearest integer, which will result in a loss of accuracy. This loss due to rounding was validated by comparing with the same data set that had the original temperature measurements in Celsius for a single weather station for a particular month, which we had obtained by other means.&lt;br /&gt;
&lt;br /&gt;
And here is a sample of a data set that was obtained through NOAA ISD (formatted as an HTML page, which is how the system provides data for browsing, txt files with raw data can be downloaded separately).&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6oO0AlH2TMaBwqG8O0Yssnc8kypLR_BhJ9PJv1eM43VPBj-fCyziBiIK6Fll1hvHf7EyjekDLFmB5gA96NX8KbU6UX-ZLWNXakY-9N1Ayn-cqsBbmhGxLcjWrnHjFhOdOQbJc3fubebY/s1600/sample_data.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;296&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6oO0AlH2TMaBwqG8O0Yssnc8kypLR_BhJ9PJv1eM43VPBj-fCyziBiIK6Fll1hvHf7EyjekDLFmB5gA96NX8KbU6UX-ZLWNXakY-9N1Ayn-cqsBbmhGxLcjWrnHjFhOdOQbJc3fubebY/s640/sample_data.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://randomthoughtsofbloggerrandom.blogspot.com/feeds/971540607188767564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2016/11/a-treasure-trove-of-weather-data-for.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/971540607188767564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/971540607188767564'/><link rel='alternate' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2016/11/a-treasure-trove-of-weather-data-for.html' title='A Treasure Trove of Weather data for Sri Lanka (Or any other place as well)'/><author><name>Lasantha Fernando</name><uri>http://www.blogger.com/profile/08984637006949013349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWymArdtlcCMbwq6TMXHWzHwdhieVoonXXdSpThBuLodyEb7S1n-9cYuxm9eT5ZOi3fKv3aYNnVVGRROPWLJzdkhAOh2mI03WtfS-Pij8_sQ_tW_blGoIShArfKplmA/s220/mypic.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfi-VMmy7ZPde7IaQPcK5yBDKkaHrhV3DSy0DixCHFBZgj3XLMCTMKvAa_3NCFj3hhNEKD53lmKBeuNl6GhvTSuXrWjmWs2ooxNRa1Bnau3IMtKFiEc_6EY3x68eMZx5f12A-F7eIQjwM/s72-c/isd_page.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7135775987068897205.post-2954896426379862379</id><published>2012-10-23T13:19:00.000+05:30</published><updated>2012-10-23T13:25:40.291+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="checkpoint"/><category scheme="http://www.blogger.com/atom/ns#" term="ipsec"/><category scheme="http://www.blogger.com/atom/ns#" term="openswan"/><category scheme="http://www.blogger.com/atom/ns#" term="vpn tunnel"/><title type='text'>Connecting to Checkpoint Gateway with Openswan - The Details</title><content type='html'>&lt;h2&gt;
Overview&lt;/h2&gt;
&lt;div&gt;
In a &lt;a href=&quot;http://randomthoughtsofbloggerrandom.blogspot.com/2012/09/vpn-tunnel-to-checkpoint-gateway-with.html&quot;&gt;previous post&lt;/a&gt; I explained the basic pre-requisites that you have to setup before you try to establish a VPN tunnel with Openswan. Also, I tried to explain some related terminology to the best of my understanding (That &#39;to the best of my understanding&#39; part is important ... :-) ). In this post, the detailed configuration that worked for me is given.&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
Check-list&lt;/h2&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Before proceeding further, it is always prudent to check that the following steps have been performed.&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Proper certificates for CA and the client machine and the private key for the client has been placed in the proper folders (i.e. &lt;b&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/etc/ipsec.d/cacerts,/etc/ipsec.d/certs,/etc/ipsec.d/private&lt;/span&gt;&lt;/b&gt;)&lt;/li&gt;
&lt;li&gt;IKE uses port 500 by default and NAT-T uses port 4500. It is better to keep both these ports open for UDP traffic by your firewall.&lt;/li&gt;
&lt;li&gt;Try logging through a Windows machine to ensure that the Checkpoint Gateway is up and a VPN tunnel can be established.&lt;/li&gt;
&lt;li&gt;Run &#39;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;ipsec verify&#39;&lt;/b&gt;&lt;/span&gt; to determine that all configurations are OK (No &#39;FAILED&#39; rows)&lt;/li&gt;
&lt;li&gt;Run &#39;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;ip xfrm state&#39;&lt;/b&gt;&lt;/span&gt; to verify that no previously established tunnels are still up.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;
Details&lt;/h2&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
A Very Important Detail&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Something that had me stuck for weeks was that Openswan indicated that a tunnel was established, but no traffic could pass through. The reason is simply that for the default configuration of checkpoint with the client provided for windows by Checkpoint, a tunnel within a tunnel is established. This internal tunnel has an ip range of 10.254.1.0/24 and all the firewall rules at the gateway are written based on that IP range. When Openswan connects to the Checkpoint gateway, the source IP of the connecting machine is taken as the client end IP for the tunnel. So you will have to contact the system administrator at the Checkpoint Gateway and ask him/her to adjust the firewall rules accordingly so that traffic passes through for the required traffic.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Detailed Configuration&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Ok, here is the configuration that worked for me. The top level configuration for openswan which is usually at &lt;b&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/etc/ipsec.conf&lt;/span&gt;&lt;/b&gt; looked like this.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;# basic configuration
config setup
        # Do not set debug options to debug configuration issues!
        # plutodebug / klipsdebug = &quot;all&quot;, &quot;none&quot; or a combination from below:
        # &quot;raw crypt parsing emitting control klips pfkey natt x509 dpd private&quot;
        # eg:
        plutodebug=&quot;control parsing&quot;
        #
        # enable to get logs per-peer
        # plutoopts=&quot;--perpeerlog&quot;
        #
        # Again: only enable plutodebug or klipsdebug when asked by a developer
        #
        # NAT-TRAVERSAL support, see README.NAT-Traversal
        nat_traversal=yes
        # exclude networks used on server side by adding %v4:!a.b.c.0/24
        virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12,%v4:!192.x.x.0/24
        # OE is now off by default. Uncomment and change to on, to enable.
        oe=off
        # which IPsec stack to use. netkey,klips,mast,auto or none
        protostack=netkey

&lt;/pre&gt;
&lt;br /&gt;
Also you might have to edit &lt;b&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/etc/ipsec.secrets&lt;/span&gt;&lt;/b&gt; or to the file that is pointed to by it and add a line similar to following to tell Openswan where your private key is located.&lt;br /&gt;
&lt;pre&gt;: RSA /etc/ipsec.d/private/client-key-out.pem
&lt;/pre&gt;
&lt;br /&gt;
The connection specific configuration looks like this.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre&gt;conn companyvpn
        # Left side is Openswan
        left=%defaultroute
        leftid=%fromcert
        leftsubnet=10.x.x.x/32
        leftrsasigkey=%cert
        leftcert=checkpoint-clcert.pem

        # Right side is Checkpoint
        right=x.x.x.x    # The public IP of the checkpoint gateway should come here
        rightsubnet=192.x.x.x/32
        rightcert=checkpoint-cacert.pem

        # config
        type=tunnel
        keyingtries=3
        rekey=no
#       forceencaps=yes
#       disablearrivalcheck=no
        authby=rsasig

# Please contact the administrator of the gateway to get the exact details for below settings
        # Modify settings if &quot;NO_PROPOSAL_CHOSEN&quot; comes.
        pfs=no
#       aggrmode=yes
        ike=3des-sha1;modp1536
#       keyexchange=ike
#       keylife=1h
        auto=add
&lt;/pre&gt;
&lt;br /&gt;
Now you would need to restart ipsec service to make the configuration changes effective.
&lt;br /&gt;
&lt;div class=&quot;standardcode&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;sudo /etc/init.d/ipsec restart&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
Now to establish the connection, use the following command.
&lt;br /&gt;
&lt;div class=&quot;standardcode&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;sudo ipsec auto --up companyvpn&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
If all goes well, you will get a message like follows with a successfully established connection.
&lt;br /&gt;
&lt;pre&gt;104 &quot;companyvpn&quot; #1: STATE_MAIN_I1: initiate
003 &quot;companyvpn&quot; #1: received Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02_n] method set to=106 
106 &quot;companyvpn&quot; #1: STATE_MAIN_I2: sent MI2, expecting MR2
003 &quot;companyvpn&quot; #1: NAT-Traversal: Result using draft-ietf-ipsec-nat-t-ike-02/03: i am NATed
108 &quot;companyvpn&quot; #1: STATE_MAIN_I3: sent MI3, expecting MR3
004 &quot;companyvpn&quot; #1: STATE_MAIN_I4: ISAKMP SA established {auth=OAKLEY_RSA_SIG cipher=oakley_3des_cbc_192 prf=oakley_sha group=modp1536}
117 &quot;companyvpn&quot; #2: STATE_QUICK_I1: initiate
003 &quot;companyvpn&quot; #2: ignoring informational payload, type IPSEC_RESPONDER_LIFETIME msgid=2a306520
004 &quot;companyvpn&quot; #2: STATE_QUICK_I2: sent QI2, IPsec SA established tunnel mode {ESP=&amp;gt;0x74649578 &amp;gt;0x7695245e dpd=&quot;none}&quot; natd=&quot;none&quot; natoa=&quot;none&quot; pre=&quot;pre&quot; xfrm=&quot;3DES_0-HMAC_SHA1&quot;&amp;gt;
&lt;/pre&gt;
You can try to ping the other end of the tunnel and also try to telnet to some service to check whether the connection was established properly. But chances are that it will not succeed the first time you try, in which case you might have to tweak some settings to get it working.&lt;br /&gt;
&lt;br /&gt;
Also, you can make use of the logs at &lt;b&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/var/log/auth.log&lt;/span&gt;&lt;/b&gt; (The exact file might differ from one distribution to another) to get the error messages that come out of pluto (the keying daemon for IPSec). Also a command like &#39;&lt;b&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;tcpdump&#39;&lt;/span&gt;&lt;/b&gt; (or a tool like &lt;b&gt;wireshark&lt;/b&gt; if you have a GUI based distro) can be very helpful in trying to troubleshoot and resolve any problems that you encounter. Good luck hacking into your ipsec configuration!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Sources&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;a href=&quot;http://www.jacco2.dds.nl/networking/linux-l2tp.html&quot;&gt;http://www.jacco2.dds.nl/networking/linux-l2tp.html&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.openswan.org/projects/openswan/wiki/Connecting_to_the_CheckPoint_VPN-1_NG65_firewall&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;https://www.openswan.org/projects/openswan/wiki/Connecting_to_the_CheckPoint_VPN-1_NG65_firewall&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://randomthoughtsofbloggerrandom.blogspot.com/feeds/2954896426379862379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2012/10/connecting-to-checkpoint-gateway-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/2954896426379862379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/2954896426379862379'/><link rel='alternate' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2012/10/connecting-to-checkpoint-gateway-with.html' title='Connecting to Checkpoint Gateway with Openswan - The Details'/><author><name>Lasantha Fernando</name><uri>http://www.blogger.com/profile/08984637006949013349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWymArdtlcCMbwq6TMXHWzHwdhieVoonXXdSpThBuLodyEb7S1n-9cYuxm9eT5ZOi3fKv3aYNnVVGRROPWLJzdkhAOh2mI03WtfS-Pij8_sQ_tW_blGoIShArfKplmA/s220/mypic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7135775987068897205.post-3744911155475862679</id><published>2012-09-23T01:15:00.000+05:30</published><updated>2012-10-23T13:23:44.809+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="checkpoint"/><category scheme="http://www.blogger.com/atom/ns#" term="ipsec"/><category scheme="http://www.blogger.com/atom/ns#" term="openswan"/><category scheme="http://www.blogger.com/atom/ns#" term="vpn tunnel"/><title type='text'>VPN Tunnel to Checkpoint Gateway with Openswan - Intro</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Overview&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Recently I had the situation where I had to connect to a VPN via a Checkpoint Security Gateway (R70.x) via Linux with IPSec stack. While there were a lot of posts in the net regarding Openswan to which I am very grateful, I still had to tweak configurations from here and there until I could get it working with collaboration from the admin at the gateway side as well. There is also this great book called &#39;&lt;i&gt;&lt;b&gt;Building and Integrating Virtual Private Networks with Openswan&lt;/b&gt;&lt;/i&gt;&#39; by &lt;b&gt;&lt;i&gt;Ken Bantoft and Paul Wouters&lt;/i&gt;&lt;/b&gt; which is like the recommended text for Openswan stuff. For Openswan, this is the background you need for get it working.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Installing Openswan&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;To initially install openswan, you can get it from the package manager of your distro, compile it from source, download a binary or whatever your preference. Mainly this post follows the Debian/Ubuntu setup even though I did try it from Fedora 15 and got the initial tunnel established as well. I think with a few tweaks here and there you can get it to work for any RPM based setup as well without any issue.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;For Openswan, you can use pre-shared keys or X.509 certificates. Our setup was with X.509 certificates. For a Ubuntu, you can just use

&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;standardcode&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;sudo apt-get install openswan&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; text-align: justify;&quot;&gt;It would ask for certificate details at the time of installation where you would need to have prepared-before hand the following documents in PEM format. If you are using untrusted certificates, it would be best to ask your Checkpoint Gateway admin to generate your certificate with the Checkpoint Gateway authenticating as the CA. You might get a .p12 file from which you would have to extract these documents separately. There are many sites that tell you how to convert a PKCS#12 format to various other formats to suit your needs... :-)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Client side certificate&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Client side private key&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;CA certificate (Use the CA certificate of the Gateway for this when working with untrusted [not signed by a trusted CA like Verisign] certificates)&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Alternatively, you can run &#39;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;dpkg-reconfigure openswan&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&#39; at anytime to get that certificate specifying step. This is much easier than manually copying the certificates to proper folders (e.g. CA cert to &lt;b&gt;/etc/ipsec.d/cacert&lt;/b&gt;, keys to &lt;b&gt;/etc/ipsec.d/private&lt;/b&gt; etc.) and configuring.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;After this you have to configure some initial parameters so that ipsec &amp;nbsp;works properly.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Initial Setup&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Before the initial setup, you might have to start Openswan by &#39;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;service ipsec start&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&#39; and run &#39;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;ipsec verify&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&#39;. Oh, and please drop into a root shell if you don&#39;t want to type &#39;&lt;b&gt;sudo&lt;/b&gt;&#39; or &#39;&lt;b&gt;su -c&lt;/b&gt;&#39; or whatever in front of every command. The output of ipsec verify might be similar to this.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre&gt;Checking your system to see if IPsec got installed and started correctly:
Version check and ipsec on-path                              [OK]
Linux Openswan U2.6.37/K2.6.xx.x-1.xx.xx (netkey)
Checking for IPsec support in kernel                         [OK]
 SAref kernel support                                        [N/A]
 NETKEY:  Testing XFRM related proc values                   [FAILED]

  Please disable /proc/sys/net/ipv4/conf/*/send_redirects
  or NETKEY will cause the sending of bogus ICMP redirects!

 [FAILED]

  Please disable /proc/sys/net/ipv4/conf/*/accept_redirects
  or NETKEY will accept bogus ICMP redirects!

 [OK]
Checking that pluto is running                               [OK]
 Pluto listening for IKE on udp 500                          [OK]
 Pluto listening for NAT-T on udp 4500                       [OK]
Two or more interfaces found, checking IP forwarding         [OK]
Checking NAT and MASQUERADEing                               [OK]
Checking for &#39;ip&#39; command                                    [OK]
Checking /bin/sh is not /bin/dash                            [OK]
Checking for &#39;iptables&#39; command                              [OK]
Opportunistic Encryption Support                             [DISABLED]
&lt;/pre&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif; text-align: justify;&quot;&gt;You might actually see a &#39;FAILED&#39; for &#39;Checking NAT and MASQUERADEing&#39; as well if ip forwarding is not enabled. In the &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; text-align: justify;&quot;&gt;&lt;b&gt;/etc/sysctl.conf&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif; text-align: justify;&quot;&gt; you would have to uncomment or add the following lines. [Caution: Do not change other existing lines]&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;standardcode&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;net.ipv4.ip_forward = 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;net.ipv4.conf.default.rp_filter = 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# Disable ICMP redirects for OpenSwan NETKEY stack and other required options&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# Below two lines don&#39;t seem to work when enabled :-(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;#net.ipv4.conf.all.accept_redirects = 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;#net.ipv4.conf.all.send_redirects = 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;net.ipv4.icmp_ignore_bogus_error_responses = 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;net.ipv4.conf.all.log_martians = 0
&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Now, use the &#39;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;sysctl -p&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&#39; command to apply these settings. After that run &lt;b&gt;&#39;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;ipsec verify&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&#39; again. If you are still seeing the &#39;FAILED&#39; checks even after that, use these commands to manually disable ICMP redirects.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;fixedcode&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;for f in /proc/sys/net/ipv4/conf/*/send_redirects; do echo 0 &amp;gt; $f; done&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;for f in /proc/sys/net/ipv4/conf/*/accept_redirects; do echo 0 &amp;gt; $f; done&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Well, that should fix your network configurations for Openswan/IPSec. Do not worry about Opportunistic Encryption being disabled or SAref kernel support not being available. Other parameters should be in [OK] status for the default installation configuration of Openswan. Now we move on to some info on the terms for interested readers. Those who know those stuff or would like to avoid those details can skip the next section.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Terminology&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Now for some overview of the terms and technologies related to setting up a VPN connection via Openswan. First of all, I need to tell you that I do not have in-depth knowledge about any of these technologies,protocols mentioned here. But it helps to be familiar with some of the terms.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;IPSec&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Of course, IPSec is an established standard and Openswan uses IPSec to establish the tunnel. You can learn about IPSec from any standard course on Networking. When connecting with IPSec, there are several phases that the connection goes through when establishing a tunnel. You start from Initiating IKE (Internet Key Exhcange) and go to IKE Phase One, IKE Phase Two and finally after IPSec SAs are established, you can start transferring data. You can see the status of different phases in the output of Openswan or in the logs for Openswan when establishing a tunnel. This information can help you a lot in troubleshooting your connection. If you want to know about IKE and IPsec,&amp;nbsp;&lt;a href=&quot;http://www.ciscopress.com/articles/article.asp?p=24833&quot;&gt;here&lt;/a&gt;&amp;nbsp;is a nice link. Refer to the contents section of the article and it allows you to jump to the specifics of all the related stuff.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Left and Right&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Openswan refers to the two endpoints of the tunnel as left and right and automatically identifies which peer it is running on based on the configuration. This left and right setup is so that you can copy the same configuration to both endpoints with minimal modification. Please feel free to setup your client configuration as left or right according to your preference. :-)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Protocol Stack&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;For Openswan running on Linux, you have to specify a protocol stack. The old stack was KLIPS where you had to manually specify forwarding rules and had more configuration. The newer stack is Netkey and now most kernels do not support KLIPS by default. If you want to go the KLIPS way, here are some posts about compiling KLIPS into your kernel.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.openswan.org/projects/openswan/wiki/Building_and_Installing_an_SAref_capable_KLIPS_version_for_DebianUbuntu&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Openswan Wiki Post&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://ubuntuforums.org/showthread.php?t=1721842&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Ubuntu Forum Post&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;You might have some trouble building KLIPS with NAT-T support. One important difference between KLIPS and Netkey is that KLIPS creates a separate virtual interface for the tunnel established. This might be much more easier to configure in certain cases.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Netkey is still evolving and so not an old and proven technology like KLIPS. It automatically does all the necessary configurations for routing and establishing a tunnel.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;NAT-T&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Nat traversal is needed because most of the time we are probably sitting behind some Nat. So it is always advisable to enable NAT-Traversal or NAT-T for Openswan. This needs to be enabled at both ends.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;There are loads of other stuff related to configuring Openswan that needs to be mentioned. I will mention the detailed configuration stuff in &lt;a href=&quot;http://randomthoughtsofbloggerrandom.blogspot.com/2012/10/connecting-to-checkpoint-gateway-with.html&quot;&gt;another post&lt;/a&gt;. Anyway, the sources mentioned here are pretty good and complete, so you can use them to go ahead and configure stuff on your own if you&#39;d like to hack a little bit and get things working.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Sources&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;a href=&quot;http://www.jacco2.dds.nl/networking/linux-l2tp.html&quot;&gt;http://www.jacco2.dds.nl/networking/linux-l2tp.html&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.openswan.org/projects/openswan/wiki/Connecting_to_the_CheckPoint_VPN-1_NG65_firewall&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;https://www.openswan.org/projects/openswan/wiki/Connecting_to_the_CheckPoint_VPN-1_NG65_firewall&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://randomthoughtsofbloggerrandom.blogspot.com/feeds/3744911155475862679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2012/09/vpn-tunnel-to-checkpoint-gateway-with.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/3744911155475862679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/3744911155475862679'/><link rel='alternate' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2012/09/vpn-tunnel-to-checkpoint-gateway-with.html' title='VPN Tunnel to Checkpoint Gateway with Openswan - Intro'/><author><name>Lasantha Fernando</name><uri>http://www.blogger.com/profile/08984637006949013349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWymArdtlcCMbwq6TMXHWzHwdhieVoonXXdSpThBuLodyEb7S1n-9cYuxm9eT5ZOi3fKv3aYNnVVGRROPWLJzdkhAOh2mI03WtfS-Pij8_sQ_tW_blGoIShArfKplmA/s220/mypic.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7135775987068897205.post-8143693864052008343</id><published>2012-09-05T00:25:00.001+05:30</published><updated>2012-09-05T10:40:58.143+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="anime"/><category scheme="http://www.blogger.com/atom/ns#" term="manga"/><category scheme="http://www.blogger.com/atom/ns#" term="movies"/><category scheme="http://www.blogger.com/atom/ns#" term="opinion"/><category scheme="http://www.blogger.com/atom/ns#" term="review"/><title type='text'>Of Anime and Others</title><content type='html'>&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; I like anime very much. Why? Because of those beautifully drawn characters and landscapes? Definitely. But, ..... in reality, I consider some of those great anime series and films to be beautiful pieces of art. They discuss something more than what is shown in the surface. Something relevant, a social issue, timely or something that is thought provoking. This is true of any great piece of art, irrespective of form or media. It gives the audience something more to think about than just what its outside appearance is.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;
Of Others&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; If you consider the paradigm of story telling, be it books, movies, comics or whatever, we discuss plot, character development, pace, depth of characters, depth of plots etc etc. When it comes to a hobby, an interest or a passion of yours, inevitably you like it because there is something that is appealing to you which contrasts to work of similar nature. In the case of anime, the natural comparison is with movies, the non-animated ones. I am no great expert in movies or anime for that matter and I definitely haven&#39;t watched that many of either category for to claim to be an expert. But my sampling in the non-animated category is essentially limited to Hollywood movies and series, some foreign films subtitled or dubbed, Sinhala (my native tongue) movies and films. There are master pieces in all these categories. Also, I also some light-hearted action only or comedy flicks from time to time. But each of these industries are geared towards different directions and when it comes to art forms that constitute of moving pictures, anime is geared more towards the essence of art more than any other forms in my opinion.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; Now the discussion becomes essentially political. If you consider Hollywood or Bollywood movies, they mass produce films that are constrained to a standard and familiar set of characteristics. These mass productions do have good technical aspects, a good cast and good story and all. But they essentially lack something so essential in an art form. A thought provoking discussion about some interesting topic. That does not mean that a film or series has to be serious or devoid of action sequences. &lt;i&gt;Charlie Chaplin&lt;/i&gt; did comedies. But he explored topics that were very prevalent of those times. Say I think &lt;i&gt;Gladiator&lt;/i&gt; was a wonderful action film. But it was not presented as a muddle of half or fully naked women and blood and gore to fill in the gaps. It explores the fate and destiny of a single person, of corrupt politicians, the hunger for power and many other themes. It explores not in a direct unbelievable fashion, but a subtle, believable fashion and that is what makes it appealing.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3qB1di22VrXhVrmZ4Y0BvnEVXpc-u1a-VnShNNItuThUryGqxYAYXijKkvY5tEbBmesASJ0Dgm_6BZlh0pDbtsBV9vh3pzP5e_Tq0MbSGdlcI4sNIFfwNzzRub4T7Mzu5d8AuaAFHiBk/s1600/480px-Charlie_Chaplin.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3qB1di22VrXhVrmZ4Y0BvnEVXpc-u1a-VnShNNItuThUryGqxYAYXijKkvY5tEbBmesASJ0Dgm_6BZlh0pDbtsBV9vh3pzP5e_Tq0MbSGdlcI4sNIFfwNzzRub4T7Mzu5d8AuaAFHiBk/s320/480px-Charlie_Chaplin.jpg&quot; width=&quot;256&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;[1] Charlie Chaplin - An all time great artist&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; There are timeless classics in all these other industries and I intend no disrepute to those gems. But movie industries(as well as anything else) is getting more and more commercialized and politicized and the sad end result is that true art form that can talk to a persons heart is slowly disappearing.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;i&gt;
My Definition of A Commercial TV Series&lt;/i&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; My definition of a commercial TV series is something that produces a&amp;nbsp;plethora of seasons and episodes according to the ratings they get and they drag and squeeze it until the plot gets so twisted and&amp;nbsp;&amp;nbsp;complicated that even the script writers do not know whether the main heroine was originally a blonde or brunette or whether she belongs to the category of dead, living or undead ;-) . There are exceptions, and usually you&#39;ll find that they are great exceptions!&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;
Of Anime&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; Now of anime and manga which I like very much, they explore these topics much more than Hollywood, Bollywood or similar industries are willing to expose. I feel that there are true artists who are willing to experiment, explore and it is a shame that anime and manga are not so popular as a Hollywood film or commercial TV series.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;h2&gt;
&lt;i&gt;A good work of art must have depth...&lt;/i&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; If you consider a series like &lt;i&gt;Cowboy Bebop,&lt;/i&gt;&lt;b style=&quot;font-style: italic;&quot;&gt;&amp;nbsp;&lt;/b&gt;the genre is space-western type and not in reality. But it explores the characters, and does not try to live off simply by introducing some cool looking gadgets and stuff. The characters give depth and life to the show.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5TgAbPQE9Yg3I_NPN_HIlbuldpsdXacQoHvHLQWncaRumX9xDc15elizuhKihtBOxyJs5ZtcEdP7CHV-i1pj6vP3_Xy5K5t3cwS9vTVwMC8a3bZv7x67txK2wFyZANlZdxH73mM3FhS8/s1600/CowboyBebopDVDBoxSet.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5TgAbPQE9Yg3I_NPN_HIlbuldpsdXacQoHvHLQWncaRumX9xDc15elizuhKihtBOxyJs5ZtcEdP7CHV-i1pj6vP3_Xy5K5t3cwS9vTVwMC8a3bZv7x67txK2wFyZANlZdxH73mM3FhS8/s320/CowboyBebopDVDBoxSet.jpg&quot; width=&quot;235&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;[2] Cowboy Bebop - One of the first anime to break through internationally.... As I understand ... :-)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; The original first series of darker than black, besides being good with great action sequences and good music, explores the characters well. The question that the viewer is wondering about is whether the main characters are truly emotionless, or are they just a bit different from normal and possibly afraid of being shunned by society. Besides, there is deep undertone of mystery in the whole series. If you consider a manga like the hugely popular &lt;i&gt;one piece&lt;/i&gt;, there is this crazy and stupid main character who occasionally shows flashes of wisdom. But his main qualities are his&amp;nbsp;perseverance, determination his absolute loyalty to his &lt;i&gt;nakama (friends)&lt;/i&gt;. We love this character because of those qualities. Although the story is set in an alternate universe, we see oppression, totalitarianism, aristocracy among other things and the hero, although actually a pirate, stands up against the egoistic aristocrats.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; If you take the TV series and manga &lt;i&gt;Monster&lt;/i&gt;,&amp;nbsp;it explores themes of racism, prejudice, psychological experimentation which are all valid themes in today&#39;s society. What it makes it more attractive is the characters are normal people, not superheroes or specially trained superstars, they make mistakes and their decisions can sometimes be questionable. The moral dilemma&#39;s are presented to the audience and they make the audience ponder as same as the character in the story. Most importantly, the story is open-ended, which is a very attractive attribute I find in many anime and manga as opposed to the other similar forms. The film or manga does not decide it for you, but lets you decide. The artist does not try to impose his or her opinion into you, but only raises the question, and those also valid questions. Nothing is so irritating when watching a film if you feel that you are being force-fed someone else&#39;s propaganda for their own purposes.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUHZGb1B4YHfLH2A9fbDkgS_xDt3lYYustm3Nn5Qo2RM02qQr6F-33TrDZBzNvSEE2pSb68b_u8rKHsFpCiomBaaMevTIt6jWjuv52iHH3w3UpD08WH2S7lWlu5vTaf7YskoQFywm6izU/s1600/Monster.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUHZGb1B4YHfLH2A9fbDkgS_xDt3lYYustm3Nn5Qo2RM02qQr6F-33TrDZBzNvSEE2pSb68b_u8rKHsFpCiomBaaMevTIt6jWjuv52iHH3w3UpD08WH2S7lWlu5vTaf7YskoQFywm6izU/s320/Monster.JPG&quot; width=&quot;215&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;[3] Monster - A great piece of work&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;i&gt;
Stimulate me, intellectually, emotionally...&lt;/i&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; A truly great movie or film must explore many different perspectives. Maybe, the film is presenting things in a single perspective, but one that is against the social norm. That is also exploring different perspectives. An art form like story telling must explore the different shades of grey, but not in the sense of &lt;i&gt;Fifty Shades of Grey &lt;/i&gt;(Pun intended). If a country is making films about its glorious past or patriotism, that&#39;s also OK. But we already know what the history books tell us. We want to know about the human side of the story. If you are going to do a war film on Nazis and Allies, then we want to know of the human aspects of the Nazis as well. Not about how sadistic and cruel they were. If you consider a film like &lt;i&gt;Schindler&#39;s list&lt;/i&gt;, it is told through the eyes of a German. Even the seemingly twisted character of Goeth also has human qualities, which makes it more believable. That is why, among other reasons, &lt;i&gt;Schindler&#39;s list&lt;/i&gt; is such a great film. I&#39;d love to see more movies or TV series that discuss relevant issues in-depth coming out of Hollywood or Bollywood. This quality which is like in so many commercialized modern films, is still there in anime and manga. That is why it is a worthwhile direction of exploration.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;I believe, that a true artist should be willing to portray what is relevant to the topic with enough depth, without aiming for personal benefits, commercial or other.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Picture Sources:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;1.&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/File:Charlie_Chaplin.jpg&quot;&gt;http://en.wikipedia.org/wiki/File:Charlie_Chaplin.jpg&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;2.&amp;nbsp;http://image.inkfrog.com/pix/pop7759/Cowboy_Bebop.jpg* (via Wikipedia under the fair use rationale)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;3.&amp;nbsp;http://www.ntv.co.jp/monster/* (via Wikipedia under the fair use rationale)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;* Please note that the copyright of these pictures belong to their respective publishers and used here for the purpose of review under the fair use rationale.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://randomthoughtsofbloggerrandom.blogspot.com/feeds/8143693864052008343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2012/09/of-anime-and-others.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/8143693864052008343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/8143693864052008343'/><link rel='alternate' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2012/09/of-anime-and-others.html' title='Of Anime and Others'/><author><name>Lasantha Fernando</name><uri>http://www.blogger.com/profile/08984637006949013349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWymArdtlcCMbwq6TMXHWzHwdhieVoonXXdSpThBuLodyEb7S1n-9cYuxm9eT5ZOi3fKv3aYNnVVGRROPWLJzdkhAOh2mI03WtfS-Pij8_sQ_tW_blGoIShArfKplmA/s220/mypic.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3qB1di22VrXhVrmZ4Y0BvnEVXpc-u1a-VnShNNItuThUryGqxYAYXijKkvY5tEbBmesASJ0Dgm_6BZlh0pDbtsBV9vh3pzP5e_Tq0MbSGdlcI4sNIFfwNzzRub4T7Mzu5d8AuaAFHiBk/s72-c/480px-Charlie_Chaplin.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7135775987068897205.post-7391525123846712958</id><published>2011-07-17T00:57:00.002+05:30</published><updated>2018-11-07T14:06:53.911+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="based on a true experience"/><category scheme="http://www.blogger.com/atom/ns#" term="poem"/><category scheme="http://www.blogger.com/atom/ns#" term="seductress"/><title type='text'>The Audition</title><content type='html'>&lt;div&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: right; font-size: 16px; margin-left: 1em; text-align: right;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw6skf5lZf3IFz54hVCvbPseWXU3brI-5Sr2iMtYRxd-fU4uFTLDtLWfZz5MSLz_G4XdsjFHD6KMsSJ8L6knzSdoLQioYkFRoHNX9fCkDh4sMhZzTdlwhuFX91A_aLkWWmQ-sTmWbcVPo/s1600/terra-kate-6.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw6skf5lZf3IFz54hVCvbPseWXU3brI-5Sr2iMtYRxd-fU4uFTLDtLWfZz5MSLz_G4XdsjFHD6KMsSJ8L6knzSdoLQioYkFRoHNX9fCkDh4sMhZzTdlwhuFX91A_aLkWWmQ-sTmWbcVPo/s320/terra-kate-6.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Copyright [1]&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;I met a flower in full bloom today,&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;Sweet and sexy as hell,&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;With an airy top and matching tight jeans,&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;I&#39;ve never met such an obvious belle.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;The designer logo in a tiny print,&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;Stamped her class on her dress.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;I heard her voice when she called one of her lovers,&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;Oh! Such an exquisite address.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;Her painted nails shone an emerald green.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;Her sensual curves caressed by a gentle breeze.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;Every man there wanted her just as much as me,&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;But I kept my emotions in a freeze.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;Yet her intriguing glance from time to time,&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;Kindled within me a dormant fire.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;As instincts ingrained in my genetics kicked in,&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;My body began to ache with desire.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;She turned my way, with a sly half smile,&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;Beckoning me into her pleasurable ways.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;&quot; If I were to act on these unquenchable needs,&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;Aren&#39;t our genes to be blamed in the first place? &quot;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;Dreaming away in my surreal fantasy,&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;I drank her curvaceous figure with zeal,&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;When a tiny voice from afar cried out,&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;&quot; What of her character, her virtues? Is she worthy beneath her shell? &quot;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;Ten points I gave for her cuteness,&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;And another ten for her seductive skills.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;But how much for her wisdom and intellect,&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;Or integrity, evidently on par with nil.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 16px; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;u&gt;Image References&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;[1]&amp;nbsp;&lt;a href=&quot;http://whodesignedit.net/photography/dreamlike-conceptual-photography-terra-kate&quot;&gt;http://whodesignedit.net/photography/dreamlike-conceptual-photography-terra-kate&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://randomthoughtsofbloggerrandom.blogspot.com/feeds/7391525123846712958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2011/07/the-audition.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/7391525123846712958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/7391525123846712958'/><link rel='alternate' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2011/07/the-audition.html' title='The Audition'/><author><name>Lasantha Fernando</name><uri>http://www.blogger.com/profile/08984637006949013349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWymArdtlcCMbwq6TMXHWzHwdhieVoonXXdSpThBuLodyEb7S1n-9cYuxm9eT5ZOi3fKv3aYNnVVGRROPWLJzdkhAOh2mI03WtfS-Pij8_sQ_tW_blGoIShArfKplmA/s220/mypic.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw6skf5lZf3IFz54hVCvbPseWXU3brI-5Sr2iMtYRxd-fU4uFTLDtLWfZz5MSLz_G4XdsjFHD6KMsSJ8L6knzSdoLQioYkFRoHNX9fCkDh4sMhZzTdlwhuFX91A_aLkWWmQ-sTmWbcVPo/s72-c/terra-kate-6.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7135775987068897205.post-3529563881899229817</id><published>2011-07-03T18:38:00.114+05:30</published><updated>2011-07-14T22:47:28.425+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="filters"/><category scheme="http://www.blogger.com/atom/ns#" term="grails"/><category scheme="http://www.blogger.com/atom/ns#" term="security filter"/><category scheme="http://www.blogger.com/atom/ns#" term="URL named parameters"/><title type='text'>Grails - Writing a security filter for sanitizing URL parameters</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; Recently an issue came up in a Grails project I was working where I needed to sanitize the URL parameters passed in to prevent SQL injection and similar security issues. What I needed was a simple, clean solution. One approach was to use URLMappings.groovy in the config file and validate the passed in parameters there. However, it got a bit trickier when the URL parameters were named parameters.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; Grails uses a&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;margin-left: 2.5em; padding-left: 2.5em;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 16px;&quot;&gt;/controller/action/id/other_param1/other_param2&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt; type of parameter capturing scheme by default. But what if the project did not use that type of parameters and used named parameters of the form,&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;margin-left: 2.5em; padding-left: 2.5em;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 16px;&quot;&gt;/controller/action?id=XX&amp;amp;other_param1=YYY&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Well, when I tinkered a bit trying to capture these kind of parameters things got a bit messy, inelegant. All the while, when I was searching regarding this, I constantly hit up with Grails filters. So I decided to give it a try. And my conclusion.....it fitted my needs perfectly!&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; To write a filter in grails, all you have to do is to write a class in &#39;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;grails-app/conf&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&#39; directory with a name that ends with &#39;&lt;i&gt;Filters&lt;/i&gt;&#39;. eg. &#39;&lt;i&gt;SecurityFilters&lt;/i&gt;&#39;, &#39;&lt;i&gt;AuthenticationFilters&lt;/i&gt;&#39; etc.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Grails treat all such classes as filters by convention. Consider the screenshots below. It is a very simple sample app that has a student registration mechanism. To view the details of a student you use a URL like &#39;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;/appname/student/show/1&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&#39; where &#39;1&#39; will be passed as the id for the student record. However, the problem occurs when the URL is mangled (might be intentionally or by mistake) and we get an ugly error page. That error page lists a lot of details we don&#39;t want to give to a potential attacker.&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM_qbZUn-qnNRvVy12-Y6XBspO7plVY-v4JoOuegzxhw2dsyjpr_AXbBvxXvLprvZdge-MZOLIVAfybRfUBRNmlDwN9mw5nZG-YolM6j8kqR-EG1PGYWQoeMpGdwLyYXdpdzONF94Bcb4/s1600/slms_good_url.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;352&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM_qbZUn-qnNRvVy12-Y6XBspO7plVY-v4JoOuegzxhw2dsyjpr_AXbBvxXvLprvZdge-MZOLIVAfybRfUBRNmlDwN9mw5nZG-YolM6j8kqR-EG1PGYWQoeMpGdwLyYXdpdzONF94Bcb4/s400/slms_good_url.png&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Correctly entered parameters show the page nicely&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuFnzYql0vEqgy9x2LYm9z8gO6lpwV5Q363SajrD-3GHRJI-XU_5wwqIaGybrGpmvb0nx6YSBdfssvAZQcFjwtAuxCe9yAI5D1IJhdZaX434019_uqOrI0jGNkQtby7csR8YTgb30CX2g/s1600/slms_bad_url.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;297&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuFnzYql0vEqgy9x2LYm9z8gO6lpwV5Q363SajrD-3GHRJI-XU_5wwqIaGybrGpmvb0nx6YSBdfssvAZQcFjwtAuxCe9yAI5D1IJhdZaX434019_uqOrI0jGNkQtby7csR8YTgb30CX2g/s640/slms_bad_url.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Just a simple change to the URL an you get a lot of information about the system&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; Now to the business of writing a filter, all you need to do is to create a groovy class inside &#39;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;grails-app/conf&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&#39; folder such as &#39;&lt;i&gt;SecurityFilters.groovy&lt;/i&gt;&#39;. Given below is a sample code segment.&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;longscrollbox standardcode&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;/**&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;*  Our filter to sanitize URLs. Grails detects any Groovy class inside the&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;*  grails-app/conf folder ending with &#39;Filters&#39; to be a filter by convention.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;* @author lasantha&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;*/&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;class&lt;/b&gt;&lt;/span&gt; SecurityFilters &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;{&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; // All filters are defined is this &#39;filters&#39; block&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt; filters = &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;{&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &#39;urlSanitizeFilter&#39; is the name of our filter.Specify any name.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // controller:&#39;student&#39;,action:&#39;*&#39; means&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &#39;All actions in student controller&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // If you want to capture all actions, use controller:&#39;*&#39;,action:&#39;*&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; urlSanitizeFilter(controller:&#39;student&#39;,action:&#39;*&#39;) &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;{&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // can be one of &#39;before&#39;,&#39;after&#39;,&#39;afterView&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; before = &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;{&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;(params?.id) &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;{&lt;/span&gt;&lt;/b&gt;        &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;// if a parameter named &#39;id&#39; is passed in.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;// if id is not a number of 1-10 digits,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt;(!(params?.id ==~ /\d{1,10}/))&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;return false&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // You can add other filters here. The order in which filters&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;are matched&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;will be determined by the order in which they appear&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;in the &#39;filters&#39; block.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Filters are matched from top to bottom.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; The filters must appear within the &#39;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;def filters = {}&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&#39; code block and you can write any number of filters inside it as you want. There are three types of filters as before, after and afterView. These types actually signify when the filter is applied.&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i&gt;before &lt;/i&gt;- Applied before processing a request URL.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i&gt;after&lt;/i&gt; - Applied after processing a request URL, but before rendering the view.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i&gt;afterView&lt;/i&gt; - Applied after rendering the view.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; You can actually customize for which URL actions the filter is applied via the &#39;controller&#39; and &#39;action&#39; properties for a filter. Inside the filter code also, many attributes such as controllerName, actionName, request, params etc. are available. Returning false inside any filter would mean that any further filtering is &amp;nbsp;stopped and processing of the request is abandoned.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; Finally, after the filter is in effect, this is what you get for an incorrect parameter.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivVg3FDjh9oeMIScCoGPzDR0gIk9jwMEWb89iG9WMubgpmOXRfXOyZdPVY7LkK01q25Z5ilTaLVaQ1R52E-BsHRiLhlSzTVG-jJvg-ACVSESW42XjW8n9xWas-NJk3JYpo87w8JD4nEco/s1600/slms_bad_url_filtered.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;368&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivVg3FDjh9oeMIScCoGPzDR0gIk9jwMEWb89iG9WMubgpmOXRfXOyZdPVY7LkK01q25Z5ilTaLVaQ1R52E-BsHRiLhlSzTVG-jJvg-ACVSESW42XjW8n9xWas-NJk3JYpo87w8JD4nEco/s640/slms_bad_url_filtered.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Incorrect URL with filter gives blank page&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; A blank page. The filter chain broke down when that return false was triggered.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://randomthoughtsofbloggerrandom.blogspot.com/feeds/3529563881899229817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2011/07/grails-writing-security-filter-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/3529563881899229817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/3529563881899229817'/><link rel='alternate' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2011/07/grails-writing-security-filter-for.html' title='Grails - Writing a security filter for sanitizing URL parameters'/><author><name>Lasantha Fernando</name><uri>http://www.blogger.com/profile/08984637006949013349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWymArdtlcCMbwq6TMXHWzHwdhieVoonXXdSpThBuLodyEb7S1n-9cYuxm9eT5ZOi3fKv3aYNnVVGRROPWLJzdkhAOh2mI03WtfS-Pij8_sQ_tW_blGoIShArfKplmA/s220/mypic.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM_qbZUn-qnNRvVy12-Y6XBspO7plVY-v4JoOuegzxhw2dsyjpr_AXbBvxXvLprvZdge-MZOLIVAfybRfUBRNmlDwN9mw5nZG-YolM6j8kqR-EG1PGYWQoeMpGdwLyYXdpdzONF94Bcb4/s72-c/slms_good_url.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7135775987068897205.post-4196996713679574541</id><published>2011-06-04T22:40:00.000+05:30</published><updated>2018-11-07T14:08:41.554+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="distributed systems promo"/><category scheme="http://www.blogger.com/atom/ns#" term="parallel computing promo"/><title type='text'>Promoting Distributed and Parallel Computing</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; Distributed and Parallel Computing is an important area of study....no doubt about it. It is indeed the way forward. However, this attachment of importance seems to hide away what a fun and interesting area it is...at least for me.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; Distributed and parallel systems have achieved a lot of seemingly impossible tasks. All those super computers that clock tera flops and peta flops to aid in top secret government projects; well... they are classic examples of parallel systems. Heard of the new cool architecture of nVidia that pushes 3D graphics to the next edge. Yeah.... that&#39;s parallel computing as well. Am not talking about technologies like SLI or cross fire here. nVidia&#39;s new architecture that goes by the name of &#39;fermi&#39; has a set off a lot of hype and buzzes. Here&#39;s what I gleamed by going through their websites.&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;512 CUDA cores (CUDA is nVidia&#39;s computing engine)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;L1, L2 caching&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;ECC support&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Support for thousands of threads&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;All that ground breaking graphics that come with new games are possible because of such parallel architectures.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Heard of grid computing? SETI@home, BOINC etc. SETI@home having 5+ million nodes. Biggest computations ever....&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Cluster computing that brings super computing the layman....&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Overlay routing, distributed file servers?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Tiger video server&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Bit-torrents? All those illegal movies and songs that you download from torrents&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;And that&#39;s just the tip of a very long list.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; Cluster computing? Have you tried this cool Linux software that goes by the name of OSCAR (Open Source Cluster Application Resources - &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;a href=&quot;http://svn.oscar.openclustergroup.org/trac/oscar&quot;&gt;Here&#39;s the link&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;). You can literally turn your old lab computers to a high performance cluster with this tool.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; There&#39;s a lot of research going on in this area and the interesting and fun stuff that churn out of this field is practically limitless. You should really give it a try!&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://randomthoughtsofbloggerrandom.blogspot.com/feeds/4196996713679574541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2011/06/promoting-distributed-and-parallel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/4196996713679574541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/4196996713679574541'/><link rel='alternate' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2011/06/promoting-distributed-and-parallel.html' title='Promoting Distributed and Parallel Computing'/><author><name>Lasantha Fernando</name><uri>http://www.blogger.com/profile/08984637006949013349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWymArdtlcCMbwq6TMXHWzHwdhieVoonXXdSpThBuLodyEb7S1n-9cYuxm9eT5ZOi3fKv3aYNnVVGRROPWLJzdkhAOh2mI03WtfS-Pij8_sQ_tW_blGoIShArfKplmA/s220/mypic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7135775987068897205.post-6236712612429550742</id><published>2011-04-01T22:56:00.000+05:30</published><updated>2018-11-07T14:08:52.623+05:30</updated><title type='text'>Intricate weaves...</title><content type='html'>&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS-BZvUBCkvpWp0wiCYsnODnYvprKF3ZHUeF_ukevj6kCzfpG30p9SlpppRNgdGEW2Pm1gDNji5es4hYLPnwqKA3jsFP3_D7gAuMfiRkGyBKsBkBWqIeqEjvQA6efj7F_X9-ctonKKznU/s1600/5160902848_b917345bd0.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;266&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS-BZvUBCkvpWp0wiCYsnODnYvprKF3ZHUeF_ukevj6kCzfpG30p9SlpppRNgdGEW2Pm1gDNji5es4hYLPnwqKA3jsFP3_D7gAuMfiRkGyBKsBkBWqIeqEjvQA6efj7F_X9-ctonKKznU/s400/5160902848_b917345bd0.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;See reference for licensing information&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Sometimes, the strings of life that connect us to each other, the way it twists and turns around our lives... makes you wonder whether if it is all a part of one great plan. Destiny, fate, one true god, call it whatever you want, but the fact remains that life weaves some beautiful patterns that truly inspire our souls.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;If you think a bit deep,&amp;nbsp;I do believe that&amp;nbsp;you can see patterns in most things. But sometimes, a pattern comes up that blurs away and eats away at another. Zoom out your vision and the bigger picture becomes clearer. As you zoom out, you see newer and more dazzling weaves. Yet, you&#39;ll lose sight of the minute intricate patterns that was the your centre of attention earlier.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif;&quot;&gt;At times, I feel frustrated beyond comprehension. I guess this is because I still haven&#39;t figured out how life is supposed to work out. Maybe, I am grasping at straws in hope for a solution. Maybe, these are too much philosophical questions never to be solved by wanderers like me. Yet at times, you get this soothing feeling at the same time, just by appreciating the intricate connections and cross roads of life. This emotion makes you feel so calm and smooth &amp;nbsp;in such a way that it makes you able to think so clearly about ethereal and illusive visions. I find these moments to be so strong and soothing at the same time. Am I drugged? Am I mad? or is it all just an illusion? I always thought that life had a deeper meaning that what was seen from the outside. I wish I knew the answers....&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&lt;u&gt;References&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;Picture&amp;nbsp;Copied from&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;http://farm5.static.flickr.com/4144/5160902848_b917345bd0.jpg&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;with Creative Commons License&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='replies' type='application/atom+xml' href='http://randomthoughtsofbloggerrandom.blogspot.com/feeds/6236712612429550742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2011/04/intricate-weaves.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/6236712612429550742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/6236712612429550742'/><link rel='alternate' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2011/04/intricate-weaves.html' title='Intricate weaves...'/><author><name>Lasantha Fernando</name><uri>http://www.blogger.com/profile/08984637006949013349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWymArdtlcCMbwq6TMXHWzHwdhieVoonXXdSpThBuLodyEb7S1n-9cYuxm9eT5ZOi3fKv3aYNnVVGRROPWLJzdkhAOh2mI03WtfS-Pij8_sQ_tW_blGoIShArfKplmA/s220/mypic.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS-BZvUBCkvpWp0wiCYsnODnYvprKF3ZHUeF_ukevj6kCzfpG30p9SlpppRNgdGEW2Pm1gDNji5es4hYLPnwqKA3jsFP3_D7gAuMfiRkGyBKsBkBWqIeqEjvQA6efj7F_X9-ctonKKznU/s72-c/5160902848_b917345bd0.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7135775987068897205.post-6627218563599945239</id><published>2011-02-26T22:35:00.000+05:30</published><updated>2011-02-26T22:35:39.182+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="character development"/><category scheme="http://www.blogger.com/atom/ns#" term="japanese anime"/><category scheme="http://www.blogger.com/atom/ns#" term="planetes"/><title type='text'>Planetes - An anime of depth</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;I&#39;ve just finished watching the anime &#39;Planetes&#39; by Sunrise studio and it blew me away in such a way that I decided I would be doing a disservice to the community at large if i didn&#39;t write a bit about it. It is a solid, beautiful anime with a brilliant story. The animation is good, and so is the score. But when it comes to story and character development, it is just superb. The characters are not the super human kind with hearts of unbelievable who never face moral ambiguity. Nor are they cut in black and white, with their motivation and drive neatly explained, where at the end of series you learn that the villain is evil because of his or her traumatic childhood.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFMRU89-sbSd5Ps9v24N_Hjf71g7No3CN8CyGh8ZhPxapX8Ngqw-LtoqyBKuQMe7BC3msfyJpZNRzmgZi_NtB5_8iNP6eLMXmPBQRCaMfDmO5BsSx-AAuwsfRN4vDNC8xdakZFVb68dp4/s1600/29011119745758.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFMRU89-sbSd5Ps9v24N_Hjf71g7No3CN8CyGh8ZhPxapX8Ngqw-LtoqyBKuQMe7BC3msfyJpZNRzmgZi_NtB5_8iNP6eLMXmPBQRCaMfDmO5BsSx-AAuwsfRN4vDNC8xdakZFVb68dp4/s1600/29011119745758.jpg&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Female protagonist of the series, Ai Tanabe [1]&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Sure, those anime with black &amp;amp; white characters have their niche in the annals of history of animation. It is also true that a good modern anime would fit all the &#39;nice shades of gray characters&#39; to make it smooth around the edges. However, the beauty of the characters in this anime stems from the fact that they are real, and human, even when they are not in the process of making a morally&amp;nbsp;ambiguous decision that affects the fate of the world. Some anime protagonists are there who do have their associated shades of gray touches, but they stumble into murky waters because the fate of all mankind rests on their shoulders.&amp;nbsp;Poor saviour of the world! How could one think straight when the fate of humanity lies on your head. You are bound to step on to some grayish areas and stumble into darkness with all that responsibility! The characters in Planetes are human, flawed, do mistakes and they are real even when it is not the whole world (or the whole solar system in the context of this anime) that is resting on their shoulders.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;The main character, Hachirota Hoshino initially comes up as a typical young salary man in year 2075 A.D. who works with the seemingly &#39;losers&#39; of a large company named Technora. The company itself is a huge corporate institute involved in Space Development. The main female&amp;nbsp;protagonist (means the heroine of the story ;-) ), Ai Tanabe is the usual cheery, cute, kind girl that seems to have an unbending optimistic attitude towards life. She believes that all the problems of humanity can be solved by love. On the other hand we see that Hachirota (&quot;Hachimaki&quot; ) is a bit despondent, because realizing his dreams seem a bit far away given his current situation and this reality bites him at times to make him brash and irritable. His friends/colleagues have moved up in the world while he seems to be stuck on the Debris section of Technora. With this initial setting, the anime kicks off and starts to develop the characters in a natural, yet engrossing fashion.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;During the first episodes, we come to realize that even though everyone else regards them as&amp;nbsp;losers, the Debris section has a streak of selflessness, heroism and love for humanity that contrasts dramatically with the selfish bureaucratic administration of the company. They do a thankless, yet important job in order to keep the space safe, and these characters (or most of them) are working the Debris section not just because it is a job, but because they believe in the importance of their job. However, all of these characters have their little flaws, and some flaws are seem to be stuck forever. The captain of the spaceship that collects space debris is a brash, outspoken woman with an incurable addiction to smoking. The Russian astronaut Yuri is suffering silently from the loss of his wife. Tanabe is a little too optimistic in believing her mantra &#39;Love is the cure for everything&#39;. Hachimaki seems to be struggling to find answers regarding to what he wants to do with his life. He has a dream of owning a spaceship one day. Yet other section workers laugh at his dreams, and probably with justification since his job is not the kind that lets you save enough for a spaceship (Though I have no idea how much a space ship costs...How much does one cost really? )&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCdFLmsBvQUjsj493_VrSPy8GtuQOh1Eyd0j5EscVHhrCRyYFmh2QHBhc2CvSGtIni1u-7U_fMZ86SDWbNg41TufKmhfPecGM4BkcJaAhoMY0pPiiIlGLLfT77wpgwsaJb4nhX411VNo4/s1600/2384512314_ac736280b9_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;266&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCdFLmsBvQUjsj493_VrSPy8GtuQOh1Eyd0j5EscVHhrCRyYFmh2QHBhc2CvSGtIni1u-7U_fMZ86SDWbNg41TufKmhfPecGM4BkcJaAhoMY0pPiiIlGLLfT77wpgwsaJb4nhX411VNo4/s400/2384512314_ac736280b9_o.jpg&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;The Jovian Explorer, Von Braun [2]&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Then comes the accident which becomes the turning point for Hachimaki. He is eventually cured, after his drive and ambition to go in a bigger, faster machine is renewed by witnessing the space ship Von Braun, mankind&#39;s newest and most powerful space ship built to carry men to Jupiter. He decides to join the crew of Von Braun and prepares himself for the tough tests that are part and parcel of becoming a crew member of this ship. However, along with his new determination comes a streak of selfishness and cold-heartedness that he believes is necessary to achieve his dreams. He enters a psychological whirlwind where he is conflicted between his need for company, his love for Tanabe, his alter-ego that taunts him by telling he is weak and his own father&#39;s words - (not exact) &quot;Space is not conquered by men who are afraid to follow their own dreams&quot;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;He starts building psychological barriers against society and becomes more more and more lonely. This culminates in a near nervous breakdown for him, and he finally decides to meet Tanabe, whom he had been avoiding after the accident. However, when he finally tries to reconnect with his former world that he had cut off for some time, he learns that Tanabe had faced an accident. The accident happened when she was drawn into the chaos of an attack against Von Braun, while she was aboard the ship in hope of meeting Hachi and breaking his psychological barriers. During the attack, Tanabe escapes in a pod to the moon, and is faced with a lack of help and oxygen in a barren and unforgiving environment. The climax in this sequence of events come when Tanabe is dying for lack of oxygen, and she suddenly realizes that Hachi&#39;s drive comes from his attraction to bigger, faster and more powerful machines, and not from her love for him. Her seemingly unwavering belief in love and humanity is shaken for the first time, and she contemplates taking oxygen from her wounded companion who is also one of the individuals responsible for the attack on Von Braun. While almost going to reach for the oxygen tank of her companion, she collapses from lack of oxygen.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;The final episodes deal with Hachi&#39;s revelation regarding the errors in his life philosophy, and his&amp;nbsp;reconciliation with Tanabe (nope...she didn&#39;t die in that accident, though she loses control of her limbs due to nerve damage). Tanabe is in a wheel chair, undergoing therapy, hopefully for a full recovery. Hachi tells her how his ideas were mistaken and he apologizes. Tanabe tells him about how her experiences during the last year has affected her and the two reconcile with each other. Then the plot progresses quickly to reach its eventual conclusion.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Also, through out the series, there are lot of other themes that are discussed, such as how powerful nations exploit the resources of poorer countries and the dirty politics associated with these strategies. Each of these themes merit their own separate discussion if to be reviewed with proper credit and appreciation. The anime does a wonderful job of connecting all the plot lines together and giving off the different messages convincingly at the right time. Most of the answers to the questions raised are given in an indirect manner, with a lot of depth and a large scope. The motif of the last will is quite beautiful in regard to the way it sums up the character development. It is introduced at the beginning of the film and appears at the end to connect the two main protagonists and nicely wraps up their development through out the series.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;The beauty of the series lies in the not so clearly defined answers which are presented at the end. It is not a case of the hero realizing his undying love for the girl and suddenly decides to give up all his dreams for that girl. Nor is it a tragic love story where the boy leaves the girl to die for the sake of a cold, heartless journey in pursuit of fame, fortune and knowledge. &amp;nbsp;Instead, the series &amp;nbsp;presents somewhat of a compromise, although the final conclusion may be a bit unexpected. It is a practical, very plausible ending, even if the purity and devotion the heroine might be a bit too good for real life.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;The anime doesn&#39;t end by saying that the bleak, black, bad characters are now doomed, the seemingly gray personalities are now reformed, and all those&amp;nbsp;bureaucrats&amp;nbsp;and dirty politicians are now defeated. Some crooks stay unpunished, as they never seem to grasp the reality. Some lost souls find their way back to life through a path of repentance and service to humanity. The world still moves the same old way, even though the path through the story produces some champions for the oppressed, and knocks some sense to some of the bureaucrats. But the series never presents fully all the reasons and motivation behind the decisions of each character. Yet its final answer, though hard to articulate into clearly defined thoughts and words, is so clear...and beautiful!&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcObV-N4Aw6RkqqWu2xFmOCz4z7TCuyy9wi8XnzrA61K1PqZl4rkTrHJgKl6C8T-7vPo0IeUf2jHH4yVs7ukwhPWA8NqwTeVMZvh-A2IS8IrjAQ8ssuMptKn1ht3Cv1UqEKu2XqKt3Hw8/s1600/1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcObV-N4Aw6RkqqWu2xFmOCz4z7TCuyy9wi8XnzrA61K1PqZl4rkTrHJgKl6C8T-7vPo0IeUf2jHH4yVs7ukwhPWA8NqwTeVMZvh-A2IS8IrjAQ8ssuMptKn1ht3Cv1UqEKu2XqKt3Hw8/s400/1.jpg&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;The two main characters having their moment... [3]&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;u&gt;Picture Sources&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;1.&amp;nbsp;&lt;a href=&quot;http://www.homemademech.com/anime-reviews/planetes/836&quot;&gt;http://www.homemademech.com/anime-reviews/planetes/836&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;2.&amp;nbsp;&lt;a href=&quot;http://www.flickr.com/photos/jpl3k/2384512314/sizes/o/in/photostream/&quot;&gt;http://www.flickr.com/photos/jpl3k/2384512314/sizes/o/in/photostream/&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;3.&amp;nbsp;&lt;a href=&quot;http://omohide.com/943/planetes-review/&quot;&gt;http://omohide.com/943/planetes-review/&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Copyright for all these pictures belong to Sunrise Inc. and I hope they don&#39;t mind me taking these pictures for the purpose of review.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://randomthoughtsofbloggerrandom.blogspot.com/feeds/6627218563599945239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2011/02/planetes-anime-of-depth.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/6627218563599945239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/6627218563599945239'/><link rel='alternate' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2011/02/planetes-anime-of-depth.html' title='Planetes - An anime of depth'/><author><name>Lasantha Fernando</name><uri>http://www.blogger.com/profile/08984637006949013349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWymArdtlcCMbwq6TMXHWzHwdhieVoonXXdSpThBuLodyEb7S1n-9cYuxm9eT5ZOi3fKv3aYNnVVGRROPWLJzdkhAOh2mI03WtfS-Pij8_sQ_tW_blGoIShArfKplmA/s220/mypic.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFMRU89-sbSd5Ps9v24N_Hjf71g7No3CN8CyGh8ZhPxapX8Ngqw-LtoqyBKuQMe7BC3msfyJpZNRzmgZi_NtB5_8iNP6eLMXmPBQRCaMfDmO5BsSx-AAuwsfRN4vDNC8xdakZFVb68dp4/s72-c/29011119745758.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7135775987068897205.post-7646717047972061683</id><published>2011-02-08T13:27:00.000+05:30</published><updated>2011-02-08T13:27:39.698+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="concurrent programming"/><category scheme="http://www.blogger.com/atom/ns#" term="dijkstra"/><category scheme="http://www.blogger.com/atom/ns#" term="semaphores"/><title type='text'>A Wee Bit On Semaphores</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&amp;nbsp;&amp;nbsp;There was a recent discussion regarding semaphores in a lecture I was attending, and this eventually led me to dig a little bit about semaphores. Of course, am talking about the semaphores used in computers, not any other kind. Semaphores are synchronizing primitives that can be used solve mutual exclusion in an environment that has concurrent processes.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmaPwCzlpCtfwSK0J5P32ykjhmsQxmXa7C5gqwdOETKj8JMx7eAgaAJ1hVah-_g-qwYBoqfQ8JV3tzcvEkqJb1htHe0LO-_UlC_nneeTzK7BlERcXLPWp9G9LTrQEcn9ov4nSIgWrxMqU/s1600/semaphore_pic.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmaPwCzlpCtfwSK0J5P32ykjhmsQxmXa7C5gqwdOETKj8JMx7eAgaAJ1hVah-_g-qwYBoqfQ8JV3tzcvEkqJb1htHe0LO-_UlC_nneeTzK7BlERcXLPWp9G9LTrQEcn9ov4nSIgWrxMqU/s400/semaphore_pic.jpeg&quot; width=&quot;550&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;The basic concept for a semaphore ( This diagram will be more clearer as you read on... ;-) )&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&amp;nbsp;&amp;nbsp;The concept of semaphore seems to be first published by E.W. Dijkstra on his paper, &lt;i&gt;The Structure of &quot;THE&quot;-Multiprogramming System&lt;/i&gt;. For mutual exclusion, he introduces a synchronization primitive termed a &#39;Semaphore&#39; and the two operations P(sem) and V(sem) that can be operated on this primitive. However, I cannot&amp;nbsp;guarantee whether this the first time this concept was published, as it seems that Dijkstra had conceptualized and written about semaphores on one of his manuscripts, EWD 123 to be exact. The paper I mentioned at the beginning of this paragraph was published May,1968 on &lt;i&gt;Communications of ACM&lt;/i&gt;. Probably the EWD was written before that. If you are interested about the paper, try following this link,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;a href=&quot;http://web.cecs.pdx.edu/~walpole/class/cs533/papers/the.pdf&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;http://web.cecs.pdx.edu/~walpole/class/cs533/papers/the.pdf&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;or you can try to google it. (Probably Google Scholar would give you better results). (There is a nice history behind the numbering scheme EWD as well)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&amp;nbsp;&amp;nbsp;Anyway, coming to the concept of semaphore, it basically does something like this (I might not capture the rigour and correctness of a semaphore as well as how Dijkstra describes it, so do forgive me if I err on some technicalities. However, I would try to give the basic concept as well as I can)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&amp;nbsp;&amp;nbsp;Dijkstra defines a semaphore as a special-purpose integer that is shared to all concurrent processes. The only way to access a semaphore is via the primitive actions &#39;P-operation&#39; and &#39;V-operation&#39;. When only solving mutual exclusion using semaphores, a semaphore will be essentially a non-negative integer that allows only P and V operations to access it. Binary semaphores are semaphores that are restricted to having only values of &#39;1&#39; and &#39;0&#39;, also known as a mutex. For the mutual exclusion, we only need a mutex (Obviously, as the word mutex is derived from &lt;i&gt;mut&lt;/i&gt;ual &lt;i&gt;ex&lt;/i&gt;clusion...).&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;b&gt;V operation&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&amp;nbsp;&amp;nbsp;V operation increments the value of the semaphore by 1. This is a non-blocking operation that returns immediately. The incrementing step should be atomic (i.e. a scenario like the scheduler jumping in to the middle of the increment and&amp;nbsp;pre-empt the process won&#39;t happen).&amp;nbsp;Also called the &lt;i&gt;up&lt;/i&gt; operation, which is more meaningful.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;b&gt;&amp;nbsp;P operation&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&amp;nbsp;&amp;nbsp;P operation decrements the value of the semaphore by 1, &lt;b&gt;&lt;i&gt;but only if the resulting value is non-negative&lt;/i&gt;&lt;/b&gt;. Otherwise, it would block the calling process until the value of the semaphore becomes non-negative. As soon as the resulting value for the semaphore becomes non-negative, the operation should decrement the value of the semaphore by 1 and complete the operation.The checking of the value for non-negativeness and the subsequent decrement should be non-divisible/atomic. Called as the &lt;i&gt;down&lt;/i&gt; operation as well.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;(From here on I will use the terms &lt;i&gt;up &amp;amp; down&lt;/i&gt; instead of &lt;i&gt;V &amp;amp; P&lt;/i&gt; as they make more sense to us folks who understand a bit of English and nothing of Dutch.... :-) )&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&amp;nbsp;&amp;nbsp;These are the basics for a semaphore. For mutual exclusion, a semaphore will be created that is initialized to 1. This semaphore will be associated with a critical region that it guards. When a process wants to enter the critical region (the region that should not be accessed concurrently), it does a down operation on the associated semaphore, enters the critical region, and after doing its work does an up operation. If a concurrent process has already entered the critical region when another tries to enter, the down operation will block till the semaphore becomes non-negative again. The process that is already inside the critical region will do an up operation only after it has finished its business inside the critical region. Therefore, this mechanism ensures that mutual exclusion property is preserved. And that is the basic mechanism of how mutual exclusion is ensured using semaphores.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&amp;nbsp;&amp;nbsp;Fairly simple, I guess. However, you can tweak the constraints that have been introduced a little bit from here and there to get other uses for the semaphore. For example, you can allow negative values while the keeping the constraint that down operation completes only when non-negative. This would give you an idea of how many processes are waiting on the semaphore. Then again, if you forget mutexes (with values 0 or 1) and allow a semaphore to be any non-negative integer, this type of a semaphore can be used to successfully solve the producer-consumer problem.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&amp;nbsp;&amp;nbsp;Also, note that in this case, we(or rather Dijkstra) have defined that the down operation should complete as soon as the resulting value would be non-negative. When trying to implement this &#39;soon as&#39; part, several possible mechanisms come up.&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;Using busy waiting for the down operation where execution iterates in an infinite loop till the semaphore becomes can be decremented to a non-negtive value ( Here, execution time for other processes should be allowed in between loops)&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;Keeping a set of processes that became blocked on a down and waking one of them randomly on an up operation if there are any blocked processes&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;Using a queue and queueing them up when blocking on the down operation and waking them up when an up operation is performed if the queue is not empty (gives a FIFO access mechanism)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;And there might be more for all I know.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;Here is the pseudo code for the above three.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;i&gt;For all the code segments below, S will be a non-negative integer that is initialized to 1.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;b&gt;Busy waiting&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;i&gt;V-operation&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;fixedcode&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// Just atomic incrementing of S&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; margin: inherit;&quot;&gt;S := S + 1;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; margin: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;i&gt;P-operation&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;fixedcode&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;while(true) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;// Checking of S and setting it should happen atomically&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;if(S&amp;gt;0) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;S := S - 1;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;// Let other processes have their share of execution&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;b&gt;Blocked set of processes&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;i&gt;V-operation&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;fixedcode&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;if(blocked_process_set NOT empty) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// Wake up a randomly selected process from the set&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;wakeup_process();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;else {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;// Increment should happen atomically&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;S := S + 1;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;i&gt;P-operation&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;fixedcode&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// Testing and setting S should happen atomically&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;if(S&amp;gt;0) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;S := S - 1;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;else { &amp;nbsp;// This block should execute atomically&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;add_process_to_blocked_set();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;sleep();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;b&gt;Queue of blocked processes&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;i&gt;V-operation&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;fixedcode&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;if(blocked_process_queue NOT empty) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;// Wake up the process at the head of the queue&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;wakeup_process();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;else {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;// Increment atomically&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;S := S + 1;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;i&gt;P-operation&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;fixedcode&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;if(S&amp;gt;0) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;// Atomic&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;S := S - 1;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;else {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;// Again atomic execution&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;add_process_to_queue();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;sleep();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&amp;nbsp;&amp;nbsp;There is a lot more to semaphores than just this. But it is one of the basic synchronizing primitives when it comes to concurrent programming and it is totally worth your time to dig up a bit more on semaphores to get your basics right.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 110%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;References&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;&lt;ol&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Edsger W. Dijkstra, &quot;The Structure of the &#39;THE&#39; - Multiprogramming System&quot;, &lt;i&gt;Communications of the ACM&lt;/i&gt;, Volume 11, No. 5, May, 1968. pp.341-346&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&quot;E.W. Dijkstra Archive: Cooperating sequential processes (EWD 123)&quot; [Online] Available:&amp;nbsp;&lt;a href=&quot;http://www.cs.utexas.edu/users/EWD/transcriptions/EWD01xx/EWD123.html&quot;&gt;http://www.cs.utexas.edu/users/EWD/transcriptions/EWD01xx/EWD123.html&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&quot;Semaphore (Programming) - Wikipedia, the free encyclopedia&quot; [Online] Available:&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Semaphore_(programming)&quot;&gt;http://en.wikipedia.org/wiki/Semaphore_(programming)&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&quot;Edsger W. Dijkstra - Wikipedia, the free encyclopedia&quot; [Online] Available:&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Edsger_Dijkstra&quot;&gt;http://en.wikipedia.org/wiki/Edsger_Dijkstra&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://randomthoughtsofbloggerrandom.blogspot.com/feeds/7646717047972061683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2011/02/wee-bit-on-semaphores.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/7646717047972061683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/7646717047972061683'/><link rel='alternate' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2011/02/wee-bit-on-semaphores.html' title='A Wee Bit On Semaphores'/><author><name>Lasantha Fernando</name><uri>http://www.blogger.com/profile/08984637006949013349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWymArdtlcCMbwq6TMXHWzHwdhieVoonXXdSpThBuLodyEb7S1n-9cYuxm9eT5ZOi3fKv3aYNnVVGRROPWLJzdkhAOh2mI03WtfS-Pij8_sQ_tW_blGoIShArfKplmA/s220/mypic.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmaPwCzlpCtfwSK0J5P32ykjhmsQxmXa7C5gqwdOETKj8JMx7eAgaAJ1hVah-_g-qwYBoqfQ8JV3tzcvEkqJb1htHe0LO-_UlC_nneeTzK7BlERcXLPWp9G9LTrQEcn9ov4nSIgWrxMqU/s72-c/semaphore_pic.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7135775987068897205.post-8199740696166049847</id><published>2011-01-23T20:23:00.004+05:30</published><updated>2011-03-01T23:12:15.437+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="java options"/><category scheme="http://www.blogger.com/atom/ns#" term="java tuning"/><category scheme="http://www.blogger.com/atom/ns#" term="JVM options"/><title type='text'>Further JVM Options for Tomcat</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;In my &lt;a href=&quot;http://randomthoughtsofbloggerrandom.blogspot.com/2011/01/jvm-options-for-tomcat.html&quot;&gt;last post&lt;/a&gt;, I was trying to explain a bit about the basic JVM options. While completely oblivious to whether it was a successful post or not, I will try to describe some more options. Actually, these are the more fun options. Please note that most of the finer details I have taken from this very nice article at Java World (&lt;a href=&quot;http://www.javaworld.com/javaworld/jw-01-2002/jw-0111-hotspotgc.html&quot;&gt;http://www.javaworld.com/javaworld/jw-01-2002/jw-0111-hotspotgc.html&lt;/a&gt;). Feel free to explore it as well. It explains in detail very well.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;NewSize&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt; (Specified in the form of -XX:NewSize=512m) As you probably know, there are main generations in the Java memory model. This option specifies the default size for the new/young generation. Setting these sizes correctly is really important. Say your app is a server application that creates a lot of objects as per requests, but does not need to keep these created objects for a long time. This means that you are creating a lot of that can be collected as garbage fairly quickly. Therefore, for that type of an application, you need a relatively large young generation. Otherwise, if the new generation gets filled up too quickly and if the JVM doesn&#39;t have a place to put new incoming large objects, it might be forced to go to the old generation for creating objects. Then comes imminent performance degradation, as old generation GC is heavy on the resources and takes time. Also, during full GC the application just goes boink!! and stops responding to all external events. There are options that can tune-up GC for old generation. But still, why should we let objects live till they get old, if we can kill them when they are young, if we have a large enough new generation. You can also specify the new ratio to specify how the ratio of old gen to young gen. Specified in the form of -XX:NewRatio=3, the above means that 1/4th of heap will be allocated to new gen while the remaining 3/4th will be allocated to old gen. For server class VMs the default ratio is 2(1/3rd and 2/3rd). For client VMs, it is 8.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;MaxNewSize&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt; The maximum limit for the new size. Specified as -XX:MaxNewSize=256m&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;SurvivorRatio&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt; Remember that the young generation is further divided as eden space and survivor space. Well the ratio between the survivor space and the eden space can be determined using this option. If you specify as -XX:SurvivorRatio=15, that means that each survivor space( there are 2 survivor spaces) is 1/15th the size of eden space.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;UseParallelGC&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt; Makes garbage collection parallel using multiple threads for the new generation. If you are running on a parallel architecture with a lot of cores/processors, use this option to optimize your GC.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;This is a boolean option. To set or unset it, you use &#39;+&#39; or &#39;-&#39; accordingly.e.g.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;-XX:+UseParallelGC means &#39;Turn parallel GC on for new gen&#39;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;-XX:-UseParallelGC means &#39;Turn the option off&#39;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Also I forgot to mention, that for these options, my reference was this. &lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html&quot;&gt;http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html&quot;&gt;&lt;/a&gt;It has all the options you need for basic JVM tuning. There are a lot of other options that allow you to do even further fine tuning. But they must have been left out of the VM options page probably because these options were categorized as rare breeds. The following page has a more complete and comprehensive list. &lt;a href=&quot;http://blogs.sun.com/watt/resource/jvm-options-list.html&quot;&gt;http://blogs.sun.com/watt/resource/jvm-options-list.html&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;UseParallelOldGC&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt; Another boolean option that makes GC parallel in old generation. This automatically sets on the UseParallelGC option. Example for usage, -XX:+UseParallelOldGC&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;UseGCOverheadLimit&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt; When this option is turned on, the JVM will throw some OutOfMemory errors before the heap is filled to its capacity to try and free up memory before memory reaches the maximum limit. i.e. it uses a overhead limit to determine when to try to clean up memory. This option is turned on by default. Used in the form, -XX:+UseGCOverheadLimit&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;UseConcMarkSweepGC&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt; Uses parallel threads to mark and sweep in GC cycles. Usually, when a full GC is done, there are pauses that hold all activities of the applications. These &#39;Stop the world pauses&#39; can be reduced if you use concurrent marking and sweeping. It would concurrently mark and sweep while the application is still running.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;AggressiveOpts&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt; This option is supposed to enable aggressive performance tuning. More specifically, enables point performance compiler optimizations as told in the JVM option guide of oracle. However, it seems that it is still in an experimental stage and what options will be enabled/disabled may depend on the JVM build. You better refer to the proper documentation to know which options will get affected when turning this on.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;That is a summary of the basic options. There are lot of other options for fine tuning performance. Also there is a collection of debugging options that will enable you to get a lot of verbose statistics to determine the application behavior. Please use these debugging options to get an idea about where you should focus when optimizing the JVM for your application.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://randomthoughtsofbloggerrandom.blogspot.com/feeds/8199740696166049847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2011/01/further-jvm-options-for-tomcat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/8199740696166049847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/8199740696166049847'/><link rel='alternate' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2011/01/further-jvm-options-for-tomcat.html' title='Further JVM Options for Tomcat'/><author><name>Lasantha Fernando</name><uri>http://www.blogger.com/profile/08984637006949013349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWymArdtlcCMbwq6TMXHWzHwdhieVoonXXdSpThBuLodyEb7S1n-9cYuxm9eT5ZOi3fKv3aYNnVVGRROPWLJzdkhAOh2mI03WtfS-Pij8_sQ_tW_blGoIShArfKplmA/s220/mypic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7135775987068897205.post-6960457308653104549</id><published>2011-01-17T08:03:00.018+05:30</published><updated>2011-07-25T11:57:50.535+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="java options"/><category scheme="http://www.blogger.com/atom/ns#" term="java tuning"/><category scheme="http://www.blogger.com/atom/ns#" term="jvm arguments"/><category scheme="http://www.blogger.com/atom/ns#" term="JVM options"/><title type='text'>JVM options for Tomcat</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Given that we are not here to debate the importance of Java in context of today&#39;s Software industry, or the importance of performance for that matter, one important aspect of an enterprise grade Java application that should be configured properly is the JVM options. There are many a fine blog posts out there that tell us how to configure a JVM properly with complete details. In fact, Oracle has provided (probably it was written during Sun times) a very nice list of options on their site and there are also articles/white papers regarding JVM tuning.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlfOCC58OuW5W0k20gbf01vgKew3PRCo3KKwqEbTnJzwpnLsKhsyChZyH10aOaAIpkMAPKmy_vSw7Uvy0qs1TE_vhH5PBsFfDPzrhHcZGuceG4HEHWbo2oP7JmBD6PfVsGcRbSGkJ31C0/s1600/melody_snap.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlfOCC58OuW5W0k20gbf01vgKew3PRCo3KKwqEbTnJzwpnLsKhsyChZyH10aOaAIpkMAPKmy_vSw7Uvy0qs1TE_vhH5PBsFfDPzrhHcZGuceG4HEHWbo2oP7JmBD6PfVsGcRbSGkJ31C0/s1600/melody_snap.png&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;A monitoring tool showing the JVM options that have been sets&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;What I am writing here is what I have picked up from here and there regarding JVM tuning. Most importantly, I would try to give a brief intro, as they come up, about some common terms that occur when discussing JVM tuning. The application server I tested these options were for &lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;a production grade tomcat server running on Linux. I will be giving examples only for Linux as it is what I am most familiar with.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;u&gt;&lt;b&gt;Passing option arguments to JVM&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Before we go in to any options, let us consider the basics of how to pass an option to the JVM. You can pass them by setting up environment variables.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;For example, you can put them in a variable defined as JAVA_OPTS or CATALINA_OPTS for tomcat. Both are read into the tomcat startup script and any options will be passed on before firing the JVM. (There are other numerous methods as well to pass JVM options)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Tomcat has many scripts that help us set our options correctly. They are all located in the $CATALINA_HOME/bin directory(Simply put, the &#39;bin&#39; directory of a tomcat installation). &#39;catalina.sh&#39; is the script that is invoked for startup and shutdown and if you define any variables in this script, it will be passed on for sure. Also please go through the &#39;catalina.sh&#39; even if you are not your putting your variables there, as it explains all the options that will be read by tomcat very nicely and going through it will give you a good idea about how the JVM is started up for tomcat.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;The recommended way to pass on any options is to set it in &#39;setenv.sh&#39;. Tomcat runs two external scripts before starting tomcat. They are &#39;setclasspath.sh&#39; where you set your classpath variables and &#39;setenv.sh&#39;. Note that &#39;setenv.sh&#39; does not come bundled with tomcat by default. This is so that you can copy your &#39;setenv.sh&#39; to any tomcat installation to instantly customize that tomcat instance the way you want. (i.e. you install a new tomcat instance and copy the &#39;setenv.sh&#39; from your old instance, and voila! your new instance is configured for the same environment as the old one.) So create a &#39;setenv.sh&#39; inside the &#39;bin&#39; directory and set your options.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;Here is a sample configuration of a &#39;setenv.sh&#39; file.&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;scrollbox&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace; margin-left: 50px;&quot;&gt;#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
# Instance specific tomcat options&lt;br /&gt;
&lt;br /&gt;
CATALINA_OPTS=&quot;$CATALINA_OPTS -Xmx1024m -Xms256m -XX:MaxPermSize=256m -XX:PermSize=64m -Djava.library.path=/usr/local/apr/lib&quot;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;You can specify multiple options by separating them with a space. Just include the already defined $CATALINA_OPTS first so that you won&#39;t override options already defined by someone else. In the above example, the following options have been used.&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;-Xmx1024m&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;-Xms256m&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;-XX:MaxPermSize=256m&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;-XX:PermSize=64m&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;-Djava.library.path=/usr/local/apr/lib&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Note that the order of specifying the options do not matter as long as you specify all the necessary options correctly.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;u&gt;Some JVM Options&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Now we know how to set the options, lets move on to learn what these options really mean. Some common options that are used are regarding &lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #d0e0e3;&quot;&gt;Xmx, Xms, PermGenSize, NewSize, SurvivorRatio, UseParallelGC, UseParallelOldGC, UseConcMarkSweep, AggressiveOpts&lt;/span&gt;&lt;/i&gt; so on and so forth.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;-Xmx&lt;/span&gt;&lt;/b&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;One of the most basic options that is needed most of the time. Specifies the maximum heap size for the JVM. Default sizes specified are usually not enough if your application is considerably large. You can google around to find the correct sizes for your application. Always set it well below the memory capacity of your system (Keep some memory for other programs as well, Otherwise java will use up all the system memory and even a simple text editing program might become intolerably slow).Specified in the form of -Xmx&lt;size&gt;&lt;unit&gt;. e.g. -Xmx256m,-Xmx1g etc&lt;/unit&gt;&lt;/size&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;-Xms&lt;/span&gt;&lt;/b&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;The above defined the max heap size. This defines the minimum heap size. This will be the size allocated by default when the JVM starts up initially.Some examples for specifying are -Xms64m,-Xms256m etc.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;PermSize&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Specified in the form of -XX:PermSize=&lt;size&gt;&lt;unit&gt;, PermGenSize specifies the size of the permanent generation of memory. The Sun Hotspot JVM has basically three generations for memory management. They are&amp;nbsp;&lt;/unit&gt;&lt;/size&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Young Generation (Further separates as Eden space, and 2 Survivor spaces)&lt;/span&gt;&lt;/li&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt; &lt;/span&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;Old/Tenured Generation&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;Permanent Generation&lt;/span&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Young Generation&lt;/i&gt; Keeps the most new, short-lived objects. In this generation, Objects are first created in Eden space, and sent to survivor space after a GC(Garbage Collection) on the eden space does not kill the object. From survivor space, they are sent to tenured generation after some time. GCs on young generations are known as minor collections and occur more frequently than major collections.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;i&gt;Tenured Generation&lt;/i&gt; Keeps objects that have survived the young generation. A GC on this is a major collection or full GC and bogs down the application considerably during GC. Therefore full GCs should be less frequent for a properly tuned application. Note that different GC algorithms are used for different generations.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;i&gt;Permanent Generation&lt;/i&gt; Keeps permanent objects that are kept through out the life time of the application. Usually classes are loaded into this generation when starting the application and unloaded when shutting down the application.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Though the brief description about generations came up when trying to explain the option PermGenSize, it is important to have a proper understanding about the generations that the JVM use. Now since we know all about the generations, I can simply say that PermGenSize sets the size of the permanent generation at start up of the JVM. If you have a large application with a lot of classes, keep it high.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #ffe599;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-weight: bold;&quot;&gt;MaxPermSize &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Specifies the maximum allowed size for the permanent generation. If the default size specified is low and JVM needs more perm gen space for class loading, the permanent generation will grow, but only up to the value specified here. The option is passed in the form of -XX:MaxPermSize=&lt;size&gt;&lt;unit&gt;. e.g. -XX:MaxPermSize=256m, -XX:MaxPermSize=512m etc.&lt;/unit&gt;&lt;/size&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #ffe599;&quot;&gt;&lt;size&gt;&lt;unit&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/unit&gt;&lt;/size&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Well, that covers the very basic of options. I originally planned to elaborate more on these options. However, unknowingly it seems, this post has become very long. So I will explain the other options in &lt;a href=&quot;http://randomthoughtsofbloggerrandom.blogspot.com/2011/01/further-jvm-options-for-tomcat.html&quot;&gt;another post&lt;/a&gt;. Until then, see ya...&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://randomthoughtsofbloggerrandom.blogspot.com/feeds/6960457308653104549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2011/01/jvm-options-for-tomcat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/6960457308653104549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/6960457308653104549'/><link rel='alternate' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2011/01/jvm-options-for-tomcat.html' title='JVM options for Tomcat'/><author><name>Lasantha Fernando</name><uri>http://www.blogger.com/profile/08984637006949013349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWymArdtlcCMbwq6TMXHWzHwdhieVoonXXdSpThBuLodyEb7S1n-9cYuxm9eT5ZOi3fKv3aYNnVVGRROPWLJzdkhAOh2mI03WtfS-Pij8_sQ_tW_blGoIShArfKplmA/s220/mypic.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlfOCC58OuW5W0k20gbf01vgKew3PRCo3KKwqEbTnJzwpnLsKhsyChZyH10aOaAIpkMAPKmy_vSw7Uvy0qs1TE_vhH5PBsFfDPzrhHcZGuceG4HEHWbo2oP7JmBD6PfVsGcRbSGkJ31C0/s72-c/melody_snap.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7135775987068897205.post-5176863891802980961</id><published>2010-12-19T19:12:00.006+05:30</published><updated>2011-06-04T22:43:09.340+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="communication"/><category scheme="http://www.blogger.com/atom/ns#" term="importance of listening"/><category scheme="http://www.blogger.com/atom/ns#" term="office parody"/><title type='text'>When two people....</title><content type='html'>When two people who speak the same language but at varying speeds try to talk to each other, the natural tendency of both will be to stop listening to each other. Sometimes this can lead to disastrous consequences. Consider the following scenario.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Scenario1&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;Slow Poke&lt;/b&gt;: You see, the fact is that there is this small problem in this area where you normally get this kind of result, but on exceptional cases, get these kind of results. Now these kinds of results are problematic because .................&lt;/i&gt;&lt;/span&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Smart Aleck&lt;/b&gt;: [Thinking aloud] (Ah, here we go again. This one is still talking about the problem I resolved last week. Gosh!... How long must you give this guy before he gets updated to the present... :-/ )&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;[To Slow Poke] Hmm&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;, Mr. Slow Poke, Sorry&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt; to interrupt, but I resolved this last week, you do &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;this, then that and voila!!&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Now let us break away from that scenario for a wee bit and consider another scenario.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih6h7sn_YFemQBLjeftJjJHzMatvGfCJqtwLS8PGIAEioXs0lMOE1w3qyHooxHO4MUqHq6xcumTn1cTFvuR22DlHs33_UMuRGOBEK3Di315ARBc_34oIAX2tu5LnqgZZbmOEfmuadjVGA/s1600/two-men-coffee-break-on-the-office.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih6h7sn_YFemQBLjeftJjJHzMatvGfCJqtwLS8PGIAEioXs0lMOE1w3qyHooxHO4MUqHq6xcumTn1cTFvuR22DlHs33_UMuRGOBEK3Di315ARBc_34oIAX2tu5LnqgZZbmOEfmuadjVGA/s200/two-men-coffee-break-on-the-office.jpg&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;u&gt;Scenario 2&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Smart Aleck&lt;/b&gt;: Hey Pokey! I&#39;ve this issue. When you do this to that, &amp;nbsp;a somersault to that, and a german suplex on top of that, you get a foie gras entier frais that can be&amp;nbsp;re-sublimated&amp;nbsp;to determine the&amp;nbsp;diachronic properties of duck.&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;This leads to ........ &amp;nbsp; .......... &amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;Check on that, will ya.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Slow Poke&lt;/b&gt;: [Thinking aloud] (Wha...What?? Oh! hell, can this guy never learn to speak a sentence in an intelligible manner. Hey it is true that I have a general degree, but that does not mean that I know of every bloody term you come up by perusing through Wikipedia each day....I know, I&#39;ll just pretend to know, because am too busy to listen to his 2 hour lecture right now. When I really want to know...I&#39;ll go and ask him to explain again, slowly.)&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;[ To Smart Aleck]&amp;nbsp;Yeah, sure. [and shows the thumbs up sign to assure him].&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3whMBB6s58yQMZLEw3-g4vujEpH9zyq3BbNIfGUKPJbDUNN57UH6WaF0G_Q7EOwlvOAB7hPTuErHXYzmVN1dlNEfrps7ebU_JEzQep3TgWjz5aUCnV8iF00NCne9mnVGJuxHDkRPVVfQ/s1600/Lunch.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3whMBB6s58yQMZLEw3-g4vujEpH9zyq3BbNIfGUKPJbDUNN57UH6WaF0G_Q7EOwlvOAB7hPTuErHXYzmVN1dlNEfrps7ebU_JEzQep3TgWjz5aUCnV8iF00NCne9mnVGJuxHDkRPVVfQ/s1600/Lunch.jpg&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;They go for their lunch break and return....&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
What is more interesting is what happens a few hours later. I have given the continuations of the above two scenarios separately. Note the similarity.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Continuation of scenario 1.&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Slow Poke&lt;/b&gt;: Hey Smart Aleck, this is still broke. I thought you said you resolved this.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Smart Aleck&lt;/b&gt;: [Sudden surprise is seen in his face. ] Ah! I thought you were talking about that issue. But seems this is a new issue. Don&#39;t worry. I&#39;ll look into it and fix it in a jiffy.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;[ Smart Aleck retires meekly. Slow Poke lets out some swear words to let out his frustration with Smart Aleck busy bodies...]&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Now for the next scenario.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxPLBlGnnwelqvhC63kiKzOT-8z2RBDF442BguG1lMiDsMaJwjp87FC9oEnF9UAlc4EdzBXor6dW2-MnBYNppJT83Xaud8oYgrQtWC5IuP2oj8ps0PcZFKw496M9yfFUD6jUYxLxh55Vo/s1600/4760-two-businessmen-thinking-about-something-clipart-by-dennis-cox-at-wackystock.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxPLBlGnnwelqvhC63kiKzOT-8z2RBDF442BguG1lMiDsMaJwjp87FC9oEnF9UAlc4EdzBXor6dW2-MnBYNppJT83Xaud8oYgrQtWC5IuP2oj8ps0PcZFKw496M9yfFUD6jUYxLxh55Vo/s320/4760-two-businessmen-thinking-about-something-clipart-by-dennis-cox-at-wackystock.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;u&gt;Continuation of scenario 2.&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Smart Aleck&lt;/b&gt;: What the heck! Why is this happening? Hey, slow poke, didn&#39;t I tell you to check on that issue.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Slow Poke&lt;/b&gt;: What issue? No, you didn&#39;t.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Smart Aleck&lt;/b&gt;: What!? But I told you to look into it. You assured me that you&#39;d do that.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Slow Poke&lt;/b&gt;: Ah! That issue! Sorry, I couldn&#39;t look into it. By the way, I didn&#39;t understand that part about the German souffle.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Smart Aleck&lt;/b&gt;: Urrgh! I wasn&#39;t talking about a German souffle. I was talking about foie gras entier. And a fresh one at that.&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;I remember explicitly telling you that if you do not fry this one within two hours, the re-sublimation procedure would be useless.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;Now look what has happened to my poor duck. We are going to have to do the whole thing again from scratch.... (Aside) Urrgh, I hate idiotic slow pokes.&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Well, that gives the conclusion to our two similar scenarios. Once again, I would stress on the point, note the similarity.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;(Copyrights of the above images belong exclusively to their respective owners)&lt;/i&gt;</content><link rel='replies' type='application/atom+xml' href='http://randomthoughtsofbloggerrandom.blogspot.com/feeds/5176863891802980961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2010/12/when-two-people.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/5176863891802980961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/5176863891802980961'/><link rel='alternate' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2010/12/when-two-people.html' title='When two people....'/><author><name>Lasantha Fernando</name><uri>http://www.blogger.com/profile/08984637006949013349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWymArdtlcCMbwq6TMXHWzHwdhieVoonXXdSpThBuLodyEb7S1n-9cYuxm9eT5ZOi3fKv3aYNnVVGRROPWLJzdkhAOh2mI03WtfS-Pij8_sQ_tW_blGoIShArfKplmA/s220/mypic.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih6h7sn_YFemQBLjeftJjJHzMatvGfCJqtwLS8PGIAEioXs0lMOE1w3qyHooxHO4MUqHq6xcumTn1cTFvuR22DlHs33_UMuRGOBEK3Di315ARBc_34oIAX2tu5LnqgZZbmOEfmuadjVGA/s72-c/two-men-coffee-break-on-the-office.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7135775987068897205.post-5967814402475853050</id><published>2010-08-17T22:55:00.008+05:30</published><updated>2010-08-18T00:08:57.507+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="animation"/><category scheme="http://www.blogger.com/atom/ns#" term="eureka seven"/><category scheme="http://www.blogger.com/atom/ns#" term="japanese anime"/><title type='text'>Of Japanese Anime...</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGnnJ5bU9yWrYDpADSbIGVLTVQMj-20TPrUkUSm93vc8J0_50oSHIQheYbPADuYN_06sbifJ7WSyvkjRzfzElRnWRK3uRXTPB_lyPveRKyv0H7iWXaLpsXjmUiAb6UTS_mP8hUbsmNCCQ/s1600/Eureka+Seven.jpg&quot;&gt;&lt;img style=&quot;float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 320px; height: 200px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGnnJ5bU9yWrYDpADSbIGVLTVQMj-20TPrUkUSm93vc8J0_50oSHIQheYbPADuYN_06sbifJ7WSyvkjRzfzElRnWRK3uRXTPB_lyPveRKyv0H7iWXaLpsXjmUiAb6UTS_mP8hUbsmNCCQ/s320/Eureka+Seven.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5506446646324980914&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-style: italic;font-size:85%;&quot; &gt;Eureka Seven by Bones Studio - One of my favourite anime...it has lovely character development....a beautiful score and lovely animation. Its themes include racial integration, love, family among others...and if you want to know about its finer points of detail and art, listen to the audio commentary track...!&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: trebuchet ms;font-size:100%;&quot; &gt;Japanese anime has been there for a long time. There are collection pieces of this industry that even go as far as the 1950s(According to my meagre knowledge... :-) ). It is true that Japanese Anime has become more popular outside of Japan in recent times. But still, those who are unfamiliar with it view the interest and obsession shown by anime fans with scepticism and disdain. So this post is for the benefit of those who view anime as &#39;just kids stuff&#39; without ever watching a single anime utilising my meagre knowledge and experience relating to the Anime industry.&lt;br /&gt;&lt;br /&gt;First and foremost, it is my firm belief that anime is an art form, just like any other forms of art like cinema, literature, paintings, music and so on. It is indeed the practice of some studios to limit the art of animation only to the young audiences. But that does not mean in anyway that it should be so. While I love characters like Mickey Mouse and Donald duck, it does not mean that the maximum depth that can be expressed out of a cartoon character should be limited to just slapstick comedy and potty humour. Mind you, I am not saying that those type of characters are shallow. They serve beautifully for their particular kind of cartoon shows. But the medium of animation offers us a more broader horizon to experiment with. So why should we limit our art to a specific area with self-imposed boundaries?&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: trebuchet ms;font-size:100%;&quot; &gt;&lt;br /&gt;Japanese anime is just that. It has expanded into the much larger horizon and artistic freedom that was already available to explore to higher depths. It is just sad that some &#39;grown-ups&#39; fail to appreciate this form of art. Indeed, Japanese anime is not just any form of art, it is art that has proven to have a very high depth in all aspects that defines a work of art. Be it animation, storyline, character development, musical score or presentation of the anime itself, the skill and dedication with these aspects have been handled leaves us in no doubt about the level of artistry and creativity involved. True, not all anime series or movies will   stand up to be acclaimed a true masterpiece and a classic. But there are enough gems out there to prove enough and more times that this is a true form of art that can be appreciated by all.&lt;br /&gt;&lt;br /&gt;To those who know of anime and the effort that goes into their production, this is an obvious and bland statement. But still there are people who think that anime is just kids stuff. Sure there are some anime that are done for the sake of younger audiences. But this is a medium of art that can be appreciated by a wider audience with a higher depth than your average kids cartoon. Indeed, IMHO, I think that a good anime series packs more than their counterpart half hour, 1 hour shows in Fox and NBC networks. Hey, I am not against a good TV series or dazzling Disney cartoons. Am just saying that there are many forms art in this world, and if you fail to appreciate art in most of its forms, you are missing out a lot in life.&lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;&lt;br /&gt;Evaluate art for what it is, and be ready to appreciate true forms of art and creativity, regardless of its race, religion, cast or nationality.&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://randomthoughtsofbloggerrandom.blogspot.com/feeds/5967814402475853050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2010/08/of-japanese-anime.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/5967814402475853050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/5967814402475853050'/><link rel='alternate' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2010/08/of-japanese-anime.html' title='Of Japanese Anime...'/><author><name>Lasantha Fernando</name><uri>http://www.blogger.com/profile/08984637006949013349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWymArdtlcCMbwq6TMXHWzHwdhieVoonXXdSpThBuLodyEb7S1n-9cYuxm9eT5ZOi3fKv3aYNnVVGRROPWLJzdkhAOh2mI03WtfS-Pij8_sQ_tW_blGoIShArfKplmA/s220/mypic.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGnnJ5bU9yWrYDpADSbIGVLTVQMj-20TPrUkUSm93vc8J0_50oSHIQheYbPADuYN_06sbifJ7WSyvkjRzfzElRnWRK3uRXTPB_lyPveRKyv0H7iWXaLpsXjmUiAb6UTS_mP8hUbsmNCCQ/s72-c/Eureka+Seven.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7135775987068897205.post-1365457305775359616</id><published>2010-07-02T23:50:00.025+05:30</published><updated>2010-07-03T00:58:37.287+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="brazil"/><category scheme="http://www.blogger.com/atom/ns#" term="brazil defeat"/><category scheme="http://www.blogger.com/atom/ns#" term="brazil lose to netherlands 2-1"/><category scheme="http://www.blogger.com/atom/ns#" term="fifa 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="netherlands beat brazil"/><title type='text'>Brazil exits FIFA 2010</title><content type='html'>&lt;div style=&quot;text-align: right;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm9XBitgG40qikJ1E56r3NHBYVuuj-gxJzYfIb3Cqdm1Xiu7XANa3z_RzzB3dytcp-lJBqyKFPygHCw7TNhNmm7j4Bq6G1xM6fdNUeJolXJX1xwvkBIkeWW5dtraqts2BN04k_AMcUbnc/s1600/svMATCH_DUTCH-420x0.jpg&quot;&gt;&lt;img style=&quot;float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 202px; height: 320px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm9XBitgG40qikJ1E56r3NHBYVuuj-gxJzYfIb3Cqdm1Xiu7XANa3z_RzzB3dytcp-lJBqyKFPygHCw7TNhNmm7j4Bq6G1xM6fdNUeJolXJX1xwvkBIkeWW5dtraqts2BN04k_AMcUbnc/s320/svMATCH_DUTCH-420x0.jpg&quot; alt=&quot;dutch celebrate&quot; id=&quot;BLOGGER_PHOTO_ID_5489385834717905490&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(102, 102, 102); font-style: italic;font-family:verdana;font-size:78%;&quot;  &gt;Wesley Sneijder celebrates the&lt;br /&gt;own goal by Felipe Melo of&lt;br /&gt;Brazil with teammates Dirk&lt;br /&gt;Kuyt and Arjen Robben&lt;br /&gt;. Photo: Getty Images&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;Indeed it broke the hearts of many Brazilian fans to see their team exit the soccer world cup finals at the quarter final stages. Brazil were among the tournament favourites from the very beginning and even thought Netherlands was a tough team to compete with, no one could say today&#39;s match was an upset result.&lt;br /&gt;&lt;br /&gt;South American teams garner a lot of support for themselves, even from neutral fans, not only because of their success at international tournaments, but because of their playing style. They play the game beautifully!. From start to finish, teams like Brazil and Argentina play an open game, and their dribbling skills and control of the ball would keep any fan glued to their play. It is indeed unfortunate to see one such team that has the flair and ability to play it &#39;&lt;span style=&quot;font-style: italic;&quot;&gt;joga bonito&lt;/span&gt;&#39; style has to exit the tournament at this stage. Yet indeed, I guess it is the nature of football that upsets like these happen.&lt;br /&gt;&lt;br /&gt;Many critics have pointed the finger at coach Dunga for veering off from the more attacking and free flowing style of play that has been associated with Brazil so long for a more defensive style of play with fast counter-attacking breaks. Many commentators were saying that Brazil had real steel at the back that counted for a really good defence. However, looking at today&#39;s game, it seemed that after the first mistake was allowed to give an own goal to the opponents, Brazilian defence really fell apart. What was notable was that the Brazilian team really lost it after that goal and was unable to put up a composed and fluent period of play whether it be defence or offence. While it was true that Brazil were able to win some or corners and apply pressure to the Dutch penalty area even after being down by one goal, no really smooth moves for which they are famous for never came off to bring them success. Their pinpoint, defence splitting passing was no where to be seen. Even though there were many Brazilian players who tried to crash through with one of their inspiring runs, their skills were suddenly lacking in dribbling and negotiating tackles. The bottom line, the Brazil team wilted away when the pressure was really turned on.&lt;br /&gt;&lt;br /&gt;It is indeed a good reminder to us all that talent alone cannot do the job to the finish at all times. Brazil was technically superior with half a dozen stars who had more than enough talent to pull it through for Brazil. But IMHO, they lacked the nerves of steel that is needed to pull you through at times of trouble. In this respect, the Dutch was far superior as they held themselves together to comeback from being one goal down. After seeing so many upset results at the group stages, once again we see what would be called another upset by many. It seems that the norm for this world cup held in the rainbow nation is, teams that play their heart out are always rewarded, more so than the teams who base their play on technical perfection. All in all, the Dutch deserve their win, for never giving up, and for holding it together till the final whistle.&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://randomthoughtsofbloggerrandom.blogspot.com/feeds/1365457305775359616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2010/07/brazil-exits-fifa-2010.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/1365457305775359616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7135775987068897205/posts/default/1365457305775359616'/><link rel='alternate' type='text/html' href='http://randomthoughtsofbloggerrandom.blogspot.com/2010/07/brazil-exits-fifa-2010.html' title='Brazil exits FIFA 2010'/><author><name>Lasantha Fernando</name><uri>http://www.blogger.com/profile/08984637006949013349</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWymArdtlcCMbwq6TMXHWzHwdhieVoonXXdSpThBuLodyEb7S1n-9cYuxm9eT5ZOi3fKv3aYNnVVGRROPWLJzdkhAOh2mI03WtfS-Pij8_sQ_tW_blGoIShArfKplmA/s220/mypic.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm9XBitgG40qikJ1E56r3NHBYVuuj-gxJzYfIb3Cqdm1Xiu7XANa3z_RzzB3dytcp-lJBqyKFPygHCw7TNhNmm7j4Bq6G1xM6fdNUeJolXJX1xwvkBIkeWW5dtraqts2BN04k_AMcUbnc/s72-c/svMATCH_DUTCH-420x0.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>