<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Chaitanya Podalakuru Blog</title>
        <link>https://cpodalak.github.io/fyi/blog</link>
        <description>Chaitanya Podalakuru Blog</description>
        <lastBuildDate>Fri, 27 Dec 2024 00:00:00 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <item>
            <title><![CDATA[AUTOSAR application code debunked]]></title>
            <link>https://cpodalak.github.io/fyi/blog/autosar-code-debunked</link>
            <guid>https://cpodalak.github.io/fyi/blog/autosar-code-debunked</guid>
            <pubDate>Fri, 27 Dec 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[This article aims to provide a comprehensive understanding of AUTOSAR (AUTomotive Open System ARchitecture) through a practical example. We will develop a simple obstacle detection program, breaking it down from a monolithic C program into a modular design that mirrors AUTOSAR's approach. Finally, we will delve into system design, network topology, and communication, illustrating these concepts with ARXML snippets.]]></description>
            <content:encoded><![CDATA[<p>This article aims to provide a comprehensive understanding of AUTOSAR (AUTomotive Open System ARchitecture) through a practical example. We will develop a simple obstacle detection program, breaking it down from a monolithic C program into a modular design that mirrors AUTOSAR's approach. Finally, we will delve into system design, network topology, and communication, illustrating these concepts with ARXML snippets.</p>
<p>We will walkthrough this evolution of simple program in phases</p>
<ol>
<li>Setup Example - Obstacle detection program</li>
<li>Refactor monolithic program to Functions</li>
<li>Seperate functionalities into modules</li>
<li>Real-car analogy</li>
<li>Write ARXMl for same example</li>
<li>Refactor modules to autosar format</li>
<li>Conclusion</li>
</ol>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="phase-1-setup-example">Phase 1: Setup Example<a href="https://cpodalak.github.io/fyi/blog/autosar-code-debunked#phase-1-setup-example" class="hash-link" aria-label="Direct link to Phase 1: Setup Example" title="Direct link to Phase 1: Setup Example">​</a></h2>
<p>Simple Obstacle Detection Program
The initial step involves creating a straightforward C program that encompasses all functionalities within the main function. This program reads sensor data and actuates a motor to stop when an obstacle is detected.</p>
<div class="language-C language-c codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-c codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token macro property directive-hash" style="color:#36acaa">#</span><span class="token macro property directive keyword" style="color:#00009f">include</span><span class="token macro property" style="color:#36acaa"> </span><span class="token macro property string" style="color:#e3116c">&lt;stdio.h&gt;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token macro property directive-hash" style="color:#36acaa">#</span><span class="token macro property directive keyword" style="color:#00009f">include</span><span class="token macro property" style="color:#36acaa"> </span><span class="token macro property string" style="color:#e3116c">&lt;stdbool.h&gt;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">int</span><span class="token plain"> </span><span class="token function" style="color:#d73a49">main</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    bool obstacleDetected </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> false</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token keyword" style="color:#00009f">int</span><span class="token plain"> sensorData </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">0</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token function" style="color:#d73a49">printf</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string" style="color:#e3116c">"Reading sensor data...\n"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token comment" style="color:#999988;font-style:italic">// Simulate reading sensor data</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    sensorData </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">10</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"> </span><span class="token comment" style="color:#999988;font-style:italic">// Assume 10 is the threshold for detecting an obstacle</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token keyword" style="color:#00009f">if</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">sensorData </span><span class="token operator" style="color:#393A34">&gt;=</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">10</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">        obstacleDetected </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> true</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token keyword" style="color:#00009f">if</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">obstacleDetected</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">        </span><span class="token function" style="color:#d73a49">printf</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string" style="color:#e3116c">"Obstacle detected! Stopping motor...\n"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">        </span><span class="token comment" style="color:#999988;font-style:italic">// Code to stop the motor</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token keyword" style="color:#00009f">return</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">0</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="phase-2-functions">Phase 2: Functions<a href="https://cpodalak.github.io/fyi/blog/autosar-code-debunked#phase-2-functions" class="hash-link" aria-label="Direct link to Phase 2: Functions" title="Direct link to Phase 2: Functions">​</a></h2>
<p>We refactor the initial program by breaking down the logic into separate functions. This enhances readability and maintainability.</p>
<div class="language-C language-c codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-c codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token macro property directive-hash" style="color:#36acaa">#</span><span class="token macro property directive keyword" style="color:#00009f">include</span><span class="token macro property" style="color:#36acaa"> </span><span class="token macro property string" style="color:#e3116c">&lt;stdio.h&gt;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token macro property directive-hash" style="color:#36acaa">#</span><span class="token macro property directive keyword" style="color:#00009f">include</span><span class="token macro property" style="color:#36acaa"> </span><span class="token macro property string" style="color:#e3116c">&lt;stdbool.h&gt;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">bool </span><span class="token function" style="color:#d73a49">readSensorData</span><span class="token punctuation" style="color:#393A34">(</span><span class="token keyword" style="color:#00009f">int</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">*</span><span class="token plain">sensorData</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token operator" style="color:#393A34">*</span><span class="token plain">sensorData </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">10</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"> </span><span class="token comment" style="color:#999988;font-style:italic">// Simulate reading sensor data</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token keyword" style="color:#00009f">return</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">*</span><span class="token plain">sensorData </span><span class="token operator" style="color:#393A34">&gt;=</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">10</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"> </span><span class="token comment" style="color:#999988;font-style:italic">// Returns true if obstacle is detected</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">void</span><span class="token plain"> </span><span class="token function" style="color:#d73a49">stopMotor</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token function" style="color:#d73a49">printf</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string" style="color:#e3116c">"Stopping motor...\n"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token comment" style="color:#999988;font-style:italic">// Code to stop the motor</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">int</span><span class="token plain"> </span><span class="token function" style="color:#d73a49">main</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token keyword" style="color:#00009f">int</span><span class="token plain"> sensorData </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">0</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    bool obstacleDetected </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token function" style="color:#d73a49">readSensorData</span><span class="token punctuation" style="color:#393A34">(</span><span class="token operator" style="color:#393A34">&amp;</span><span class="token plain">sensorData</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token keyword" style="color:#00009f">if</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">obstacleDetected</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">        </span><span class="token function" style="color:#d73a49">stopMotor</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token keyword" style="color:#00009f">return</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">0</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<p>IN PROGRESS</p>]]></content:encoded>
            <category>AUTOSAR</category>
            <category>C</category>
        </item>
        <item>
            <title><![CDATA[Everything about yaml]]></title>
            <link>https://cpodalak.github.io/fyi/blog/everything-about-yaml</link>
            <guid>https://cpodalak.github.io/fyi/blog/everything-about-yaml</guid>
            <pubDate>Wed, 25 Dec 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[Introduction]]></description>
            <content:encoded><![CDATA[<h2 class="anchor anchorWithStickyNavbar_LWe7" id="introduction">Introduction<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#introduction" class="hash-link" aria-label="Direct link to Introduction" title="Direct link to Introduction">​</a></h2>
<p>YAML ("YAML Ain’t Markup Language") is a human-readable data-serialization format commonly used for configuration files, data exchange, and templating.</p>
<p>It emphasizes simplicity and readability, supports comments, anchors, and complex data structures.</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="official-site--specification">Official Site &amp; Specification<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#official-site--specification" class="hash-link" aria-label="Direct link to Official Site &amp; Specification" title="Direct link to Official Site &amp; Specification">​</a></h3>
<ul>
<li><a href="https://yaml.org/" target="_blank" rel="noopener noreferrer">YAML Official Site</a></li>
<li><a href="https://yaml.org/spec/" target="_blank" rel="noopener noreferrer">YAML Specification</a></li>
</ul>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="yaml-syntax--features">YAML Syntax &amp; Features<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#yaml-syntax--features" class="hash-link" aria-label="Direct link to YAML Syntax &amp; Features" title="Direct link to YAML Syntax &amp; Features">​</a></h3>
<ul>
<li><strong>Scalars</strong>: Strings, numbers, booleans</li>
<li><strong>Sequences</strong>: Ordered lists (dash-prefixed)</li>
<li><strong>Mappings</strong>: Key–value pairs (colon-separated)</li>
<li><strong>Comments</strong>: Start with <code>#</code></li>
<li><strong>Anchors &amp; Aliases</strong>: Reuse/refer to nodes</li>
<li><strong>Multiline &amp; Folded Blocks</strong>: Handle long text</li>
</ul>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="basic-rules">Basic Rules<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#basic-rules" class="hash-link" aria-label="Direct link to Basic Rules" title="Direct link to Basic Rules">​</a></h3>
<ul>
<li>Indentation-sensitive (use spaces, not tabs)</li>
<li>Case-sensitive keys</li>
<li>Quotes optional unless special characters appear</li>
</ul>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="simple-yaml-examples">Simple YAML Examples<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#simple-yaml-examples" class="hash-link" aria-label="Direct link to Simple YAML Examples" title="Direct link to Simple YAML Examples">​</a></h3>
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="flat-mapping">Flat Mapping<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#flat-mapping" class="hash-link" aria-label="Direct link to Flat Mapping" title="Direct link to Flat Mapping">​</a></h4>
<div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token key atrule" style="color:#00a4db">server</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">host</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> example.com</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">port</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">8080</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#00a4db">debug</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token boolean important" style="color:#36acaa">true</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="sequence-of-mappings">Sequence of Mappings<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#sequence-of-mappings" class="hash-link" aria-label="Direct link to Sequence of Mappings" title="Direct link to Sequence of Mappings">​</a></h4>
<div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token key atrule" style="color:#00a4db">databases</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> </span><span class="token key atrule" style="color:#00a4db">name</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> users</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token key atrule" style="color:#00a4db">host</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> db1.local</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> </span><span class="token key atrule" style="color:#00a4db">name</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> logs</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token key atrule" style="color:#00a4db">host</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> db2.local</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="anchors--aliases">Anchors &amp; Aliases<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#anchors--aliases" class="hash-link" aria-label="Direct link to Anchors &amp; Aliases" title="Direct link to Anchors &amp; Aliases">​</a></h4>
<div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token key atrule" style="color:#00a4db">defaults</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token important">&amp;def</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">adapter</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> postgres</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">timeout</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">5000</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#00a4db">production</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">&lt;&lt;</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token important">*def</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">database</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> prod_db</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="advanced-anchors--aliases">Advanced Anchors &amp; Aliases<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#advanced-anchors--aliases" class="hash-link" aria-label="Direct link to Advanced Anchors &amp; Aliases" title="Direct link to Advanced Anchors &amp; Aliases">​</a></h4>
<p>Anchors and aliases can be used to create complex reusable structures, reducing duplication and improving maintainability.</p>
<div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token comment" style="color:#999988;font-style:italic"># Define reusable anchor for default settings</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#00a4db">defaults</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token important">&amp;defaults</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">adapter</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> postgres</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">timeout</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">5000</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">retries</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">3</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token comment" style="color:#999988;font-style:italic"># Use the anchor in multiple environments</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#00a4db">development</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">&lt;&lt;</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token important">*defaults</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">database</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> dev_db</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">debug</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token boolean important" style="color:#36acaa">true</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#00a4db">staging</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">&lt;&lt;</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token important">*defaults</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">database</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> staging_db</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">debug</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token boolean important" style="color:#36acaa">false</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#00a4db">production</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">&lt;&lt;</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token important">*defaults</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">database</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> prod_db</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">debug</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token boolean important" style="color:#36acaa">false</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">timeout</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">10000</span><span class="token plain">  </span><span class="token comment" style="color:#999988;font-style:italic"># Override specific values</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="nested-anchors--aliases">Nested Anchors &amp; Aliases<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#nested-anchors--aliases" class="hash-link" aria-label="Direct link to Nested Anchors &amp; Aliases" title="Direct link to Nested Anchors &amp; Aliases">​</a></h4>
<p>You can also nest anchors and aliases to handle more complex configurations.</p>
<div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token comment" style="color:#999988;font-style:italic"># Define base anchor for server settings</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#00a4db">server_defaults</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token important">&amp;server_defaults</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">host</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> localhost</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">port</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">8080</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token comment" style="color:#999988;font-style:italic"># Define another anchor for database settings</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#00a4db">db_defaults</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token important">&amp;db_defaults</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">adapter</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> postgres</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">timeout</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">5000</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token comment" style="color:#999988;font-style:italic"># Combine anchors in a service configuration</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#00a4db">services</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">web</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token key atrule" style="color:#00a4db">&lt;&lt;</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token important">*server_defaults</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token key atrule" style="color:#00a4db">endpoints</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> /api/v1</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> /api/v2</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token key atrule" style="color:#00a4db">database</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token key atrule" style="color:#00a4db">&lt;&lt;</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token important">*db_defaults</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token key atrule" style="color:#00a4db">database</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> app_db</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token key atrule" style="color:#00a4db">replicas</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">3</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<p>These examples demonstrate how anchors and aliases can simplify YAML configurations by reusing and combining settings across different sections.</p>
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="multiline-strings">Multiline Strings<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#multiline-strings" class="hash-link" aria-label="Direct link to Multiline Strings" title="Direct link to Multiline Strings">​</a></h4>
<div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token key atrule" style="color:#00a4db">description</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">|</span><span class="token scalar string" style="color:#e3116c"></span><br></span><span class="token-line" style="color:#393A34"><span class="token scalar string" style="color:#e3116c">  This is a multiline</span><br></span><span class="token-line" style="color:#393A34"><span class="token scalar string" style="color:#e3116c">  literal block.</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#00a4db">notes</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">&gt;</span><span class="token scalar string" style="color:#e3116c"></span><br></span><span class="token-line" style="color:#393A34"><span class="token scalar string" style="color:#e3116c">  This is folded into</span><br></span><span class="token-line" style="color:#393A34"><span class="token scalar string" style="color:#e3116c">  a single line.</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="templating-with-ytt">Templating with ytt<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#templating-with-ytt" class="hash-link" aria-label="Direct link to Templating with ytt" title="Direct link to Templating with ytt">​</a></h2>
<p><code>ytt</code> is a simple YAML templating tool that lets you add logic to your YAML files without making them complex.</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="installation-macoslinux-via-homebrew">Installation (macOS/Linux via Homebrew)<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#installation-macoslinux-via-homebrew" class="hash-link" aria-label="Direct link to Installation (macOS/Linux via Homebrew)" title="Direct link to Installation (macOS/Linux via Homebrew)">​</a></h3>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">brew install ytt</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="basic-usage">Basic Usage<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#basic-usage" class="hash-link" aria-label="Direct link to Basic Usage" title="Direct link to Basic Usage">​</a></h3>
<p><a href="https://ayling.fyi/docs/category/ytt-basics" target="_blank" rel="noopener noreferrer">YTT Basics</a></p>
<p>For more examples and documentation, visit <a href="https://carvel.dev/ytt/" target="_blank" rel="noopener noreferrer">Carvel ytt</a>.</p>
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="can-yaml-import-from-another-yaml-file">Can YAML Import from Another YAML File?<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#can-yaml-import-from-another-yaml-file" class="hash-link" aria-label="Direct link to Can YAML Import from Another YAML File?" title="Direct link to Can YAML Import from Another YAML File?">​</a></h4>
<p>YAML itself does not natively support importing data from another YAML file. However, this functionality can be achieved using external tools or libraries. Here are some approaches:</p>
<ol>
<li>
<p><strong>Using Templating Tools</strong>: Tools like <code>ytt</code> (covered earlier) allow you to merge or include YAML files during rendering.</p>
</li>
<li>
<p><strong>Custom Scripts</strong>: You can write scripts in Python, JavaScript, or other languages to load multiple YAML files and combine them programmatically.</p>
</li>
<li>
<p><strong>Third-Party Libraries</strong>: Some libraries, like <code>ruamel.yaml</code> in Python, can be extended to support custom import logic.</p>
</li>
</ol>
<p>While YAML does not natively support imports, tools like <code>ytt</code> or custom scripts can provide this functionality. This approach ensures modular and maintainable configurations.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="vs-code-extensions-for-yaml">VS Code Extensions for YAML<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#vs-code-extensions-for-yaml" class="hash-link" aria-label="Direct link to VS Code Extensions for YAML" title="Direct link to VS Code Extensions for YAML">​</a></h2>
<ul>
<li><strong>YAML by Red Hat</strong>: Provides YAML language support.</li>
<li><strong>YAML Support by GitHub</strong>: Enhances YAML editing.</li>
<li><strong>YAML Path</strong>: Simplifies navigation in YAML files.</li>
<li><strong>YAML Formatter and Tools</strong>: Formats and validates YAML.</li>
</ul>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="python-yaml-libraries">Python YAML Libraries<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#python-yaml-libraries" class="hash-link" aria-label="Direct link to Python YAML Libraries" title="Direct link to Python YAML Libraries">​</a></h2>
<ul>
<li><strong>PyYAML</strong>: A popular library for parsing and writing YAML.</li>
<li><strong>ruamel.yaml</strong>: A more advanced YAML library with better support for YAML 1.2.</li>
</ul>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="pros--cons-of-yaml">Pros &amp; Cons of YAML<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#pros--cons-of-yaml" class="hash-link" aria-label="Direct link to Pros &amp; Cons of YAML" title="Direct link to Pros &amp; Cons of YAML">​</a></h2>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="pros">Pros<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#pros" class="hash-link" aria-label="Direct link to Pros" title="Direct link to Pros">​</a></h3>
<ul>
<li>Human-readable &amp; concise</li>
<li>Supports comments &amp; anchors</li>
<li>Widely adopted (e.g., Ansible, Kubernetes, CI configs)</li>
<li>Flexible data structures</li>
</ul>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="cons">Cons<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#cons" class="hash-link" aria-label="Direct link to Cons" title="Direct link to Cons">​</a></h3>
<ul>
<li>Indentation-sensitive: Can cause errors</li>
<li>Ambiguous syntax (e.g., tabs vs. spaces, boolean parsing "on/off")</li>
<li>No built-in schema (relies on JSON Schema or custom validators)</li>
<li>Harder to parse with regex</li>
</ul>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="best-practices">Best Practices<a href="https://cpodalak.github.io/fyi/blog/everything-about-yaml#best-practices" class="hash-link" aria-label="Direct link to Best Practices" title="Direct link to Best Practices">​</a></h2>
<ul>
<li>Use <strong>2 spaces per indent</strong>; never tabs.</li>
<li>Quote strings with special characters or leading zeros.</li>
<li>Define and reuse anchors for repeated data.</li>
<li>Validate against JSON Schema (many CLI tools exist).</li>
<li>Keep documents small to maintain readability.</li>
<li>Use CI linting (e.g., <code>yamllint</code>).</li>
</ul>
<p>YAML remains a dominant choice for config files and data exchange due to its readability and expressiveness. With tools like <code>ytt</code> for templating, VS Code extensions for editing, and robust Python libraries for parsing, you can build, manage, and validate YAML-based configurations efficiently.</p>
<p>Keep best practices in mind to avoid common pitfalls, and happy coding!</p>]]></content:encoded>
            <category>yaml</category>
            <category>utt</category>
        </item>
        <item>
            <title><![CDATA[Time for new AUTOSAR file format?]]></title>
            <link>https://cpodalak.github.io/fyi/blog/time-for-new-autosar-file-format</link>
            <guid>https://cpodalak.github.io/fyi/blog/time-for-new-autosar-file-format</guid>
            <pubDate>Sun, 17 Dec 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[What is ARXML?]]></description>
            <content:encoded><![CDATA[<h2 class="anchor anchorWithStickyNavbar_LWe7" id="what-is-arxml">What is ARXML?<a href="https://cpodalak.github.io/fyi/blog/time-for-new-autosar-file-format#what-is-arxml" class="hash-link" aria-label="Direct link to What is ARXML?" title="Direct link to What is ARXML?">​</a></h2>
<p>We all know plain <strong>XML</strong> (eXtensible Markup Language) file is a text-based file format that stores data in form of tags and text. Whereas <strong>ARXML is AUTOSAR XML file to store AUTOSAR parameters</strong> with added AUTOSAR specific tags and constraints.</p>
<p>Instead of delving into AUTOSAR parameters or the various types of ARXML files, let’s focus on a broader question:</p>
<p><strong>Why was ARXML chosen initially, and what alternative might be selected if AUTOSAR was initiated in 2023?</strong></p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="why-arxml">Why ARXML?<a href="https://cpodalak.github.io/fyi/blog/time-for-new-autosar-file-format#why-arxml" class="hash-link" aria-label="Direct link to Why ARXML?" title="Direct link to Why ARXML?">​</a></h2>
<p>The answer is relatively straightforward. ARXML is based on XML. Whereas XML’s significant rise to prominence in the late 1990s and its adoption as a W3C recommendation in 1998 made it an ideal choice for data interchange and storage. Due to its flexible, human-readable, machine-readable nature and its widespread use in enterprise applications, web services (SOAP), and configuration files cemented its reputation well before the emergence of modern formats.</p>
<p>Essentially, XML was at the peak of its popularity when AUTOSAR was established.</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="arxmls-place-in-todays-landscape">ARXML’s Place in Today’s Landscape<a href="https://cpodalak.github.io/fyi/blog/time-for-new-autosar-file-format#arxmls-place-in-todays-landscape" class="hash-link" aria-label="Direct link to ARXML’s Place in Today’s Landscape" title="Direct link to ARXML’s Place in Today��’s Landscape">​</a></h3>
<p>Since the early 2000s, the landscape of data serialization and configuration management has evolved considerably with modern formats like <strong>JSON</strong> (JavaScript Object Notation), <strong>YAML</strong> (YAML Ain’t Markup Language), and <strong>TOML</strong> (Tom’s Obvious, Minimal Language) or Data Modeling languages like ASN.1 or Protobuf.</p>
<p>Now, let’s not dig into JSON format much as it’s already been replaced by YAML and TOML in many areas.</p>
<p>Also, TOML is not as widely adopted as XML or YAML but it is gaining popularity for its simplicity and ease of use, particularly in smaller-scale applications and open-source projects, especially in the Rust and Go communities.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="can-yaml-replace-arxml">CAN YAML replace ARXML?<a href="https://cpodalak.github.io/fyi/blog/time-for-new-autosar-file-format#can-yaml-replace-arxml" class="hash-link" aria-label="Direct link to CAN YAML replace ARXML?" title="Direct link to CAN YAML replace ARXML?">​</a></h2>
<p>Probably yes in some areas. YAML (YAML Ain’t Markup Language) is a human-readable data serialization standard that can be used in conjunction with all programming languages.</p>
<p><strong>Structured Data Representation:</strong> YAML excels at representing structured data with a focus on human readability. It supports scalars (strings, numbers, booleans), arrays, and maps (key-value pairs), allowing for deeply nested data structures.</p>
<p><strong>Namespace Support:</strong> YAML itself does not natively support XML-style namespaces. However, it can represent namespaced keys in a map through naming conventions or application-specific designs.</p>
<p><strong>Schema Validation:</strong> While YAML does not have a built-in schema validation feature like XML Schema Definition (XSD), it can be used with external tools like JSON Schema for validation purposes. There are also custom schema validators for YAML, such as Kwalify or StrictYAML.</p>
<p><strong>Widespread Tooling:</strong> YAML is widely supported across various programming languages and platforms with numerous libraries available for parsing and generating YAML data. It is commonly used in DevOps tools like Docker, Kubernetes, and continuous integration systems.</p>
<p><strong>Industry Precedence:</strong> YAML has become a standard for configuration files in software development, particularly due to its clarity and ease of use. While not as entrenched as XML in enterprise data interchange.</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="can-asn1-or-protocol-buffers-replace-autosar-data-exchange-format">Can ASN.1 or Protocol Buffers replace AUTOSAR data exchange format?<a href="https://cpodalak.github.io/fyi/blog/time-for-new-autosar-file-format#can-asn1-or-protocol-buffers-replace-autosar-data-exchange-format" class="hash-link" aria-label="Direct link to Can ASN.1 or Protocol Buffers replace AUTOSAR data exchange format?" title="Direct link to Can ASN.1 or Protocol Buffers replace AUTOSAR data exchange format?">​</a></h3>
<p>ARXML is a file format used within the automotive industry to describe the configuration and behavior of automotive systems and their interactions. It is specifically tailored to the requirements and standards of the automotive domain.</p>
<p>While ASN.1(Abstract Syntax Notation One) and Protocol Buffers (protobuf) are powerful data modeling languages commonly used for defining data structures and serialization formats for network communication and data interchange across various industries, they are not designed specifically for the same purpose as ARXML.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="conclusion">Conclusion<a href="https://cpodalak.github.io/fyi/blog/time-for-new-autosar-file-format#conclusion" class="hash-link" aria-label="Direct link to Conclusion" title="Direct link to Conclusion">​</a></h2>
<p>In my opinion, should the AUTOSAR team be in the position to choose today, they might consider YAML and come up with <strong>ARYAML</strong> or build a new data modelling language and call it as <strong>ARDML</strong> (AUTOSAR Data Modelling Language) to support “code first” approach.</p>
<p>If the AUTOSAR team decides to redefine the file format, I suggest considering the <strong>adoption of multiple data exchange formats</strong> that are best suited for use-cases. It’s important not to restrict the industry by using a single data exchange format for everything.</p>
<p>However, replacing ARXML would not be a simple task, given that it has been <strong>deeply entrenched in the industry for over two decades</strong> with extensive tools, workflows, and processes built around it. Transitioning to a new format raises interesting questions but also presents significant challenges that would require considerable effort, retooling, and <strong>retraining across the entire ecosystem</strong>.</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="potential-for-change-in-the-ai-era">Potential for Change in the AI Era<a href="https://cpodalak.github.io/fyi/blog/time-for-new-autosar-file-format#potential-for-change-in-the-ai-era" class="hash-link" aria-label="Direct link to Potential for Change in the AI Era" title="Direct link to Potential for Change in the AI Era">​</a></h3>
<p>Nevertheless, in an era where artificial intelligence and rapid technological advancements are the norms, change is always on the horizon. The industry’s mindset is increasingly open to innovation, suggesting that a shift, while complex, is not beyond the realm of possibility.</p>
<p>As the automotive industry continues to evolve with smart vehicles and connected infrastructure, the <strong>demands on software architecture will undoubtedly lead to new considerations for data interchange formats.</strong></p>]]></content:encoded>
            <category>autosar-big-picture</category>
        </item>
        <item>
            <title><![CDATA[AUTOSAR vs traditional practices]]></title>
            <link>https://cpodalak.github.io/fyi/blog/AUTOSAR-vs-traditional-embedded-practices</link>
            <guid>https://cpodalak.github.io/fyi/blog/AUTOSAR-vs-traditional-embedded-practices</guid>
            <pubDate>Mon, 04 Dec 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[Embedded system development, especially in the realm of automotive technology, can be approached through different methodologies. Among these, AUTOSAR (AUTomotive Open System ARchitecture) stands out as a dedicated framework tailored to address the intricate and safety-critical nature of automotive systems.]]></description>
            <content:encoded><![CDATA[<p>Embedded system development, especially in the realm of automotive technology, can be approached through different methodologies. Among these, <strong>AUTOSAR</strong> (AUTomotive Open System ARchitecture) stands out as a dedicated framework tailored to address the intricate and safety-critical nature of automotive systems.</p>
<p>Now, before we dive into the specifics of the AUTOSAR methodology, let’s take a moment to explore some of the more traditional or widely-used strategies for crafting an embedded system.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="regular-embedded-system-development-techniques">Regular embedded system development techniques<a href="https://cpodalak.github.io/fyi/blog/AUTOSAR-vs-traditional-embedded-practices#regular-embedded-system-development-techniques" class="hash-link" aria-label="Direct link to Regular embedded system development techniques" title="Direct link to Regular embedded system development techniques">​</a></h2>
<p>Traditional or regular embedded systems are less standardized and more diverse.</p>
<p><strong>Bare-Metal Programming</strong></p>
<p>In this methodology, <strong>developers write code that runs directly on the hardware without an operating system</strong>. It’s often used for simple or resource-constrained devices where maximum performance and minimum overhead are required.</p>
<p>Development is highly hardware-specific, with direct manipulation of registers and use of interrupts for task management.</p>
<p>Actuators for specific functions like mirror adjustment, seat position, or window control can be implemented with bare-metal programming, as these tasks usually require simple, deterministic control loops.</p>
<p><strong>RTOS-Based Development</strong></p>
<p>Real-Time Operating Systems (RTOS) are used when deterministic behavior and timing are crucial. The RTOS abstracts some of the hardware details, but developers still need to have a good understanding of the system’s timing and resource constraints.</p>
<p>Examples include FreeRTOS, VxWorks, and QNX, which provide a framework for task scheduling, inter-task communication, and timing services.</p>
<p><strong>Linux-Based Development</strong></p>
<p>For more complex systems that require networking, file systems, or high-level application frameworks, a full-fledged operating system like Linux might be used.</p>
<p>Linux offers a rich set of features and is supported by a wide variety of processor architectures.</p>
<p>Development can leverage standard programming languages and open-source tools, but may still require customization of the Linux kernel or device drivers.</p>
<p><strong>Proprietary or In-House Frameworks</strong></p>
<p>Some organizations develop their own proprietary frameworks or libraries tailored to their specific hardware and application requirements. These frameworks can range from simple hardware abstraction layers to complex software ecosystems.</p>
<p>They may offer advantages in terms of performance or integration with company-specific technology but can also lead to increased maintenance and portability challenges.</p>
<p><strong>Model-Based Development (MBD)</strong></p>
<p>MBD uses high-level modeling tools like MATLAB/Simulink to design the system, which can then automatically generate code for various hardware targets. This approach is useful for complex control systems and signal processing applications.</p>
<p><strong>Vendor-Specific Ecosystems</strong></p>
<p>Many microcontroller and processor vendors provide integrated development environments (IDEs), software libraries, and tools specific to their hardware. These ecosystems simplify development for the vendor’s hardware but can lock you into using that vendor’s products.</p>
<p>Some examples are Microchip’s MPLAB X, Texas Instruments’ Code Composer Studio, and STMicroelectronics’ STM32Cube.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="autosar-methodology">AUTOSAR Methodology<a href="https://cpodalak.github.io/fyi/blog/AUTOSAR-vs-traditional-embedded-practices#autosar-methodology" class="hash-link" aria-label="Direct link to AUTOSAR Methodology" title="Direct link to AUTOSAR Methodology">​</a></h2>
<p>AUTOSAR provides a standardized architecture for automotive software development. It aims to improve software reusability, scalability, and interoperability between different vehicle components and vehicle manufactures.</p>
<p>The AUTOSAR methodology roughly describes the concept of ECU (Electronic Control Unit) development by the basic work product flow from a global view.</p>
<p><strong>Example</strong>: Temperature Control System
Let’s dive a bit deeper by comparing AUTOSAR methodology with regular embedded system development using an example of developing a temperature control system.</p>
<p>A temperature control system typically consists of several key components that work together to regulate temperature within a desired range. The exact configuration can vary depending on the complexity of the system and the specific application, but here are the fundamental components you would generally find</p>
<ul>
<li>Sensor(s) — To measure current temperature.</li>
<li>Controller — The brain of the system which processes input from sensors and determines output to heating or cooling devices.</li>
<li>Actuator(s) — Heating or cooling elements.</li>
<li>User Interface — Allows user to set desired temperatures.</li>
<li>Regular Embedded System Development approach</li>
<li>Requirements Analysis : Determine the functional requirements, such as the desired temperature range and response time.</li>
</ul>
<p><strong>Hardware Selection:</strong><br>
<!-- -->Next, you pick out a microcontroller that’s got enough oomph to run your code and a sensor that’s accurate enough so you don’t end up sweating or freezing.</p>
<p><strong>Software Design:</strong><br>
<!-- -->Now you sketch out how your code’s going to work. You’ll need some loops to check the temperature, some logic to decide when to turn on the heat, and a way for people to adjust the settings.</p>
<p><strong>Implementation:</strong><br>
<!-- -->Time to get coding. You roll up your sleeves and start writing lines of C or C++ that tell the microcontroller what to do.</p>
<p><strong>Integration and Testing:</strong><br>
<!-- -->You’ve got to make sure your code plays nice with the hardware. Integrate the software with the hardware and test the system to ensure that it meets the requirements.</p>
<p><strong>Maintenance:</strong><br>
<!-- -->After everything’s up and running, you’re not done yet. If a bug pops up or you want to add new features, you get back in there and update your code.</p>
<p>Now if you want to add touch screen, there is high chance of touching almost all modules because you never thought to standardize your interfaces.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="autosar-approach">AUTOSAR Approach<a href="https://cpodalak.github.io/fyi/blog/AUTOSAR-vs-traditional-embedded-practices#autosar-approach" class="hash-link" aria-label="Direct link to AUTOSAR Approach" title="Direct link to AUTOSAR Approach">​</a></h2>
<p>Think of AUTOSAR like a big LEGO kit for car software. It’s got all these standardized blocks you can snap together to build software for cars.</p>
<p>It’s all about making sure the pieces you create can be used in different cars and play nicely with parts from other car makers.</p>
<p>Now, let’s see how we’d whip up a temperature control system with this toolkit.</p>
<p><strong>Requirements Analysis:</strong><br>
<!-- -->Just like when you’re planning any project, you gotta figure out what you need. In the car world, there are some extra rules to follow, like making sure everything is super safe because, well, it’s a car.. For example, ISO 26262 for functional safety.</p>
<p><strong>Software Architecture:</strong><br>
<!-- -->AUTOSAR sets up a neat structure for your code with different blocks.</p>
<p>You’ve got the Application Layer where your temperature control magic happens, the Runtime Environment (RTE) that’s like a middleman passing messages, and then the layers that talk to the actual car hardware.</p>
<p><strong>Component Design:</strong><br>
<!-- -->Now, you get to create the bits and pieces of the software that control the temperature.</p>
<p>The best part is that you can use them over and over in different areas. Just like libraries.</p>
<p>You describe these pieces with a fancy instruction manual called ARXML.</p>
<p><strong>Configuration:</strong><br>
<!-- -->You’ve got your pieces ready, but you need to set them up for your specific ride. That’s like tuning your sound system to get the perfect bass.</p>
<p>You use some special AUTOSAR tools to make sure all the software bits are working together properly.</p>
<p><strong>Integration and Testing:</strong><br>
<!-- -->It’s time to put your creation into action and make sure it doesn’t go haywire.</p>
<p>More of like connecting blocks.</p>
<p>You’ll run it through some virtual tests on your computer (that’s SIL) and then with real car parts (that’s HIL) to catch any gremlins before they cause trouble.</p>
<p><strong>Maintenance:</strong><br>
<!-- -->Since you’ve used these standardized LEGO-like pieces, when it’s time to update or fix something, it’s way easier.</p>
<p>You can just swap out the old piece for a new one, and you’re good to go.</p>
<p>So, there you have it. Using AUTOSAR is a bit like having a guidebook that makes sure everyone’s building their temperature control systems with the same set of rules, which is pretty handy when you’re making something as complex as a car.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="key-takeaways-with-a-different-example-for-better-visualization">Key takeaways with a different example for better visualization<a href="https://cpodalak.github.io/fyi/blog/AUTOSAR-vs-traditional-embedded-practices#key-takeaways-with-a-different-example-for-better-visualization" class="hash-link" aria-label="Direct link to Key takeaways with a different example for better visualization" title="Direct link to Key takeaways with a different example for better visualization">​</a></h2>
<p><strong>Standardization:</strong><br>
<!-- -->Like I mentioned, With AUTOSAR, it’s like everyone’s using the same cookbook, which makes it easier to share recipes and tools.</p>
<p>In regular embedded development, each chef might have their own secret recipes and special kitchen setup.</p>
<p><strong>Abstraction:</strong><br>
<!-- -->AUTOSAR is like having smart kitchen appliances that adjust themselves to the recipe.</p>
<p>In regular development, the chef has to fiddle with the knobs and settings for each dish.</p>
<p><strong>Interoperability:</strong><br>
<!-- -->AUTOSAR’s like a potluck where everyone brings dishes made using the same cookbook, ensuring all the food goes well together.</p>
<p>Regular development is more like everyone bringing a dish without knowing what the others are making, which can lead to a mismatched meal.</p>
<p><strong>Tooling:</strong><br>
<!-- -->Working with AUTOSAR might mean you need some pricey, high-tech kitchen gadgets that take time to learn how to use.</p>
<p>For regular embedded development, you might get by with more basic tools, or even DIY some gadgets to suit your needs.</p>
<p><strong>Scalability:</strong><br>
<!-- -->AUTOSAR’s like having a cookbook that covers everything from making toast to preparing a five-course meal. It can handle recipes for all sorts of occasions.</p>
<p>In traditional embedded development, you might need a new cookbook — or even a new kitchen — every time the scale of your cooking changes.</p>
<p><strong>Not everyone grasps AUTOSAR as originally intended, and since the AUTOSAR methodology doesn’t clearly define roles and responsibilities. Whereas, company-specific processes and vendor tools tend to complicate it further.</strong></p>]]></content:encoded>
            <category>autosar-big-picture</category>
        </item>
        <item>
            <title><![CDATA[Is Industry Regessing with AUTOSAR?]]></title>
            <link>https://cpodalak.github.io/fyi/blog/is-industry-regressing-with-autosar</link>
            <guid>https://cpodalak.github.io/fyi/blog/is-industry-regressing-with-autosar</guid>
            <pubDate>Sun, 03 Dec 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[Story of AUTOSAR]]></description>
            <content:encoded><![CDATA[<h2 class="anchor anchorWithStickyNavbar_LWe7" id="story-of-autosar">Story of AUTOSAR<a href="https://cpodalak.github.io/fyi/blog/is-industry-regressing-with-autosar#story-of-autosar" class="hash-link" aria-label="Direct link to Story of AUTOSAR" title="Direct link to Story of AUTOSAR">​</a></h2>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="motivation">Motivation<a href="https://cpodalak.github.io/fyi/blog/is-industry-regressing-with-autosar#motivation" class="hash-link" aria-label="Direct link to Motivation" title="Direct link to Motivation">​</a></h3>
<p>Roughly two decades ago, the automotive industry operated with proprietary software development, hardware dependency, a lack of standards, and diverse interfaces. Basic software modules were tailored to specific electronic control units (ECUs).</p>
<p>The frequent obsolescence of microcontrollers before series production often led to last-minute software adjustments under tight time constraints. Integrating such diverse subsystems into a complex, interconnected vehicle network was error-prone and demanded extensive testing.</p>
<p>It may be hard for younger readers to imagine, but this was the situation that gave rise to the concept of AUTOSAR.</p>
<p>so, in early 2002, the concept for an open system architecture emerged in BMW’s electronics division.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="release-of-classic-autosar">Release of Classic AUTOSAR<a href="https://cpodalak.github.io/fyi/blog/is-industry-regressing-with-autosar#release-of-classic-autosar" class="hash-link" aria-label="Direct link to Release of Classic AUTOSAR" title="Direct link to Release of Classic AUTOSAR">​</a></h2>
<p>The Classic Platform Release 1.0 was published in June 2005 as the first release of the classic platform specifications.</p>
<p>The idea was to get rid of the late and risky adaptations of basic software for ECUs and to reduce the demand of internal and external resources involved in these software adaptations.</p>
<p>It envisioned moving towards open system architectures by creating a hardware abstraction layer (HAL), a standardized basic software stack, and a middleware layer with standardized interfaces to the applications.</p>
<p>It took a minimum of 10 years for some companies to accept, implement and transition AUTOSAR.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="release-of-adaptive-autosar">Release of Adaptive AUTOSAR<a href="https://cpodalak.github.io/fyi/blog/is-industry-regressing-with-autosar#release-of-adaptive-autosar" class="hash-link" aria-label="Direct link to Release of Adaptive AUTOSAR" title="Direct link to Release of Adaptive AUTOSAR">​</a></h2>
<p>Vehicles are evolving into cyber-physical systems, connecting to the internet, and becoming part of the Internet of Things (IoT). In addition, the industry moved towards realizing the vision of autonomous driving through advanced driver assistance systems and autonomous parking.</p>
<p>These new functions placed demands on hardware and software infrastructure, including high-end processors, hypervisor technology, communication with backend systems, and a focus on dependability, functional safety, and cybersecurity within the software architecture.</p>
<p><strong>In 2015, AUTOSAR released the Adaptive Platform to address new challenges posed by connected, automated, shared, and electrified driving (CASE).</strong></p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="2020s">2020s<a href="https://cpodalak.github.io/fyi/blog/is-industry-regressing-with-autosar#2020s" class="hash-link" aria-label="Direct link to 2020s" title="Direct link to 2020s">​</a></h2>
<p>The car industry is changing like never before in its 150-year history. Cars are now filled with digital features and new business models. Car makers are trying new things and facing new competition.</p>
<p>Everyone in the industry now knows that software is crucial for cars, and most car makers are aiming high.</p>
<p>Past 20 years, AUTOSAR has created a comprehensive way to design software deeply embedded in cars. The classic platform still plays a role in driving sensors and actuators, while the Adaptive Platform is used in central ECUs. This means that cars are evolving into IT-edge devices, connecting to the cloud. Combining AUTOSAR with other technologies has the potential to establish a new software platform for vehicles but the drawbacks still exist though.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="twist-in-the-plot">Twist in the plot<a href="https://cpodalak.github.io/fyi/blog/is-industry-regressing-with-autosar#twist-in-the-plot" class="hash-link" aria-label="Direct link to Twist in the plot" title="Direct link to Twist in the plot">​</a></h2>
<p><strong>New players from the tech world have entered the car industry, bringing fast development and collaboration methods.</strong></p>
<p>This helps them deal with the complexity of automotive software, but the industry still needs to consider safety and real-time standards.</p>
<p>The key to future success is fast collaboration and open-source development in addition to existing safety-related methods.</p>
<p>As I mentioned before, main drivers for the increased complexity in our systems are the following four, which today are also often summarized by the acronym CASE:</p>
<p><strong>Connectivity:</strong> Standardized communication protocols are needed to enable connectivity between vehicle ECUs and the external world.</p>
<p><strong>Autonomy:</strong> The advancement of automated and autonomous driving necessitates high computing performance in today’s and future microprocessors (µPs), leading to new E/E architectures and centralized E/E architectures. This also sets new standards for security updates and promotes the use of non-automotive IT standards available as open-source software solutions.</p>
<p>Safety requirements for autonomous features demand traceable requirement specifications in addition to open-source software approaches.</p>
<p><strong>Sharing:</strong> The abundance of software in future automotive systems requires applications from various sources and the reuse of non-differentiating commodity software, making a standardized Vehicle-Operating-System (Vehicle-OS) crucial to meet this demand.</p>
<p><strong>Electrification:</strong> The introduction of electric vehicles brings about less complex electrified powertrains, making it easier for new players (OEMs) to enter the market.</p>
<p>This supports the reuse of commodity functions and encourages open-source solutions for Vehicle-OS.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="future">Future<a href="https://cpodalak.github.io/fyi/blog/is-industry-regressing-with-autosar#future" class="hash-link" aria-label="Direct link to Future" title="Direct link to Future">​</a></h2>
<p>Many automotive manufacturers are working to build their own vehicle operating systems, and there is a growing need for an ecosystem that simplifies access to both off-board and on-board systems.</p>
<p>Another emerging trend is the shift towards centralized computing platforms, eliminating the necessity for a separate microcontroller for each vehicle function.</p>
<p>There are already open-source standards and solutions for various industry needs, and it may not be necessary to adhere to a single standard like AUTOSAR. It’s possible to have multiple standards tailored to specific needs with/without/around AUTOSAR.</p>
<p>Volvo has developed a concept car using Rust. Zephyr is a scalable real-time operating system supporting various hardware architectures, designed for resource-constrained devices with a focus on security. SAFERTOS® is another option, based on the FreeRTOS kernel model and pre-certified to ISO 26262 ASIL D. Middleware protocols like DDS and API standards for data-centric connectivity are also available.</p>
<p>Combining alternatives along with AUTOSAR in use, vehicle manufacturers are developing their own Vehicle-OS with standards wrapped around open sources.</p>
<p>This could lead to a diverse range of ecosystems and interfaces, reminiscent of the situation 20 years ago but on a larger and more complex scale.</p>
<p>In order to get this under control, industry should focus on providing lighter alternatives to AUTOSAR with approved common services and protocols with a forward-looking approach. Additionally, industry needs a coordinated collaboration across different standardization and Open-Source Software organizations to continuously develop the common infrastructure.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="references">References<a href="https://cpodalak.github.io/fyi/blog/is-industry-regressing-with-autosar#references" class="hash-link" aria-label="Direct link to References" title="Direct link to References">​</a></h2>
<p><a href="https://www.autosar.org/news-events" target="_blank" rel="noopener noreferrer">News &amp; Events AUTOSAR</a></p>
<p><a href="https://medium.com/volvo-cars-engineering/why-volvo-thinks-you-should-have-rust-in-your-car-4320bd639e09" target="_blank" rel="noopener noreferrer">Why Volvo thinks you should have Rust in your car?</a></p>
<p><a href="https://www.dds-foundation.org/what-is-dds-3/" target="_blank" rel="noopener noreferrer">What is DDS?</a></p>
<p><a href="https://github.com/zephyrproject-rtos" target="_blank" rel="noopener noreferrer">Zephyr Project</a></p>]]></content:encoded>
            <category>autosar-big-picture</category>
        </item>
        <item>
            <title><![CDATA[Framework Dependency]]></title>
            <link>https://cpodalak.github.io/fyi/blog/framework-dependency</link>
            <guid>https://cpodalak.github.io/fyi/blog/framework-dependency</guid>
            <pubDate>Fri, 03 Nov 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[The Emergence of Frameworks]]></description>
            <content:encoded><![CDATA[<h2 class="anchor anchorWithStickyNavbar_LWe7" id="the-emergence-of-frameworks">The Emergence of Frameworks<a href="https://cpodalak.github.io/fyi/blog/framework-dependency#the-emergence-of-frameworks" class="hash-link" aria-label="Direct link to The Emergence of Frameworks" title="Direct link to The Emergence of Frameworks">​</a></h2>
<ul>
<li>Early frameworks such as MFC(Microsoft Foundation Classes) and AWT(Abstract Window Toolkit in Java) pioneered structured software development.</li>
<li>The Dot-Com Boom popularized web development technologies like PHP and ASP.NET.</li>
<li>Mobile app development advanced significantly with frameworks like Swift and Kotlin.</li>
<li>The advent of Angular, React, and Node.js marked a notable shift towards front-end and full-stack web development.
Hadoop and Apache Spark were introduced to tackle big data challenges.</li>
<li>AUTOSAR, a specialized framework in the automotive sector, was developed to standardize vehicle software systems. It evolved to meet the demands of high-performance computing in cars, shifting its approach with the introduction of the Adaptive Platform.</li>
<li>The software industry has seen a mix of framework evolution and obsolescence, and recent advancements in AI, ML, and IoT are currently guiding the creation of new frameworks.</li>
</ul>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="pros-of-using-frameworks">Pros of Using Frameworks<a href="https://cpodalak.github.io/fyi/blog/framework-dependency#pros-of-using-frameworks" class="hash-link" aria-label="Direct link to Pros of Using Frameworks" title="Direct link to Pros of Using Frameworks">​</a></h2>
<ul>
<li><strong>Increased Efficiency</strong>: Frameworks provide pre-built components and standardized code structures, significantly reducing development time.</li>
<li><strong>Community Support</strong>: Popular frameworks boast extensive communities, offering support, documentation, and third-party resources.</li>
<li><strong>Enforced Best Practices</strong>: Many frameworks come with built-in security features and promote coding best practices.</li>
</ul>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="cons-of-over-reliance-on-frameworks">Cons of Over-Reliance on Frameworks<a href="https://cpodalak.github.io/fyi/blog/framework-dependency#cons-of-over-reliance-on-frameworks" class="hash-link" aria-label="Direct link to Cons of Over-Reliance on Frameworks" title="Direct link to Cons of Over-Reliance on Frameworks">​</a></h2>
<ul>
<li><strong>Lack of Flexibility</strong>: Over-dependence can hinder the implementation of unique features or require convoluted workarounds.</li>
<li><strong>Performance Overheads</strong>: Some frameworks add unnecessary bloat, impacting application performance.</li>
<li><strong>Steep Learning Curves</strong>: Learning and staying updated with a framework can be resource-intensive. Potential Disasters from Framework Dependence.</li>
<li><strong>Technological Lock-In</strong>: Relying solely on one framework can impede the adoption of newer, more efficient technologies.</li>
<li><strong>Security Risks</strong>: Misplaced trust in a framework’s security can lead to overlooked vulnerabilities.</li>
<li><strong>Maintenance Challenges</strong>: Older frameworks can become difficult to maintain, especially as technology evolves.</li>
</ul>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="mitigating-risks">Mitigating Risks<a href="https://cpodalak.github.io/fyi/blog/framework-dependency#mitigating-risks" class="hash-link" aria-label="Direct link to Mitigating Risks" title="Direct link to Mitigating Risks">​</a></h2>
<ul>
<li><strong>Modular Approach</strong>: Integrating frameworks as part of a flexible technology strategy can reduce dependence.</li>
<li><strong>Continuous Learning</strong>: Encouraging developers to stay adept with multiple technologies ensures adaptability.</li>
<li><strong>Balancing Development</strong>: Discerning when to utilize framework features versus custom development is key.</li>
</ul>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="conclusion">Conclusion<a href="https://cpodalak.github.io/fyi/blog/framework-dependency#conclusion" class="hash-link" aria-label="Direct link to Conclusion" title="Direct link to Conclusion">​</a></h2>
<p>Frameworks have been the backbone of software development, continuously evolving to meet industry needs. While they are indispensable in modern software development, fostering standardization and rapid development, an over-reliance on them can lead to significant drawbacks, including reduced flexibility and potential long-term maintenance issues.</p>
<p><strong>If you work in the automotive field and use AUTOSAR a lot, you’ve probably noticed how it kind of locks you in. It’s tough to break away from it, so you often end up sticking with it or having a hard time trying to switch to something else.</strong></p>]]></content:encoded>
            <category>autosar-big-picture</category>
        </item>
    </channel>
</rss>