<?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" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bt on Medium]]></title>
        <description><![CDATA[Stories by Bt on Medium]]></description>
        <link>https://medium.com/@24bt04145?source=rss-ccb8dfe72696------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ZiyegitqzAWSpRDX</url>
            <title>Stories by Bt on Medium</title>
            <link>https://medium.com/@24bt04145?source=rss-ccb8dfe72696------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 21:06:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@24bt04145/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[BFS in Cloud File Synchronisation (Google Drive/Dropbox) — Distribution of the file version]]></title>
            <link>https://medium.com/@24bt04145/bfs-in-cloud-file-synchronisation-google-drive-dropbox-distribution-of-the-file-version-49ad5c1f7045?source=rss-ccb8dfe72696------2</link>
            <guid isPermaLink="false">https://medium.com/p/49ad5c1f7045</guid>
            <category><![CDATA[cloud-storage]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[file-synchronization]]></category>
            <category><![CDATA[breadth-first-search]]></category>
            <category><![CDATA[data-structure-algorithm]]></category>
            <dc:creator><![CDATA[Bt]]></dc:creator>
            <pubDate>Sat, 03 Oct 2026 07:43:04 GMT</pubDate>
            <atom:updated>2026-10-03T07:43:04.831Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction</strong><br> <br> In this day and age, people store their files in the cloud. Different cloud storage services provide one with the ability to store files virtually. This means that one can create files on their computer, make changes to them on their phone, and view them on their laptop.<br> But how does one ensure that all the devices have the latest version of a file?<br> <br> When studying Data Structures and Algorithms (DSA), one often comes across the concept of the breadth-first search graph traversal algorithm. Although the actual implementation of this algorithm is significantly more complex, one can approximate the propagation of file versions with the BFS approach. This report discusses the basics of the BFS graph traversal algorithm as well as its real-life application in propagating file versions.</p><p><strong>What is BFS?</strong><br> BFS, or breadth-first search, is a graph traversal algorithm, which explores all the nodes of a graph. More specifically, one can think of this algorithm as visiting the nodes in levels. In other words, one starts with a node, also referred to as the source node, and visits all the nodes that are directly connected to it. After that, one moves to the next level and visits all the nodes that are connected to the nodes that one visited on the previous level. <br> The most important thing to remember about the BFS algorithm is that it always prioritizes visiting the nodes that are the farthest from the source node. Furthermore, one always processes the nodes on the lowest level before moving on to the next level.</p><p>The BFS algorithm uses the queue data structure, an example of which is demonstrated below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bR3XvqmBJ5_F3x5Z_Bmv_w.jpeg" /></figure><p><strong>Understanding the Concept of Cloud File Synchronization</strong><br> When one speaks about cloud file synchronization, they essentially mean that one has a certain file, which they edit, and this file is somehow propagated to all of one’s devices. For instance, if one uses Google Drive on their laptop, phone, and tablet, one would be able to edit any version of a file and synchronize it across all devices. A simplified illustration of this process is demonstrated below:</p><p>Cloud Server<br> / | \<br> / | \<br> Laptop Phone Tablet</p><p>In reality, there are many more nuances to file synchronization, such as metadata, timestamps, file versioning, conflict resolution, and other concepts related to distributed systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*E4ITvAT5mRvSBNjh58XL8w.jpeg" /></figure><p><strong>What is File Version Propagation?</strong><br> File version propagation is the process of propagating a specific version of a file to other systems and devices, which requires it. For instance, if one edits a file stored in their cloud account, the edited version of the file should be propagated to all of one’s devices linked to that account. A simple example of this process is demonstrated below:<br> Version 1<br> ↓<br> Student edits file<br> ↓<br> Version 2<br> ↓<br> Cloud server receives version 2<br> ↓<br> Other devices receive version 2</p><p>In some cases, one might edit a file multiple times, which could result in multiple versions of the file being stored on the cloud server. An example of this scenario is demonstrated below:</p><p>Report_v1<br> ↓<br> Report_v2<br> ↓<br> Report_v3<br> ↓<br> Report_v4</p><p>This way, if one realizes that the file, as it is now, has several issues, they can revert to a previous version.</p><p><strong>How Can BFS Be Used to Represent File Propagation?</strong></p><p>An end-user file can be represented by using BFS to traverse the graph in which cloud servers and devices are nodes.</p><p>Cloud</p><p>/ | \</p><p>Laptop Phone Tablet</p><p>|</p><p>Desktop</p><p>Assume that a file is edited on the Laptop. After that, it is updated in the cloud and propagated to other devices.</p><p>BFS traversal can be represented by the following sequence:</p><p>Cloud → Laptop → Phone → Tablet → Desktop</p><p>The algorithm visits nodes level by level:</p><p>1. The first level is the root node (Cloud Server).</p><p>2. The second level consists of three nodes: Laptop, Phone, and Tablet.</p><p>3. The third level is Desktop, and it is visited last.</p><p>It is a hypothetical example because Google Drive and Dropbox do not use BFS to synchronize files. However, BFS can help visualize the propagation of a file from the cloud to devices level by level.</p><p><strong>Why is BFS Useful for Understanding Synchronization?<br> </strong>The BFS algorithm has several advantages, which make it a great tool for this particular task.</p><p>First of all, one can understand why synchronization works the way it does by realizing that it is essentially a level-based traversal.</p><p>Secondly, the BFS algorithm is useful in finding the shortest path between two nodes in an unweighted graph. For instance, if one had to propagate a certain version of the file from one device to another, the BFS algorithm would help one find the shortest path between these two nodes.</p><p>Thirdly, the BFS algorithm uses the queue data structure, which can be used to conceptualize the propagation of file versioning:<br> Queue<br> Cloud<br> ↓<br> Laptop → Phone → Tablet</p><p>Fourthly, one of the main advantages of the BFS algorithm is that it does not revisit nodes, which have already been visited, which prevents infinite loops. This is done by making sure to mark nodes as visited, which is especially important when working with graphs that have cycles.</p><p><strong>Advantages of BFS in Modeling<br> </strong>Using the BFS to model file propagation has a number of advantages, such as the following:<br> • It is easy to understand and implement<br> • It always visits nodes in levels<br> • It can represent the propagation of information using a queue<br> • It can find the shortest path in an unweighted graph<br> • It can be used to demonstrate the real-life application of a DSA concept</p><p><strong>Limitations</strong><br> Unfortunately, the main limitation of using the BFS algorithm for representing file synchronization is that, in reality, file synchronization is significantly more complex than one would think. Furthermore, one must remember that cloud storage services have to implement a number of additional measures, such as handling conflicts, maintaining metadata and versioning, working with networks in real time, handling offline status, and much more.</p><p><strong>Conclusion</strong></p><p>BFS is an useful graph traversal algorithm in DSA that uses a clear level‑by‑level method. It helps us see how file changes travel between devices that are linked together.</p><p>In life cloud syncing is far more complicated than this simple model. So imagining devices and servers as a graph lets us link the ideas from DSA to real‑world systems such, as Google Drive and Dropbox. BFS remains a way to think about how changes spread through a network.</p><p><strong>References</strong></p><p>[1] Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest and Clifford Stein, Introduction to Algorithms, 4 th Edition, MIT Press, 2022.</p><p>[2] Mark Allen Weiss, Data Structures and Algorithm Analysis in Java, 3 rd Edition, Pearson, 2012.</p><p>[3] Robert Lafore, Data Structures &amp; Algorithms, in Java 2 nd Edition, Sams Publishing, 2002.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49ad5c1f7045" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>