<?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-1630216375320598495</id><updated>2026-03-27T00:24:21.701-07:00</updated><category term="Code is design"/><category term="Lean thinking"/><category term="Myth about software design specification"/><category term="pex"/><category term="Assertion"/><category term="C++"/><category term="Data Driven Design"/><category term="Defensive Programming"/><category term="Democracy"/><category term="Design by contract"/><category term="Fractal Time Box"/><category term="Kernel management style"/><category term="Lera Boroditsky"/><category term="Linguistic relativity"/><category term="Nash Equilibrium."/><category term="Object Oriented Operating System"/><category term="Operating System Design"/><category term="Problem with continuous build"/><category term="Programming language design"/><category term="Regression Testing"/><category term="Sapir-Whorf hypothesis"/><category term="Single Transferable vote"/><category term="Software Design Specs"/><category term="Software Estimates"/><category term="Software Product Lines"/><category term="Software sizing"/><category term="Spiral Development"/><category term="Standard Architecture"/><category term="Static analysis"/><category term="Stupidity of software estimates"/><category term="Unix Design"/><category term="Value Stream"/><category term="Variability in the salaries of software engineers"/><category term="Voting System"/><category term="code comments"/><category term="compiler"/><category term="fortran"/><category term="function point"/><category term="inline comments"/><category term="java"/><category term="literate programming"/><category term="sql"/><title type='text'>Washington Technical Resources</title><subtitle type='html'>Blog dedicated to software engineering, software methodology and my life as a computer engineer.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default?start-index=26&amp;max-results=25'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>38</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-7042483322614110560</id><published>2016-05-10T23:01:00.002-07:00</published><updated>2016-05-10T23:01:50.377-07:00</updated><title type='text'>Phonetics: 2500 year old Sanskrit grammar in BNF form</title><content type='html'>&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
In last post I talked about the Syntax parsing and special X-Bar theory that applies to the natural&amp;nbsp;languages. In this post we&#39;ll start our exploration with 2500 years old grammar in Backus Naur Form and move to internal structure of words&amp;nbsp;and syllables.&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Sanskrit &amp;nbsp;&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
My mother tongue is&amp;nbsp;&lt;a data-mce-href=&quot;https://en.wikipedia.org/wiki/Marathi_language&quot; href=&quot;https://en.wikipedia.org/wiki/Marathi_language&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Marathi Language&lt;/a&gt;&amp;nbsp;which is a daughter language of&amp;nbsp;&lt;a data-mce-href=&quot;https://en.wikipedia.org/wiki/Sanskrit&quot; href=&quot;https://en.wikipedia.org/wiki/Sanskrit&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Sanskrit&lt;/a&gt;&amp;nbsp; and preserves most of the grammatical features of Sanskrit including 8 cases, 3 genders. 50% of the vocabulary is directly from Sanskrit (tat-sama ) and another 25% can be derived by single sound shift (tat-bhava).&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;3 years of Painful High School Grammar&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
I took 3 years of Sanskrit in high school but all I remember is sheer pain learning its grammar.&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Imagine all those latin conjugation and declination tables ? Well&amp;nbsp;!&amp;nbsp;Sanskrit has 10 times more&amp;nbsp;tables.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;You think French liaison and ellisions are hard ? Sanskrit has most such rules for sound changes.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;You think German has long words ? Yes,&amp;nbsp;Sanskrit has that as well. Including famous splitting of prefix and the main verb.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&amp;nbsp;&lt;/h3&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Panini&#39;s Grammar&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;The most&amp;nbsp;authoritative grammar of sanskrit is&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;actually formulated&amp;nbsp;using form similar to&amp;nbsp;modern context free grammars.&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Panini developed his Grammar around 500 BC&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAARlAAAAJDc3NTljODM4LTkwM2UtNGVhNy1iNmE5LTQ0ZjkxMzkxYmZhYw.png&quot; height=&quot;223&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAARlAAAAJDc3NTljODM4LTkwM2UtNGVhNy1iNmE5LTQ0ZjkxMzkxYmZhYw.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;236&quot; /&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;He used 14 classes of phonemes and taking that as lexical terminal symbols of his grammar described Sanskrit grammar as set of&amp;nbsp;3,959 rules to describe all grammatically correct ways to construct Sanskrit sentence.&lt;br /&gt;&amp;nbsp; &amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&amp;nbsp;&lt;/h2&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;The word factory&amp;nbsp;&lt;/strong&gt;&lt;/h2&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 5px; margin-top: 10px;&quot;&gt;
&lt;strong&gt;Human - a&amp;nbsp;talking&amp;nbsp;animal&amp;nbsp;&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Despite our differences all humans are born with an ability for the language most human languages have following properties&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;30-60 sounds that are put together to make syllables.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;The syllables are put together to make words&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;words form phrases&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;phrases form sentences&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;sentences form discourse&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Structure of Words and Syllable&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAWZAAAAJDA2YmI1NTA3LWNhY2EtNGIwOC04Y2E1LWViYzJiZWU2OTI2ZQ.png&quot; height=&quot;80&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAWZAAAAJDA2YmI1NTA3LWNhY2EtNGIwOC04Y2E1LWViYzJiZWU2OTI2ZQ.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;213&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&amp;nbsp;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&amp;nbsp;&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAdCAAAAJGI4ZjFkYzZkLWNiY2ItNDRjYS1iNTQ0LTY4MzM1N2Q4NDI2MA.png&quot; height=&quot;178&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAdCAAAAJGI4ZjFkYzZkLWNiY2ItNDRjYS1iNTQ0LTY4MzM1N2Q4NDI2MA.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;239&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&amp;nbsp;&lt;/h2&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;How human voice is produced.&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Human speech articulation begins in the larynx. The vibrations created there are modified through out the vocal tract which ultimately comes out of the mouth as series of sounds which we understand as sequence of phonemes. Larynx is where the &quot;voice&quot; starts but that sound is progressively modified in the mouth by forming various shapes with our tongue and lips. I have modified the standard diagram to show the schematic of the vocal tract.&amp;nbsp;The most important key concept is this: Our tongue is a very flexible muscle that can form various shapes and that profoundly affects the way we perceive the basic sound that begins at the larynx.&amp;nbsp;&amp;nbsp;[Edited from original here :&amp;nbsp;http://en.wikipedia.org/wiki/File:Illu01_head_neck.jpg.]&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&amp;nbsp;&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAARqAAAAJGNjMTYyNzIyLWExNmMtNGVjMC1hOGNiLWMwNzlkYTdjNzZhZg.jpg&quot; height=&quot;171&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAARqAAAAJGNjMTYyNzIyLWExNmMtNGVjMC1hOGNiLWMwNzlkYTdjNzZhZg.jpg&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;320&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
That brings us to the next concept. There are two types of sounds viz. vowels and consonants.&lt;br /&gt;When the airflow from larynx is not obstructed we perceive that sound. Anyone how has dealt with waveform of human sound knows that most of the waveform is basically sound of&amp;nbsp;&lt;b&gt;vowels&lt;/b&gt;. However the most interesting sounds are generated when the airflow is blocked (or substantially modified) for the brief amount of time. This time frame is seriously tiny compared to rest of the vowel sound and we perceive it as&amp;nbsp;&lt;b&gt;consonant&lt;/b&gt;.&lt;br /&gt;In terms of digital signal processing the waveform of the voice that starts in larynx is modified by the resonance of the vocal tract and therefore we apply the convolution of the simplified model on the right side.&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;br /&gt;&lt;strong&gt;Vowels&lt;/strong&gt;&amp;nbsp;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Vowels take most of the time in speech signal. All consonants are meaningful only in the context of background of robust vowel signal.&amp;nbsp; The larynx is actively producing &quot;voice&quot; during the vowels.&lt;br /&gt;The quality of vowel depends on&amp;nbsp; four attributes.&lt;/div&gt;
&lt;ol style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Height of tongue position&lt;/strong&gt;- In other words whether the gap between tongue and roof of mouth is closed or open. generally four positions are considered. Open, Open mid,Close mid and Close.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Position of tongue&lt;/strong&gt;&amp;nbsp;- Front, central or back&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Roundness of lips&lt;/strong&gt;&amp;nbsp;- The roundness of lips add another effect.&amp;nbsp; They are generally rounded for back vowels.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Nasalization ?&lt;/strong&gt;&amp;nbsp;are the vowels nasalized.&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Below is the list of known vowels and their IPA symbols.&lt;br /&gt;&lt;br /&gt;&lt;img alt=&quot;&quot; class=&quot;center&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAaZAAAAJDcyMzUzZTE5LWJhYTktNDI4NS05NTZiLWI2M2M1MDUxOGFkNw.png&quot; height=&quot;209&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAaZAAAAJDcyMzUzZTE5LWJhYTktNDI4NS05NTZiLWI2M2M1MDUxOGFkNw.png&quot; style=&quot;display: block; height: auto; margin: 30px auto; max-width: 100%; text-align: center;&quot; width=&quot;543&quot; /&gt;&lt;br /&gt;Edited from original here :&amp;nbsp;http://en.wikipedia.org/wiki/File:IPA_chart_2005_png.svg&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The best way to analyze vowels is to look at their frequency spectrogram and look at the peaks. The first three formant are specifically interesting. The roundness of lips changes the positions of formant.&lt;br /&gt;Again there are further diphthongs and glides that are combination of&amp;nbsp; two vowels.&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;br /&gt;&lt;strong&gt;Consonants&amp;nbsp;&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;br /&gt;&amp;nbsp;The consonants are interesting because they are numerous, show great variation in how they are produced and the signal is available for only the short time. They are &quot;negative&quot; because the voicing and vowel are interrupted or blocked by the position of tongue. Here I am going to use somewhat non-standard terminology and classification only because that is how I understand it. Also because i was introduced to the subject via Sanskrit Grammar.&lt;br /&gt;There are three main things to look for - (A) Properties of original sound that is obstructed (B) manner in which the air flow is obstructed/modified&lt;br /&gt;(C) place of obstruction/modification&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Properties of original sound&lt;/strong&gt;&lt;/h3&gt;
&lt;ol style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Voiced vs Unvoiced&lt;/strong&gt;&amp;nbsp;- whether voicing continues or not . [b -p]. [k -g][t-d] are some examples . (saghosh and aghosh.सघोष- अघोष&amp;nbsp;)&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Aspirated vs Non aspirated&lt;/strong&gt;&amp;nbsp;- this difference is important in Indic langauges it effectively doubles the consonants available for use in languages. &amp;nbsp; (alpa prana- maha prana अल्पप्राण- महाप्राण)&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Manner in which flow is obstructed /Modified&lt;/strong&gt;&lt;/h3&gt;
&lt;ol style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;&amp;nbsp;Stops&lt;/strong&gt;&amp;nbsp;- The airflow completely stops&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Friction&lt;/strong&gt;&amp;nbsp;- Sound produced by friction is introduced in the mix.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Affricates&lt;/strong&gt;&amp;nbsp;- these are combination of stop, followed by the friction at the same place.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Liquids&lt;/strong&gt;&amp;nbsp;- sibilant and approximants - where air flow is partially blocked&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Nasals&lt;/strong&gt;&amp;nbsp;- the airflow goes through the nasal channel&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&amp;nbsp;&lt;/h3&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Place of articulation&lt;/strong&gt;&lt;br /&gt;&lt;img alt=&quot;&quot; class=&quot;center&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAS4AAAAJDE0ZTg1MjYyLTlhOGUtNDIxYS1iYjg5LTcwZTZkM2QwYmEzNQ.png&quot; height=&quot;298&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAS4AAAAJDE0ZTg1MjYyLTlhOGUtNDIxYS1iYjg5LTcwZTZkM2QwYmEzNQ.png&quot; style=&quot;display: block; height: auto; margin: 30px auto; max-width: 100%; text-align: center;&quot; width=&quot;400&quot; /&gt;&lt;/h3&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Labial&amp;nbsp;&lt;/li&gt;
&lt;ul style=&quot;list-style-type: disc; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Bilabial&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Labio-dental&lt;/li&gt;
&lt;/ul&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Coronal&amp;nbsp;&lt;/li&gt;
&lt;ul style=&quot;list-style-type: disc; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Dental&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Alveolar&lt;/li&gt;
&lt;/ul&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Palatal&amp;nbsp;&lt;/li&gt;
&lt;ul style=&quot;list-style-type: disc; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Alveo-palatal&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Retroflex&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Palatal&lt;/li&gt;
&lt;/ul&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Dorsal&lt;/li&gt;
&lt;ul style=&quot;list-style-type: disc; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Velar&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Uvular&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Radial&amp;nbsp;&lt;/li&gt;
&lt;ul style=&quot;list-style-type: disc; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Pharyngeal /Epiglotal&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Glotal&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Edited from original here : http://en.wikipedia.org/wiki/File:IPA_chart_2005_png.svg&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/7042483322614110560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2016/05/phonetics-2500-year-old-sanskrit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/7042483322614110560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/7042483322614110560'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2016/05/phonetics-2500-year-old-sanskrit.html' title='Phonetics: 2500 year old Sanskrit grammar in BNF form'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-2049748872712762095</id><published>2016-05-10T23:00:00.002-07:00</published><updated>2016-05-10T23:00:43.258-07:00</updated><title type='text'>Syntax: Colorless green ideas sleep furiously</title><content type='html'>&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
In 1957, the father of modern linguistics Naom Chomsky came up with&amp;nbsp;a sentence &quot;colorless green ideas sleep furiously&quot; as an example of sentence that is syntactically correct but semantically non-sense. He founded a branch of grammar referred as &quot;Generative Grammar&quot;&amp;nbsp;based on the idea of production rules. Here I talk about the basics, X-Bar theory and generalized phrase structure grammar.&amp;nbsp;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;The basics of&amp;nbsp;Context Free Grammar&amp;nbsp;&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAO0AAAAJDVmZGNjMGRhLTNkOWYtNDcwYy05ZDFhLThkZTVjYWI5MzNmZA.png&quot; height=&quot;187&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAO0AAAAJDVmZGNjMGRhLTNkOWYtNDcwYy05ZDFhLThkZTVjYWI5MzNmZA.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;182&quot; /&gt;&lt;/strong&gt;The context free grammar is specified by&amp;nbsp;a system of production rules. Starting with a set of terminal symbols, non-terminal symbol and a distinct starting symbol each production rule specifies how to generate a valid sentence in a given grammar.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Given a sentence identifying the sequence of rules that generate that statement is called Parsing. The raw text is first &quot;tokenized&quot; using lexer and syntax tree is generated during parsing.&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;The grammar is generally specified in a form similar to Backus Naur form&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;There are two ways to parse top-down or bottom-up.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;The LL parsers look&amp;nbsp;ahead k symbols and deterministically chose next production rule to apply. (Often a simple recursive decent parser can be written &quot;by hand&quot; making generous use of switch statements)&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;LALR parsers on the other hand use a &quot;shift/reduce&quot; parsing where a state transition table is used to decide whether to &quot;shift&quot; current token on to the stack or to &quot;reduce&quot; the stack by applying a grammar rule. This often requires getting help of parser generators like yaac.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;The &quot;Language Instinct&quot; and X-Bar Theory&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAaDAAAAJDgxZWEwNGU4LTk2ZWQtNGQzMi1hMGMwLWMzM2VkMzUxZDJkZQ.png&quot; height=&quot;336&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAaDAAAAJDgxZWEwNGU4LTk2ZWQtNGQzMi1hMGMwLWMzM2VkMzUxZDJkZQ.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;220&quot; /&gt;&amp;nbsp;&lt;/strong&gt;As linguists started applying formal grammar theory to the natural languages they realized there is an underlying common structure to all languages.&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;The sentence is made up of phrases&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;The sentence always has verb.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;The order of Subject(S) Object(O) and Verb(V) is fixed for a given language. &amp;nbsp;Eg. English is SVO, Indic languages are SOV , while semantic languages tend to be VSO.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;The order of adjectives (A) , Nouns(N) and&amp;nbsp;Specifiers (Sp) is fixed&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;This ordering is similar to way individual phrases themselves are structured internally.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;X-Bar theory&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The theory is formally called &quot;X-bar&quot; which posits that each phrase is made up of a binary tree. &amp;nbsp;Each phrase must have a district element called &quot;head&quot; and the phrase structure is specified by following rules. The structure applies to Noun Phrase, Verb Phrase and Preposition Phrase. (Even the sentence itself!)&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAUEAAAAJDg3MWI3MWI2LWVlMDgtNDBiMC05ZWZmLTkwOWU0NGMwOTVmNw.png&quot; height=&quot;184&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAUEAAAAJDg3MWI3MWI2LWVlMDgtNDBiMC05ZWZmLTkwOWU0NGMwOTVmNw.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;171&quot; /&gt;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Phrase ::= Spec X&#39;&#39;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;X&#39;&#39; ::= X&#39; Adjunct* &amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;X&#39; ::= X Complement*&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;X ::= Head&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
By changing the order for symbols in each rule we get rules for your favorite language. Eg In English and Indic languages the adjective is before noun , where as in Spanish (and other Romance languages) it comes after noun.&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;em&gt;the&lt;/em&gt;&amp;nbsp;blue&amp;nbsp;&lt;strong&gt;sky&lt;/strong&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;em&gt;el&lt;/em&gt;&amp;nbsp;&lt;strong&gt;cielo&lt;/strong&gt;&amp;nbsp;azul&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Language Instinct&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Even the languages spontaneously generated by kids show the same &quot;inherent structure&quot; leading to the hypothesis that&amp;nbsp;&quot;parsing ability&quot; is a part of cognitive circuit that every human is born with. Cognitive Psychologist&amp;nbsp;&lt;strong&gt;Steven Pinker&lt;/strong&gt;&amp;nbsp;explains this very well in his book &quot;&lt;strong&gt;Language Instinct&lt;/strong&gt;&quot;.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Essentially for each language we learn &amp;nbsp;the parameters that fix the order of symbols in X-Bar theory&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Generalized Phrase Structure Grammar&lt;/strong&gt;&amp;nbsp;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
In BNF form of grammar the production rules are given in the following manner&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;A ::= B C D&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Where A is a parent and it can have three child nodes in that order.&lt;br /&gt;However the generalized phrase structure grammar&amp;nbsp;parsing strategy will separates immediate &amp;nbsp;dominance and linear precedence.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Instead of specifying a single production rule, it is broken down into three separate parts&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;b&gt;&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAY8AAAAJDE4ZTdmN2ViLWYxZDItNDM3Yi1hOWQ0LTU4NGIxODU1NTU2ZA.png&quot; height=&quot;147&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAY8AAAAJDE4ZTdmN2ViLWYxZDItNDM3Yi1hOWQ0LTU4NGIxODU1NTU2ZA.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;100&quot; /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;b&gt;Immediate Dominance&lt;/b&gt;&amp;nbsp;: In simple terms it says A is the parent of B, C and D . It does not specify in which order &amp;nbsp;B, C, D should occur.&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Eg Rule A--&amp;gt; B, C, D specifies that A can have three children&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;b&gt;Linear Precedence :&lt;/b&gt;&amp;nbsp;Specifies order in which children are. Orders can be partially specified&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Eg Rule &amp;nbsp;B C specifies that under A, &amp;nbsp;B must occur before &amp;nbsp;C&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;b&gt;Head Identifying Rule:&amp;nbsp;&lt;/b&gt;Each such production has exactly one head element and must occur in the production.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Eg. &amp;nbsp;ConditionalBlock ~ IfClause&lt;br /&gt;&lt;br /&gt;if {} - is valid&lt;br /&gt;if {} else {} - is valid&lt;br /&gt;else {} - is not because the head is missing.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example is&lt;/strong&gt;&lt;br /&gt;QueryExpression --&amp;gt; SelectClause, WhereClause, FromClause.&lt;br /&gt;&lt;br /&gt;With the separation of Dominance and Precedence all of following are valid production of the rules.&lt;br /&gt;&lt;br /&gt;select * from tbl where col == 10;&lt;br /&gt;from tbl where col ==10 select *;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/2049748872712762095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2016/05/syntax-colorless-green-ideas-sleep.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/2049748872712762095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/2049748872712762095'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2016/05/syntax-colorless-green-ideas-sleep.html' title='Syntax: Colorless green ideas sleep furiously'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-6263584383786786926</id><published>2016-05-10T22:59:00.003-07:00</published><updated>2016-05-10T22:59:42.243-07:00</updated><title type='text'>My JVM dream, now 20 years later..</title><content type='html'>&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Back in 1996,&amp;nbsp;I first encountered Java Virtual Machine while still in collage. And immediately fell in love. But worse - I got obsessed with it. Obsessed with this crazy idea of writing new languages that targeted JVM. &amp;nbsp;20 Years later that obsession secretly continues ...&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Fortran Compiler For Java Virtual Machine&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
To complete my Computer Engineering degree, we had to submit a group project at the end of the final year.&amp;nbsp;I was able convince my&amp;nbsp;awesome and insanely talented friends to take that as our project. &amp;nbsp;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;We chose fortran because lots of literature available on Fortran&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;We contacted&amp;nbsp;&lt;a data-mce-href=&quot;http://www.cdac.in/index.aspx?id=CorporateProfile&quot; href=&quot;http://www.cdac.in/index.aspx?id=CorporateProfile&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Center for Development of Advance Computing (CDAC)&lt;/a&gt;, and they indicated interest in porting their scientific simulations in Fortran to our JVM.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Sun JVM team shared their JVM specs with us. (I just realized I actually work for the same company now !!!)&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;img alt=&quot;&quot; class=&quot;center&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAh-AAAAJDg2MzIzYTc3LTJlMGMtNGFjZS04OGM3LWUyYjI5YzI0MmQxNw.png&quot; height=&quot;322&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAh-AAAAJDg2MzIzYTc3LTJlMGMtNGFjZS04OGM3LWUyYjI5YzI0MmQxNw.png&quot; style=&quot;display: block; height: auto; margin: 30px auto; max-width: 100%; text-align: center;&quot; width=&quot;338&quot; /&gt;&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;What we delivered&amp;nbsp;&lt;/strong&gt;&lt;/h3&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Assembler for JVM&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Fortran compiler that outputs in our assembly language&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Java based IDE for editing and building fortran code.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&amp;nbsp;&lt;/h2&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;The BIG DREAM -&amp;nbsp;JVM as a target for writing new languages&amp;nbsp;&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Obviously back in those days as a young collage student, my intention was to conquer the world! But by developing new and interesting higher order languages ...&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;img alt=&quot;&quot; class=&quot;center&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAbjAAAAJDY3MzA1OTQ4LTNmNGUtNDhiMi04MjQ5LTMzMGVjNzQ3ZDAwNQ.png&quot; height=&quot;475&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAbjAAAAJDY3MzA1OTQ4LTNmNGUtNDhiMi04MjQ5LTMzMGVjNzQ3ZDAwNQ.png&quot; style=&quot;display: block; height: auto; margin: 30px auto; max-width: 100%; text-align: center;&quot; width=&quot;364&quot; /&gt;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Paradigm Shift I really wanted was ...LINQ&amp;nbsp;&lt;/strong&gt;!&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The&amp;nbsp;language I really wanted us to implement had native SQL syntax ...here is what my handwritten&amp;nbsp;version of seminar says ...&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;&lt;img alt=&quot;&quot; class=&quot;center&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAQbAAAAJDYzMDFjNzRlLTJkZGEtNDM1OC1iZjM2LWFjZGYwYmE4ODljNg.png&quot; height=&quot;621&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAQbAAAAJDYzMDFjNzRlLTJkZGEtNDM1OC1iZjM2LWFjZGYwYmE4ODljNg.png&quot; style=&quot;display: block; height: auto; margin: 30px auto; max-width: 100%; text-align: center;&quot; width=&quot;491&quot; /&gt;Where are we now 20 years later?&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;&lt;a data-mce-href=&quot;http://www.infoworld.com/article/2923035/java/java-at-20-jvm-javas-other-big-legacy.html#tk.ifw-infsb&quot; href=&quot;http://www.infoworld.com/article/2923035/java/java-at-20-jvm-javas-other-big-legacy.html#tk.ifw-infsb&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://www.infoworld.com/article/2923035/java/java-at-20-jvm-javas-other-big-legacy.html#tk.ifw-infsb&lt;/a&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;a data-mce-href=&quot;https://en.wikipedia.org/wiki/List_of_JVM_languages&quot; href=&quot;https://en.wikipedia.org/wiki/List_of_JVM_languages&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;List of JVM languages&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;Top Languages running on JVM&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Scala&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Groovy&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Jython&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;JRuby&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Lambda and Streams&amp;nbsp;&lt;/strong&gt;&lt;/h3&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Java now supports lambda and stream processing&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Where to next ?&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
It looks like world is still warming up to&amp;nbsp;the notion&amp;nbsp;of targeting languages to JVM and getting to know lambdas.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
And I&amp;nbsp;feel like my dream is still alive and a driving force for me...&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/6263584383786786926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2016/05/my-jvm-dream-now-20-years-later.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/6263584383786786926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/6263584383786786926'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2016/05/my-jvm-dream-now-20-years-later.html' title='My JVM dream, now 20 years later..'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-3108324340859056069</id><published>2016-05-10T22:58:00.002-07:00</published><updated>2016-05-10T22:58:43.141-07:00</updated><title type='text'>Scarce Data Problem: Mysterious Indus Valley Script</title><content type='html'>&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Once upon a time, nearly&amp;nbsp;&lt;strong&gt;5000&lt;/strong&gt;&amp;nbsp;years ago there was an urban Civilization with&amp;nbsp;&lt;a data-mce-href=&quot;https://en.wikipedia.org/wiki/List_of_Indus_Valley_Civilisation_sites&quot; href=&quot;https://en.wikipedia.org/wiki/List_of_Indus_Valley_Civilisation_sites&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;1000 planned Cities&amp;nbsp;&lt;/a&gt;across the North-Western India. It is called&amp;nbsp;&lt;a data-mce-href=&quot;https://en.wikipedia.org/wiki/Indus_Valley_Civilisation&quot; href=&quot;https://en.wikipedia.org/wiki/Indus_Valley_Civilisation&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Indus Valley Civilization&lt;/a&gt;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAeSAAAAJDIzOGRlYWUyLTJiZmEtNDU3OC1hMjBmLWEyMzUzM2Q4NjVjZg.png&quot; height=&quot;249&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAeSAAAAJDIzOGRlYWUyLTJiZmEtNDU3OC1hMjBmLWEyMzUzM2Q4NjVjZg.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;188&quot; /&gt;The Cities&amp;nbsp;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Most of the cities were along banks of the now dry river and at its peak this Civilization had a&amp;nbsp;&lt;strong&gt;population of over five million.&amp;nbsp;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
For that era it was very advanced civilization with houses built out of baked bricks and public facilities like baths and huge granaries. One of the cities Harappa had about 700 houses with private wells and most cities had Citadels. The civilization had developed metallurgy. &amp;nbsp;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
The Oldest&amp;nbsp;Writing on Indian Subcontinent&amp;nbsp;&amp;nbsp;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
One of the most interesting thing about this civilization is that they developed a script and left behind around 4000 seals with around 400 distinct symbols.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAASHAAAAJGVhMTBiNTJmLWExMjktNGUxMi04MmU1LTRmZDk4NjgyNjNlYQ.png&quot; height=&quot;95&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAASHAAAAJGVhMTBiNTJmLWExMjktNGUxMi04MmU1LTRmZDk4NjgyNjNlYQ.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;212&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The script is&amp;nbsp;&lt;strong&gt;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;still undeciphered and the underlying language has not been identified.&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;The script is found all over the North-Western India as well as Egypt and Mesopotemia.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Script is continued over hundreds of years with regularity and similarity between seals found across the region and across the centuries&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;There is no bilingual text available like Rosetta Stone.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Most seals are extremely brief with longest being only 17 character&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;center&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAjlAAAAJGM1YjJkMzMzLTc4NzktNDU0YS1hZjM3LTc4M2QzYmM3MGJiYw.png&quot; height=&quot;157&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAjlAAAAJGM1YjJkMzMzLTc4NzktNDU0YS1hZjM3LTc4M2QzYmM3MGJiYw.png&quot; style=&quot;display: block; height: auto; margin: 30px auto; max-width: 100%; text-align: center;&quot; width=&quot;533&quot; /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
Original Scarce Data Problem&lt;/h2&gt;
&lt;ol style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Does this script represent a spoken language ?&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;If yes what language ? What can we learn about this language ? How does it related to present day languages of&amp;nbsp;the South Asia&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;What are these seals trying to tell ? What were they used for ?&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAkIAAAAJGE3N2NmODM3LTBhMmEtNDBlZS1iMDUzLTBkMjA3NTgxNjg1OA.png&quot; height=&quot;135&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAkIAAAAJGE3N2NmODM3LTBhMmEtNDBlZS1iMDUzLTBkMjA3NTgxNjg1OA.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;307&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Answers to these question can shed light on early history of Indian subcontinent and cultural sphere. But this is not just an old Indian civilization it is the World Heritage for all of humanity. &amp;nbsp;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&amp;nbsp;&lt;/h2&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Call to Action:&lt;/strong&gt;&lt;/h2&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
How can we use our big data tool set and machine learning to decipher Indus Valley Script ?&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
[All images from Wikipedia - thank you to all original creators]&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/3108324340859056069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2016/05/scarce-data-problem-mysterious-indus.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/3108324340859056069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/3108324340859056069'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2016/05/scarce-data-problem-mysterious-indus.html' title='Scarce Data Problem: Mysterious Indus Valley Script'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-828003036137257978</id><published>2016-05-10T22:57:00.002-07:00</published><updated>2016-05-10T22:57:48.739-07:00</updated><title type='text'>Managing Projects: Software By Numbers</title><content type='html'>&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
I read a wonderful book in 2004&amp;nbsp;named&amp;nbsp;&lt;a data-mce-href=&quot;https://www.safaribooksonline.com/library/view/software-by-numbers/0131407287/#toc-start&quot; href=&quot;https://www.safaribooksonline.com/library/view/software-by-numbers/0131407287/#toc-start&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Software By Numbers&lt;/a&gt;&amp;nbsp;by&amp;nbsp;Mark Denne, Jane Cleland-Huang. It introduced the concept of &amp;nbsp;&lt;em&gt;&quot;Minimum Marketable &amp;nbsp;Feature&quot;&lt;/em&gt;&amp;nbsp;and&amp;nbsp;&lt;em&gt;&quot;Incremental Funding Methodology&quot;&lt;/em&gt;. &amp;nbsp;It&amp;nbsp;radically changed how I viewed project management and continues to inspire me even today.&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The main message is &amp;nbsp;- by carefully choosing the way in which software components are assembled, we can create identified units of market value before the application/product is anywhere near completion.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;Minimum Marketable Feature (MMF)&lt;/strong&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Typically an MMF creates the market value in following ways&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Competitive differentiation&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Revenue generation&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Cost Saving&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Brand Projection&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Enhanced loyalty &amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
As the name suggest the features need to be marketable which means you can use them to decide price for the product, promote them and more importantly create revenue by help selling those products.&amp;nbsp;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Kano Matrix&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
An incomplete software still has value to the user. However a&amp;nbsp;car that consist of only engine and wheelbase is unlikely to be thought any useful. You need more than basic functionality. Similarly a super cool luxury&amp;nbsp;car that does not move is equally useless. What you need is a balance of &amp;nbsp;&quot;cool&quot; and &quot;required&quot; features. This idea is captured in a model developed by Nariaki Kano.&amp;nbsp;&lt;img alt=&quot;&quot; class=&quot;center&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAWrAAAAJDRmZjhmODZhLTYzNTctNDUyMC05ZTZmLWNjZGFlY2M5NmQwOA.png&quot; height=&quot;508&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAWrAAAAJDRmZjhmODZhLTYzNTctNDUyMC05ZTZmLWNjZGFlY2M5NmQwOA.png&quot; style=&quot;display: block; height: auto; margin: 30px auto; max-width: 100%; text-align: center;&quot; width=&quot;640&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The model &amp;nbsp;categorizes the features in a few interesting&amp;nbsp;categories&amp;nbsp;&lt;/div&gt;
&lt;ol style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Must-Have or Basic Needs:&lt;/strong&gt;&amp;nbsp;Lack of must have features causes dis-satisfaction, but once&amp;nbsp;these features are present adding more Must-Have features does not make the product attractive to the customers&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Delighter:&lt;/strong&gt;&amp;nbsp;Lack of these features does not make customer unhappy but it does make your product boring. When added these features create excitement&amp;nbsp;&amp;nbsp;and makes your product attractive.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;One dimensional or Performance Needs:&lt;/strong&gt;&amp;nbsp;The customer satisfaction is directly proportional to &#39;how much&#39; of the feature you are providing. For cars milage is one such feature - more the better and as it goes down so does customer&#39;s dissatisfaction.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Incremental Funding Methodology&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The goal of the incremental&amp;nbsp;funding is to&amp;nbsp;&lt;strong&gt;accelerate&lt;/strong&gt;&amp;nbsp;achievement of first&amp;nbsp;the self funding point and then the breakeven time.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Below is the a high level of procedure to do exactly that.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;&lt;img alt=&quot;&quot; class=&quot;center&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAOiAAAAJDk0NTJlYjdlLWUzZDUtNDQzNi04MTA4LWQ2OTMyOWI2NDE3Ng.png&quot; height=&quot;374&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAOiAAAAJDk0NTJlYjdlLWUzZDUtNDQzNi04MTA4LWQ2OTMyOWI2NDE3Ng.png&quot; style=&quot;display: block; height: auto; margin: 30px auto; max-width: 100%; text-align: center;&quot; width=&quot;623&quot; /&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;ol style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Define Dollar&amp;nbsp;Value of the MMF&lt;/strong&gt;: Once we have MMFs defined and categorized next task is to assign a dollar value to that feature. &amp;nbsp;This is the incremental revenue generated by&amp;nbsp;adding an MMF to the product. Obviously it is calculated based on additional buyers and&amp;nbsp;price increase. &amp;nbsp;For Must-Have feature the dollar value is defined by possible loss if the feature was absent.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Estimate Cost :&lt;/strong&gt;&amp;nbsp;Next we estimate the cost of creating and maintaining/servicing this feature.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Identify Risks :&amp;nbsp;&lt;/strong&gt;We also need to capture the uncertainties associated with the features.&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Identify the dependencies between MMFs.&lt;/strong&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Calculate Rate of Return for each MMF.&lt;/strong&gt;&amp;nbsp;The rate of return can be calculated using various standard techniques like Net Present Value (NPV) or Internal Rate of Return (IRR)&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Sequence:&lt;/strong&gt;&amp;nbsp;Finally Sequence the delivery of the MMFs to maximize return in by delivering them in &amp;nbsp;minimum amount of time&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&amp;nbsp;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
[Images: &amp;nbsp;for&amp;nbsp;Kano wikipedia and for incremental funding the book]&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/828003036137257978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2016/05/managing-projects-software-by-numbers.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/828003036137257978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/828003036137257978'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2016/05/managing-projects-software-by-numbers.html' title='Managing Projects: Software By Numbers'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-6982285994898886347</id><published>2016-05-10T22:56:00.002-07:00</published><updated>2016-05-10T22:56:42.936-07:00</updated><title type='text'>Look Ma No Locks - Act III - &quot;STRONG&quot; Eventual Consistency with CRTDs and other Geeky Stuff</title><content type='html'>&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
In Act-I we saw that&amp;nbsp;&lt;strong&gt;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;Consistency&lt;/span&gt;&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong&gt;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;Serializability&lt;/span&gt;&lt;/strong&gt;&amp;nbsp;were the goals of our Hero Developer was striving for, the plot started with the basic idea of Two Phase Locking and in Act II we encountered the concept of &quot;Tunable &amp;nbsp;Consistency&quot; in the form of isolation levels and then stumbled upon the CAP theorem , both very important developments. In this Act III, the story continues with new and exciting developments in research community - namely CRDTs and Co-ordination Free Consistency...&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
What is this &quot;Eventual Consistency&quot; business?&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
If our Micro-Services were dealing with&amp;nbsp;Read-Only-Data then we could scale them infinitely by adding one clone after another- all nodes will have same data and every result would always be consistent. But alas - the world changes and so must our data - on&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;each&lt;/span&gt;&amp;nbsp;individual node responsible for that piece of data. &amp;nbsp;&lt;strong&gt;The problem&lt;/strong&gt;&amp;nbsp;is that the change has to &quot;Start&quot; somewhere and then must spread to&amp;nbsp;all other nodes in the cluster and eventually somehow we must detect that change propagation is&amp;nbsp;&quot;Finished&quot;. Network is unreliable &amp;nbsp;and THAT exactly is the curse of being a distributed system, my friends. There is that brief amount of time when the change has been &quot;Started&quot; but not yet &quot;Finished&quot; completely. How do you deal with the next change request already in the queue ?&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Now,&amp;nbsp;you can be pessimistic and wait for the first change to Finish Completely before next one Starts. OR - you can be optimistic and assume the Best Case and proceed to adapt the next change before first one Finishes and only&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;deal with any issues&lt;/span&gt;&amp;nbsp;when they arise. The intuition here is that the series of changes may be re-ordered or delayed but&amp;nbsp;&lt;strong&gt;&quot;Eventually&quot;&lt;/strong&gt;&amp;nbsp;every one sees the all changes and &quot;deals with it&quot; in case when problems arise. (It is as if&amp;nbsp;my otherwise consistently normal friends behave a little strange when in Las Vegas, but they are eventually back to normal when we are back in Seattle...)&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
In short here is the reality&amp;nbsp;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;By the time you detect the consistency problem, the client requesting the change may be long gone already and you are left alone with inconsistencies&amp;nbsp;&amp;nbsp;to resolve.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Eventual consistency is a&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;meaningless&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;term until you define what it means to &quot;reconcile&quot; the differences/inconsistency. Eg. What happens&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;after you detect&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;that&amp;nbsp;&amp;nbsp;two customers have added the same last remaining item to the cart or have booked the same last seat on the plane? What is your MERGE strategy ?&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;In eventual consistency you decide to pay very little price upfront for the consistency but your&amp;nbsp;&lt;em&gt;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;are&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&amp;nbsp;signing up to pay heavy price&amp;nbsp;&lt;strong&gt;&lt;em&gt;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;later&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&amp;nbsp;to &amp;nbsp;reconcile and correct the in-consistency when it arises. The math works as long as the cost of &quot;Fixing&quot; is&amp;nbsp;&lt;a data-mce-href=&quot;https://en.wikipedia.org/wiki/Amortized_analysis&quot; href=&quot;https://en.wikipedia.org/wiki/Amortized_analysis&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;amortized&lt;/a&gt;&amp;nbsp;over mostly problem free executions.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;It is an&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;absolute requirement&amp;nbsp;&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;that ultimately all nodes resolve the inconsistency&amp;nbsp;the&amp;nbsp;&lt;strong&gt;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;same way&lt;/span&gt;&lt;/strong&gt;. I repeat - It is an&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&amp;nbsp;&lt;span class=&quot;underline&quot;&gt;absolute requirement&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;that ultimately all nodes resolve the&amp;nbsp;inconsistency&amp;nbsp;the same way. It is turtles all the way down - How do all nodes come to know what was the resolution decision and how do you propagate&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;em&gt;that&lt;/em&gt;&amp;nbsp;decision consistently?&amp;nbsp;&lt;span class=&quot;underline&quot;&gt;Fun times ...&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
I&#39;m already thinking of writing a next best seller novel based on the effects of eventual consistency and meaning of destiny -&amp;nbsp;Is it cute&amp;nbsp;Ms. Isabella who gets the&amp;nbsp;last seat or it is&amp;nbsp;&lt;em&gt;really&lt;/em&gt;&amp;nbsp;her&amp;nbsp;destiny to miss the flight and meet Mr. Right on the next flight ?? &amp;nbsp;...&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Commutativity :&amp;nbsp;2 + 3 == 5 == 3 + 2&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;em&gt;What if&lt;/em&gt;&amp;nbsp;there was no additional costs to pay when inconsistency was detected in eventually consistent system?&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;em&gt;What if&lt;/em&gt;&amp;nbsp;no coordination was required to resolve inconsistency in a distributed system?&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;em&gt;What if&lt;/em&gt;&amp;nbsp;every node already knew how to resolve the inconsistency in a &amp;nbsp;prescribed deterministic ways?&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;em&gt;What if&amp;nbsp;&lt;/em&gt;there were no bad&amp;nbsp;effects of message re-ordering to begin with ?&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Suppose&amp;nbsp;our Hero Developer wins three lotteries in a row in three days .&amp;nbsp;Now, it doesn&#39;t matter in what order he gets paid from each lottery. As long as he gets the money in reasonable time - it&#39;s all good. &amp;nbsp;The commutative nature of natural numbers &quot;adds up&quot; to a solid logic based reasoning that&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;em&gt;eventually&lt;/em&gt;&lt;/span&gt;&amp;nbsp;our Hero Developer will be rich by the amount that equals to&amp;nbsp;sum of all three lottery prizes !&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
In 2007 , Marc Shapiro and others at INRIA, formalized &amp;nbsp;this notion in what is called as&amp;nbsp;&lt;a data-mce-href=&quot;https://hal.inria.fr/inria-00609399v1/document&quot; href=&quot;https://hal.inria.fr/inria-00609399v1/document&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;&quot;Conflict Free Replicated Data Types&quot;&amp;nbsp;&lt;/a&gt;.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
This system works in following conditions ...&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;If the system is&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;monotonically increasing&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;, then it never has to &quot;roll-back&quot;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;And if state transitions are&amp;nbsp;partially ordered and&amp;nbsp;&lt;strong&gt;MERGE&lt;/strong&gt;&amp;nbsp;operations are&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;associative&lt;/strong&gt;,&amp;nbsp;&lt;strong&gt;commutative&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong&gt;idempotent&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;THEN the replicas that have received and applied the same set of updates must immediately have equivalent state. There is no conflict arbitration process, because conflicts do not exist in strongly-consistent systems.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
In short, if only operation we allow is INCR(account, amount) &amp;nbsp;then is monotonically increasing and addition being commutative, associative as long as the operations have &quot;at least once&quot; and &quot;at most once&quot; guarantees (i.e. idempotent) , the system is STRONGLY consistent and co-ordination free !!!&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Mr. Luca Pacioli and Double Entry Accounting&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The Father of profession of Accounting, Luca Pacioli was a Italian mathematician who invented what is now known as double entry accounting system. This system revolutionized the world of commerce. This system is fundamental to modern civilization as is Newton&#39;s Mechanics or theory of Social Contracts. In his system there is a column for Debit and another column for Credit. The total balance is result of subtraction of one column from the other&amp;nbsp;&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;How is that relevant ? &amp;nbsp;&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Both debit and credit are monotonically increasing and follows the rules of addition in short can be implemented as CRDTs. And natural number can be represented as a sum of a positive and negative number&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;What other data structures can be implemented as CRDTs&lt;/strong&gt;&lt;/h3&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Sets&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Maps&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Graphs&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Shipping Pie&amp;nbsp;vs Shipping Pie Recipe&amp;nbsp;&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAVNAAAAJDVkNGExOGRjLTE5MjktNGE5Mi1iMDZhLTM4MWY5OGQ5MTY3Yg.png&quot; height=&quot;222&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAVNAAAAJDVkNGExOGRjLTE5MjktNGE5Mi1iMDZhLTM4MWY5OGQ5MTY3Yg.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;302&quot; /&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The theory of CRDT makes a great deal of distinction between shipping the end results and shipping the instructions to achieve the results. While shipping End Result is cumbersome. It is theoretically easy to deal with and easy to prove properties of the system. While shipping recipe is easy it is not as accessible to theoretical treatment. The genius of team who developed CRDTs at INRIA is to show the equivalence of both the approaches.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAYZAAAAJDc1ZmQ2ZDAxLTY3NzQtNDMzOC04MjdiLTlmY2U1YTE4NWI3YQ.png&quot; height=&quot;193&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAYZAAAAJDc1ZmQ2ZDAxLTY3NzQtNDMzOC04MjdiLTlmY2U1YTE4NWI3YQ.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;190&quot; /&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;The story continues next week ....&lt;/strong&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/6982285994898886347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2016/05/look-ma-no-locks-act-iii-strong.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/6982285994898886347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/6982285994898886347'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2016/05/look-ma-no-locks-act-iii-strong.html' title='Look Ma No Locks - Act III - &quot;STRONG&quot; Eventual Consistency with CRTDs and other Geeky Stuff'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-7858383165910817238</id><published>2016-05-10T22:55:00.002-07:00</published><updated>2016-05-10T22:55:40.969-07:00</updated><title type='text'>Look Ma, No Locks  - Act II -  Tunable Consistency</title><content type='html'>&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&amp;nbsp;The last post described why our industry started using locks excessively in database system to achieve Serializable transactions. The conflict and tension between Availability and Consistency became more serious as days passed by...&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
This post first talks about how the concept of database&amp;nbsp;&lt;strong&gt;Isolation Levels&lt;/strong&gt;&amp;nbsp;is actually an early attempt to define&amp;nbsp;&lt;strong&gt;Tunable Consistency&lt;/strong&gt;&amp;nbsp;and then describes the essence of now famous&amp;nbsp;&lt;strong&gt;CAP theorem.&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Next post will lay out necessary foundations to understand current research in this area including commutatively and example STRONG eventual consistency model called Conflict-free Replicated Data Types.&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Locks everywhere in all shapes and sizes.&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
To increase the performance we had to start using different types of locks for different types of things and operations. There were obviously separate reader and writer locks. There are page level locks and then there are row level locks. Sometimes we use transaction level locks, but most times the locks are statement level locks. In short there were locks everywhere in all sizes and shapes. But our insatiable thirst for throughput meant that we were ready to let go of some consistency guarantees. Stage for Availability vs Consistency battle was set.&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Are these&amp;nbsp;Database Isolation Levels or Tunable Consistency Levels in&amp;nbsp;disguise?&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
To increase throughput (aka availability) we started dropping the locks starting with range lock, then read locks and even write locks. But that obviously started showing up undesirable side effects. Recall that any transaction is in final analysis a sequence of reads and writes and that all reads and writes to the same data items can potentially cause inconsistent state as a result of random scheduling.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Later these bad effects were categorized as follows&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;P0 - Dirty Read&lt;/strong&gt;&amp;nbsp;– Transaction could read uncommitted data written by another transaction. In short your reads are dirty.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;P1- Non-Repeatable Reads&lt;/strong&gt;&amp;nbsp;– If transaction read same data item twice then value may be different between two reads. You reads are not reliably repeatable&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;P2- Phantom reads&lt;/strong&gt;&amp;nbsp;– This happens when a query with a where clause is executed twice and between those two calls new data gets added or deleted that satisfies the query- the result is phantom reads. Some other names for this are motion blur, fuzzy read&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;In addition there are many other phenomenon viz. Lost Update, Cursor Lost Update, Read Skew, Write Skew etc etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;In short, there is no free availability without reduced consistency&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Based these bad side effects, the ANSI standard defines following four isolation levels. In reality these are rather Consistency Levels and you can choose the reduced consistency for better performance&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Read Uncommitted –&lt;/strong&gt;&amp;nbsp;This is lowest level of consistency guarantee. Dirty reads are possible, so are Non-Repeatable and Phantom reads&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Read committed –&lt;/strong&gt;&amp;nbsp;In this next higher consistency level, only the committed data is read. Although dirty reads are prevented other anomalies are still possible&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Repeatable Reads –&lt;/strong&gt;&amp;nbsp;At this consistency level single item reads are repeatable but phantom reads are still possible&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Serializable –&lt;/strong&gt;&amp;nbsp;This is the highest consistency guarantee. It is not possible to have dirty reads, phantom reads or non-repeatable reads&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Snapshot –&lt;/strong&gt;&amp;nbsp;this is yet another consistency level where your transactions can see only the snapshot of the data as it existed before your transaction began.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Distributed Transactions – the basics&lt;/strong&gt;&lt;/h2&gt;
&lt;ol style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;As computer systems were connected to each other on a distributed network, &amp;nbsp;our industry started exploring Master-Backup architecture. However there is always some delay between when transactions are committed at Master and when Backup is updated - leaving possibility for In-Consistency&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Alternatively you could have synchronous updates - The protocols like two phase commit and three-phase commit were introduced just for handling this sort of stuff. In essence a transaction is not committed until all machines participating in the distributed atomic transactions first commit their share of the transaction. The obvious side effect is that while Consistency is increased the Availability is decreased because of all this co-ordination effort …&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Enter the CAP theorem&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The CAP theorem says that it is impossible for a distributed computer system&amp;nbsp;to simultaneously provide all three of the following guarantees:&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Consistency&amp;nbsp;(all nodes see the same data at the same time)&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Availability (a guarantee that every request receives a response about whether it succeeded or failed)&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Partition tolerance&amp;nbsp;&amp;nbsp;(the system continues to operate despite arbitrary partitioning due to network failures)&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&amp;nbsp;The theorem is easy to understand and equally easy to misapply. &amp;nbsp; Many have interpreted this as a binary choice between Consistency and Availability (because partitions are always ever present).&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;&lt;em&gt;However what the theorem REALLY demands of you is following :&amp;nbsp;&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;&lt;em&gt;better partition detection ,&amp;nbsp;&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;&lt;em&gt;better partition management&amp;nbsp;&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;&lt;em&gt;And&amp;nbsp;more importantly mitigation and recovery when partition recovers.&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;em&gt;More on this next time ...&lt;/em&gt;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;&lt;em&gt;References:&lt;/em&gt;&lt;/strong&gt;&lt;/h2&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;A Critique of ANSI SQL Isolation Levels&amp;nbsp;&lt;em&gt;&lt;a data-mce-href=&quot;http://research.microsoft.com/pubs/69541/tr-95-51.pdf&quot; href=&quot;http://research.microsoft.com/pubs/69541/tr-95-51.pdf&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://research.microsoft.com/pubs/69541/tr-95-51.pdf&lt;/a&gt;&lt;/em&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;CAP Twelve Years Later: How the &quot;Rules&quot; Have Changed&amp;nbsp;&lt;em&gt;&lt;a data-mce-href=&quot;http://www.infoq.com/articles/cap-twelve-years-later-how-the-rules-have-changed&quot; href=&quot;http://www.infoq.com/articles/cap-twelve-years-later-how-the-rules-have-changed&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://www.infoq.com/articles/cap-twelve-years-later-how-the-rules-have-changed&lt;/a&gt;&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/7858383165910817238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2016/05/look-ma-no-locks-act-ii-tunable.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/7858383165910817238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/7858383165910817238'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2016/05/look-ma-no-locks-act-ii-tunable.html' title='Look Ma, No Locks  - Act II -  Tunable Consistency'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-8944401097898357001</id><published>2016-05-10T22:54:00.004-07:00</published><updated>2016-05-10T22:54:50.894-07:00</updated><title type='text'>Look Ma, No Locks - Act I</title><content type='html'>&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
I have seen too many people signing up for &quot;SQL vs NoSQL war&quot; without understanding what exactly they are fighting for and more importantly - for whom and for what reasons.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
This is a first act of the&amp;nbsp;drama that is &quot;SQL vs NoSQL war&quot;...enjoy.&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Opening sequence:&amp;nbsp;Writes, they always conflict&amp;nbsp;&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Ever since John von Neumann started reading and writing to memory addresses he left a problem for future generations to solve. &amp;nbsp;&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;em&gt;If you read a variable twice (or two different variables) then value obtained during those reads&amp;nbsp;depends upon whether someone else wrote and changed the value of variable(s) behind your back between those calls! &amp;nbsp;&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The problem is pervasive - from processor registers and caches ..to memory and disks, ...from single processors to distributed systems.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The problem becomes even more severe when transactions are involved.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Say &amp;nbsp;you have&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;just two&lt;/span&gt;&amp;nbsp;statements with primitive operations of add, multiply and assign , and&amp;nbsp;&amp;nbsp;initial values of variables are as follows ; x=1 and y =2&amp;nbsp;&lt;/div&gt;
&lt;ol style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;z = add(x, y)&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;y = multiply( 10 * x)&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;What is the value of z&lt;/span&gt;&amp;nbsp;if you could possibly simulate&amp;nbsp;all combinations of read and writes for 3 variables x, y, and z happening one after another? &amp;nbsp;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;If 1 is executed before 2 then z == 3.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;In other case it is 12 !&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Which one is it -&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;REALLY?&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Now what if there are two transactions with&amp;nbsp;&lt;strong&gt;8&lt;/strong&gt;&amp;nbsp;steps each ? what about&amp;nbsp;&lt;strong&gt;679&lt;/strong&gt;&amp;nbsp;steps each ? &amp;nbsp;I get dizzy just thinking about this - I&amp;nbsp;hope you see the problem here ...&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
This is NOT&amp;nbsp;a theoretical problem, with pipelining architectures the operations are indeed executed in any random order every time you run. With reordering of messages in a distributed system this is a real problem.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
What happens if we&amp;nbsp;&quot;double click&quot; and we break statements above down to smallest possible unit of execution? may be a single processor instructions or even a&amp;nbsp;micro-instructions ?! &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;Real geeks know it already : It is all about History&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;The real geeks represent this sort of thing as a directed graph where an operation that depends on other operations is&amp;nbsp;connected by a directed edge in a graph.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Real geeks truely understand that there are many ways to traverse nodes in such a connected graph.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Real geeks also know that there are many permutations and combinations&amp;nbsp;to visit the nodes in this graph and each path or History&amp;nbsp;is just one way things could happen.&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;There are many alternative Histories of your travel through the graph - you just happen to take one path and know one History.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;The Seer : Transactions -&amp;nbsp;Do or Don&#39;t, Don&#39;t try&amp;nbsp;&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
One of the greatest invention was the idea of transactions. You read number of items and write number of items -&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;but here is the rule everyone follows&lt;/span&gt;&amp;nbsp;- ALL&amp;nbsp;the variables change at once or NONE&amp;nbsp;of them change at all !&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;img alt=&quot;&quot; class=&quot;center&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAPKAAAAJDFmNzkwM2Q1LWE3M2YtNGUyOC1iYWU5LWNmZWQ5ZjhjODY0OA.png&quot; height=&quot;210&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAPKAAAAJDFmNzkwM2Q1LWE3M2YtNGUyOC1iYWU5LWNmZWQ5ZjhjODY0OA.png&quot; style=&quot;display: block; height: auto; margin: 30px auto; max-width: 100%; text-align: center;&quot; width=&quot;375&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Seers invented&amp;nbsp;this great idea of ATOMIC operations&amp;nbsp;- batch your operations in transactions and at the end - either COMMIT or ABORT but never leave your application&amp;nbsp;in a ZOMBIE&amp;nbsp;state.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Are all the problems solved ?&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
NO!!!&amp;nbsp;Mr. Problem shows up again. Effect of series of transactions still depends on which&amp;nbsp;transaction&amp;nbsp;ran first !!&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;First Breakthrough&amp;nbsp;: Serializable transactions - what&amp;nbsp;if we decide order should&amp;nbsp;not matter at all - just like that ?&amp;nbsp;&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
What if you did not allow transactions to complete at all if they are NOT serializable , meaning that&amp;nbsp;the side effect did not depend on the order in which transactions &amp;nbsp;were executed ? Here is a simple rule that solves the problem -&lt;em&gt;&amp;nbsp;If order between transactions did not matter then and only then allow them to proceed or else fail them right away&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
No mercy - you need to be Serializable! Anyway, what is the difference between an explicit ABORT&amp;nbsp;and&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;implicit&lt;/span&gt;&amp;nbsp;ABORT&amp;nbsp;(when transaction does not even meet our requirements of serializability) ?&amp;nbsp;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Here is our requirement - Given transactions T1 and T2, &amp;nbsp;the effects are same if&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;T1 in its entirety was executed before T2 or vice versa.&lt;/span&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;A stronger requirement is -&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;ANY interleaving of operation in transaction T1 and T2 produce the SAME effect.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;First Problem : But How do you even know when set of transactions is serializable ?&amp;nbsp;&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The Seers know the answers - as always&amp;nbsp;&lt;/div&gt;
&lt;blockquote style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Georgia; font-size: 24px; font-style: italic; line-height: 38px; margin: 50px 0px; padding-left: 80px; padding-right: 80px; position: relative; text-align: center;&quot;&gt;
A History of transactions is Serializable if and only if its operation dependency graph does not include any cycles.&lt;/blockquote&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;The Journey begins:&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The serializability theorem looks like a very promising&amp;nbsp;&lt;strong&gt;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;destination&lt;/span&gt;&lt;/strong&gt;&amp;nbsp;to go to.&amp;nbsp;It feels like worthy&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;purpose to live for a database system&lt;/span&gt;&amp;nbsp;...&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The Question is - How do you get there ?&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;First Wrong Turn:&lt;/strong&gt;&amp;nbsp;&lt;strong&gt;Two phase locking&amp;nbsp;&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
In the old days when there was simple one core computer the answer was obvious ...use two phase locking.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The algorithm is pretty simple&amp;nbsp;&lt;/div&gt;
&lt;ol style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;In phase ONE try to acquire all the locks you will ever need (or else abort if you can&#39;t)&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Do you stuff (censored version)&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;In phase TWO release all the locks you acquired in step 1&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;The Shortest theorem ever !!&lt;/strong&gt;&lt;/h2&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;If&amp;nbsp;there are cycles in the &quot;History Graph&quot; then phase ONE&amp;nbsp;will fail for one of the transactions and it is not member of Serializable Transaction Set..&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;That is it -&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;that&lt;/span&gt;&amp;nbsp;is the theorem - &amp;nbsp;in a Directed Acyclic Graph you can&#39;t visit the same node twice ... no two transactions can acquire the same lock !!&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Deadlocks : Oh my god !!!&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
....&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
....&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
the story continues in next week&#39;s episode ....&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/8944401097898357001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2016/05/look-ma-no-locks-act-i.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/8944401097898357001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/8944401097898357001'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2016/05/look-ma-no-locks-act-i.html' title='Look Ma, No Locks - Act I'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-3433747979026145784</id><published>2016-05-10T22:53:00.001-07:00</published><updated>2016-05-10T22:53:26.185-07:00</updated><title type='text'>Einstein and Time Travel in Distributed Systems</title><content type='html'>&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Exactly 100 years ago this month in Nov 1915 Einstein published his Field Equations and forever changed the physics and our understanding of space and time. His ideas are still relevant in the field of Distributed Systems. This is my tribute to Einstein by showing how his fundamental principles&amp;nbsp;directly apply to distributed system design.&amp;nbsp;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Accept the reality and work backwards to fix your theories&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
In last century Einstein changed the physics and turned it upside down several times again and again by simply accepting the reality as it is and&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;working backwards&amp;nbsp;&amp;nbsp;&lt;span class=&quot;underline&quot;&gt;to fix the physics to deal with it&lt;/span&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;First Einstein&amp;nbsp;used the&amp;nbsp;&lt;strong&gt;&lt;em&gt;reality of&amp;nbsp;constant speed of light&lt;/em&gt;&amp;nbsp;&lt;/strong&gt;to derive&amp;nbsp;&lt;a data-mce-href=&quot;https://en.wikipedia.org/wiki/Special_relativity&quot; href=&quot;https://en.wikipedia.org/wiki/Special_relativity&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;special relativity&lt;/a&gt;&amp;nbsp;and famous&amp;nbsp;&lt;a data-mce-href=&quot;https://en.wikipedia.org/wiki/Mass–energy_equivalence&quot; href=&quot;https://en.wikipedia.org/wiki/Mass%E2%80%93energy_equivalence&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;E=mc2&lt;/a&gt;.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAUzAAAAJGI2N2Q4MTE4LTU0NTEtNGM4ZS1hODk2LWVlNDE3ZDZlMDdmNw.png&quot; height=&quot;177&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAUzAAAAJGI2N2Q4MTE4LTU0NTEtNGM4ZS1hODk2LWVlNDE3ZDZlMDdmNw.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;254&quot; /&gt;Then he used the simple everyday fact about&amp;nbsp;&lt;strong&gt;&lt;em&gt;equivalence of inertial mass and &amp;nbsp;gravitational mass&lt;/em&gt;&lt;/strong&gt;&amp;nbsp;to derive General relativity. Theories about unimaginable stuff like blackholes and Big Bang followed. &amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;He accepted the fundamental reality of&amp;nbsp;&lt;strong&gt;&lt;em&gt;quantum nature of interactions&lt;/em&gt;&amp;nbsp;&lt;em&gt;between light and matter&lt;/em&gt;&lt;/strong&gt;&amp;nbsp;and led the foundation of quantum mechanics by explaining photo electric effect. &amp;nbsp;By accepting the simple fact that&amp;nbsp;&lt;strong&gt;t&lt;em&gt;wo photons are indistinguishable from each other&lt;/em&gt;&lt;/strong&gt;&amp;nbsp;he derived the Bose-Einstein statistics that is the basis of how Lasers work and at the root of everything IT - from VLSI to printers to optic fibers to Compact Disks.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Photon the Messenger of Force&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAROAAAAJGFjNThmOGJiLWM2NjgtNDIzOS1hZGIzLWZiMTZmZTRjZTdiYw.png&quot; height=&quot;105&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAROAAAAJGFjNThmOGJiLWM2NjgtNDIzOS1hZGIzLWZiMTZmZTRjZTdiYw.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;123&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The greatest achievement of last century is&amp;nbsp;&lt;em&gt;&lt;strong&gt;Quantum Field Theory&lt;/strong&gt;&lt;/em&gt;&amp;nbsp;, the most successful of which is Quantum Electro-Dynamics&amp;nbsp;&amp;nbsp;(QED).&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The theory&amp;nbsp;posits that all interactions between matter particles are mediated through force particles. &amp;nbsp;In short &amp;nbsp;one matter particle sends a message to other particle in the form of a photon. After receiving&amp;nbsp;this event/message the second matter particle changes its&amp;nbsp;internal state. The Quantum Field Theory&amp;nbsp;reduced all physical laws to this basic interaction scheme. &amp;nbsp;A Fermion (a matter particle) keeps on doing what it is doing i.e remains in the same state until it either sends a message or receives a message - a Boson (force particle). &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
In short the nature at it&#39;s most fundamental level&lt;em&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;works on this&amp;nbsp;&lt;strong&gt;Message Passing&lt;/strong&gt;&amp;nbsp;paradigm&lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;No Global Clock and Only Local Effects&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAASEAAAAJDczYmJjMjdiLWY0N2UtNDJkMC1iZWE0LWFjODU0MTE1MTExMg.png&quot; height=&quot;151&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAASEAAAAJDczYmJjMjdiLWY0N2UtNDJkMC1iZWE0LWFjODU0MTE1MTExMg.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;111&quot; /&gt;&amp;nbsp;When you look at the night sky there are billions of shiny stars. &amp;nbsp;You can see a star only because a&amp;nbsp;photon from that star started perhaps billions of years ago and hitting your eye right now&amp;nbsp;getting converted to chemical-electrical signal. Have you ever wondered that the moonlight you see now might have actually started ~8 minutes ago at the surface of the sun and reached you only after reflecting at the surface of the moon? &amp;nbsp;Suppose you see a shooting star and two minutes later see a super-nova.&amp;nbsp;&amp;nbsp;What event do you think really happened&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;em&gt;before&lt;/em&gt;&lt;/span&gt;&amp;nbsp;and which one&amp;nbsp;&lt;em&gt;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;after&lt;/span&gt;&lt;/em&gt;? It really depends on frame of reference -&amp;nbsp;&lt;em&gt;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;your&lt;/span&gt;&lt;/em&gt;&amp;nbsp;local frame of reference.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
In a distributed systems messages get reordered and messages get delayed . How do you know which event happened before another event. This is super important because without ordering the events any attempt&amp;nbsp;of maintaining consistency is&amp;nbsp;&amp;nbsp;impossible. &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
But not all hope is NOT lost because we still know two things&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;that star became unstable&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;before&lt;/span&gt;&amp;nbsp;it went super nova&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;that light from shooting star was emitted before you received it.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Formally this relation is captured in a&amp;nbsp;&lt;strong&gt;Strict Partial Order &amp;lt;&amp;nbsp;&lt;/strong&gt;such that&lt;/div&gt;
&lt;ol style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&amp;nbsp;If event A happened on the same process before event B then A &amp;lt; B&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;If event A is sending of message M and B is the receiving of that message then A &amp;lt; B&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Transitive : If A &amp;lt; B and B &amp;lt;C then A &amp;lt; C&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Irreflexive : The event can not be before itself !&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Necessity : &amp;nbsp;If A &amp;lt; B is true then B &amp;lt; A must be false.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;Black holes and Gravitational Lensing&amp;nbsp;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAT0AAAAJDFhYzRhMDk0LTg5ZWYtNDg3ZS05YmIwLWUyYTA0NzgwMDU3ZA.png&quot; height=&quot;282&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAT0AAAAJDFhYzRhMDk0LTg5ZWYtNDg3ZS05YmIwLWUyYTA0NzgwMDU3ZA.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;287&quot; /&gt;&lt;/strong&gt;In Distributed Systems the messages often get lost or sometimes a node just fall into the blackhole. We know the presence of the node and its state only by receiving a messages from it.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
But equally importantly &amp;nbsp;because of gravitational bending of light we might have multiple images of the star. &amp;nbsp;A parallel in distributed systems is when you get multiple duplicated messages from the same event and need to&amp;nbsp;deal with it&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;In conclusion,&amp;nbsp;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Einstein based all his theory on this fundamental principle of causality and his genius is converting&amp;nbsp;&amp;nbsp;theory of local effects&amp;nbsp;into a theory that can describe the entire universe and the birth&amp;nbsp;of Space and Time .&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Below is the image of photograph that proved the light-bending effects of suns gravitation that turned&amp;nbsp;Einstein&#39;s general theory of Relativity into Law of Nature. &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;Thank you very much Albert Einstein.&lt;br /&gt;&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAO_AAAAJGUzNDUzZDg0LWViOGUtNGU1Yi05NGY4LTdhMjdiZDBlZDYwMw.png&quot; height=&quot;361&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAO_AAAAJGUzNDUzZDg0LWViOGUtNGU1Yi05NGY4LTdhMjdiZDBlZDYwMw.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;294&quot; /&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Note : all images from wikipedia - many thanks to the original creators of those images. &amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/3433747979026145784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2016/05/einstein-and-time-travel-in-distributed.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/3433747979026145784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/3433747979026145784'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2016/05/einstein-and-time-travel-in-distributed.html' title='Einstein and Time Travel in Distributed Systems'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-268602842114645667</id><published>2016-05-10T22:51:00.002-07:00</published><updated>2016-05-10T22:51:53.032-07:00</updated><title type='text'>Benevolent Dictator vs. Part-time Parliament</title><content type='html'>&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Distributed systems require Leader Election and today I am going to try to explain two most popular algorithms - PAXOS and RAFT. &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Once the problem is defined and some basic building blocks are&amp;nbsp;identified both the algorithms are very easy to understand.&amp;nbsp;The&amp;nbsp;&lt;strong&gt;Paxos&lt;/strong&gt;&amp;nbsp;protocol was first published in 1989 by&amp;nbsp;&lt;strong&gt;Leslie Lamport&lt;/strong&gt;&amp;nbsp;as the basis of State Machine Replication method.&amp;nbsp;&lt;strong&gt;Raft&lt;/strong&gt;&amp;nbsp;was designed in last couple years from &quot;ground up&quot; specifically for easy understandability.&amp;nbsp;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Background : Need For Consensus&lt;/strong&gt;&amp;nbsp;&lt;/h2&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 5px; margin-top: 10px;&quot;&gt;
&lt;strong&gt;Army of clones&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
In a typical scale out architecture we have a&amp;nbsp;number of clients making requests to a cluster of servers.&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;When these servers are identical and stateless any server can process any request from any client. That is the basis for &quot;scale-out&quot; architectures. When servers are stateful the same logic still applies&amp;nbsp;&lt;em&gt;as long as each server&amp;nbsp;has the same state.&lt;/em&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;When the client request change the state, that is when we need consistency and atomicity with many concurrent clients talking to many servers. This is where you need to co-ordinate using consensus protocols&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Electing a leader and following commands&amp;nbsp;&lt;/strong&gt;&lt;/h3&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAVHAAAAJGJlNGUxZWRjLTliNDEtNGNhMy05NzA3LTg5OTU0NWM1NjMyYg.png&quot; height=&quot;236&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAVHAAAAJGJlNGUxZWRjLTliNDEtNGNhMy05NzA3LTg5OTU0NWM1NjMyYg.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;285&quot; /&gt;One very powerful approach is to elect a&amp;nbsp;&lt;em&gt;single leader&lt;/em&gt;&amp;nbsp;who&amp;nbsp;makes the changes to the state and then all other machines&amp;nbsp;&lt;em&gt;follow&lt;/em&gt;&amp;nbsp;exact steps leader followed to make state change.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;This&amp;nbsp;change of state is defined by a deterministic state machine.(&lt;a data-mce-href=&quot;https://en.wikipedia.org/wiki/Mealy_machine&quot; href=&quot;https://en.wikipedia.org/wiki/Mealy_machine&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Mealy State Machine&lt;/a&gt;&amp;nbsp;to be exact). Same sequence of input command executed on each&amp;nbsp;nodes creates the identical state changes at each node. Leader broadcasts the input messages to this state machine and followers make local state changes. &amp;nbsp;This is what Leslie Lamport means when he says &quot;State Machine Replication&quot;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;Crashes and Dropped Messages&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAQdAAAAJDAwNWI4ODQ0LWEyNTMtNDUzMy04MGE5LWQwNDAxYTg3MTg4NA.png&quot; height=&quot;204&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAQdAAAAJDAwNWI4ODQ0LWEyNTMtNDUzMy04MGE5LWQwNDAxYTg3MTg4NA.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;219&quot; /&gt;Life would have been awesome if there were no crashes and no lost messages and no network partitions. But failures do happen and that&#39;s exactly the reason why we need complicated protocols.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;The basic assumption of distributed system is that there is no global shared state and the state has to be transferred by passing messages. Messages have delays and so the state changes have delays.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Every node in the cluster will be&amp;nbsp;slightly different due to delays between when commands&amp;nbsp;were sent by the leader and when they were received and&amp;nbsp;applied by each&amp;nbsp;follower.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;The basic requirement for Leader Election&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The basic requirement of consensus&amp;nbsp;is that despite crashes and network partitioning&amp;nbsp;there is&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;exactly one elected leader&lt;/span&gt;&amp;nbsp;and every one knows about it when elected.&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Toolbox: The&amp;nbsp;Building Blocks&amp;nbsp;&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Let&#39;s first start with examining some familiar concepts and tools before we analyze PAXOS and RAFT&lt;strong&gt;.&amp;nbsp;&lt;/strong&gt;In both algorithms any node can propose but only one is finally accepted as leader. &quot;Proposer&quot; proposes and &quot;Voters&quot; vote on it. In both algorithms once the leader is elected the results are&amp;nbsp;broadcast.&amp;nbsp;&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Optimistic Concurrency and Thomas Write Rule :&amp;nbsp;&lt;/strong&gt;&lt;/h3&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;The optimistic concurrency works by requiring every write to follow a two step process - first fetch&amp;nbsp;the latest version of data and then update it.&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;This is just&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;Compare and Swap&lt;/span&gt;&amp;nbsp;in different form. If your update is based on outdated version then it will&amp;nbsp;be rejected. Thomas&#39; write rule says i&lt;em&gt;gnore outdated writes&lt;/em&gt;.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;This is &quot;lock-free&quot; and gives very high throughput.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;Two phase commit&amp;nbsp;&lt;/strong&gt;&lt;/h3&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;The classical commit protocol has two phases - a&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;prepare phase&lt;/span&gt;&amp;nbsp;and a&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;commit phase&lt;/span&gt;&amp;nbsp;. In prepare phase we solicit votes and leader is elected only when commit is issued and successful. &amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Why we need majority ?&lt;/strong&gt;&lt;/h3&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;It is possible that two nodes simultaneously believe that they are the leaders.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;But by definition and mathematical certainty&amp;nbsp;only 1 can get&amp;nbsp;the majority votes. &amp;nbsp;Therefore there can be only one leader - thus satisfying basic requirement. &amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Bidding and Auctions&lt;/strong&gt;&lt;/h3&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Think of leader election as as an auction - the highest bidder always wins. Proposals from&amp;nbsp;higher bidder cancels voter&#39;s previous commitments - the transaction&amp;nbsp;is aborted for previous bidder/proposal.&amp;nbsp;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;There is always some well defined way of saying which Candidate has higher bid.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;This bidding and auctioning process is integral part of the leader election.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Paxos&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Below are the high level&amp;nbsp;details of the algorithm. Here is&amp;nbsp;how it works&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;img alt=&quot;&quot; class=&quot;center&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAYfAAAAJDFjNmE1ZTNmLTVjZTktNDU2Ni1iNDU2LTIwZmU1NWE5OTkzYg.png&quot; height=&quot;261&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAYfAAAAJDFjNmE1ZTNmLTVjZTktNDU2Ni1iNDU2LTIwZmU1NWE5OTkzYg.png&quot; style=&quot;display: block; height: auto; margin: 30px auto; max-width: 100%; text-align: center;&quot; width=&quot;391&quot; /&gt;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;At a higher level Paxos combines &quot;read value&quot;&amp;nbsp;part of optimistic concurrency&amp;nbsp;with propose phase of two phase commit in first step. In second step it combines &quot;write value&quot; part with commit phase.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;In step 1, the&amp;nbsp;proposer &quot;makes up&quot; a integer version number/timestamp and calls it &quot;proposal number&quot;. In the spirit of Thomas&#39;s rule no voter&amp;nbsp;accepts any &quot;outdated version&quot; by making sure it always accepts the highest proposal number. This pretty much looks like an auction - the highest bidder always wins.&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;If proposal gets ACK&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&amp;nbsp;from the majority of the nodes&lt;/span&gt;&amp;nbsp;then proposer send the &quot;commit message&quot;.&amp;nbsp;The only confusing aspect of the algorithm is that if the value is already chosen then proposer just sets the&amp;nbsp;&lt;em&gt;same already chosen&lt;/em&gt;&amp;nbsp;value instead of its own. (It sure does feel&amp;nbsp;like an uneccesary no-op though)&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Again using Thomas&#39; rule voters reject the request to commit if they have seen a higher numbered proposal. Proposal to write higher version cancels voter&#39;s previous commitments - as far voter is concerned the commit is aborted for the proposer.&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;When proposal gets majority of committed ACKs, the election is over.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Leslie Lamport compared this method to a fictional legislative consensus system used on the Paxos island in Greece. That is your &quot;Part Time Parliament&quot;. Leslie envisioned that for each new state change a new leader is elected and everyone follows it only for that single change. For next state change request the process repeats.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;RAFT&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&amp;nbsp;RAFT instead&amp;nbsp;elects a dictator for fixed term. Once elected, everyone follows the leader until a new leader is elected.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;For each state change, the leader first sends a Prepare message on behalf of the client. When it receives majority of ACK on prepares it sends commit message. Commit is complete when majority have committed. The cycle continues for the next change..&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;New election is started when the term for current leader ends or any node thinks leader is dead. A node thinks a leader is dead if it has not received any heartbeat or&amp;nbsp;&amp;nbsp;command from the leader in given timespan.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;The node suspecting a leader death&amp;nbsp;then&amp;nbsp;decides to become a&amp;nbsp;candidate. Candidates seek a majority vote. If the Candidate&amp;nbsp;doesn&#39;t get elected in the first round then it just keeps on trying again and again until someone is elected. &amp;nbsp;As simple as that, keep on asking for vote until either you win or know that someone else is already a winner. &amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;If node itself is not a candidate then it always accept the candidate which has&amp;nbsp;advanced most in its processing. Again this is kind of an auction. In other words the bid from the candidate with the most consistent state always wins.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;But how does RAFT&amp;nbsp;avoid or minimize the chance of election getting into the infinite loop where no one ever has&amp;nbsp;the majority&amp;nbsp;? The answer is annoyingly simple - The&amp;nbsp;node waits for a random amount of time before becoming a candidate and asking for a vote. It is statistically improbable that&amp;nbsp;there will be two candidates asking for the vote at the same time. By carefully choosing the random wait time progress can be made - this is exactly how&amp;nbsp;&lt;a data-mce-href=&quot;https://en.wikipedia.org/wiki/Carrier_sense_multiple_access_with_collision_detection&quot; href=&quot;https://en.wikipedia.org/wiki/Carrier_sense_multiple_access_with_collision_detection&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;ethernets&lt;/a&gt;&amp;nbsp;work !&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Leader election is fact of life in distributed systems. &amp;nbsp;Although Paxos and Raft look very different at the surface , deep down they use the similar building blocks.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;References:&lt;/strong&gt;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;line-height: 32px; margin-bottom: 32px;&quot;&gt;
Paxos Made Simple&lt;/div&gt;
&lt;a data-mce-href=&quot;http://research.microsoft.com/en-us/um/people/lamport/pubs/paxos-simple.pdf&quot; href=&quot;http://research.microsoft.com/en-us/um/people/lamport/pubs/paxos-simple.pdf&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://research.microsoft.com/en-us/um/people/lamport/pubs/paxos-simple.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;line-height: 32px; margin-bottom: 32px;&quot;&gt;
In Search of an Understandable Consensus Algorithm&lt;/div&gt;
&lt;div style=&quot;line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;a data-mce-href=&quot;http://web.stanford.edu/~ouster/cgi-bin/papers/raft-atc14&quot; href=&quot;http://web.stanford.edu/~ouster/cgi-bin/papers/raft-atc14&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://web.stanford.edu/~ouster/cgi-bin/papers/raft-atc14&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/268602842114645667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2016/05/distributed-systems-require-leader.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/268602842114645667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/268602842114645667'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2016/05/distributed-systems-require-leader.html' title='Benevolent Dictator vs. Part-time Parliament'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-5366031496105668711</id><published>2016-05-10T22:49:00.003-07:00</published><updated>2016-05-10T22:49:25.568-07:00</updated><title type='text'>Resilient Distributed Datasets and origins of my obsession</title><content type='html'>&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Yes- it is true. I am obsessed with in memory data processing and it goes waaayyy back. Back in my college days I had a very simple but very powerful insight or vision. I feel super lucky because over the years every now and then I&amp;nbsp;just happen to stumble upon&amp;nbsp;more and more opportunities to make it real...I&#39;ll talk about LINQ, Project Orleans and then finally RDDs. &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;In the beginning&amp;nbsp;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The obsession&amp;nbsp;&amp;nbsp;started some 17-18 years back when I was writing a paper for my college seminar.&amp;nbsp;&lt;em&gt;Being a compiler freak, my idea was to write a language that manipulated in memory collections using sql like syntax.&amp;nbsp;&lt;/em&gt;&amp;nbsp;What remains today of that dream&amp;nbsp;is&amp;nbsp;a couple dozen&amp;nbsp;hand written versions of that paper&amp;nbsp;and reams of BNF grammars for that dream language. &amp;nbsp;Here are couple of examples ...&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;img alt=&quot;&quot; class=&quot;center&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAYgAAAAJDY1ZjI2OWFjLTNkODItNDc2Zi1hM2I0LTAwYjZkYzEyYzczMQ.png&quot; height=&quot;355&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAYgAAAAJDY1ZjI2OWFjLTNkODItNDc2Zi1hM2I0LTAwYjZkYzEyYzczMQ.png&quot; style=&quot;display: block; height: auto; margin: 30px auto; max-width: 100%; text-align: center;&quot; width=&quot;475&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
And here is another example&amp;nbsp;...(didn&#39;t I tell that this obsession goes way back)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;img alt=&quot;&quot; class=&quot;center&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAASCAAAAJDA5NTc4Y2IyLTQ1NTctNDUzZi1hZWUwLTA3MGE3NTk3YTBkOA.png&quot; height=&quot;335&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAASCAAAAJDA5NTc4Y2IyLTQ1NTctNDUzZi1hZWUwLTA3MGE3NTk3YTBkOA.png&quot; style=&quot;display: block; height: auto; margin: 30px auto; max-width: 100%; text-align: center;&quot; width=&quot;449&quot; /&gt;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;While( !done) iterate;&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAATNAAAAJDRlYTA2MDMxLTkyYTAtNDFmYy1hNTMwLTZlM2M1OTY0YjUwNA.png&quot; height=&quot;409&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAATNAAAAJDRlYTA2MDMxLTkyYTAtNDFmYy1hNTMwLTZlM2M1OTY0YjUwNA.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;309&quot; /&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
One idea that I kept on toying with (rather&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;ad infinitum)&lt;/span&gt;&amp;nbsp;was that of representing a sql query as a enumeration. (See example of one such idea.) I didn&#39;t actually get it working in the college. I almost forgot about it. &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Later on while at Microsoft, my passion was rekindled . Off the normal day job hours, I tried to meddle with some research projects like&amp;nbsp;&lt;a data-mce-href=&quot;http://research.microsoft.com/en-us/um/cambridge/projects/comega/&quot; href=&quot;http://research.microsoft.com/en-us/um/cambridge/projects/comega/&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;COmega&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a data-mce-href=&quot;http://research.microsoft.com/en-us/projects/cci/&quot; href=&quot;http://research.microsoft.com/en-us/projects/cci/&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Common compiler Infrastructure&lt;/a&gt;. &amp;nbsp;Unfortunately I was not able to make any real contributions. &amp;nbsp;I moved on and joined Amazon.com...a number of years passed. &amp;nbsp;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Laziness Pays Off&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Later in 2008&amp;nbsp;Microsoft&amp;nbsp;released LINQ and then eventually java followed it by lambdas and streams. It felt like my dream was realized by someone else already. I needed a a new obsession and so I was free to forget about the whole idea.&amp;nbsp;&lt;em&gt;Except - the Lazy Evaluation was destined to turn my world upside down again. &amp;nbsp;&lt;img alt=&quot;&quot; class=&quot;center&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAATPAAAAJDUzNDY3ODYzLTkxNTktNDFlMy1iNjU2LTdhODExMzg4ZjFhMQ.png&quot; height=&quot;123&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAATPAAAAJDUzNDY3ODYzLTkxNTktNDFlMy1iNjU2LTdhODExMzg4ZjFhMQ.png&quot; style=&quot;display: block; height: auto; margin: 30px auto; max-width: 100%; text-align: center;&quot; width=&quot;379&quot; /&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;Back to the&amp;nbsp;&lt;/strong&gt;&lt;em&gt;Future&amp;lt;&amp;gt;&lt;/em&gt;&lt;strong&gt;&amp;nbsp;in 2011 :&amp;nbsp;Project Orleans at Microsoft Research&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;img alt=&quot;&quot; class=&quot;left&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAU_AAAAJGUwZGNmYzZiLWVlMjEtNDVlMi04MzNjLTEyZjAzNzc3NTA0YQ.png&quot; height=&quot;420&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAU_AAAAJGUwZGNmYzZiLWVlMjEtNDVlMi04MzNjLTEyZjAzNzc3NTA0YQ.png&quot; style=&quot;float: left; height: auto; margin-bottom: 30px; margin-right: 30px; margin-top: 30px; max-width: 100%;&quot; width=&quot;276&quot; /&gt;I was lucky enough to get a contract position in Microsoft&#39;s eXtreme Computing Group in Microsoft Research. More specifically in&amp;nbsp;&lt;strong&gt;Cloud Computing Futures&lt;/strong&gt;&amp;nbsp;team. The project was&amp;nbsp;using&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;em&gt;Asynchronous Message Passing&lt;/em&gt;&lt;/span&gt;&amp;nbsp;to implement an&amp;nbsp;&lt;em&gt;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;Actor Model&lt;/span&gt;&lt;/em&gt;&amp;nbsp;based compute engine. Think of these actors as objects distributed in a cluster using some sort of&amp;nbsp;Consistent Hashing Ring. Almost like a memcache for actively callable objects. Admittedly this project was the coolest project I have ever worked on and worked with&amp;nbsp;some of the brightest engineers&amp;nbsp;I have ever met. ( I helped with implementing state management and code generation.) &amp;nbsp;&amp;nbsp;&amp;nbsp;With the help of &quot;mostly in memory&quot; processing we were able to achieve amazing throughput for live Halo 4 services.&amp;nbsp;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Enter Apache Spark and Resilient Distributed Datatypes&amp;nbsp;&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
After a trip down a memory lane we arrive at Today&#39;s state of the art -&amp;nbsp;&lt;em&gt;Resilient Distributed Datasets (RDDs), a distributed memory abstraction that lets programmers perform in-memory computations on large clusters in a fault-tolerant manner. From the RDD paper ...&lt;/em&gt;&lt;/div&gt;
&lt;blockquote style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Georgia; font-size: 24px; font-style: italic; line-height: 38px; margin: 50px 0px; padding-left: 80px; padding-right: 80px; position: relative; text-align: center;&quot;&gt;
....&amp;nbsp;RDDs provide an interface based on coarse-grained transformations (e.g., map, filter and join) that apply the same operation to many data items. If a parti-tion of an RDD is lost, the RDD has enough information about how it was derived from other RDDs to recompute&amp;nbsp;just that partition. Thus, lost data can be recovered, often quite quickly, without requiring costly replication.&lt;/blockquote&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;em&gt;&lt;img alt=&quot;&quot; class=&quot;center&quot; data-mce-src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAbMAAAAJDg2ZDc3Y2FmLTlmYWItNDYwMi1hZmY5LTRkZDAzMWNlZjRmYg.png&quot; height=&quot;300&quot; src=&quot;https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAbMAAAAJDg2ZDc3Y2FmLTlmYWItNDYwMi1hZmY5LTRkZDAzMWNlZjRmYg.png&quot; style=&quot;display: block; height: auto; margin: 30px auto; max-width: 100%; text-align: center;&quot; width=&quot;395&quot; /&gt;&lt;/em&gt;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;References :&lt;/strong&gt;&lt;/h2&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Resilient Distributed Datasets: A Fault-Tolerant Abstraction for In-Memory Cluster Computing&amp;nbsp;&lt;a data-mce-href=&quot;https://www.cs.berkeley.edu/~matei/papers/2012/nsdi_spark.pdf&quot; href=&quot;https://www.cs.berkeley.edu/~matei/papers/2012/nsdi_spark.pdf&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;https://www.cs.berkeley.edu/~matei/papers/2012/nsdi_spark.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Orleans: Distributed Virtual Actors for Programmability and Scalability&amp;nbsp;&lt;a data-mce-href=&quot;http://research.microsoft.com/pubs/210931/Orleans-MSR-TR-2014-41.pdf&quot; href=&quot;http://research.microsoft.com/pubs/210931/Orleans-MSR-TR-2014-41.pdf&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://research.microsoft.com/pubs/210931/Orleans-MSR-TR-2014-41.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;a data-mce-href=&quot;http://research.microsoft.com/en-US/people/philbe/disckeyotephilbefinal.pdf&quot; href=&quot;http://research.microsoft.com/en-US/people/philbe/disckeyotephilbefinal.pdf&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://research.microsoft.com/en-US/people/philbe/disckeyotephilbefinal.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;a data-mce-href=&quot;http://dotnet.github.io/orleans/Introduction&quot; href=&quot;http://dotnet.github.io/orleans/Introduction&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://dotnet.github.io/orleans/Introduction&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/5366031496105668711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2016/05/resilient-distributed-datasets-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/5366031496105668711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/5366031496105668711'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2016/05/resilient-distributed-datasets-and.html' title='Resilient Distributed Datasets and origins of my obsession'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-273097898630135887</id><published>2016-05-10T22:48:00.000-07:00</published><updated>2016-05-10T22:48:01.640-07:00</updated><title type='text'>Microservices: Managing for Frequent Reads and Rare Writes </title><content type='html'>&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
It is a rare service that does not need to persist its state.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Choice of your design critically depends on how frequently data gets written and allowable delay between when data gets written and the time when&amp;nbsp;readers&amp;nbsp;(and other nodes in the cluster) see that update. Let us examine&amp;nbsp;a&amp;nbsp;class of services where there are very infrequent rare writes and massive numbers of&amp;nbsp;reads. This type is the&amp;nbsp;most common kind of service in my experience. &amp;nbsp;Here I outline a common way to design such Microservice. I have used this simple &quot;design recipe&quot; for many services and&amp;nbsp;it has worked for me every time over the last decade. &amp;nbsp;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Step 1 : Treat it as a Read Only&amp;nbsp;Service&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The first step towards designing a service is to&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;assume it to be&amp;nbsp;Read Only&lt;/span&gt;&amp;nbsp;and optimize it for&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;fast access and scalability&lt;/span&gt;. When&amp;nbsp;data is readonly you can make million copies of your service and you don&#39;t need any coordination. They all return the&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;same results for same input&lt;/span&gt;.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
An example would be a service that returns Maximum or Minimum recorded temperature for a given the Zip Code. Input for this service is historical data. We assume it is&amp;nbsp;&lt;em&gt;somehow&lt;/em&gt;&amp;nbsp;injected in the system already. Temperature gets recorded daily and so it is okay to update the result set on daily basis. &amp;nbsp;&lt;em&gt;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;Until we get new updates the service just serves readonly data.&lt;/span&gt;&lt;/em&gt;&amp;nbsp;Another example would be Catalog Search on football memorabilia/ collectible&amp;nbsp;site which will have some structured data in product catalog. It is highly unlikely that new products are added every hour and product details are upadated every second. &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;ol style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Precompute results:&amp;nbsp;&lt;/strong&gt;The first optimization obviously is to pre-compute results.Eg. min/max results for given zip codes are calculated offline in a batch (or hadoop) job. The resulting data is then loaded into some persistent database. Your service is then just the look up of this pre-computed data for given type. &amp;nbsp;Performance is increased many folds. &amp;nbsp;You can increase the performance even further by&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;em&gt;trading space for speed by&amp;nbsp;denormalizing the results&lt;/em&gt;&lt;/span&gt;. How often you calculate the result set data is domain specific.&amp;nbsp;It can range from minutes to daily to even weekly. Most domains tolerate delays extremely&amp;nbsp;well and&amp;nbsp;do not require true &quot;as of now&quot; results. Now where do you store the output of a batch job? I prefer using distributed high availability key-value stores for storing such &quot;denormalized&quot; and &amp;nbsp;pre-computed results.&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;em&gt;The resulting service code is then mostly looking up data in key-value stores&lt;/em&gt;&lt;/span&gt;&amp;nbsp;(and do some parameter validation and minor post processing)&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Cache&amp;nbsp;results:&amp;nbsp;&lt;/strong&gt;But we are still hitting the datastore for every request. Networks are fast these days but not fast enough. Next optimization is to use distributed caching to decrease latency. The result data is treated readonly&amp;nbsp;anyway.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Cache results locally in memory:&amp;nbsp;&lt;/strong&gt;We can increase the performance even further by using multiple&amp;nbsp;levels of cache by first&amp;nbsp;storing some of the data locally in server memory.&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The &quot;hot data&quot; lives&amp;nbsp;mostly in memory, &amp;nbsp;the &quot;warm data&quot; is a RPC call away in&amp;nbsp; distributed cache and &quot;cold data&quot; is always reliably&amp;nbsp;stored in distributed key value store and summoned at any time. &amp;nbsp;It is very easy to scale your service up or down by adding more caching or service instances.&amp;nbsp;&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
Now is the time to start thinking about those Writes.&amp;nbsp;&lt;/h3&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Step 2: Handle Writes&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The writes are rare but DO&amp;nbsp;change the state of the system. We must handle concurrency and consistency properly.&amp;nbsp;&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Separation of Concerns&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
There is a common pattern called&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;em&gt;Command Query Responsibility Segregation (CQRS).&lt;/em&gt;&lt;/span&gt;&amp;nbsp;Essentially you have two separate interfaces: one for update and the other for read. &amp;nbsp;We designed our read interface earlier. &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The Write interface is generally your plain vanilla 3-tier web service backed by a very high performance&amp;nbsp;&lt;strong&gt;Relational Database&lt;/strong&gt;. &amp;nbsp;The data in your&amp;nbsp;database is the ultimate source of truth about your service. &amp;nbsp;I prefer this database to be strongly consistent i.e.&amp;nbsp;ACID.&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;em&gt;The read interface never ever read from this database.&lt;/em&gt;&amp;nbsp;&lt;/span&gt;They read from the key-value persistent store. &amp;nbsp;&lt;strong&gt;A batch job&lt;/strong&gt;&amp;nbsp;periodically reads the data from the master database and transforms it into key-values and stores in&amp;nbsp;&lt;strong&gt;No-SQL store&lt;/strong&gt;. We have already discussed how to handle this readonly key-value data effectively. Note that the eventual consistency comes from the delay between when data is added to master database and when it shows up in key-value stores. There are age old multi-phased state of the art protocols to handle failures and backups and fail-overs in case of master read/write RDBMS. It&amp;nbsp;is very much appropriate to use standard database technology given low write traffic. &amp;nbsp;Again recall that this database does not contain the data about the entire universe but only the slice of reality that is relevant to out micro service. Usually the data size is not a problem these days.&amp;nbsp;&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Optimistic Concurrency&amp;nbsp;&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Although write&amp;nbsp;traffic is low it still needs locking and properly scoping your transactions and using correct isolation levels. Use of optimistic concurrency and locking can increase performance of your database without sacrificing the consistency.&amp;nbsp;&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Use Event Sourcing&amp;nbsp;&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Event sourcing is a technique where we record and preserve each every change made to the system. This is yet another way to increase throughput and resiliency of the system. &amp;nbsp;&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Use Complex Event Processing&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
So far we are relying on batch model . But this is not hard and fast requirement.&amp;nbsp;You can build complex pipelines on top of event stream using likes of &amp;nbsp;&lt;a data-mce-href=&quot;http://reactivex.io&quot; href=&quot;http://reactivex.io/&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Reactive X&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a data-mce-href=&quot;http://spark.apache.org/streaming/&quot; href=&quot;http://spark.apache.org/streaming/&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Spark Streaming&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a data-mce-href=&quot;http://storm.apache.org&quot; href=&quot;http://storm.apache.org/&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Apache Storm&lt;/a&gt;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Step 3 :&amp;nbsp;Get Closer to&amp;nbsp;Data&amp;nbsp;&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;Use&amp;nbsp;Ephemeral Local Store:&lt;/strong&gt;&amp;nbsp;One disadvantage of caching is that memory is limited and you still need to fetch data from remote&amp;nbsp;machine (be it memcache or &amp;nbsp;your no-sql store). Yet another optimization is to copy data to each mid-tier machine. There are probably a dozen different&amp;nbsp;ways to achieve this each with its own pros and cons. But the important point is that -&amp;nbsp;the data access is then becomes just a local&amp;nbsp;access and much faster than accessing remote&amp;nbsp;machines. &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;Use Actors:&amp;nbsp;&lt;/strong&gt;You can also use actor based run-times to add fault tolerance and optimize write performance. &amp;nbsp;&lt;a data-mce-href=&quot;http://akka.io&quot; href=&quot;http://akka.io/&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Akka&lt;/a&gt;&amp;nbsp;is one such example. &amp;nbsp;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Many domains tolerate delay in data being updated and that update being visible to everyone. &amp;nbsp;Many micro services have very high read traffic but rare write traffic. &amp;nbsp;There is a simple and effective &quot;design recipe&quot; to build them that works wonderfully in practice.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Happy Coding !&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;References :&lt;/strong&gt;&lt;/h2&gt;
&lt;ol style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Data&amp;nbsp; Concurrency and Consistency in Oracle Databases&amp;nbsp;&lt;a data-mce-href=&quot;http://docs.oracle.com/cd/B28359_01/server.111/b28318/consist.htm&quot; href=&quot;http://docs.oracle.com/cd/B28359_01/server.111/b28318/consist.htm&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://docs.oracle.com/cd/B28359_01/server.111/b28318/consist.htm&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Oracle High Availability Database&amp;nbsp;&lt;a data-mce-href=&quot;http://www.oracle.com/us/products/database/high-availability/overview/index.html&quot; href=&quot;http://www.oracle.com/us/products/database/high-availability/overview/index.html&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://www.oracle.com/us/products/database/high-availability/overview/index.html&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Oracle No-sql database&amp;nbsp;&lt;a data-mce-href=&quot;http://www.oracle.com/us/products/database/nosql/overview/index.html&quot; href=&quot;http://www.oracle.com/us/products/database/nosql/overview/index.html&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://www.oracle.com/us/products/database/nosql/overview/index.html&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Memcached&amp;nbsp;&lt;a data-mce-href=&quot;http://memcached.org&quot; href=&quot;http://memcached.org/&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://memcached.org&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;line-height: 32px; margin-bottom: 32px;&quot;&gt;
Leveraging Massively Parallel Processing in an Oracle Environment for Big Data Analytics&lt;/div&gt;
&lt;a data-mce-href=&quot;http://www.oracle.com/technetwork/database/bi-datawarehousing/twp-hadoop-oracle-194542.pdf&quot; href=&quot;http://www.oracle.com/technetwork/database/bi-datawarehousing/twp-hadoop-oracle-194542.pdf&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://www.oracle.com/technetwork/database/bi-datawarehousing/twp-hadoop-oracle-194542.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Why use event sourcing ?&lt;a data-mce-href=&quot;http://codebetter.com/gregyoung/2010/02/20/why-use-event-sourcing/&quot; href=&quot;http://codebetter.com/gregyoung/2010/02/20/why-use-event-sourcing/&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://codebetter.com/gregyoung/2010/02/20/why-use-event-sourcing/&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Actor Models&amp;nbsp;&lt;a data-mce-href=&quot;https://en.wikipedia.org/wiki/Actor_model&quot; href=&quot;https://en.wikipedia.org/wiki/Actor_model&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;https://en.wikipedia.org/wiki/Actor_model&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/273097898630135887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2016/05/microservices-managing-for-frequent.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/273097898630135887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/273097898630135887'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2016/05/microservices-managing-for-frequent.html' title='Microservices: Managing for Frequent Reads and Rare Writes '/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-4201977281845241049</id><published>2016-05-10T22:46:00.002-07:00</published><updated>2016-05-10T22:46:49.228-07:00</updated><title type='text'>Microservices: Settling Architecture vs Design Debate</title><content type='html'>&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
It is an old religious war in software industry.&amp;nbsp;&lt;em&gt;Where does Software Design end and Software Architecture start&amp;nbsp;?&lt;/em&gt;&amp;nbsp;&amp;nbsp;My answer to that question is - boundary that separates&amp;nbsp;a&amp;nbsp;&lt;strong&gt;microservice&lt;/strong&gt;&amp;nbsp;from the things outside of it from the stuff inside it. Inside a micro service we need&amp;nbsp;Design, outside of micro service we need&amp;nbsp;Architecture.&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;What is Software&amp;nbsp;Architecture?&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The wikipedia definition captures the essence of what&amp;nbsp;&lt;a data-mce-href=&quot;https://en.wikipedia.org/wiki/Software_architecture&quot; href=&quot;https://en.wikipedia.org/wiki/Software_architecture&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Software Architecture&lt;/a&gt;&amp;nbsp;is. I take liberty to re-iterpret&amp;nbsp;it a little bit. &amp;nbsp;&lt;/div&gt;
&lt;blockquote style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Georgia; font-size: 24px; font-style: italic; line-height: 38px; margin: 50px 0px; padding-left: 80px; padding-right: 80px; position: relative; text-align: center;&quot;&gt;
Software Architecture&amp;nbsp;is the set of structures needed to reason about the software system. Each structure comprises software elements&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;(aka Micro-service)&lt;/span&gt;, relations among them, and properties of both elements and relations.&lt;/blockquote&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Software architecture choices include specific structural options from possibilities in the design of software.&amp;nbsp;Software architecture is about making fundamental&amp;nbsp;&lt;strong&gt;structural choices&lt;/strong&gt;&amp;nbsp;which are costly to change once implemented. &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;a data-mce-href=&quot;https://www.youtube.com/watch?v=DngAZyWMGR0&quot; href=&quot;https://www.youtube.com/watch?v=DngAZyWMGR0&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Martin Fowler&lt;/a&gt;&amp;nbsp;defines the architecture in an interesting way. &quot;&lt;em&gt;&lt;strong&gt;The important stuff—whatever that is&quot;&lt;/strong&gt;. &amp;nbsp;&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;a data-mce-href=&quot;http://www.iso-architecture.org/42010/defining-architecture.html&quot; href=&quot;http://www.iso-architecture.org/42010/defining-architecture.html&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;ISO/IEC/IEEE 42010&lt;/a&gt;&amp;nbsp;defines it as &quot;&lt;em&gt;&lt;strong&gt;fundamental concepts or properties of a system&lt;/strong&gt;&amp;nbsp;in its environment embodied in its elements, relationships, and in the principles of its design and evolution&quot;&lt;/em&gt;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Architecture vs Design&lt;/strong&gt;&lt;/h2&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;em&gt;Architecture is&amp;nbsp;&lt;span class=&quot;underline&quot;&gt;definin&lt;span class=&quot;underline&quot;&gt;g&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&amp;nbsp;the interactions&amp;nbsp;and contracts&lt;/span&gt;&lt;/em&gt;&amp;nbsp;of a micro service with the rest of the system.&amp;nbsp;&lt;em&gt;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;Design is making&amp;nbsp;&lt;span class=&quot;underline&quot;&gt;implementation&lt;/span&gt;&amp;nbsp;choices&lt;/span&gt;&lt;/em&gt;&amp;nbsp;(like internal OO Design, data structures and algorithms.) Your Architecture involves figuring out what micro services you need. Defining data&amp;nbsp;they communicate and store. Details of database design, choice of MVC framework is Design. &amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;Architecture is strategic , Design is tactical&lt;/span&gt;. Making trade-offs around consistency and availability is Architecture. Making space/time tradeoffs or &amp;nbsp;deciding to precompute partial results or choosing a caching mechanism is then all part of the Design.&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Design is concerned with local issues, Architecture is concerned with global issues. We can change our Design without asking anyone else. (Eg. Change data structure, algorithm or refactor OO Model). To change Architecture we need to communicate it to others and the change has ripple effect.&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Design is executable. Architecture is not.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Discovering and Defining Microservices&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
There are two steps to discovering the Microservices&amp;nbsp;&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;1. User Story Mapping&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;Input&lt;/span&gt;&lt;/strong&gt;&amp;nbsp;: Our starting point is scenario or epic. A user has a concrete need in mind and a task to accomplish. User does that&amp;nbsp;by interacting with our system through series of actions. Input to our architectural discovery process is long list of&amp;nbsp;user stories.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Activity&lt;/strong&gt;:&lt;/span&gt;&amp;nbsp;We group related&amp;nbsp;stories into the clusters. &amp;nbsp;These clusters indicate the underlying feature or &quot;capability&quot; that the system must provide.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Output&lt;/strong&gt;:&lt;/span&gt;&amp;nbsp;Each feature or capability is potentially a micro-service. (Prune the list as required.)&amp;nbsp;&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;2. Component-Responsibility-Collaboration Cards&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Input&lt;/strong&gt;&amp;nbsp;:&lt;/span&gt;&amp;nbsp;List of microservices, list of user stories.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Activity&lt;/strong&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;ol style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;For each micro service create a card with two sections&amp;nbsp;&lt;strong&gt;Responsibility&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong&gt;Collaboration.&amp;nbsp;&lt;/strong&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Responsibility section includes (a)&amp;nbsp;&amp;nbsp;What do I know ? (b) What do I do? (c) What do I decide ?&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;In Collaboration section include (a) Who do I interact with? (b) What data I exchange with others?&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;For each major user story&amp;nbsp;walk through the&amp;nbsp;micro services and in the process assigning responsibilities to them and discovering collaborations and details of those interactions.&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;Output:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;Well defined set of micro-services with clear responsibilities and identified interaction with&amp;nbsp;collaborators.&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
References:&lt;/h2&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;The New User Story Backlog is a Map&amp;nbsp;&lt;a data-mce-href=&quot;http://jpattonassociates.com/the-new-backlog/&quot; href=&quot;http://jpattonassociates.com/the-new-backlog/&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://jpattonassociates.com/the-new-backlog/&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Creating an Agile Road Map Using Story Mapping&amp;nbsp;&lt;a data-mce-href=&quot;https://www.scrumalliance.org/community/articles/2013/august/creating-an-agile-roadmap-using-story-mapping&quot; href=&quot;https://www.scrumalliance.org/community/articles/2013/august/creating-an-agile-roadmap-using-story-mapping&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;https://www.scrumalliance.org/community/articles/2013/august/creating-an-agile-roadmap-using-story-mapping&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/4201977281845241049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2016/05/microservices-settling-architecture-vs.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/4201977281845241049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/4201977281845241049'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2016/05/microservices-settling-architecture-vs.html' title='Microservices: Settling Architecture vs Design Debate'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-1757292342213968903</id><published>2016-05-10T22:45:00.002-07:00</published><updated>2016-05-10T22:45:21.682-07:00</updated><title type='text'>Microservices: Lego Blocks in Modern Architecture </title><content type='html'>&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Until recently there was no real word to describe the kind of software that I developed over the last decade. I have worked on distributed systems that were massively scalable with&amp;nbsp;millions of users and billions of transactions. I have worked on service oriented architectures that delivered user functionality at rapid pace. I discovered, learned and practiced a particular style of software architecture. But until recently could not find a simple phrase to describe it.&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Now I can say I developed Microservices ! But what is Microservice ?&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Defining Microservice&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Wikipedia defines :&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Microservices&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;is a software architectural style&amp;nbsp;in which complex applications&amp;nbsp;are&amp;nbsp;&lt;strong&gt;&lt;em&gt;composed&lt;/em&gt;&lt;/strong&gt;&amp;nbsp;of small,&amp;nbsp;&lt;em&gt;&lt;strong&gt;independent&lt;/strong&gt;&lt;/em&gt;&amp;nbsp;processes&amp;nbsp;&lt;em&gt;&lt;strong&gt;communicating&lt;/strong&gt;&lt;/em&gt;&amp;nbsp;with each other&amp;nbsp;&lt;em&gt;&lt;strong&gt;using language agnostic API&lt;/strong&gt;&lt;/em&gt;. These services are small, highly decoupled&amp;nbsp;and f&lt;em&gt;&lt;strong&gt;ocus on doing a small task&lt;/strong&gt;&lt;/em&gt;, facilitating a&amp;nbsp;&lt;em&gt;&lt;strong&gt;modular&lt;/strong&gt;&lt;/em&gt;&amp;nbsp;approach to&amp;nbsp;&lt;strong&gt;system-building&lt;/strong&gt;.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
In short, for each service &quot;Do one thing and do it well&quot;.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
But I like following definition better&lt;/div&gt;
&lt;blockquote style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Georgia; font-size: 24px; font-style: italic; line-height: 38px; margin: 50px 0px; padding-left: 80px; padding-right: 80px; position: relative; text-align: center;&quot;&gt;
&lt;em&gt;Microservice Architecture is a service-oriented architecture composed of loosely coupled elements that have bounded contexts&lt;/em&gt;.&lt;/blockquote&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Loosely Coupled&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Loosely coupled means each microservice is a unit of software that is independently replaceable and upgradeable and deployable. It is not microservice architecture If all services have to be deployed at once or they talk to the same database and requires coordinating schema changes.&amp;nbsp;Micro services can be scaled independent of each other (ideally in elastic automated ways.). This allows separate development teams (perhaps geographically separated) to develop services using separate schedules, frameworks and methodologies.&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Bounded Context&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Bounded context as name suggests is a partition or silo of domain model that is mostly selfcontained – Microservices and its peers interact purely through APIs and don’t share data or schema. The key is that each organizes and manages its own data. This is&amp;nbsp;a critical feature of this architecture.&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Organized around business capabilities&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Now&amp;nbsp;essence of Microservice is that each Microservice is they expose business functionality as a component. And then you can build your application as as suit of services by putting these components together.&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Using Language Agnostic API&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
With language agnostic APIs, it enforces clear separation between interface of the Microservice and its implementation. This ensures&amp;nbsp;true interoperability between&amp;nbsp;various components. SOAP and REST are two approaches that have already become industry standard.&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Marriage made in Heaven: Containers as Deployment Units.&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Containers are the future of application delivery. It is an application packaging and delivery method that&amp;nbsp;guarantees that your containers&amp;nbsp;will always run the same, regardless of the environment it is running in. In short it is well&amp;nbsp;contained. This is exactly the fundamental requirement of Microservices&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Container is an old concept. Most familiar&amp;nbsp;being the java web archive and servlet containers. Latest and the most popular incarnation being the docker containers. Linux containers allow higher density and better&amp;nbsp;utilization of hardware resources.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The advantages are &amp;nbsp;&lt;/div&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Rapid provisioning&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Scale quickly.&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Eliminates the environment inconsistencies&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Improves the velocity of development by allowing development teams to choose the software stack that is best for their service.&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Easy sharing&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Isolate problems&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Simplifies&amp;nbsp;continuous integration and testing &amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
References&amp;nbsp;&lt;/h2&gt;
&lt;ul style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-left: 35px; padding-right: 0px;&quot;&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Web Containers&lt;/strong&gt;&amp;nbsp;&lt;a data-mce-href=&quot;https://en.wikipedia.org/wiki/Web_container&quot; href=&quot;https://en.wikipedia.org/wiki/Web_container&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;https://en.wikipedia.org/wiki/Web_container&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Docker&lt;/strong&gt;&amp;nbsp;&lt;a data-mce-href=&quot;https://www.docker.com/whatisdocker&quot; href=&quot;https://www.docker.com/whatisdocker&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;https://www.docker.com/whatisdocker&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&lt;strong&gt;Oracle Zones&lt;/strong&gt;&amp;nbsp;&lt;a data-mce-href=&quot;http://www.oracle.com/technetwork/server-storage/solaris/containers-169727.html&quot; href=&quot;http://www.oracle.com/technetwork/server-storage/solaris/containers-169727.html&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://www.oracle.com/technetwork/server-storage/solaris/containers-169727.html&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;How netflix does Microservices&amp;nbsp;&lt;a data-mce-href=&quot;https://www.nginx.com/blog/microservices-at-netflix-architectural-best-practices/&quot; href=&quot;https://www.nginx.com/blog/microservices-at-netflix-architectural-best-practices/&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;https://www.nginx.com/blog/microservices-at-netflix-architectural-best-practices/&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Book titled : &quot;Building Microservices&quot;&amp;nbsp;&lt;a data-mce-href=&quot;http://shop.oreilly.com/product/0636920033158.do&quot; href=&quot;http://shop.oreilly.com/product/0636920033158.do&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://shop.oreilly.com/product/0636920033158.do&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;Video Library&amp;nbsp;&lt;a data-mce-href=&quot;http://www.infoq.com/microservices/&quot; href=&quot;http://www.infoq.com/microservices/&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://www.infoq.com/microservices/&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;line-height: 32px; margin-bottom: 15px; margin-top: 0px;&quot;&gt;&quot;Microservices: Java the Unix Way&quot;&amp;nbsp;&lt;a data-mce-href=&quot;http://www.infoq.com/presentations/Micro-Services&quot; href=&quot;http://www.infoq.com/presentations/Micro-Services&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://www.infoq.com/presentations/Micro-Services&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/1757292342213968903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2016/05/microservices-lego-blocks-in-modern.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/1757292342213968903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/1757292342213968903'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2016/05/microservices-lego-blocks-in-modern.html' title='Microservices: Lego Blocks in Modern Architecture '/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-6116000907136418301</id><published>2016-05-10T22:42:00.000-07:00</published><updated>2016-05-10T22:42:00.241-07:00</updated><title type='text'>For More Agility Do the Waterfall !</title><content type='html'>&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Yes you read it right. If you want to be more Agile then my recommendation is to do Waterfall model . But do it in reverse direction. &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Here is my simple theory -&amp;nbsp;&amp;nbsp;&lt;strong&gt;If the Waterfall model is opposite of Agile, then by doing Waterfall in&amp;nbsp;&lt;em&gt;opposite direction&amp;nbsp;&lt;/em&gt;you get Agile!&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;If Waterfall has long product cycles then we make them super short.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Without further ado..&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Fail Early, Fail Often, Fail Cheap&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Agile Development has &amp;nbsp;one and only&amp;nbsp;one reason for its existence -&amp;nbsp;&lt;em&gt;We need to respond to&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;changing customer requirements&lt;/span&gt;&amp;nbsp;in timely manner by better utilization of productive resources.&amp;nbsp;&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Now&amp;nbsp;that requires&lt;em&gt;&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;discovering customer requirements&lt;/span&gt;.&amp;nbsp;&lt;/em&gt;In his book Lean Startup author Eric Ries talks about using&amp;nbsp;&lt;strong&gt;Validated Learning&lt;/strong&gt;&amp;nbsp;-&amp;nbsp;a process in which one learns by trying out an initial idea and then measuring it&amp;nbsp;and validating&amp;nbsp;the effect. Our goal then is to define and discover a&lt;em&gt;&amp;nbsp;&lt;strong&gt;minimal viable product&lt;/strong&gt;&amp;nbsp;(MVP) which is the &quot;version of a new product which allows a team to collect the maximum amount of validated learning about customers with the least effort&quot;&amp;nbsp;&lt;/em&gt;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;Turning back the Arrow Of Time&lt;/strong&gt;&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Let now do the Waterfall in opposite direction.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;1. Announce&amp;nbsp;your product&#39;s General Availability&lt;/strong&gt;&amp;nbsp;: Start with writing an&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;internal press release of your finished product&lt;/span&gt;. The target audience is end user who is going to benefit from your solution. Describe how your product is better than your competition and how it exceeds customers expectations. Like a real &amp;nbsp;news story, include a narrative scenario of how one customer solved their most pressing problem using your product.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
At this point if there are not enough real benefits to make it a compelling value proposition then it is unlikely that product will succeed in the market place. Rework on your product idea. Don&#39;t rush this step. Get it right - are you appealing to right market segment ? Do they really have that problem that you are trying to solve? Remember Mr. Kano? Have you used right portfolio&amp;nbsp;of exciting/cool features and must have functionality ? Have you covered all stages of Buyer Experience Cycle ?&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Once you have this narrative scenario/ press release - use it as a light house to guide all your discussions and planning. This press release is what James D. Murphy, author of book&amp;nbsp;&lt;em&gt;Flawless Execution&lt;/em&gt;&amp;nbsp;calls&amp;nbsp;&lt;strong&gt;Future Picture -&amp;nbsp;&lt;/strong&gt;a&amp;nbsp;high resolution description of the way we&#39;d like things to be. The richness, the completeness is what makes it work by having sufficient content and clarity to provide guidance down the road.&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;2. Test with limited Beta Users&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Invite your most friendly customers to test your product. At this point obviously what you don&#39;t have is the working code. But worry not , you can still conduct the usability testing by conducting what is called&amp;nbsp;&lt;strong&gt;Paper Prototyping.&amp;nbsp;&lt;/strong&gt;&amp;nbsp;Instead of customers interacting with actual software they walk through the mockups and paper drawings.&amp;nbsp;&amp;nbsp;&lt;strong&gt;&lt;a data-mce-href=&quot;http://interchangeproject.org/2013/11/02/paper-prototyping/&quot; href=&quot;http://interchangeproject.org/2013/11/02/paper-prototyping/&quot; style=&quot;color: #8c68cb; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://interchangeproject.org/2013/11/02/paper-prototyping/&lt;/a&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
This is super useful because you get direct feedback about your product and discover missing and confusing features. It is super cheap and super easy - because all you require is paper and pencil.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;But make no mistake - this is NOT about UX design only.&lt;/strong&gt;&amp;nbsp;For every user interaction&amp;nbsp;&lt;span class=&quot;underline&quot; style=&quot;text-decoration: underline;&quot;&gt;there must be an underlying API&lt;/span&gt;&amp;nbsp;that must implement that functionality. Your services don&#39;t live in a&amp;nbsp;vacuum - they are there to enable user scenarios - so first discover what those user stories are. This also uncovers&amp;nbsp; a underlying mental model that users, experts and developer use to think about the &quot;stuff&quot; &amp;nbsp;in your applications domain. In his book&amp;nbsp;&lt;strong&gt;Domain Driven Design&lt;/strong&gt;, author Eric Evans explains importance of discovering what he calls&amp;nbsp;&lt;strong&gt;Ubiquitous Language.&lt;/strong&gt;&amp;nbsp;This model is input to your entity model.&amp;nbsp;Using the ubiquitous language in conversations with domain experts and end users is an important part of testing it, and more importantly&amp;nbsp;discovering&amp;nbsp;the domain model.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
The most valuable outcome of this stage is domain model and set of user stories.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;3. Deployment&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Next you should write deployment scripts and figure out how you are going to deploy your software. &amp;nbsp;It helps resolve many issues early in the game&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
(a)&amp;nbsp;how do you do branching ? Service release management? (b) How do you handle various deployment stages - (prod, pre-prod etc) (c) How do you package it - docker image? VM image? .jars ? &amp;nbsp;(d) How do you manage dependencies in your code&amp;nbsp;? (e) Do you have stateful services or stateless ? How many ? How many for each stage? How do you scale them up or&amp;nbsp;down? &amp;nbsp;Where is the configuration stored (f) where do logs go ? &amp;nbsp;(h) what about test infrastructure ? How do you stress the product ? how do you measure performance ? (i) can you use open source ? do you have to open you code? (j) How do you configure&amp;nbsp;CDN? (k) How do you charge the customer (l) What is your architecture ? 3 tier? 8 tiers ? how do micro-services discover each other ?....so on.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
All these decisions affect the way your team works.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
In addition it is a pre-requisite for integration testing. The software does not need to be ready - yet. If your software is a command line utility, it just prints &quot;hello world&quot; . If it is a REST service it just returns 200 OK. If its a mobile app it just shows a logo. It is otherwise useless - does not do anything interesting. But most importantly - you can deploy it !!&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;4. Integration&amp;nbsp;&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Next is integration.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;Define end to end Acceptance Tests&lt;/strong&gt;: By this time you have broken down your news release scenario into manageable set of user stories. &amp;nbsp;You must now define acceptance criteria for each user story.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;Assign clear responsibility to services/ components:&lt;/strong&gt;&amp;nbsp;You have an idea about how your architecture looks like and you have assigned capabilities to each micro-service/ component. It is time to define how they fit together. Are there missing components ? Is data lost in translation ? Do you need to transform data? &amp;nbsp;Walk through each scenario and user story to discover what functionality a service needs to implement, what data it needs to store and what data other services can provide.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;Define perf and scalability goals:&lt;/strong&gt;&amp;nbsp;This is the time to define your performance/scalability goals for each scenario (and sometimes each user story). Having clearly defined &amp;nbsp;measurable targets helps drive implementation decisions.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
&lt;strong&gt;Create Scenario Score Card :&amp;nbsp;&lt;/strong&gt;Create a score card to track how far are you from meeting all your goals - SLA, usability, capacity utilization. &amp;nbsp;&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;5. Unit Test&amp;nbsp;&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Use Test Driven Development for each service/component.&amp;nbsp;Ask your dev team to write test cases before writing any code.&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
This is a well established practice in many places. I need not elaborate...&lt;/div&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;6. Implementation&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
This is where you have reached the point in development process where there is lot less uncertainty and increased clarity about the intended functionality.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
Early in the cycle everything in the Scenario Score Card will be in red, but that motivates team to fix that and strive towards&amp;nbsp;a green score card. Release criteria is simple - when everything is green you know you are ready to ship the product for real !&lt;/div&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
You are writing tons of quality code and completing feature after feature. You are &amp;nbsp;experiencing what the psychologists call -&amp;nbsp;the&amp;nbsp;&lt;strong&gt;Flow&lt;/strong&gt;&amp;nbsp;!&amp;nbsp;&lt;/div&gt;
&lt;blockquote style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Georgia; font-size: 24px; font-style: italic; line-height: 38px; margin: 50px 0px; padding-left: 80px; padding-right: 80px; position: relative; text-align: center;&quot;&gt;
&lt;strong&gt;Flow&lt;/strong&gt;, also known as&amp;nbsp;&lt;strong&gt;the zone&lt;/strong&gt;, is the mental state of operation in which a person performing an activity is fully immersed in a feeling of energized focus, full involvement, and enjoyment in the process of the activity. In essence, flow is characterized by complete absorption in what one does.&amp;nbsp;&lt;/blockquote&gt;
&lt;h3 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
&lt;strong&gt;7. Design&amp;nbsp;&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
You have shippable product. &amp;nbsp;You have well commented and well tested code. It is time to write one pager &quot;Getting started ..&quot; design document, so that new hires know where to start looking for the executable design !&amp;nbsp;&lt;/div&gt;
&lt;h2 style=&quot;color: rgba(0, 0, 0, 0.85098); font-family: Helvetica, Arial, sans-serif; font-size: 24px; font-weight: 400; margin-bottom: 8px;&quot;&gt;
Conclusion&lt;/h2&gt;
&lt;div style=&quot;color: rgba(0, 0, 0, 0.701961); font-family: Georgia, serif; font-size: 18px; line-height: 32px; margin-bottom: 32px;&quot;&gt;
For More Agility Do the Waterfall !&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/6116000907136418301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2016/05/for-more-agility-do-waterfall.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/6116000907136418301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/6116000907136418301'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2016/05/for-more-agility-do-waterfall.html' title='For More Agility Do the Waterfall !'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-5267264997868173428</id><published>2012-05-18T00:32:00.001-07:00</published><updated>2012-05-18T00:32:45.386-07:00</updated><title type='text'>Resurrecting Object Curry - Part 4 : Managed or Native ?</title><content type='html'>As I mentioned in earlier posts Object Curry was a language I was designing so to speak in my college days (1996-1998) and that I am planning to resurrect it and make it more modern.&lt;br /&gt;
&lt;br /&gt;
One important issue is whether object curry is &quot;Managed&quot; or &quot;Native&quot; ?&lt;br /&gt;
It is very hard question for me to answer correctly but lets just go back to source and see what were original thoughts.&lt;br /&gt;
As it often happens ideas about language turn into a platform and then into OS concepts. &amp;nbsp;So for a while I started calling Object Curry by various names like Component Mantra , OS Mantra and even the name Winix &lt;br /&gt;
Here are the original thoughts , I think many of the ideas are still valid...&lt;br /&gt;
I&#39;ll add commentary to the posts and ideas in my next post after the weekend. But for now just paste the original notes..so here you go straight from the source.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&quot;&gt;Virtual Machine for C.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&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;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivKdsJDoPJD3IoMbBoLE9us3Obq2_zm0b8oU_bpDpH_tpQWNmU0iJLKVdMLovMzY_Gw7-DOQA-IaeHwd7ITgsEnwBjapJw5u5zRb_L6EvM-aHi1t_qYu4DuiNBjDEgBUHkPB55RGFIa7U/s1600/VMIdeas.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 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/AVvXsEivKdsJDoPJD3IoMbBoLE9us3Obq2_zm0b8oU_bpDpH_tpQWNmU0iJLKVdMLovMzY_Gw7-DOQA-IaeHwd7ITgsEnwBjapJw5u5zRb_L6EvM-aHi1t_qYu4DuiNBjDEgBUHkPB55RGFIa7U/s320/VMIdeas.png&quot; width=&quot;228&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&quot;&gt;Two stage architecture.&lt;/span&gt;&lt;/div&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/AVvXsEhVGaodq7ZeJ05qJo5IflTIs7j6oj6VwNPewV-mcJtWXoykiq4IE02idxies0Q6ZA2m2IxPEO2hpVHUIG7m-8Qkhm9Tr02IsUAE5LxVc6IZ2XmDmsMdR562FhbnSDMThnMdSXfyk5jEkAI/s1600/VMIdeas1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 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/AVvXsEhVGaodq7ZeJ05qJo5IflTIs7j6oj6VwNPewV-mcJtWXoykiq4IE02idxies0Q6ZA2m2IxPEO2hpVHUIG7m-8Qkhm9Tr02IsUAE5LxVc6IZ2XmDmsMdR562FhbnSDMThnMdSXfyk5jEkAI/s320/VMIdeas1.png&quot; width=&quot;221&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEhwvlvXFtGZ44VmdBE_ASLTesK9LcW7CpeRrg2cPS3FbiPZHI6QSYQToiaFIrefXAGlzIX05ot9uu2d2Ge6kD0Ce2qfGe1Eojb9sZJH3KqLWOKYwhuvClkAV8U04EENkohIIxijfbiFZdU/s1600/VMIdeas2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 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/AVvXsEhwvlvXFtGZ44VmdBE_ASLTesK9LcW7CpeRrg2cPS3FbiPZHI6QSYQToiaFIrefXAGlzIX05ot9uu2d2Ge6kD0Ce2qfGe1Eojb9sZJH3KqLWOKYwhuvClkAV8U04EENkohIIxijfbiFZdU/s320/VMIdeas2.png&quot; width=&quot;209&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEiXYmnIpqsrj8PK4t6UET3Dj9kg_eA73DPmcAMj1LzDsR1I-_Zk1VlsR-u3M6K-npVX2A6ySv-dLdvd0hxjIP0xTgasRR0yZmCUA3izqJpIfKgP-87Va1-OXwakebLJxH3XOaenKUrPhiU/s1600/VMIdeas3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 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/AVvXsEiXYmnIpqsrj8PK4t6UET3Dj9kg_eA73DPmcAMj1LzDsR1I-_Zk1VlsR-u3M6K-npVX2A6ySv-dLdvd0hxjIP0xTgasRR0yZmCUA3izqJpIfKgP-87Va1-OXwakebLJxH3XOaenKUrPhiU/s320/VMIdeas3.png&quot; width=&quot;214&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEghizAbhubLueq4Iqhl9KMak7HPNiGgYOXkvzPfNMuUtV10oilBdzXYZsvx54nWP53aobbqMDJUVnEPV-TU_Yb-oc2yXS1r1gQ_cTnRj7RAAKgvJhI3hCjfjCadeDkWMNB8v8AOBTttGR0/s1600/VMIdeas4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 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/AVvXsEghizAbhubLueq4Iqhl9KMak7HPNiGgYOXkvzPfNMuUtV10oilBdzXYZsvx54nWP53aobbqMDJUVnEPV-TU_Yb-oc2yXS1r1gQ_cTnRj7RAAKgvJhI3hCjfjCadeDkWMNB8v8AOBTttGR0/s320/VMIdeas4.png&quot; width=&quot;217&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&quot;&gt;Web Pointers for Distributed Computing !&lt;/span&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/AVvXsEiDeLRcGVG4SMaHJot8lU_PH9yj3zFY6uEz1_n7XSv5C6GJTEM7UL24iku-LvEc_BP4KJ2mSkXl7es0P7tvoN5g7VLeeWqaItYkVyn4zjct0Bs6vrA92Tp_rmel3N8LZCRBH_keYbxO6rU/s1600/VMIdeas5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 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/AVvXsEiDeLRcGVG4SMaHJot8lU_PH9yj3zFY6uEz1_n7XSv5C6GJTEM7UL24iku-LvEc_BP4KJ2mSkXl7es0P7tvoN5g7VLeeWqaItYkVyn4zjct0Bs6vrA92Tp_rmel3N8LZCRBH_keYbxO6rU/s320/VMIdeas5.png&quot; width=&quot;207&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEi3z1O3BaxW0cvrhhlHutj4QlUpSOKz-G36eB16rK-DWYp-O0qIhchVJI9TFZkKtH4-BQXNmPXCgwOeExdUwzqL0K7GJw5Hdlsyw2lQv8bQyqSt6NcgThLbHFUzMY5LO-E7dCFfOtfkPyc/s1600/VMIdeas6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 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/AVvXsEi3z1O3BaxW0cvrhhlHutj4QlUpSOKz-G36eB16rK-DWYp-O0qIhchVJI9TFZkKtH4-BQXNmPXCgwOeExdUwzqL0K7GJw5Hdlsyw2lQv8bQyqSt6NcgThLbHFUzMY5LO-E7dCFfOtfkPyc/s320/VMIdeas6.png&quot; width=&quot;215&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEi0mX1iCfJIq_6q0TJUw-CGClKtg5PevuxjMxieF1aczRdDugq-1onqu33jLQyPLpvmZELnbI6UANTlvk4-2GWgkkPOTqtSrn7RjlPBK_j5eT91uTn79-IHdhPJezsEPMWwtBSl2bEA18E/s1600/VMIdeas7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 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/AVvXsEi0mX1iCfJIq_6q0TJUw-CGClKtg5PevuxjMxieF1aczRdDugq-1onqu33jLQyPLpvmZELnbI6UANTlvk4-2GWgkkPOTqtSrn7RjlPBK_j5eT91uTn79-IHdhPJezsEPMWwtBSl2bEA18E/s320/VMIdeas7.png&quot; width=&quot;220&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&quot;&gt;Some object memory layout stuff&lt;/span&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/AVvXsEhzw3xeizoI6n13NImE9kcA7xsvxisAQOWROfnVlOTl0_c0BKJqmN8Jvi5PfZ0K1XeW1YSIHLq0VvpjLWfbVtRodnx6CYh-i-vxl0wP2U5lMrTDBzBUzbw99a6Zr4UFk-MXW_teIjuiKBo/s1600/VMIdeas8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 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/AVvXsEhzw3xeizoI6n13NImE9kcA7xsvxisAQOWROfnVlOTl0_c0BKJqmN8Jvi5PfZ0K1XeW1YSIHLq0VvpjLWfbVtRodnx6CYh-i-vxl0wP2U5lMrTDBzBUzbw99a6Zr4UFk-MXW_teIjuiKBo/s320/VMIdeas8.png&quot; width=&quot;215&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&quot;&gt;Final thoughts&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;I think I will still go with the C virtual machine design. The &quot;C pointers&quot; here are garbage collectable.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;For now we&#39;ll just output C code (instead of C++11) and pretend there is VM that handles it.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;Support web pointers .&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;I have a set of hand written documents that tell why VM should not be low level but should have very high level instruction set. (so that linker-loader has more knowledge that it can use to optimize , something very relevant even today. ) &amp;nbsp;I will go over it again...&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/5267264997868173428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2012/05/resurrecting-object-curry-part-4.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/5267264997868173428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/5267264997868173428'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2012/05/resurrecting-object-curry-part-4.html' title='Resurrecting Object Curry - Part 4 : Managed or Native ?'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivKdsJDoPJD3IoMbBoLE9us3Obq2_zm0b8oU_bpDpH_tpQWNmU0iJLKVdMLovMzY_Gw7-DOQA-IaeHwd7ITgsEnwBjapJw5u5zRb_L6EvM-aHi1t_qYu4DuiNBjDEgBUHkPB55RGFIa7U/s72-c/VMIdeas.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-6131725605733662293</id><published>2012-05-16T21:51:00.002-07:00</published><updated>2012-05-16T21:51:39.171-07:00</updated><title type='text'>Resurrecting Object Curry - Part 3 : New/Experimental Parsing Algorithm.</title><content type='html'>In part two I talked about using parsing strategy that is inspired from Generalized Phrase Structure Grammar. &amp;nbsp;In Object Curry compiler I am going to use a new and experimental strategy.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&quot;&gt;Separation of Immediate Dominance and Linear Precedence&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
In BNF form of grammar the production rules are given in the following manner&lt;br /&gt;
A ::= B C D&lt;br /&gt;
Where A is a parent and it can have three child nodes in that order.&lt;br /&gt;
However my parsing strategy will separate immediate &amp;nbsp;dominance and linear precedence.&lt;br /&gt;
To best of my knowledge no one has attempted to define parsing strategy and grammar specification as defined below..&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Immediate Dominance&lt;/b&gt;&amp;nbsp;: In simple terms it says A is the parent of B, C and D . It does not specify in which order &amp;nbsp;B, C, D should occur.&lt;br /&gt;
Eg Rule A--&amp;gt; B, C, D specifies that A can have three children&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Linear Precedence :&lt;/b&gt;&amp;nbsp;Specifies order in which children are. Orders can be partially specified &lt;br /&gt;
Eg Rule &amp;nbsp;B &amp;lt; C specifies that under A, &amp;nbsp;B must occur before &amp;nbsp;C&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Head Identifying Rule: &lt;/b&gt;Each such production has exactly one head element and must occur in the production.&lt;br /&gt;
Eg. &amp;nbsp;ConditionalBlock ~ IfClause&lt;br /&gt;
&lt;br /&gt;
if {} is valid&lt;br /&gt;
if {} else {} is valid&lt;br /&gt;
but else {} is not because the head is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[place holder for the diagram]&lt;br /&gt;
&lt;br /&gt;
Example is&lt;br /&gt;
QueryExpression --&amp;gt; SelectClause, WhereClause, FromClause.&lt;br /&gt;
&lt;br /&gt;
With the separation of Dominance and Precedence all of following are valid production of the rules.&lt;br /&gt;
&lt;br /&gt;
select * from tbl where col == 10;&lt;br /&gt;
from tbl where col ==10 select *;&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&quot;&gt;Syntax Directed Translation and Attribute Value Calculation.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The values of attributes at each node in a syntax tree is calculated in following manner.&lt;br /&gt;
&lt;b&gt;Synthesized attributes&lt;/b&gt;&amp;nbsp;: Values of the parent is a function of values of its children.&lt;br /&gt;
Eg. &amp;nbsp;In expression &amp;nbsp; from x join y , the value of tuple type is determined by value of its children&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Inherited Attributes:&lt;/b&gt;&amp;nbsp;Attribute value is inherited from parents to the children.&lt;br /&gt;
In java like try catch block the closable variables are inherited.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Inferred attributes :&lt;/b&gt; The attributes are calculated using rules that are applicable to only nodes that have certain properties.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&quot;&gt;Algorithm&lt;/span&gt;&lt;br /&gt;
1. Variant of recursive descent for creating syntax tree.&lt;br /&gt;
2. &amp;nbsp;Topological sort based evaluation of dependency graph of attribute values.&lt;br /&gt;
&lt;br /&gt;
I might stumble upon unexpected problem.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Useful References :&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
[1] Generalized Phrase Structure Grammar by Gazdar,Klien, Pullum and Sag&lt;br /&gt;
&amp;nbsp;- Book about theory of natural languages!&lt;br /&gt;
&amp;nbsp;- chapter 3 , nature of grammatical rules.&lt;br /&gt;
[2] Compilers : Principles, Techniques and Tools by Aho, Sethi, Ullman&lt;br /&gt;
- the compiler book&lt;br /&gt;
- chapter 5, &amp;nbsp;Syntax directed translation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/6131725605733662293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2012/05/resurrecting-object-curry-part-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/6131725605733662293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/6131725605733662293'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2012/05/resurrecting-object-curry-part-3.html' title='Resurrecting Object Curry - Part 3 : New/Experimental Parsing Algorithm.'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-8665151624007414685</id><published>2012-05-16T17:45:00.001-07:00</published><updated>2012-05-16T17:45:06.186-07:00</updated><title type='text'>Resurrecting Object Curry - Part 2 : To Write is to think</title><content type='html'>In my earlier post I indicated that I plan to resurrect &quot;my&quot; language Object Curry. The source of this &quot;inspiration&quot; was my handwritten notes that&amp;nbsp;I have kept from college days. &lt;br /&gt;
Many of the writeups seem silly ( but&amp;nbsp;sme are really interesting) and had some new ideas.&lt;br /&gt;
But what are these &quot;notes&quot; and why&amp;nbsp;I have kept them for so long ?&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #990000; font-size: large;&quot;&gt;To teach is to understand - To write is to think.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;I have just too many teachers in my family. My grandma was a teacher , my father is&amp;nbsp;a medical doctor and of course a head of the department in&amp;nbsp;a medical college. My mom was a principal of&amp;nbsp; high school. My other grandma&#39;s sister was teacher. Both my uncles married&amp;nbsp; teachers and my other aunt married a english professor and one of my cousin ... well you get the point. Something like Marisa Tomei in My Cousin Vinny. &lt;/span&gt;&lt;br /&gt;
The point is that my father says that to teach is to really understand. When you teach something to someone, you benifit the most during the process. You aquire clearer , crisper and potentially profound understanding ...&lt;br /&gt;
Somewhere in my my highschool years&amp;nbsp;I started writing&amp;nbsp;notes for myself as if&amp;nbsp;I am teaching it&amp;nbsp;myself!&amp;nbsp;That habit remained though out the college days and even trace of it today .&lt;br /&gt;
Though&amp;nbsp;I am writing for myself my tone&amp;nbsp;was always as if&amp;nbsp;I am teaching class or writing a tutorial.&lt;br /&gt;
&lt;br /&gt;
Putting your fuzzy&amp;nbsp;thoughts in writting helps make them concrete, crystal clear and most importantly durable. &lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #990000; font-size: large;&quot;&gt;Language is defined by how it is used.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;Any language is ultimately defined by how it is used and how it feels to program in it. So instead of defing a precise spec and BNF grammar&amp;nbsp;I will just go with&amp;nbsp;sketch of an idea. Language is what my compiler will implement it !&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
I have tried thousands of syntax variations on my whiteboard and every time I try something out I discover some problem with it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #990000; font-size: large;&quot;&gt;What&#39;s the plan then ?&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;I will go through with my old writeups and try to see what is still useful and what can be extended. May be create new write ups. &lt;strong&gt;Benefit:&lt;/strong&gt; may be I&#39;ll come up with something cool.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Implement parser in at least three langauges ( one of&amp;nbsp; C#, java, Objective C) &lt;strong&gt;Benefit: &lt;/strong&gt;I will practice parser writing and practice writing in 4 different dev environments.&lt;/li&gt;
&lt;li&gt;Write as many algorithms in Object Curry as you possibly can. (Graph colouring or k-mean or page rank etc) &lt;strong&gt;Benefit:&lt;/strong&gt; Revise my algorithms ! Make my Object Curry truely useful.&lt;/li&gt;
&lt;/ol&gt;
Unless of course I take project some place else or come up with even better idea.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Ground Rules for Parser&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;I am going to use parsing strategy that is recursive descent styled. But a twist taken from Generalized Phrase Structure Grammar. where child nodes may not be ordered and where there are still partial ordering.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;The parser will for now output C++11 source code for now.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/8665151624007414685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2012/05/resurrecting-object-curry-part-2-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/8665151624007414685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/8665151624007414685'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2012/05/resurrecting-object-curry-part-2-to.html' title='Resurrecting Object Curry - Part 2 : To Write is to think'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-2238416488857606008</id><published>2012-05-16T15:11:00.004-07:00</published><updated>2012-05-16T15:29:56.111-07:00</updated><title type='text'>Resurrecting &quot;Object Curry&quot; - Part 1: SQL/NF and Datalog</title><content type='html'>In my college days I was working on a language called Object Curry. (Around 1996-1998).&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;As I was cleaning my stuff yesterday, &amp;nbsp;I came across treasure trove of large numbers of my handwritten notes from college days. That&#39;s where I found &quot;specs&quot; for my language &quot;Object Curry&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Georgia, Utopia, &#39;Palatino Linotype&#39;, Palatino, serif; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;™&quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;Many of the ideas are still applicable and I have decided to write a compiler and updated spec for the language.&amp;nbsp;&lt;/span&gt;I plan to use parsing strategy from natural languages called Generalized Phrase Structure Grammar.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;If the output is sensible enough I&#39;ll take it further.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&quot;&gt;What&#39;s in the name ?&lt;/span&gt;&lt;br /&gt;
The name is derived from my attempt to mix object oriented programming with sql/nf like querying.&lt;br /&gt;
That sounded like a tasty Indian Curry. On top of it can claim connection to currying in functional programming. &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&quot;&gt;Renovation of syntax&lt;/span&gt;&lt;br /&gt;
I actually found two syntax for the language on Pascal like and other C like. &amp;nbsp;But over the years I have kind of merged it look like below.&lt;br /&gt;
The syntax remains pascal inspired but with more curly braces than before.&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;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;class Foo&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;&amp;nbsp; &amp;nbsp; public x : int;&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; private y : char; //note reverse order and pascal like colon&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; protected arr : int { 1, 2 ,3};&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; public Fn(param:string): int&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; { ... }&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;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;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&quot;&gt;SQL/NF&lt;/span&gt;&lt;br /&gt;
SQL NF is form of nested relational calculus &lt;a href=&quot;http://www.cs.utexas.edu/ftp/techreports/tr85-19.pdf&quot;&gt;first published in 1985&lt;/a&gt; , it has nested tables and two new operators &lt;b&gt;nest&lt;/b&gt; and &lt;b&gt;unnest.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Here are some of the original hand written notes. These ideas are still valid and used in new version of Object Curry.&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Original Object Curry was an attempt to solve impedance &amp;nbsp;mismatch between querying collections using declarative syntax and still being able to use in memory data structures. (&lt;a href=&quot;https://sites.google.com/site/objectcurry/ObjectCurrySQLNF0.pdf&quot;&gt;see this note&lt;/a&gt;&amp;nbsp;or &lt;a href=&quot;https://sites.google.com/site/objectcurry/ObjectCurrySQLNF2.pdf&quot;&gt;this one&lt;/a&gt;)&amp;nbsp;&lt;/li&gt;
&lt;li&gt;The enum keyword from C++ is repurposed to create some &lt;a href=&quot;https://sites.google.com/site/objectcurry/ObjectCurrySQLNF3.pdf&quot;&gt;amazing syntax possibilities&lt;/a&gt; including piping and sequence generation. Mixing C++ pointers, streaming and iterators there was some good facility for cursor management.&lt;/li&gt;
&lt;li&gt;The &lt;a href=&quot;https://sites.google.com/site/objectcurry/RelationCSyntax2.pdf&quot;&gt;dynamic queries&lt;/a&gt; were also a possibility.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;u&gt;I will blog about the new syntax and semantics very soon.&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&quot;&gt;How is this different than LINQ?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&quot;Discovered&quot; or rather stumbled upon by me before C# and Linq.&lt;/li&gt;
&lt;li&gt;Uses SQL/NF as its basis and does not have group by.&lt;/li&gt;
&lt;li&gt;Not Library based but syntax based. Compiler knows a lot more about the underlying collections.&lt;/li&gt;
&lt;li&gt;&quot;Query plan&quot; so to speak is decided at compile time. &amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;Integration with Datalog and Prolog.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
I was very fascinated by possibility of Object Curry having some capabilities like Datalog and better integration with Prolog.&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://sites.google.com/site/objectcurry/ObjectCurrySQLNFDatalog0.pdf&quot;&gt;Here&lt;/a&gt; are some initial thoughts from my college days &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&quot;&gt;Am I being nostalgic or this has some practical applications?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
I think the concepts and syntax elements in the Object Curry are still valid in the era of NoSQL, json, GPGPU and map reduce. Hopefully I am able to come up with a practically useful implementation.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&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-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/2238416488857606008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2012/05/resurrecting-object-curry-part-1-sqlnf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/2238416488857606008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/2238416488857606008'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2012/05/resurrecting-object-curry-part-1-sqlnf.html' title='Resurrecting &quot;Object Curry&quot; - Part 1: SQL/NF and Datalog'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-7800936416031614978</id><published>2011-04-26T12:56:00.000-07:00</published><updated>2011-04-26T13:02:36.466-07:00</updated><title type='text'>Applying Radical Programming: Software is a Batch Process</title><content type='html'>&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;B&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;efore&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;applying the lean thinking to software engineering we must understand what are the concerns that lean thinking tries to solve and where exactly process of producing software fits in.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;See my earlier post&amp;nbsp;&lt;a href=&quot;http://blogs.watechresources.com/2011/03/what-is-radical-programming.html&quot;&gt;What is radical programming?&lt;/a&gt;&amp;nbsp;if you want and introduction to Radical Programming.&lt;/span&gt;&lt;br /&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;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;Mass Production vs Mass Customization&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Unlike craft production mass production relies on the standard components and economy of scale. Each unit is like every other unit and &amp;nbsp;parts are interchangeable. The assembly line can increase the throughput but then it becomes very difficult to change and to customize.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;On the other hand the more customization is required the less standard and costly the production becomes. Why is this relevant to software engineering ? That is because each software system is unique we have a need for high degree of custom software development and at the same time we need to bring in mass production techniques.&amp;nbsp;&lt;/span&gt;&lt;br /&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;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;User Story (Use case) is the unit of software production.&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;In Radical Programming we treat user story as the unit of production. Our output is measured in terms of number of user stories implemented. We imagine an assembly line where a user story starts its life as a simple statement of user need which is developed into full set of acceptance tests and lightweight use case. It is then translated into design delta and finally implemented, tested and integrated. Individual user stories are the basis of calculations to make production decisions.&amp;nbsp;&lt;/span&gt;&lt;br /&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;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;Process Types&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;One of the most critical factor in implementing efficient production system is to identify the process type that best achieves the tradeoffs between quality , time and flexibility.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;There are five types to choose from&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;b&gt;Project Process&lt;/b&gt; - There is a high degree of customization and very low volume . Which means each project is unique. Flows and dependencies are very complicated.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;b&gt;Job Process&lt;/b&gt; - Even though it is customized the volume is high enough. Which means each job is not as unique as project. Each new order is handled as a single unit and produced made to order. Flows and dependencies are jumbled. Examples are your doctors&#39;s visit, jobs with car mechanic, process for auto loan approval. Variety is achieved through &quot;made to order&quot; strategy.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;b&gt;Batch Process: &lt;/b&gt;There is high volume and variety is achieved through &quot;assemble to order&quot;. Most importantly items are produced as a batch. Some intermediate products might be pre-processed.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;b&gt;Line Process: &lt;/b&gt;Volumes are very high. Fast food services and car assembly lines are examples of line processes. There are line flows with very little inventory held between operations.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;b&gt;Continuous Process: &lt;/b&gt;It requires extremely high volume and very generic standardized product.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;Software as a batch process with Time Boxing&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;Like Scrum the radical programming achieves its goal using series of scrums. In radical programming we treat the software production as a Batch Process where we produce batch of user stories each iteration.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;by Sachin Joshi&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;for Washington Technical Resources&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/7800936416031614978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2011/04/applying-radical-programming-software.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/7800936416031614978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/7800936416031614978'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2011/04/applying-radical-programming-software.html' title='Applying Radical Programming: Software is a Batch Process'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-2595061913532227028</id><published>2011-04-26T11:07:00.000-07:00</published><updated>2011-04-26T11:12:49.465-07:00</updated><title type='text'>Simple theory of Management: 8 Ps</title><content type='html'>&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;I &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;have a very simple theory about what senior managers need to do. &amp;nbsp;&lt;i&gt;&lt;u&gt;There job is to convert potential into profitability through internal and external interaction&lt;/u&gt;&lt;/i&gt;.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;And that means specifically managing 8 Ps described below. Call it &quot;Sachin Joshi Model of Management&quot; if you wish.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Discussion is more relevant to executives and other senior managers who in my vocabulary are called &quot;business owners&quot;.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Financial Perspective&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;1. Profitability : &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;The reality is that businesses need to keep themselves profitable which means managers must take right financial decisions. At minimum it means managers must be financially &amp;nbsp;literate. Beyond budgeting and forecasting there are many decisions that require using finance/accounting tools. Selecting the right project size and team size. Pricing the products. Making buy vs build vs rent decisions. One of the most useful concepts are &amp;nbsp; Minimum Marketable Feature and idea of Real Options. &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;External Perspective&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;2. Positioning&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;: Nothing is so critical than finding the right fit to market and positioning the products in a market place. Nothing succeeds like an idea whose time has come. Your talent as a manager is in finding that right idea. The entire process of dividing the markets in right segments, selecting the right customers and solving right set of problems for them is all what I call &quot;positioning&quot;. It requires making right decisions all the time. And that doesn&#39;t happen without instituting the customer focus. Customer focus is not some magic thing you do but a value system and tool that results in a well defined procedure for &quot;positioning&quot; your service.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;3. Partnerships:&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;No business works in isolation. So yet another job is to manage partnerships with vendors and clients.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Internal Perspective&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;4. Programs&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;: Many managers make mistake of thinking that what they are delivering is product or a project. But in reality what they are doing is managing series of projects and set of products which requires Program Management. Defining and managing program objectives is a top item in job description of senior manager. A successful manager must be able to map strategy into programs and then translate the vision in terms of program objectives. (I plan to write a blog about mapping strategy into program objectives.)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;5. Process&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;: No software gets built without proper process in place. One of the important jobs of manager is to define process and actively manage it. There is a large body of knowledge dedicated to project management and process improvements. Wisdom and drive in applying these principals to increase quality is what managers demonstrate everyday.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;6. Policy:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Make sure that technical standards are defined and followed. Rather than actually making each and every decision themselves senior managers define policy. To me policy is framework in which those decisions are made. &amp;nbsp;One of the most important job of managers is to define that framework and provide guidance in applying it to everyday decisions.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&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;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;Growth Perspective&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;7. People: &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;The generative power of business comes from the talent and creativity of its people. And no where is this more important than in software. Success in providing the environment where people can grow is how we must measure our progress&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;8. Productivity&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;: Equally important is increasing our production capability or &quot;Productivity&quot;. Smart tools turn smart people into even smarter geniuses. &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;by Sachin Joshi&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;For Washington Technical Resources&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/2595061913532227028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2011/04/simple-theory-of-management-8-ps.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/2595061913532227028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/2595061913532227028'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2011/04/simple-theory-of-management-8-ps.html' title='Simple theory of Management: 8 Ps'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-1475573850152964152</id><published>2011-03-22T00:38:00.000-07:00</published><updated>2011-03-22T00:38:01.640-07:00</updated><title type='text'>Speech Technology : Phonology</title><content type='html'>&lt;span style=&quot;font-size: large;&quot;&gt;W&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;ords&amp;nbsp; are formed by series of syllables which re formed by series of phones. In last blog we looked at the Phonetics and how variety of&amp;nbsp; speech sounds are generated.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #cc0000; font-size: large;&quot;&gt;Contrasts, Phonemes and Allophones&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;We already looked the variety and variations of the phonetic elements. But not all sounds are used by all the langauge. Most importantly not all sounds are distict in the same langauge. Consider ph and p (aspirated vs non aspirated). This distinction is not important in&amp;nbsp;english but extremely important in indic langauges. Similarly&amp;nbsp;indic langauges have two&amp;nbsp;D&#39;s one dental and other palatal. English has mostly alveolar where as spanish has&amp;nbsp;mostly dental. If indic langauge has vast number of consonants the english langauge has many finer distinctions betweeen vowels.&amp;nbsp; The point ? What makes two sounds similar or distinct really depends on the langauge.&amp;nbsp;From speech technology perspective this distinction is important because speakers may not articulate sounds exactly like each other when that distinction doesn&#39;t matter. Whereas when speech recognition fails to distinguish the sounds when they should it is a problem.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;When two or more phonetic elements are distinct but map to the same phoneme it is called allophones. One of the&amp;nbsp;most striking example of allophones having distinct value is &quot;visarga&quot; in&amp;nbsp;Sanskrit where &#39;s&#39; and &#39;h&#39;&amp;nbsp;are equivalent to each other. Similar historical allophone is hard &#39;g&#39; like in gut and soft &#39;g&#39;&amp;nbsp;as in ginger. That is exactly the reason why we have letter &#39;g&#39; used for two completely different sounds. At some point these sounds were considereed close to each other and therefore allophones of each other.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #cc0000; font-size: large;&quot;&gt;Structure of Syllables&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;Sounds are either &#39;singable&#39; meaning they are sonorant or not. Vowels, nasals and liquids are singable.All others are not. Sylables almost always have sonorant sound at the nucleus.&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;Syllable is formed by&amp;nbsp;&amp;nbsp; Onset+(Nucleus+Coda).&lt;/blockquote&gt;Not all combinations are relevant. Some langauges allow many constonants in onset while others can not handle it. In every language there are some obvious constraints on what words are valid and what are non-sense. We must understand these constraints.&lt;br /&gt;
&lt;br /&gt;
Once we understand all this our next task is to actually group the phonemes into sylables.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #cc0000; font-size: large;&quot;&gt;Stress, Mora and Syllable timed&amp;nbsp;languages&lt;/span&gt;&lt;br /&gt;
In a stressed langauge like english or russian each stressed syllable&amp;nbsp;takes about equal time. Where&amp;nbsp;as in other languages like Spanish or most of the indic languages the syllables are&amp;nbsp;timed equally. The mora based langaues are yet another way of timing the phonemes.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #990000; font-size: large;&quot;&gt;Sandhi&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;Yet&lt;/span&gt;&amp;nbsp;another complication is formed by what is called Sadhi in Sanskrit and Liasion in French. I have studied Sanskrit for three years and I know first hand the pain of &quot;breaking&quot; the Sandhi and coming up with individula words. I won&#39;t go into all the details but all of us in all of the langauges merge words while talking and we must be able to separate them when recognizing the speech.</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/1475573850152964152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2011/03/speech-technology-phonology.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/1475573850152964152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/1475573850152964152'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2011/03/speech-technology-phonology.html' title='Speech Technology : Phonology'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-5543233176431547389</id><published>2011-03-20T23:45:00.000-07:00</published><updated>2011-03-21T00:08:49.317-07:00</updated><title type='text'>Speech Technology : Phonetics</title><content type='html'>&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;L&lt;span style=&quot;font-size: small;&quot;&gt;ast year around this time&lt;span style=&quot;font-size: large;&quot;&gt; &lt;span style=&quot;font-size: small;&quot;&gt;I was working on one of my projects related to speech recognition. It was a personal side project and I really did not give the project enough attention. Plus it had been a long time since I had seen stuff like Fast Fourier Transform and I kind of procrastinated .&lt;/span&gt;&lt;/span&gt;Well - it is time to again start where I left and true to its original meaning&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; - blog. This is a series of blogs is where I speak whatever is on mind about speech technology, phonetics and various options available for implementing it.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;I&lt;/span&gt; first got introduced to the subject of phonetics back in 1992. I was in college and used to visit my aunt every weekend.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;My uncle used to teach Communication Skills &amp;nbsp;in a technical college.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;He must be having a couple of dozen of books on english language and teaching english. While going through his bookshelf &amp;nbsp;I found a book on english sound system. That was the start of a fascination for phonetics and languages. My dad also had bought all volumes of &lt;a href=&quot;http://vishwakosh.org.in/vishwakosh/index.php?option=com_content&amp;amp;view=category&amp;amp;layout=blog&amp;amp;id=66&amp;amp;Itemid=78&quot;&gt;Marathi Vishwakosh&lt;/a&gt; (Encyclopedia) which I used to read a lot in my free time. (And I had a lot of free time back then). I then read about phonetics and grammar of my language and about human language in general. That fascination still remains ... &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia;&quot;&gt;The language ability of our race has made us the only species able to successfully transition to civilization. Every human being has capacity of language and it is impossible to think of human society with out language.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia;&quot;&gt;[Without language we would be still in sub saharan desert and&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Toba_catastrophe_theory#Genetic_bottleneck_theory&quot;&gt;probably extinct by now&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia; font-size: large;&quot;&gt;. &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small;&quot;&gt;As a side note please do watch &amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://www.amazon.com/Journey-Man-Dr-Spencer-Wells/dp/B0000AYL48?ie=UTF8&amp;amp;tag=watechresources-20&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;Journey of Man&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=watechresources-20&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=B0000AYL48&quot; style=&quot;border-style: none ! important; cursor: move; margin: 0px ! important; padding: 0px ! important;&quot; width=&quot;1&quot; /&gt;&amp;nbsp;if you get some time. Anthropology is yet another subject I am fascinated with.]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia; font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small;&quot;&gt;&lt;/span&gt;How human voice is produced&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000; font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Human speech articulation begins in the larynx. The vibrations created there are modified through out the vocal tract which ultimately comes out of the mouth as series of sounds which we understand as sequence of phonemes. Larynx is where the &quot;voice&quot; starts but that sound is progressively modified in the mouth by forming various shapes with our tongue and lips. I have modified the standard diagram to show the schematic of the vocal tract.&amp;nbsp;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000; font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;The most important key concept is this: Our tongue is a very flexible muscle that can form various shapes and that profoundly affects the way we perceive the basic sound that begins at the larynx.&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&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/AVvXsEjkN6qefPYjXB-TIEU0SfqTfFytvRmPvLASK1OxhggTCIYPnWX6dHkHBsW0hfLpiaIwB0WsQPbc5VpVS1tlbxC3I-lVHeIrr0SO-OrYi5TGarTEakC7x4h7wDMOJ3PBshZEfFbTZ-XFVsM/s1600/VOCAL+TRACT.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;170&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkN6qefPYjXB-TIEU0SfqTfFytvRmPvLASK1OxhggTCIYPnWX6dHkHBsW0hfLpiaIwB0WsQPbc5VpVS1tlbxC3I-lVHeIrr0SO-OrYi5TGarTEakC7x4h7wDMOJ3PBshZEfFbTZ-XFVsM/s320/VOCAL+TRACT.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;Edited from original here : &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia;&quot;&gt;http://en.wikipedia.org/wiki/File:Illu01_head_neck.jpg.]&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia;&quot;&gt;That brings us to the next concept. There are two types of sounds viz. vowels and consonants.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia;&quot;&gt;When the airflow from larynx is not obstructed we perceive that sound. Anyone how has dealt with waveform of human sound knows that most of the waveform is basically sound of &lt;b&gt;vowels&lt;/b&gt;. However the most interesting sounds are generated when the airflow is blocked (or substantially modified) for the brief amount of time. This time frame is seriously tiny compared to rest of the vowel sound and we perceive it as &lt;b&gt;consonant&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia; font-size: small;&quot;&gt;In terms of digital signal processing the waveform of the voice that starts in larynx is modified by the resonance of the vocal tract and therefore we apply the convolution of the simplified model on the right side.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000; font-family: Georgia;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;Vowels&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia;&quot;&gt;Vowels take most of the time in speech signal. All consonants are meaningful only in the context of background of robust vowel signal.&amp;nbsp; The larynx is actively producing &quot;voice&quot; during the vowels.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia;&quot;&gt;The quality of vowel depends on&amp;nbsp; four attributes.&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;Height of tongue position- In other words whether the gap between tongue and roof of mouth is closed or open. generally four positions are considered. Open, Open mid,Close mid and Close.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;Position of tongue - Front, central or back&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;Roundness of lips - The roundness of lips add another effect.&amp;nbsp; They are generally rounded for back vowels.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;Nasalization ? are the vowels nasalized.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;Below is the list of known vowels and their IPA symbols.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia;&quot;&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;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgM1i4Jfgkq0IjDoppET_tf1WL0agCR1RszWdOhB-l-qe2hwtoOeEXOT7vHMAafrZRl1u1bWDSltXhb-IY2pgAZO9lujZf_zPkI4x5vkcWe9sB4safCn3MIn1QFhMWZfotur8RjF9PIg8/s1600/IPA-vow.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;152&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgM1i4Jfgkq0IjDoppET_tf1WL0agCR1RszWdOhB-l-qe2hwtoOeEXOT7vHMAafrZRl1u1bWDSltXhb-IY2pgAZO9lujZf_zPkI4x5vkcWe9sB4safCn3MIn1QFhMWZfotur8RjF9PIg8/s400/IPA-vow.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia;&quot;&gt;Edited from original here : &lt;/span&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;http://en.wikipedia.org/wiki/File:IPA_chart_2005_png.svg&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia;&quot;&gt;The best way to analyze vowels is to look at their frequency spectrogram and look at the peaks. The first three formant are specifically interesting. The roundness of lips changes the positions of formant.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia;&quot;&gt;Again there are further diphthongs and glides that are combination of&amp;nbsp; two vowels.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;Consonants&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;The consonants are interesting because they are numerous, show great variation in how they are produced and the signal is available for only the short time. They are &quot;negative&quot; because the voicing and vowel are interrupted or blocked by the position of tongue. Here I am going to use somewhat non-standard terminology and classification only because that is how I understand it. Also because i was introduced to the subject via Sanskrit Grammar.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia;&quot;&gt;There are three main things to look for - (A) Properties of original sound that is obstructed (B) manner in which the air flow is obstructed/modified &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia;&quot;&gt;(C) place of obstruction/modification&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #990000; font-family: Georgia;&quot;&gt;Properties of original sound&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;span style=&quot;color: #990000; font-family: Georgia;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Voiced vs Unvoiced - whether voicing continues or not . [b -p]. [k -g][t-d] are some examples . (saghosh and aghosh.सघोष- अ&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #990000; font-family: Georgia;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;घोष&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #990000; font-family: Georgia;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; )&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #990000; font-family: Georgia;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Aspirated vs Non aspirated - this difference is important in Indic langauges it effectively doubles the consonants available for use in languages. &amp;nbsp; (alpa prana- maha prana अल्पप्राण- महाप्राण)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div style=&quot;color: #990000;&quot;&gt;&lt;span style=&quot;color: #990000; font-family: Georgia;&quot;&gt;Manner in which flow is obstructed /Modified&lt;/span&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;span style=&quot;color: #990000; font-family: Georgia;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;/span&gt;Stops - The airflow completely stops&lt;/li&gt;
&lt;li&gt;Friction - Sound produced by friction is introduced in the mix.&lt;/li&gt;
&lt;li&gt;Affricates - these are combination of stop, followed by the friction at the same place.&lt;/li&gt;
&lt;li&gt;liquids - sibilant and approximants - where air flow is partially blocked&lt;/li&gt;
&lt;li&gt;Nasals - the airflow goes through the nasal channel&lt;/li&gt;
&lt;/ol&gt;&lt;span style=&quot;color: #990000; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Place of articulation&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Labial&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Bilabial&lt;/li&gt;
&lt;li&gt;Labio-dental&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Coronal&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Dental&lt;/li&gt;
&lt;li&gt;Alveolar&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Palatal&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Alveo-palatal&lt;/li&gt;
&lt;li&gt;Retroflex&lt;/li&gt;
&lt;li&gt;Palatal&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Dorsal&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Velar&lt;/li&gt;
&lt;li&gt;Uvular&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Radial&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Pharyngeal /Epiglotal&lt;/li&gt;
&lt;li&gt;Glotal&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&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/AVvXsEgEMmrJ2iWEH8_1Ec2VQbZ2qNHxmOuPg7LvnZlGrSF7O-5yx9i_4oc-XKtZkd8kmBkCHqeXYs75v7PrUb9TTUAH8ccerbdBYBCraFc4NZqbthxNX7sfgj9PMgchZee3BpBOv12ToFpwL9w/s1600/IPA-Cons.png&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;297&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEMmrJ2iWEH8_1Ec2VQbZ2qNHxmOuPg7LvnZlGrSF7O-5yx9i_4oc-XKtZkd8kmBkCHqeXYs75v7PrUb9TTUAH8ccerbdBYBCraFc4NZqbthxNX7sfgj9PMgchZee3BpBOv12ToFpwL9w/s400/IPA-Cons.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia;&quot;&gt;Edited from original here : http://en.wikipedia.org/wiki/File:IPA_chart_2005_png.svg&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;Common Tasks in Speech Recognition&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;Audio signal capture &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;Spectral Analysis&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;Phonetic Feature Identification&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;Phoneme Identification&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia;&quot;&gt;Phoneme to word translation&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/5543233176431547389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2011/03/speech-technology-phonetics.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/5543233176431547389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/5543233176431547389'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2011/03/speech-technology-phonetics.html' title='Speech Technology : Phonetics'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkN6qefPYjXB-TIEU0SfqTfFytvRmPvLASK1OxhggTCIYPnWX6dHkHBsW0hfLpiaIwB0WsQPbc5VpVS1tlbxC3I-lVHeIrr0SO-OrYi5TGarTEakC7x4h7wDMOJ3PBshZEfFbTZ-XFVsM/s72-c/VOCAL+TRACT.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-7084296419167215805</id><published>2011-03-18T01:47:00.000-07:00</published><updated>2011-03-18T01:55:58.445-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Democracy"/><category scheme="http://www.blogger.com/atom/ns#" term="Nash Equilibrium."/><category scheme="http://www.blogger.com/atom/ns#" term="Single Transferable vote"/><category scheme="http://www.blogger.com/atom/ns#" term="Voting System"/><title type='text'>Does democracy make most people unhappy? Future of democracy</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;I&lt;/span&gt; am a student of computer science, a science fiction writer and I am interested in philosophical discussions every once in a while, so while world is busy transitioning to democracy I started thinking about how computer science , social networking can help usher the democratic utopia. My mind was racing, I started thinking about machine learning, &quot;collective intelligence algorithms&quot;, optimization and things like Nash Equilibrium etc..I already had an idea of science fiction taking shape in my head...and BAM ..I realized something very simple.&lt;br /&gt;
I realized we have to solve a very basic problem first! &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;First Past Post Voting or Formula for maximum dissatisfaction?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;In&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp;&lt;/span&gt;many countries the elections are held using what is called first past post method. The person with most votes wins the seat. call it winner takes all. This sounds fair but in a multi party system like India or UK or many other countries there are always more than a couple of political parties and many a times a winning candidate get less than 50% of votes. This means that there are more people NOT liking the winning candidate than the ones who voted for him/her.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;Here is an example - there are 4 parties&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Candidate A - 35% votes&lt;/li&gt;
&lt;li&gt;Candidate&amp;nbsp;B - 30% votes&lt;/li&gt;
&lt;li&gt;Candidate&amp;nbsp;C - 20 % votes&lt;/li&gt;
&lt;li&gt;Candidate&amp;nbsp;D - 15 % votes&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;Clearly candidate A is winner but also that 2/3 of the population does not like him.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;As if it looks like Democracy makes more people unhappy than it makes them happy !!&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;This is not a problem with multi-party system but a problem with vote counting method.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Are there any alternatives? Yes enter Science of &amp;nbsp;Voting Methods&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Science of Voting Methods&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
There are many voting systems. Some are proportional and preferential.&lt;br /&gt;
Please see:&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Voting_system&quot;&gt;http://en.wikipedia.org/wiki/Voting_system&lt;/a&gt;&lt;br /&gt;
One of the methods that can be readily used is&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Single_transferable_vote&quot;&gt;Single Transferable Vote&amp;nbsp;http://en.wikipedia.org/wiki/Single_transferable_vote&lt;/a&gt;. &amp;nbsp;Here the voters rank the candidate with their preference and candidate with most preferential votes is declared a winner. To me this seems like a simple fix that once again makes most people happy &lt;a href=&quot;http://en.wikipedia.org/wiki/Utilitarianism&quot;&gt;Jeremy Benthum&lt;/a&gt;&amp;nbsp;style.&amp;nbsp;One of the barriers has been the complexity of vote counting. But with the advent of computerized vote counting it can be easily administered at relatively low cost.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;Popular Votes vs Representational Democracy.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;This is a pure thought experiment with no relation any country/nation/state what so ever. Let us talk about a 22nd century colony on Mars. Let call it XYZ. The problem with first past post voting was solved long time ago in 21st century. But t&lt;/span&gt;&lt;/span&gt;here are other problems though that need to be solved differently. And that is a problem of representing evenly distributed minority.&lt;br /&gt;
Say in XYZ there is a 30% population which is considered minority. But it is evenly distributed. In this case it seems like they will be massively under represented. They can never elect 30% of the representatives- in theory they may get none. &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;Bicameral Parliament with a different structure.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;One of the invention of modern democracies is bi-cameral parliament/ congress. There is a upper house and a lower house. Generally a upper house has equal (or fair) representation for each state/province. However theoretically this need not be the case. A party list system where an entire country votes for their favorite party can also be used. Each party gets the seats proportional to the aggregate votes they receive in election. In this example instead of states sending delegates, parties send their nominated candidates. &amp;nbsp;In this minority can be always get their say.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;Tri-cameral parliament ?&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;Many people will object to the idea of changing the upper house. But how about adding a third house which is popularly elected?&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;Let&#39;s call it middle house!&amp;nbsp;Instead of two houses passing the law three houses will need to do that. Well that sounds complicated but the idea of &quot;double majority&quot; is not far from it.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;Responsible Executive and Separation of Concerns?&lt;/span&gt;&lt;br /&gt;
There are two styles of democracies - Presidential and Parliamentary. In parliamentary system there is no clear separation and in presidential system no clear accountability. We can actually solve these problems by merging the concepts with president being responsible to lower house and only middle + upper house acting as legislature. Lower house still has the budget!&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;Well, well !! That&#39;s enough for now. Political science is not a subject of this blog we are only interested in the algorithms for voting system so we&#39;ll leave all that undiscussed and unsaid and let the people from 22nd century figure out tri-cameral parliament.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Democracy of the future.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;So how will democracy of the future look like ?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;With instant communication and tele conferencing do representatives need to be present in the &quot;house&quot; ? Or can they just &quot;log into the parliament&quot; to cast their vote and participate in a debate.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Is law making in Open Source style possible ?&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Can there be a one big direct democracy?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Can a giant computer cluster solve the optimization problem of representing most people with least amount of representatives?&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Really how will future democracy look like?&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;Disclaimer : This is a blog related to science, computers, philosophy and its intersection with the society. I have not expressed any political views here. It is from pure theoretical perspective and as an interesting computer science problem. This is not a place for flame wars and random comments. Intellectual discussions and comments are welcome. But if you express your political views those are yours not mine! &amp;nbsp;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/7084296419167215805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2011/03/does-democracy-make-most-people-unhappy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/7084296419167215805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/7084296419167215805'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2011/03/does-democracy-make-most-people-unhappy.html' title='Does democracy make most people unhappy? Future of democracy'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1630216375320598495.post-7767581379382106639</id><published>2011-03-17T22:52:00.000-07:00</published><updated>2011-03-17T23:26:49.319-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Code is design"/><category scheme="http://www.blogger.com/atom/ns#" term="Data Driven Design"/><category scheme="http://www.blogger.com/atom/ns#" term="Fractal Time Box"/><category scheme="http://www.blogger.com/atom/ns#" term="Lean thinking"/><category scheme="http://www.blogger.com/atom/ns#" term="Software Product Lines"/><category scheme="http://www.blogger.com/atom/ns#" term="Spiral Development"/><category scheme="http://www.blogger.com/atom/ns#" term="Standard Architecture"/><category scheme="http://www.blogger.com/atom/ns#" term="Value Stream"/><title type='text'>What is Radical Programming?</title><content type='html'>&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;W&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;hat is Radical Programming?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;It is a post-Agile software construction methodology which aims at order of magnitude improvements in value delivered through software projects.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;The word&amp;nbsp;&lt;/span&gt;&lt;dfn&gt;&lt;em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;radical&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/dfn&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;has a Latin root&amp;nbsp;&lt;/span&gt;&lt;c&gt;&lt;dfn&gt;&lt;em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;radix&lt;/span&gt;&lt;/em&gt;&lt;/dfn&gt;&lt;/c&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;blockquote style=&quot;background-attachment: initial; background-clip: initial; background-color: #fafafa; background-image: url(http://watechresources.com.saffron.arvixe.com/agile/Data/Sites/1/skins/styleshout-envision/quote.gif); background-origin: initial; background-position: 5px 5px; background-repeat: no-repeat no-repeat; border-bottom-color: rgb(242, 242, 242); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(242, 242, 242); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(242, 242, 242); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(242, 242, 242); border-top-style: solid; border-top-width: 1px; color: #333333; line-height: 16px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 36px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Webster&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.merriam-webster.com/dictionary/radical&quot; style=&quot;color: #4f82cb;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;defines:&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;(1) proceeding from root (2) fundamental (3)unusual (4) cool.&lt;/span&gt;&lt;/blockquote&gt;&lt;div style=&quot;color: #333333; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;In that respect it recognizes that the primary&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;source&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;of all the value ultimately created through a software is the source code itself. It recognizes that root purpose of the software is to satisfy customer need.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; line-height: 16px;&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;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;Eight-fold way of Radical Programming.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Aim of any software is to create customer value. Aim of Radical Programming is to create order of magnitude returns on the efforts required to generate that value.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;The eight principles of Radical Programming work together to achieve exactly that.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small;&quot;&gt;In today&#39;s fast moving world with multi faceted sales channel Software Product Line Engineering is the most sensible option. It creates multiple differentiated versions of product by using the same underlying code base and repository of components. As you can see it is component oriented reuse.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;1: Four Quadrants&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;Radical Programming uses a variant of Software Product Line Engineering that simultaneously undertakes parallel activities in four quadrant.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;b&gt;Quadrant I : Creating and discovering &amp;nbsp;Domain Model&lt;/b&gt;. All prototypes, spike solutions and various differentiated product versions reuse the same object oriented domain model.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;b&gt;Quadrant II: Product Assembly&lt;/b&gt;.Various differentiated product versions are constructed using iterative development. Rapid delivery of customer feature is the primary aim. The secondary a&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;im is to achieve maximum reuse possible.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;b&gt;Quadrant III: Creating Platform code&lt;/b&gt;. Most products require common infrastructure and we spend significant time in developing productivity tools&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;b&gt;Quadrant IV: Aspect Orientation.&lt;/b&gt;We also spend significant time taking care of global and cross cutting &quot;aspects&quot; like performance, security ease of use etc&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;2:Value Streams&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;div style=&quot;color: black; font-family: Times; font-size: medium; line-height: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;Applying lean thinking to Software Engineering it envisions the assembly line where features are continuously &quot;manufactured&quot;. A feature starts it life as user story and goes through various development stages of acceptance tests, precondition, post conditions, detailed description and test , design, implementation , unit tests and is finally released. Radical Programming considers software delivery as a Batch Process. Scrum and Kanban are used to deliver &amp;nbsp;the batch. Body of knowledge developed for lean thinking and batch management is then systematically applied.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Times; font-size: medium; line-height: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;ul style=&quot;color: black; font-family: Times; font-size: medium; line-height: normal;&quot;&gt;&lt;/ul&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;3:Code is Design&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;Radical Programming treats Code as the primary expression of Design. It uses code centric approach to development where unnecessary documents are eliminated. Various techniques and concepts like Static analysis, Literal programming and Design by Contract are used. Code is re-factored mercilessly.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;4:Standard Architecture&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Times; font-size: medium; line-height: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;One of the ways to achieve great flexibility and productivity is to use standard architecture with predictable interaction between components. N-tier service oriented architecture or plugin based architecture or pipeline like architecture. Emphasis is on implementation agnostic interfaces and loosely coupled interfaces so that components can be readily interchanged. There are many many design principles that can be seen in existing systems and design philosophies. Eg. Unix Philosophy, COM, N-tier SOA with REST etc, Many &quot;component oriented&quot; CMSes. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Times; font-size: medium; line-height: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;5:Data Driven Design&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;One of the main principles of Radical Programming is to use data driven programming. This means program logic is driven by configurable data sets. Every argument that can be made for DSL is equally valid for data driven programming.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;6:Fractal Time Boxing&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;Time boxing is a familiar concept, however time boxing is applied to various time horizons and product definition and planning is handled only at the appropriate level of details. Vision is defined on 1-3 year time horizon, the mission and strategy is calibrated every quarter and quarterly goals are achieved by series of monthly/fortnightly releases. At every &quot;scale&quot; the process looks similar because we deal with uncertainty, deliverable and work to be done at only the appropriate level of details.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;7:Spiral Development&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;Spiral development is different than iterative development. In the context of Radical Programming it means within a sprint product is developed by first building it in big chunks and refining it again and again.&amp;nbsp;Rapid development and progressive elaboration is the mantra.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;8:Flexible Team Structure.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;In short it is a self organizing team with collective code ownerships and lack of silos. Developers sometimes wear SDET hat and sometimes volunteer to drive issues like product wide secuirty/performance etc. Load balancing is the matra.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogs.watechresources.com/feeds/7767581379382106639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogs.watechresources.com/2011/03/what-is-radical-programming.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/7767581379382106639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1630216375320598495/posts/default/7767581379382106639'/><link rel='alternate' type='text/html' href='http://blogs.watechresources.com/2011/03/what-is-radical-programming.html' title='What is Radical Programming?'/><author><name>watechresources</name><uri>http://www.blogger.com/profile/04122158977812476805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2wKXnhXf0SB8UpJ_dzYceBt9hIRa0f3Tk2DT88vbsvYhu_g1Cl8Bt2Yhas4XrFVEyyGkpCgU-3YWK03EUjDb22Cke5gaev9ePEDwEyO3WYrrinM3NJy5DEL7PSb95eQ/s220/SachinProfile.jpg'/></author><thr:total>7</thr:total></entry></feed>