<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ summary - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ summary - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Fri, 26 Jun 2026 22:48:05 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/summary/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ What Went Down at WWDC ]]>
                </title>
                <description>
                    <![CDATA[ By Vardhan Kishore Agrawal WWDC, in case you aren’t familiar with it, is Apple’s Worldwide Developer Conference, which they hold annually. This year, Apple announced several groundbreaking releases, and while not fully focused on consumers, these rel... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-went-down-at-wwdc/</link>
                <guid isPermaLink="false">66d852dcef84e4cc27cfbe72</guid>
                
                    <category>
                        <![CDATA[ summary ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Sun, 16 Jun 2019 07:16:07 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/06/Screen-Shot-2019-06-06-at-12.56.50-PM.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Vardhan Kishore Agrawal</p>
<p>WWDC, in case you aren’t familiar with it, is Apple’s Worldwide Developer Conference, which they hold annually. This year, Apple announced several groundbreaking releases, and while not fully focused on consumers, these releases will help developers and professionals create more immersive, intuitive, and fun experiences for their users. Nonetheless, this was likely Apple’s most jam-packed event thus far.</p>
<p>This article will give you a quick rundown of the major releases in this year’s WWDC conference and help you get a sense of what happened — even if you didn’t have the time to watch the keynote. In case you’re interested in going over it yourself, however, you can watch the full presentation as well as the various sessions throughout the week on <a target="_blank" href="https://developer.apple.com/videos/wwdc2019/">Apple’s website</a>.</p>
<h4 id="heading-table-of-contents">Table of Contents</h4>
<p><em>Follow the links to jump to each section.</em></p>
<ul>
<li><a class="post-section-overview" href="#heading-tvos">tvOS</a></li>
<li><a class="post-section-overview" href="#heading-ios">iOS</a></li>
<li><a class="post-section-overview" href="#heading-ipados">iPadOS</a></li>
<li><a class="post-section-overview" href="#heading-watchos">watchOS</a></li>
<li><a class="post-section-overview" href="#heading-macos-catalina">macOS Catalina</a></li>
<li><a class="post-section-overview" href="#heading-mac-pro">Mac Pro</a></li>
<li><a class="post-section-overview" href="#heading-pro-display-xdr">Pro Display XDR</a></li>
<li><a class="post-section-overview" href="#heading-developer-tools">Developer Tools</a></li>
</ul>
<hr>
<h3 id="heading-tvos">tvOS</h3>
<p>The conference began with tvOS after Tim Cook made some opening remarks. Despite minor user interface changes, not much has changed in the newest version of tvOS. Instead, Apple focused on their services, which they launched during the Spring Special Event earlier this year.</p>
<h4 id="heading-apple-tv">Apple TV+</h4>
<p>This service is to provide a Netflix-style streaming service with only Apple’s original content as a part of the service. During the keynote, they showcased one of their original Apple TV+ shows, in which the story of the first moon landing on the moon is revised so that the Soviet Union is the first as opposed to the United States.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*LkLOQey9IMbrZwedLZqYGw.jpeg" alt="Image" width="1200" height="680" loading="lazy">
<em>Trailer Clip from “For All Mankind”</em></p>
<h4 id="heading-new-wallpapers">New Wallpapers</h4>
<p>The latest wallpapers on Apple TV are stunning — they keep you immersed and wondering how and when each of the videos were recorded. Last year, Apple partnered with the International Space Station to capture high resolution footage from outer space, but this year, they’re delving into the ocean to get a submarine-style look at underwater life.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*IGRxH0ky55aOrPv3gSUg6g.jpeg" alt="Image" width="1200" height="800" loading="lazy">
<em>Announcing Submarine Wallpapers for tvOS</em></p>
<hr>
<h3 id="heading-ios">iOS</h3>
<p>As with every WWDC, we have our latest version of iOS — and they didn’t skip the number thirteen for those with <a target="_blank" href="https://en.wikipedia.org/wiki/Triskaidekaphobia">triskaidekaphobia</a>. However, this release did not cover the iPad, and is only available for iPhone—more on that later.</p>
<h4 id="heading-dark-mode">Dark Mode</h4>
<p>The most popular feature, by far, was Dark Mode. This long-awaited setting allows most apps to switch into a beautiful state, in which menus, bars, and fields become less apparent. This allows users to have a more immersive content experience, while giving the appearance that less of their screen real estate is being wasted.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*tFNwPfRfdZhAwwOoBMuFEA.jpeg" alt="Image" width="756" height="425" loading="lazy">
<em>Dark Mode on iOS 13</em></p>
<h4 id="heading-privacy-and-data">Privacy and Data</h4>
<p>While Apple’s always finding new ways to protect their customers’ data, this year, they’re allowing developers to use a <a target="_blank" href="https://9to5mac.com/2019/06/03/apple-launches-sign-in-with-apple-button-for-apps-no-tracking-login/"><strong>Sign in with Apple</strong></a> button to further protect data. In addition, they’re asking users for nearly <em>everything</em> to ensure privacy, whether it’s location services, notifications, or microphone access.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*uFtjr2cXN5Qkwgpy3P1MVQ.jpeg" alt="Image" width="1200" height="630" loading="lazy">
<em>The “Sign in with Apple” Button</em></p>
<h4 id="heading-memoji">Memoji</h4>
<p>Memojis have always been a fun, whimsical way to convey one’s emotions over text, but Apple’s bringing more life than ever to these. You can now add makeup to them, and also set them as a profile picture for all of your iMessage contacts to see.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*tQafpfjun-ETH-Qh1V-kbg.jpeg" alt="Image" width="1280" height="720" loading="lazy">
<em>Patrick Starrr and Desi Perkins’ Memojis</em></p>
<h4 id="heading-maps">Maps</h4>
<p>After driving around for millions of miles, Apple’s managed to get a high resolution view with <a target="_blank" href="https://appleinsider.com/articles/19/06/07/hands-on-with-ios-13-look-around-in-apple-maps">Look Around</a>, a feature that allows users to pan through a map as if they were biking or driving through it. While not completed, Apple says they’re working hard to help get this feature to other states and countries as well.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*hQGQ4EiNom0jtxgUjr6H7g.jpeg" alt="Image" width="1600" height="1000" loading="lazy">
<em>Craig Federighi Announcing Apple Maps Updates</em></p>
<hr>
<h3 id="heading-ipados">iPadOS</h3>
<p>While still sharing its underlying DNA with iOS, iPadOS gives the iPad new functionality, utilizing some of its more unique hardware capabilities. This allows it to become closer to Apple’s dream of a PC-replacement and less of a tablet. While not <em>fully</em> a laptop just yet, the iPad is now closer than ever.</p>
<h4 id="heading-desktop-class-browsing">Desktop-Class Browsing</h4>
<p>Among the bigger changes, Apple announced that users can now use Safari for the desktop version of websites. They used Google Docs and Wordpress as examples to show how you can take advantage of this feature and not be limited by mobile sites or apps.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*dsvavDrpB91U0dIUiZrZlQ.png" alt="Image" width="1092" height="806" loading="lazy">
<em>Google Docs Website on iPadOS</em></p>
<h4 id="heading-pencilkit">PencilKit</h4>
<p>The Apple Pencil has been <a target="_blank" href="https://appleinsider.com/articles/19/06/08/apple-pencil-gets-impressive-updates-with-ipados">improved greatly</a>, with latency reduced from 20ms to just 9ms. In addition, with a wide array of system tools for the pencil, developers now have the option to add their own if they wish to do so.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*crXjPQXTinhI-68Ib46bXg.jpeg" alt="Image" width="816" height="509" loading="lazy">
<em>Apple Pencil on Photoshop</em></p>
<h4 id="heading-sidecar">Sidecar</h4>
<p>Without any additional tools, you can now use the iPad as a secondary display for your Mac. You can also use it as a drawing tablet, too, using the Apple Pencil on professional apps on your Mac such as Photoshop, Illustrator, and Final Cut Pro.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*6tqyR2pzA-XFj8X_6_z5fg.jpeg" alt="Image" width="926" height="617" loading="lazy">
<em>Sidecar with Affinity Photo on iPadOS</em></p>
<hr>
<h3 id="heading-watchos">watchOS</h3>
<p>The Apple Watch has become a staple for many, allowing them to be more active throughout the day, and saving many from life-threatening situations throughout the years of its existence. This year, watchOS makes it even more powerful.</p>
<h4 id="heading-standalone-apps">Standalone Apps</h4>
<p>Previously, apps for the Apple Watch needed to be tethered to an iPhone companion app, but now, the Apple Watch is getting <a target="_blank" href="https://techcrunch.com/2019/06/03/apple-watch-gets-its-own-app-store-independent-apps/">its own App Store</a>, which causes a reduction in app download size, and gives it the independence the watch needs to be useful for many applications.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*Kux0Z-OiLdc06vAz1LF6wA.jpeg" alt="Image" width="780" height="436" loading="lazy">
<em>Independence for watchOS Apps</em></p>
<h4 id="heading-new-watch-faces">New Watch Faces</h4>
<p>Who doesn’t want new watch faces? Apple recently updated the list with some new ones which both improve the appearance and functionality of the watch, and these can be used for anyone running the latest version of watchOS.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*EPj1UV50-4D2rvLApIKkBw.jpeg" alt="Image" width="1200" height="800" loading="lazy">
<em>New Watch Faces on watchOS</em></p>
<hr>
<h3 id="heading-macos-catalina">macOS Catalina</h3>
<p>Becoming closer to iPadOS, macOS Catalina has several new features, most of which are centered on developers — and again — helping them make better, more functional apps.</p>
<h4 id="heading-project-catalyst">Project Catalyst</h4>
<p>While it was foreshadowed during last year’s WWDC, Apple officially announced <a target="_blank" href="https://www.digitaltrends.com/computing/what-is-project-catalyst/">Project Catalyst</a> this year. Due to the underlying similarities between macOS and iPadOS, this framework will allow developers to directly port their iPad apps as native Mac apps. It will also allow developers to create a single app across all of Apple’s platforms by just checking a box.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*pNLA2CKukgqjDWUYGQHOog.jpeg" alt="Image" width="1600" height="900" loading="lazy">
<em>Project Catalyst on macOS</em></p>
<h4 id="heading-no-more-itunes">No More iTunes</h4>
<p>After eighteen years of having launched iTunes, it is now being <a target="_blank" href="https://www.bloomberg.com/news/articles/2019-05-31/apple-s-future-ios-13-macos-10-15-watchos-6-tvos-13-mac-pro">discontinued</a> — however, its core functionality still remains. In Finder, you’ll <em>find</em> (no pun intended) your iOS device syncing tools, and in two new apps, Music and Podcasts, you’ll be able to access your music.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*XaLNncu9pwtGkAzBl2n6_A.jpeg" alt="Image" width="1092" height="819" loading="lazy">
<em>Music, Podcasts, and Apple TV</em></p>
<h4 id="heading-screen-time">Screen Time</h4>
<p>Screen time was a very useful addition to iOS last year, allowing users to keep tabs on how much they were using their devices. But — as a developer, I find myself using my Mac way more than my iOS devices, and therefore, having this feature on the Mac is great, because it allows for the same awareness for the computer. In addition, Apple has added some great new parental control features, which allow parents to limit the amount of time their kids spend on their computers, too.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*7U-HsAxnsAlS30KzQR-ofw.jpeg" alt="Image" width="1600" height="899" loading="lazy">
<em>Screen Time on macOS Catalina</em></p>
<hr>
<h3 id="heading-mac-pro">Mac Pro</h3>
<p>Right in line with macOS, Apple replaced their five-year-old “trashcan” Mac Pro and launched a powerful new model, which is the size of a traditional desktop. It allows for customization, and is targeted at enterprise-level professionals.</p>
<h4 id="heading-design">Design</h4>
<p>The Mac Pro is no longer small enough to fit on your desk, but in turn, it comes in a gorgeous aluminum frame with a striking ventilation pattern. Known as the “cheese grater” by the people of the internet, it’s something you’re sure not to miss.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*ec5j10fpPDHWqtxpIRBoOA.jpeg" alt="Image" width="650" height="366" loading="lazy">
<em>Lattice Ventilation on the New Mac Pro</em></p>
<h4 id="heading-performance">Performance</h4>
<p>The computer itself is a powerhouse. By lifting the aluminum enclosure, you get access to the Mac’s internals from all angles, allowing you to take advantage of the 8 PCle slots, and spec it up to 28 cores of processing power, 1.5 TB of memory, and use the best GPU on the planet (not by Nvidia).</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*usTtpov8ru4WiruqaDbBjw.jpeg" alt="Image" width="1600" height="1066" loading="lazy">
<em>Mac Pro Connected to Professional Rig</em></p>
<hr>
<h3 id="heading-pro-display-xdr">Pro Display XDR</h3>
<p>As a “companion” for the Mac Pro, you’ll also be able to purchase the Pro Display XDR, which, again, is targeted at commercial-level users. This display is stunning on the specs sheet, and is an uncompromising companion when used with the Mac Pro.</p>
<h4 id="heading-design-1">Design</h4>
<p>Similar to the Mac Pro, this display shares the lattice-like structure in the back to cool the amazing display. As usual, Apple has managed to cram the power of a top-of-the line $40,000 display, which weighs several times the amount of the Pro Display XDR, into a slim, bezel-less form factor.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*hW1XH9DOQncoF09klNT1VA.jpeg" alt="Image" width="926" height="617" loading="lazy">
<em>Pro Display XDR from Multiple Angles</em></p>
<h4 id="heading-performance-1">Performance</h4>
<p>The brightness of this display is paramount — it can run continuously with a sustained brightness of 1000 nits, and with content which supports it, it peaks at 1600 nits. For a full dynamic range of colors, the display also offers a record 1000000:1 contrast ratio and supports a P3 wide color gamut.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*nDgMmi9KGs81uMZBpdFkWg.jpeg" alt="Image" width="1600" height="900" loading="lazy">
<em>Pro Display XDR and its Wide Color Gamut</em></p>
<h4 id="heading-mounting">Mounting</h4>
<p>Apple doesn’t sell this stand with any mount, but for most professionals, they’ll already have a VESA mount to use with it. But if not, they can opt for the Pro Stand, which allows for seemingly weightless adjustments due to its over-engineered counterbalancing mechanism.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*bYdP32BjjYKF-IHkhDd5hg.jpeg" alt="Image" width="1024" height="606" loading="lazy">
<em>The Pro Mount for the Pro Display XDR</em></p>
<hr>
<h3 id="heading-developer-tools">Developer Tools</h3>
<p>After all, WWDC is aimed at “developers,” so to honor this, they’ve made huge changes to their developer tools, APIs, and their IDE. Some of these include Core ML, ARKit, and SwiftUI.</p>
<h4 id="heading-core-ml-3">Core ML 3</h4>
<p>Having been their main machine learning framework for several years, Apple continues to make important updates to it. This year, they’ve introduced support for activity classification, image segmentation, and sound classification, as well as extended support for NLP tasks. You can also now train these models with a dedicated Create ML app, as long as you’re running macOS Catalina.</p>
<p>Among one of the bigger changes is the ability to have custom models on users’ devices without needing a server-side database, which means that the model will adapt according to user patterns and be unique for each person’s device. This allows personalized results to be shown to the user, while still maintaining the privacy of local data processing.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*jiHjTCDh5bylXvAEltCCRA.png" alt="Image" width="1600" height="1132" loading="lazy">
<em>Create ML App for Developers on macOS</em></p>
<h4 id="heading-arkit">ARKit</h4>
<p>Augmented reality works great on Apple’s platforms. And this year, it works even better. For those without any formal 3D design experience, Apple has announced <a target="_blank" href="https://developer.apple.com/augmented-reality/reality-composer/">Reality Composer</a> and <a target="_blank" href="https://developer.apple.com/documentation/realitykit">RealityKit</a>, two tools which go hand-in-hand to allow developers to create augmented reality experiences with ease. In code, RealityKit provides — as the name suggests — a way for developers to apply effects to improve the realism of their apps.</p>
<p>People have always been the center of <a target="_blank" href="https://developer.apple.com/augmented-reality/arkit/">ARKit</a>, but now, it’s more apparent than ever. Three major features in this year’s release of ARKit are people occlusion, motion capture, and the ability to track multiple faces at once. This allows developers to create very immersive experiences, since augmented reality content can now appear to move behind people, and the ability to map people’s motions to a wireframe skeleton allows for much more flexibility. Previously, face detection was limited to one face, but now, developers can detect multiple faces using the front and rear cameras simultaneously.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*sRS1Gajo_3aDRN-kftbelA.png" alt="Image" width="1600" height="1000" loading="lazy">
<em>Reality Kit for Easy Augmented Reality Experiences</em></p>
<h4 id="heading-swiftui">SwiftUI</h4>
<p>With all of their other great releases, Apple also launched a new framework for responsive and data-driven user interface design. This framework allows developers to use a new Swift-based syntax to layout their apps and have them work natively across multiple device sizes, layouts, and types. Along with this, they’ve added the ability to “live preview” the app without needing to run it each time you make a change.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*Z65pAUV1vfIN9P8Iya26zQ.jpeg" alt="Image" width="1431" height="777" loading="lazy">
<em>SwiftUI Announced on Stage</em></p>
<hr>
<p>In conclusion, this year’s WWDC was packed with new features, products, and developer tools, and hopefully, you were able to get a glimpse of it through this article. While you’re here, stay tuned for some great new tutorials on the latest frameworks, and get ahead of the crowd by taking use of them before they’re released to the public in the fall.</p>
<p>Be sure to <strong>share this tutorial</strong> on social media, and <strong>follow me on Twitter.</strong></p>
<p><a target="_blank" href="https://twitter.com/vhanagwal"><strong>Vardhan Agrawal (@vhanagwal) | Twitter</strong></a><br><a target="_blank" href="https://twitter.com/vhanagwal">_The latest Tweets from Vardhan Agrawal (@vhanagwal). Completely self-taught #ios developer, #instructor, and human…_twitter.com</a></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Program design in the Unix environment: an academic article summary ]]>
                </title>
                <description>
                    <![CDATA[ By Shubheksha Jalan Today, let’s take a look at “Program Design in the Unix Environment” published in 1983 by Pike and Kernighan. The paper opens by listing why Unix has been successful, and then comments on the Unix philosophy and its benefits. It d... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/program-design-in-the-unix-environment-a-summary-cadcb8816dcf/</link>
                <guid isPermaLink="false">66d46106768263422736e8bb</guid>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ software development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ summary ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ unix ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Sun, 28 Jan 2018 20:29:12 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/0*O-H_d2lDRBmnCgFG.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Shubheksha Jalan</p>
<p>Today, let’s take a look at “<a target="_blank" href="http://harmful.cat-v.org/cat-v/unix_prog_design.pdf">Program Design in the Unix Environment</a>” published in 1983 by Pike and Kernighan.</p>
<p>The paper opens by listing why Unix has been successful, and then comments on the <a target="_blank" href="https://en.wikipedia.org/wiki/Unix_philosophy">Unix philosophy</a> and its benefits. It does so by looking at examples where programs diverged from the Unix philosophy and discussing the resulting trade offs</p>
<p>The reasons for Unix’s success:</p>
<ol>
<li>Portability: the kernel &amp; applications were written in C, so they could be moved from system to system without being re-written in the assembly language particular to that system.</li>
<li>The same OS ran on different hardware, so the users were already familiar and didn’t have to relearn when new hardware was released.</li>
<li>The vendors could ship the same software with each machine despite changes in hardware.</li>
<li>The system was not too big and was easy to modify since everything was written in C.</li>
<li>It provided a new philosophy based on the use of general purpose tools. They did one thing well and could be combined to do a particular task, instead of creating giant monolithic tools that served only one purpose.</li>
</ol>
<p>The paper argues that the use and design of tools is closely related, and how they fit together is the main subject of this essay.</p>
<p>The paper then dives into <code>cat</code> (the Unix command line utility for concatenating and printing files). It copies its input to its output. The input is usually a sequence of one or more files or the standard input. The output is a file or the standard output.</p>
<p>The main purpose of <code>cat</code> was to act as a utility to concatenate files. It can be combined with the pipe (<code>|</code>) operator to further enhance and extend its utility through output redirection.</p>
<p>Other systems, on the other hand, try to dump a bunch of related functionality into a single command which is against the Unix philosophy. It also creates a lock-in of functionality that might be useful to other programs.</p>
<p>Advantages of the Unix approach:</p>
<ol>
<li>The shell and the programs it can invoke provide uniform access to system facilities. Eg: the filename arguments are expanded by the shell in a similar fashion for each command. Because of pipes, we don’t need every command to deal with pre- and post- processing of input.</li>
<li>Growth is easy when functions are well-separated.</li>
</ol>
<p>Example: the `(backtic) operator was added to convert the output of one program into the input of another without requiring changes in any other program as it is interpreted by the shell. All programs the shell invokes acquire this feature automatically. If each program that required this feature interpreted it, it’d be very hard to enforce uniformity and carry out further experimentation, as each new idea would affect all the programs that would want to use it.</p>
<p>However, in future versions of <code>cat</code>, many new options were introduced (such as printing line numbers and non-printable characters).</p>
<p>The authors argue that instead of adding those options to <code>cat</code> itself, either existing programs should’ve been used or new programs should’ve been created. For example, line number functionality could’ve been provided by using <code>pr</code>. However, there was no program which allowed printing of non-printable characters which warranted the creation of a new one.</p>
<blockquote>
<p>Such a modification confuses what <code>cat</code>’s job is  concatenating files  with<br>what it happens to do in a common special case  showing a file on the terminal. A UNIX program should do one thing well, and leave unrelated tasks to other programs. <code>cat</code>’s job is to collect the data in files. Programs that collect data shouldn’t change the data; <code>cat</code> therefore shouldn’t transform its input.</p>
</blockquote>
<p>Whenever we split something into multiple programs, we sacrifice some efficiency. But since <code>cat</code> is usually used without any options, it makes sense to have the most common cases be the most efficient.</p>
<blockquote>
<p>Separate programs are not always better than wider options; which is better depends on the problem. Whenever one needs a way to perform a new function, one faces the choice of whether to add a new option or write a new program (assuming that none of the programmable tools will do the job conveniently). The<br>guiding principle for making the choice should be that each program does one thing. Options are appropriately added to a program that already has the right functionality. If there is no such program, then a new program is called for. In that case, the usual criteria for program design should be used: the program should be as general as possible, its default behavior should match the most common usage, and it should cooperate with other programs.</p>
</blockquote>
<p>Let’s consider another issue: dealing with fast terminal lines. How do we deal with output from <code>cat</code> scrolling off the top of the screen?</p>
<p>There are two approaches:</p>
<ol>
<li>Tell each command about terminal properties so it does the right thing</li>
<li>Write a command that handles only terminals without modifying other programs</li>
</ol>
<p>Let’s consider examples of both approaches: <code>lsc</code> and <code>ls</code> which prints out the list of files in a directory.</p>
<p><code>lsc</code> varies its output depending on the input. It displays the list in a columnar fashion across the screen so that the o/p fits if it’s outputting to the terminal. <code>ls</code> displays everything in a single column.</p>
<blockquote>
<p>By retaining single column output to files or pipes, <code>lsc</code> ensures compatibility with programs like <code>grep</code> or <code>wc</code> that expect things to be printed one per line. This ad-hoc adjustment of the output format depending on the destination is not only distasteful, it is unique  no standard UNIX command has this property.</p>
</blockquote>
<p>The authors argue that the columnation facility is useful in general and shouldn’t be locked away in just <code>lsc</code> , making it inaccessible to other programs. They advocate for a different program whose primary job is columnation.</p>
<blockquote>
<p>Similar reasoning suggests a solution for the general problem of data flowing off screens (columnated or not): a separate program to take any input and print it a screen at a time. Such programs are by now widely available, under names like pg and more. This solution affects no other programs, but can be used with all of them. As usual, once the basic feature is right, the program can be enhanced with options…</p>
</blockquote>
<p>Based on the previous example, the authors also talk about different cases where some functionality is locked away in a specific program (like input history in the terminal) which would be better off as a central service. All interactive programs could benefit from it.</p>
<p>They conclude with how augmenting existing commands with features/options is not desirable in Unix, it goes against its basic philosophy: make a program do one thing well. Several such programs can be composed to accomplish a more complex task.</p>
<blockquote>
<p>The key to problem solving on the UNIX system is to identify the right primitive operations and to put them at the right place. UNIX programs tend to solve general problems rather than special cases. In a very loose sense, the programs are orthogonal, spanning the space of jobs to be done (although with a fair<br>amount of overlap for reasons of history, convenience or efficiency). Functions are placed where they will do the most good: there shouldn’t be a pager in every program that produces output any more than there should be filename pattern matching in every program that uses filenames.</p>
<p>One thing that UNIX does not need is more features. It is successful in part because it has a small number of good ideas that work well together. Merely adding features does not make it easier for users to do things  it just makes the manual thicker. The right solution in the right place is always more effective<br>than haphazard hacking.</p>
</blockquote>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Building on Quicksand: A Summary ]]>
                </title>
                <description>
                    <![CDATA[ By Shubheksha Jalan Let’s try to break down the paper “Building On Quicksand” published by Pat Helland and David Campbell in 2009. All pull quotes are from the paper. The paper focuses on the design of large, fault-tolerant, replicated distributed sy... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/building-on-quicksand-a-summary-bc4e9e7c347/</link>
                <guid isPermaLink="false">66d460f7ffe6b1f641b5fa89</guid>
                
                    <category>
                        <![CDATA[ Computer Science ]]>
                    </category>
                
                    <category>
                        <![CDATA[ distributed systems ]]>
                    </category>
                
                    <category>
                        <![CDATA[ research ]]>
                    </category>
                
                    <category>
                        <![CDATA[ summary ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technology ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 04 Dec 2017 17:11:21 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9cb210740569d1a4cabf7a.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Shubheksha Jalan</p>
<p>Let’s try to break down the paper “<a target="_blank" href="http://arxiv.org/ftp/arxiv/papers/0909/0909.1788.pdf">Building On Quicksand</a>” published by Pat Helland and David Campbell in 2009. All pull quotes are from the paper.</p>
<p>The paper focuses on the design of large, fault-tolerant, replicated distributed systems. It also discusses its evolving based on changing requirements over time. It starts off by stating “Reliable systems have always been built out of unreliable components”.</p>
<blockquote>
<p>As the granularity of the unreliable component grows (from a mirrored disk to a system to a data center), the latency to communicate with a backup becomes unpalatable. This leads to a more relaxed model for fault tolerance. The primary system will acknowledge the work request and its actions without waiting to ensure that the backup is notified of the work. This improves the responsiveness of the system because the user is not delayed behind a slow interaction with the backup.</p>
</blockquote>
<p>Fault-tolerant systems can be made of many components. Their goal is keep functioning when one of those components fail. We don’t consider <strong><em>Byzantine</em></strong>failures in this discussion. Instead, the <strong><em>fail fast</em></strong> model where either a component works correctly or it fails.</p>
<p>The paper goes on to compare two versions of the Tandem NonStop system. One that used synchronous <a target="_blank" href="https://en.wikipedia.org/wiki/Application_checkpointing">checkpointing</a> and one that used asynchronous checkpointing. Refer section 3 of the paper for all the details. I’d like to touch upon the difference between the two checkpointing strategies.</p>
<ul>
<li>Synchronous checkpointing: in this case, with every write to the primary, state needed to be sent to the backup. Only after the backup acknowledged the write, did the primary send a response to the client who issued the write request. This ensured that when the primary fails, the backup can take over without losing any work.</li>
<li>Asynchronous checkpointing: in this strategy, the primary acknowledges and commits the write. This is done as soon as it processes it without waiting for a reply from the backup. This technique has improved latency but also poses other challenges addressed later.</li>
</ul>
<h4 id="heading-log-shipping">Log Shipping</h4>
<blockquote>
<p>A classic database system has a process that reads the log and ships it to a backup data-center. The normal implementation of this mechanism commits transactions at the primary system (acknowledging the user’s commit request) and asynchronously ships the log. The backup database replays the log, constantly playing catch-up.</p>
</blockquote>
<p>The mechanism described above is termed as log shipping. The main problem this poses is that when the primary fails and the back up takes over, some recent transactions might be lost.</p>
<blockquote>
<p>This inherently opens up a window in which the work is acknowledged to the client but it has not yet been shipped to the backup. A failure of the primary during this window will lock the work inside the primary for an unknown period of time. The backup will move ahead without knowledge of the locked-up work.</p>
</blockquote>
<p>The introduction of asynchrony into the system has an advantage in latency, response time and performance. However, it makes the system more prone to the possibility of losing work when the primary fails. There are two ways to deal with this:</p>
<ol>
<li>Discard the work locked in the primary when it fails. Whether a system can do that or not depends on the requirements and business rules.</li>
<li>Have a recovery mechanism to sync the primary with backups when it comes back up and retries lost work. This is possible only if the operations can be retried in an idempotent way and the out-of-order retries are possible.</li>
</ol>
<p>The system loses the notion of what the authors call “an authoritative truth”. Nobody knows the accurate state of the system at any given point in time if the work is locked in an unavailable backup or primary.</p>
<p>The authors conclude that business rules in a system with asynchronous checkpointing are probabilistic.</p>
<blockquote>
<p>If a primary uses asynchronous checkpointing and applies a business rule on the incoming work, it is necessarily a probabilistic rule. The primary, despite its best intentions, cannot know it will be alive to enforce the business rules.</p>
<p>When the backup system that participates in the enforcement of these business rules is asynchronously tied to the primary, the enforcement of these rules inevitably becomes probabilistic!</p>
</blockquote>
<p>The authors state that commutative operations, operations that can be reordered, can be executed independently, as long as the operation preserves business rules. However, this is hard to do with storage systems because the write operation isn’t commutative.</p>
<p>Another consideration is that work of a single operation is idempotent. For example, executing the operation any number of time should result in the same state of the system.</p>
<blockquote>
<p>To ensure this, applications typically assign a unique number or ID to the work. This is assigned at the ingress to the system (i.e. whichever replica first handles the work). As the work request rattles around the network, it is easy for a replica to detect that it has already seen that operation and, hence, not do the work twice.</p>
</blockquote>
<p>The authors suggest that different operations within a system provide different consistency guarantees. Yet, this depends on the business requirements. Some operations can choose classic consistency over availability and vice versa.</p>
<p>Next, the authors argue that as soon there is no notion of authoritative truth in a system. All computing boils down to three things: memories, guesses, and apologies.</p>
<ol>
<li>Memories: you can only hope that your replica remembers what it has already seen.</li>
<li>Guesses: Due to only partial knowledge being available, the replicas take actions based on local state and may be wrong. “In any system which allows a degradation of the absolute truth, any action is, at best, a guess.” Any action in such a system has a high probability of being successful, but it’s still a guess.</li>
<li>Apologies: Mistakes are inevitable. Hence, every business needs to have an apology mechanism in place either through human intervention or by automating it.</li>
</ol>
<p>The paper next discusses the topic of eventual consistency. The authors do this by taking the Amazon shopping cart built using Dynamo &amp; a system for clearing checks as examples. A single replica identifies and processes the work coming into these systems. It flows to other replicas as and when connectivity permits. The requests coming into these systems are commutative (reorderable). They can be processed at different replicas in different orders.</p>
<blockquote>
<p>Storage systems alone cannot provide the commutativity we need to create robust systems that function with asynchronous checkpointing. We need the business operations to reorder. Amazon’s Dynamo does not do this by itself. The shopping cart application on top of the Dynamo storage system is responsible for the semantics of eventual consistency and commutativity. The authors think it is time for us to move past the examination of eventual consistency in terms of updates and storage systems. The real action comes when examining application based operation semantics.</p>
</blockquote>
<p>Next, they discuss two strategies for allocating resources in replicas that might not be able to communicate with each other:</p>
<ol>
<li>Over-provisioning: the resources are partitioned between replicas. Each has a fixed subset of resources they can allocate. No replica can allocate a resource that’s not actually available.</li>
<li>Over-booking: the resources can be individually allocated without ensuring strict partitioning. This may lead to the replicas allocating a resource that’s not available, promising something they can’t deliver.</li>
</ol>
<p>The paper talks also about something termed as the “seat reservation pattern”. This is a compromise between over-provisioning and over-booking:</p>
<blockquote>
<p>Anyone who has purchased tickets online will recognize the “Seat Reservation” pattern where you can identify potential seats and then you have a bounded period of time, (typically minutes), to complete the transaction. If the transaction is not successfully concluded within the time period, the seats are once again marked as “available”.</p>
</blockquote>
<h4 id="heading-acid-20">ACID 2.0</h4>
<p>The classic definition of ACID stands for “Atomic, Consistent, Isolated, and Durable”. Its goal is to make the application think that there is a single computer which isn’t doing anything else when the transaction is being processed. The authors talk about a new definition for ACID. which stands for Associative, Commutative, Idempotent, and Distributed.</p>
<blockquote>
<p>The goal for ACID2.0 is to succeed if the pieces of the work happen: At least once, anywhere in the system, in any order. This defines a new KIND of consistency. The individual steps happen at one or more system. The application is explicitly tolerant of work happening out of order. It is tolerant of the work happening more than once per machine, too.</p>
</blockquote>
<p>Going by the classic definition of ACID, a linear history is a basis for fault tolerance. If we want to achieve the same guarantees in a distributed system, it’ll require concurrency control mechanisms which “tend to be fragile”.</p>
<blockquote>
<p>When the application is constrained to the additional requirements of commutativity and associativity, the world gets a LOT easier. No longer must the state be checkpointed across failure units in a synchronous fashion. Instead, it is possible to be very lazy about the sharing of information. This opens up offline, slow links, low-quality datacenters, and more.</p>
</blockquote>
<p>In conclusion:</p>
<blockquote>
<p>We have attempted to describe the patterns in use by many applications today as they cope with failures in widely distributed systems. It is the reorderability of work and repeatability of work that is essential to allowing successful application execution on top of the chaos of a distributed world in which systems come and go when they feel like it.</p>
</blockquote>
<p>P.S. — If you made it this far and would like to receive a mail whenever I publish one of these posts, sign up <a target="_blank" href="http://eepurl.com/dcHGFP">here</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Harvest, Yield, and Scalable Tolerant Systems: A Summary ]]>
                </title>
                <description>
                    <![CDATA[ By Shubheksha Jalan This article presents a summary of the paper “Harvest, Yield, and Scalable Tolerant Systems” published by Eric Brewer & Amando Fox in 1999. All unattributed quotes are from this paper. The paper deals with the trade-offs between c... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/harvest-yield-and-scalable-tolerant-systems-a-summary-5609a088bb2b/</link>
                <guid isPermaLink="false">66d460fa38f2dc3808b790ed</guid>
                
                    <category>
                        <![CDATA[ Computer Science ]]>
                    </category>
                
                    <category>
                        <![CDATA[ data ]]>
                    </category>
                
                    <category>
                        <![CDATA[ distributed systems ]]>
                    </category>
                
                    <category>
                        <![CDATA[ research ]]>
                    </category>
                
                    <category>
                        <![CDATA[ summary ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 30 Oct 2017 17:14:37 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/0*PlLhXyx7tBvL4fVm.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Shubheksha Jalan</p>
<p>This article presents a summary of the paper “<a target="_blank" href="https://pdfs.semanticscholar.org/5015/8bc1a8a67295ab7bce0550886a9859000dc2.pdf">Harvest, Yield, and Scalable Tolerant Systems</a>” published by Eric Brewer &amp; Amando Fox in 1999. All unattributed quotes are from this paper.</p>
<p>The paper deals with the trade-offs between consistency and availability (CAP) for large systems. It’s very easy to point to CAP and assert that no system can have consistency and availability.</p>
<p>But, there is a catch. CAP has been misunderstood in a variety of ways. As Coda Hale explains in his excellent blog post “<a target="_blank" href="https://codahale.com/you-cant-sacrifice-partition-tolerance/">You Can’t Sacrifice Partition Tolerance</a>”:</p>
<blockquote>
<p>Of the CAP theorem’s Consistency, Availability, and Partition Tolerance, Partition Tolerance is mandatory in distributed systems. You cannot <strong>not</strong> choose it. Instead of CAP, you should think about your availability in terms of yield (percent of requests answered successfully) and harvest (percent of required data actually included in the responses) and which of these two your system will sacrifice when failures happen.</p>
</blockquote>
<p>The paper focuses on increasing the availability of large scale systems by fault toleration, containment and isolation:</p>
<blockquote>
<p>We assume that clients make queries to servers, in which case there are at least two metrics for correct behavior: yield, which is the probability of completing a request, and harvest, which measures the fraction of the data reflected in the response, i.e. the completeness of the answer to the query.</p>
</blockquote>
<p>The two metrics, <strong>harvest</strong> and <strong>yield</strong> can be summarized as follows:</p>
<ul>
<li><strong>Harvest</strong>: data in response/total data<br>For example: If one of the nodes is down in a 100 node cluster, the harvest is 99% for the duration of the fault.</li>
<li><strong>Yield</strong>: requests completed with success/total number of requests<br><strong>Note:</strong> Yield is different from uptime. Yield deals with the number of requests, not only the time the system wasn’t able to respond to requests.</li>
</ul>
<p>The paper argues that there are certain systems which require perfect responses to queries every single time. Also, there are systems that can tolerate imperfect answers once in a while.</p>
<p>To increase the overall availability of our systems, we need to carefully think through the required consistency and availability guarantees it needs to provide.</p>
<h4 id="heading-trading-harvest-for-yield-probabilistic-availability">Trading Harvest for Yield — Probabilistic Availability</h4>
<blockquote>
<p>Nearly all systems are probabilistic whether they realize it or not. In particular, any system that is 100% available under single faults is probabilistically available overall (since there is a non-zero probability of multiple failures)</p>
</blockquote>
<p>The paper talks about understanding the probabilistic nature of availability. This helps in understanding and limiting the impact of faults by making decisions about what needs to be available and what kind of faults the system can deal with.</p>
<p>They outline the linear degradation of harvest in case of multiple node faults. The harvest is directly proportional to the number of nodes that are functioning correctly. Therefore, it decreases/increases linearly.</p>
<p>Two strategies are suggested for increasing the yield:</p>
<ol>
<li>Random distribution of data on the nodes<br>If one of the nodes goes down, the average-case and worst-case fault behavior doesn’t change. Yet if the distribution isn’t random, then depending on the type of data, the impact of a fault may vary.<br>For example, if only one of the nodes stored information related to a user’s account balance goes down, the entire banking system will not be able to work.</li>
<li>Replicating the most important data<br>This reduces the impact in case one of the nodes containing a subset of high-priority data goes down.<br>It also improves harvest.</li>
</ol>
<p>Another notable observation made in the paper is that it is possible to replicate all your data. It doesn’t do a lot to improve your harvest/yield, but it increases the cost of operation substantially. This is because the internet works based on best-in-effort protocols which can never guarantee 100% harvest/yield.</p>
<h4 id="heading-application-decomposition-and-orthogonal-mechanisms">Application Decomposition and Orthogonal Mechanisms</h4>
<p>The second strategy focuses on the benefits of orthogonal system design.</p>
<p>It starts out by stating that large systems are composed of subsystems which cannot tolerate failures. But they fail in a way that allows the entire system to continue functioning with some impact on utility.</p>
<blockquote>
<p>The actual benefit is the ability to provision each subsystem’s state management separately, providing strong consistency or persistent state only for the subsystems that need it, not for the entire application. The savings can be significant if only a few small subsystems require the extra complexity.</p>
</blockquote>
<p>The paper states that orthogonal components are completely independent of each other. They have no run time interface to other components, unless there is a configuration interface. This allows each individual component to fail independently and minimizes its impact on the overall system.</p>
<blockquote>
<p>Composition of orthogonal subsystems shifts the burden of checking for possibly harmful interactions from runtime to compile time, and deployment of orthogonal guard mechanisms improves robustness for the runtime interactions that do occur, by providing improved fault containment.</p>
</blockquote>
<p>The goal of this paper was to motivate research in the field of designing fault-tolerant and highly available large scale systems.</p>
<p>Also, to think carefully about the consistency and availability guarantees the application needs to provide. As well as the trade offs it is capable of making in terms of harvest against yield.</p>
<p>If you enjoyed this paper, please hit the clap button so more people see it. Thank you.</p>
<p>P.S. — If you made it this far and would like to receive a mail whenever I publish one of these posts, sign up <a target="_blank" href="http://eepurl.com/dcHGFP">here</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Some Constraints & Trade-offs In The Design of Network Communications: A Summary ]]>
                </title>
                <description>
                    <![CDATA[ By Shubheksha Jalan This article distills the content presented in the paper “Some Constraints and Trade-offs In The Design of Network Communications” published in 1975 by E. A. Akkoyunlu et al. The paper focuses on the inclusion of Interprocess Comm... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/some-constraints-trade-offs-in-the-design-of-network-communications-a-summary-19589efd55d9/</link>
                <guid isPermaLink="false">66d4610a868774922c885016</guid>
                
                    <category>
                        <![CDATA[ Computer Science ]]>
                    </category>
                
                    <category>
                        <![CDATA[ distributed systems ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ research ]]>
                    </category>
                
                    <category>
                        <![CDATA[ summary ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 25 Sep 2017 18:44:11 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*1xL5XULHeYCPNkGwBSA3jQ.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Shubheksha Jalan</p>
<p>This article distills the content presented in the paper <a target="_blank" href="http://dsg.tuwien.ac.at/linksites/teaching/courses/AdvancedDistributedSystems/download/1975_Akkoyunlu,%20Ekanadham,%20Huber_Some%20constraints%20and%20tradeoffs%20in%20the%20design%20of%20network%20communications.pdf">“Some Constraints and Trade-offs In The Design of Network Communications”</a> published in 1975 by E. A. Akkoyunlu et al.</p>
<p>The paper focuses on the inclusion of Interprocess Communication (IPC) primitives and the consequences of doing so. It explores, in particular, the time-out and the insertion property feature described in detail below with respect to distributed systems of sequential processes without system buffering and interrupts.</p>
<p>It also touches upon the two generals problem which states that it’s impossible for two processes to agree on a decision over an unreliable network.</p>
<h3 id="heading-introduction">Introduction:</h3>
<p>The design of an Interprocess Communication Mechanism (IPCM) can be described by stating the behavior of the system and the required services. The features to be included in the IPCM are very critical as they might be interdependent, hence the design process should begin with a detailed spec. This involves thorough understanding of the consequences of each decision.</p>
<blockquote>
<p>The major aim of the paper is to point out the interdependence of the features to be incorporated in the system.</p>
</blockquote>
<p>The paper states that at times the incompatibility between features is visible from the start. Yet, sometimes two features which seem completely unrelated end up affecting each other significantly. If the trade-offs involved aren’t explored at the beginning, it might not be possible to include desirable features. Trying to accommodate conflicting features results in messy code at the cost of elegance.</p>
<h4 id="heading-intermediate-processes">Intermediate Processes:</h4>
<p>Let’s suppose a system doesn’t allow indirect communication between processes that cannot establish a connection. The users just care about the logical sender and receiver of the messages: they don’t care what path the messages take or how many processes they travel through to reach their final destination. In such a situation, intermediate processes come to our rescue. They’re not a part of the IPCM but are inserted between two processes that can’t communicate directly through a directory or broker process when the connection is set up. They’re the only ones aware of the indirect nature of communication between the processes.</p>
<h3 id="heading-centralized-vs-distributed-systems">Centralized vs. Distributed Systems:</h3>
<h4 id="heading-centralized-communication-facility">Centralized Communication Facility</h4>
<ol>
<li>Has a single agent which is able to maintain all state information related to the communication happening in the system</li>
<li>The agent can also change the state of the system in a well-defined manner</li>
</ol>
<p>For example, if we consider the IPCM to be the centralized agent, it’ll be responsible for matching the SEND and RECEIVE requests of two processes, transferring data between their buffers and relaying appropriate status to both.</p>
<h4 id="heading-distributed-communication-facility">Distributed Communication Facility</h4>
<ol>
<li>No single agent has the complete state information at any time</li>
<li>The IPCM is made of several individual components which coordinate, exchange and work with parts of state information they possess.</li>
<li>A global change can take a considerable amount of time</li>
<li>If one of the components crashes, the activity of other components still interests us</li>
</ol>
<p><img src="https://cdn-media-1.freecodecamp.org/images/gKAM3khbKCC4hxqH3GK04lKgz0u7iWIYS3uO" alt="Image" width="617" height="276" loading="lazy"></p>
<p><strong>Case 1:</strong></p>
<p>In Figure 1, P1 and P2 are the two communicating processes on different machines over a network with their own IPCMs and P is the interface which enables this, with parts that lie on both machines. P handles the details of the network lines.</p>
<blockquote>
<p>If one machine or a communication link crashes, we want the surviving IPCM’s to continue their operation. At least one component should detect a failure and be able to communicate. (In the case of a communication link failure, both ends must know.)</p>
</blockquote>
<p><strong>Case 2:</strong></p>
<p>Distributed communication can also happen on the same machine given that there are one or more intermediate processes taking part in the system. In that case, P, P1 and P2 will be processes on the same system with identical IPCMs. P is an intermediate processes which facilitates the communication between P1 and P2.</p>
<p>Transactions between P1 and P2 consist of two steps: P1 to P and P to P2. Normally, the status returned to P1 would reflect the result of the P1 to P transfer, but P1 is interested in the status of the over all transaction from P1 to P2.</p>
<p>One way to deal with this is a <strong>delayed status return</strong>. The status isn’t sent to the sender immediately after the transaction occurs but only when the sender issues a SEND STATUS primitive. In the example above, after receiving the message from P1, P further sends it to P2, doesn’t send any status to P1 and waits to receive a status from P2. When it receives the appropriate status from P2, it relays it to P1 using the SEND STATUS primitive.</p>
<h4 id="heading-special-cases-of-distributed-facility">Special Cases of Distributed Facility</h4>
<p>This section starts out by stating some facts and reasoning around them.</p>
<blockquote>
<p>FACT 0: A perfectly reliable distributed system can be made to behave as a centralized system.</p>
</blockquote>
<p>Theoretically, this is possible if:</p>
<ol>
<li>The state of different components of the system is known at any given time</li>
<li>After every transaction, the status is relayed properly between the processes through their IPCMs using reliable communication.</li>
</ol>
<p>However, this isn’t possible in practice because we don’t have a perfect reliable network. Hence, the more realistic version of the above fact is:</p>
<blockquote>
<p>FACT I: A distributed IPCM can be made to simulate a centralized system provided that:</p>
<ol>
<li><p>The overall system remains connected at all times, and</p>
</li>
<li><p>When a communication link fails, the component IPCM’s that are connected to it know about it, and</p>
</li>
<li><p>The mean time between two consecutive failures is large compared to the mean transaction time across the network.</p>
</li>
</ol>
</blockquote>
<p>The paper states that if the above conditions are met, we can establish communication links that are reliable enough to simulate a centralized systems because:</p>
<ol>
<li>There is always a path from the sender to the receiver</li>
<li>Only one copy of an undelivered message will be retained by the system in case of a failure due to link failure detection. Hence a message cannot be lost if undelivered and will be removed from the system when delivered.</li>
<li>A routing strategy and a bound on the failure rate ensures that a message moving around in a subset of nodes will eventually get out in finite time if the target node isn’t present in the subset.</li>
</ol>
<p>The cases described above are special cases because they make a lot of assumptions, use inefficient algorithms and don’t take into account network partitions leading to disconnected components.</p>
<h3 id="heading-status-in-distributed-systems">Status in Distributed Systems</h3>
<h4 id="heading-complete-status">Complete Status</h4>
<p>A complete status is one that relays the final outcome of the message, such as whether it reached its destination.</p>
<blockquote>
<p>FACT 2: In an arbitrary distributed facility, it is impossible to provide complete status.</p>
</blockquote>
<p><img src="https://cdn-media-1.freecodecamp.org/images/XJzsqHDXwVzw4k-tW2Zzch6crkuXxPEtbpNy" alt="Image" width="656" height="322" loading="lazy"></p>
<p><strong>Case 1:</strong></p>
<p>Assume that a system is partitioned into two disjoint networks, leaving the IPCMs disconnected. Now, if IPCM1 was awaiting a status from IPCM2, there is no way to get it and relay the result to P1.</p>
<p><strong>Case 2:</strong></p>
<p>Consider figure 2, if there isn’t a reliable failure detection mechanism present in the system and IPCM2 sends a status message to IPCM1, then it can never be sure it reached or not without an acknowledgement. This leads to an infinite exchange of messages.</p>
<h4 id="heading-time-outs"><strong>Time-outs</strong></h4>
<p>Time-outs are required because the system has finite resources and can’t afford to be deadlocked forever. The paper states that:</p>
<blockquote>
<p>FACT 3: In a distributed system with timeouts, it is impossible to provide complete status (even if the system is absolutely reliable).</p>
</blockquote>
<p><img src="https://cdn-media-1.freecodecamp.org/images/QjeuiCyIRP-6DdAzBYgD666NJAWxLhgJ0zPH" alt="Image" width="632" height="173" loading="lazy"></p>
<p>In figure 3, P1 is trying to send P2 a message through a chain of IPCMs.</p>
<p>Suppose if I1 takes data from P1 but before it hears about the status of the transaction, P1’s request times out. IPCM1 has now knowledge about the final outcome whether the data was successfully received by P2. Whatever status it returns to P1, it may prove to be incorrect. Hence, it’s impossible to provide complete status in a distributed facility with time-outs.</p>
<h4 id="heading-insertion-property">Insertion Property</h4>
<p>An IPCM has insertion property if we insert an intermediate process P between two processes P1 and P2 that wish to communicate such that:</p>
<ol>
<li>P is invisible to both P1 and P2</li>
<li>The status relayed to P1 and P2 is the same they’d get if directly connected</li>
</ol>
<blockquote>
<p>FACT 4: In a distributed system with timeouts, the insertion property can be possessed only if the IPCM withholds some status information that is known to it.</p>
</blockquote>
<p>Delayed status is required to fulfill the insertion property. Consider that the message is sent from P1 to P2. What happens if P receives P1’s message, it goes into <code>await-status</code> state but it times out before P could learn about the status?</p>
<p>We can’t tell P1 the final outcome of the exchange as that’s not available yet. We also can’t let P know that it’s in <code>await-status</code> state because that would mean that the message was received by someone. It’s also not possible that P2 never received the data because such a situation cannot arise if P1 and P2 are directly connected &amp; hence violates the insertion property.</p>
<p>The solution to this is to provide an ambiguous status to P1, one that is as likely to be possible if the two processes were connected directly.</p>
<blockquote>
<p>Thus, a deliberate suppression of what happened is introduced by providing the same status to cover a time-out which occurs while awaiting status and, say, a transmission error.</p>
</blockquote>
<h3 id="heading-logical-and-physical-messages">Logical and Physical Messages</h3>
<p>The basic function of an IPCM is the transfer and synchronization of data between two processes. This may happen by dividing the physical messages originally sent by the sender process as a part of a single operation into smaller messages, also known as logical message for the ease of transfer.</p>
<h4 id="heading-buffer-size-considerations">Buffer Size Considerations</h4>
<p><img src="https://cdn-media-1.freecodecamp.org/images/emD1vUav17PwafIrLIxbg4ch3fpRdJjL8Mr1" alt="Image" width="800" height="273" loading="lazy"></p>
<p>As depicted in figure 5, if a buffer mismatch arises, we can take the following approaches to fix it:</p>
<ol>
<li>Define a system-wide buffer size. This is extremely restrictive, especially within a network of heterogeneous systems.</li>
<li>Satisfy the request with the small buffer size and inform both the processes involved what happened. This approach requires that the processes are aware of the low level details of the communication.</li>
<li>Allow partial transfers. In this approach, only the process that issued the smaller request (50 words) is woken up. All other processes remain asleep awaiting further transfers. If the receiver’s buffer isn’t full, an EOM (End Of Message) indicator is required to wake it up.</li>
</ol>
<h4 id="heading-partial-transfers-and-well-known-ports">Partial Transfers and Well-Known Ports</h4>
<p><img src="https://cdn-media-1.freecodecamp.org/images/E-5x03qgbd0Ks6OoNjr2WKZVa1BPtg5kAchU" alt="Image" width="800" height="498" loading="lazy"></p>
<p>In figure 6, a service process using a well-known port is accepting requests for sever user processes, P1…Pn. If P1 sends a message to the service process that isn’t complete and doesn’t fill its buffer, we need to consider the following situations:</p>
<ol>
<li>The well-known port is reserved for P1. No other process can communicate with the service process using it until P1 is done.</li>
<li>When the service process times out while P1 is preparing to send the second and final part of the message, we need to handle it without informing P1 that the first part has been ignored. P1 isn’t listening for incoming messages from the service process.</li>
</ol>
<p>Since none of these problems arise without partial transfers, one solution is to ban them altogether. For example:</p>
<blockquote>
<p>This is the approach taken in ARPANET where the communication to well known ports are restricted to short, complete messages which are used to setup a separate connection for subsequent communication.</p>
</blockquote>
<h4 id="heading-buffer-processes">Buffer Processes</h4>
<p><img src="https://cdn-media-1.freecodecamp.org/images/mVbGqJg3Eawc9Zq9oOukZj4RcWRkQ-Ji6b2N" alt="Image" width="800" height="500" loading="lazy">
<em>This solution is modeled around the creation of dynamic processes.</em></p>
<p>Whenever P1 wishes to transfer data to the service process, a new process S1 is created and receives messages from P1 until the logical message is completed, sleeping as and when required. Then it sends the complete physical message to the service process with EOM flag set. Thus no partial transfers happen between S1 and the service process, they’re all filtered out before that.</p>
<p>However, this kind of a solution isn’t possible with well-known ports. S1 is inserted between P1 and the service process when the connection is initialized. In the case of well-known ports, no initialization takes place.</p>
<blockquote>
<p>In discussing status returned to the users, we have indicated how the presence of certain other features limits the information that can be provided.</p>
<p>In fact, we have shown situations in which uncertain status had to be returned, providing almost no information as to the outcome of the transaction.</p>
</blockquote>
<p>Even though the inclusion of insertion property complicates things, it is beneficial to use the weaker version of it.</p>
<blockquote>
<p>Finally, we list a set of features which may be combined in a working IPCM:</p>
<p>(1) Time-outs</p>
<p>(2) Weak insertion property and partial transfer</p>
<p>(3) Buffer processes to allow</p>
<p>(4) Well-known ports — with appropriate methods to deal with partial transfers to them.</p>
</blockquote>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
