<?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[Geek Culture - Medium]]></title>
        <description><![CDATA[A new tech publication by Start it up (https://medium.com/swlh). - Medium]]></description>
        <link>https://medium.com/geekculture?source=rss----9758482ba857---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Geek Culture - Medium</title>
            <link>https://medium.com/geekculture?source=rss----9758482ba857---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 13 Nov 2026 14:30:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/geekculture" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[17 Things I Wish I’d Done Earlier as a Data Engineer]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/geekculture/17-things-i-wish-id-done-earlier-as-a-data-engineer-d1aa2e4f0694?source=rss----9758482ba857---4"><img src="https://cdn-images-1.medium.com/max/2600/1*DvoEWFnYXwKp6zNnjKMdlw.jpeg" width="4240"></a></p><p class="medium-feed-snippet">I don&#x2019;t like to dwell on the past. And a lot of times, it is essential to make mistakes yourself. And yet, I find myself recommending many&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/geekculture/17-things-i-wish-id-done-earlier-as-a-data-engineer-d1aa2e4f0694?source=rss----9758482ba857---4">Continue reading on Geek Culture »</a></p></div>]]></description>
            <link>https://medium.com/geekculture/17-things-i-wish-id-done-earlier-as-a-data-engineer-d1aa2e4f0694?source=rss----9758482ba857---4</link>
            <guid isPermaLink="false">https://medium.com/p/d1aa2e4f0694</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[skills-development]]></category>
            <category><![CDATA[data-engineer]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Sven Balnojan, PhD]]></dc:creator>
            <pubDate>Fri, 01 Sep 2023 01:32:25 GMT</pubDate>
            <atom:updated>2023-09-05T12:15:29.963Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[LLM-Powered OLAP: the Tencent Experience with Apache Doris]]></title>
            <link>https://medium.com/geekculture/llm-powered-olap-the-tencent-experience-with-apache-doris-9ecc779450e?source=rss----9758482ba857---4</link>
            <guid isPermaLink="false">https://medium.com/p/9ecc779450e</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Jun Zhang]]></dc:creator>
            <pubDate>Thu, 31 Aug 2023 17:32:24 GMT</pubDate>
            <atom:updated>2023-08-31T17:32:24.286Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S_Xx-eBJ26xldqOZ6lupaQ.jpeg" /></figure><p>Six months ago, I wrote about <a href="https://medium.com/geekculture/tencent-data-engineer-why-we-go-from-clickhouse-to-apache-doris-db120f324290">why we replaced ClickHouse with Apache Doris as an OLAP engine</a> for our data management system. Back then, we were struggling with the auto-generation of SQL statements. As days pass, we have made progresses big enough to be references for you (I think), so here I am again.</p><p>We have adopted Large Language Models (LLM) to empower our Doris-based OLAP services.</p><h3>LLM + OLAP</h3><p>Our incentive was to save our internal staff from the steep learning curve of SQL writing. Thus, we used LLM as an intermediate. It transforms natural language questions into SQL statements and sends the SQLs to the OLAP engine for execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yv3xN4imBFHC3tmUglvmiQ.png" /></figure><p>Like every AI-related experience, we came across some friction:</p><ol><li>LLM does not understand data jargons, like “fields”, “rows”, “columns” and “tables”. Instead, they can perfectly translate business terms like “corporate income” and “DAU”, which are basically what the fields/rows/columns are about. That means it can work well only if the analysts use the exact right word to refer to the metric they need when typing their questions.</li><li>The LLM we are using is slow in inference. It takes over 10 seconds to respond. As it charges fees by token, cost-effectiveness becomes a problem.</li><li>Although the LLM is trained on a large collection of public datasets, it is under-informed of niche knowledge. In our case, the LLM is super unfamiliar with indie songs, so even if the songs are included in our database, the LLM will not able to identify them properly.</li><li>Sometimes our input questions require adequate and latest legal, political, financial, and regulatory information, which is hard to be included in a training dataset or knowledge base. We need to connect the LLM to wider info bases in order to perform more diversified tasks.</li></ol><p>We knock these problems down one by one.</p><h3>1. A semantic layer</h3><p>For problem No.1, we introduce a semantic layer between the LLM and the OLAP engine. This layer translates business terms into the corresponding data fields. It can identify data filtering conditions from the various natural language wordings, relate them to the metrics involved, and then generate SQL statements.</p><p>Besides that, the semantic layer can optimize the computation logic. When analysts input a question that involves a complicated query, let’s say, a multi-table join, the semantic layer can split that into multiple single-table queries to reduce semantic distortion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jd8EATT3zyjrVWeoB0fRTg.png" /></figure><h3>2. LLM parsing rules</h3><p>To increase cost-effectiveness in using LLM, we evaluate the computation complexity of all scenarios, such as metric computation, detailed record retrieval, and user segmentation. Then, we create rules and dedicate the LLM-parsing step to only complicated tasks. That means for the simple computation tasks, it will skip the parsing.</p><p>For example, when an analyst inputs “tell me the earnings of the major musical platforms”, the LLM identifies that this question only entails several metrics or dimensions, so it will not further parse it but send it straight for SQL generation and execution. This can largely shorten query response time and reduce API expenses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4fEjpULX0udSDCSZG8ZM3w.png" /></figure><h3>3. Schema Mapper and external knowledge base</h3><p>To empower the LLM with niche knowledge, we added a Schema Mapper upstream from the LLM. The Schema Mapper maps the input question to an external knowledge base, and then the LLM will do parsing.</p><p>We are constantly testing and optimizing the Schema Mapper. We categorize and rate content in the external knowledge base, and do various levels of mapping (full-text mapping and fuzzy mapping) to enable better semantic parsing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8T810vG4m48d-0JM0xmyUw.png" /></figure><h3>4. Plugins</h3><p>We used plugins to connect the LLM to more fields of information, and we have different integration methods for different types of plugins:</p><ul><li><strong>Embedding local files</strong>: This is especially useful when we need to “teach” the LLM the latest regulatory policies, which are often text files. Firstly, the system vectorizes the local text file, executes semantic searches to find matching or similar terms in the local file, extracts the relevant contents and puts them into the LLM parsing window to generate output.</li><li><strong>Third-party plugins</strong>: The marketplace is full of third-party plugins that are designed for all kinds of sectors. With them, the LLM is able to deal with wide-ranging topics. Each plugin has its own prompts and calling function. Once the input question hits a prompt, the relevant plugin will be called.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dl68tHEipt8z_e2jj2p4uQ.png" /></figure><p>After we are done with above four optimizations, the SuperSonic framework comes into being.</p><h3>The SuperSonic framework</h3><p>Now let me walk you through this <a href="https://github.com/tencentmusic/supersonic">framework</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Am1x2sQ2TeedcXxh-VZr4Q.png" /></figure><ul><li>An analyst inputs a question.</li><li>The Schema Mapper maps the question to an external knowledge base.</li><li>If there are matching fields in the external knowledge base, the question will not be parsed by the LLM. Instead, a metric computation formula will trigger the OLAP engine to start querying. If there is no matching field, the question will enter the LLM.</li><li>Based on the pre-defined rules, the LLM rates the complexity level of the question. If it is a simple query, it will go directly to the OLAP engine; if it is a complicated query, it will be semantically parsed and converted to a DSL statement.</li><li>At the Semantic Layer, the DSL statement will be split based on its query scenario. For example, if it is a multi-table join query, this layer will generate multiple single-table query SQL statements.</li><li>If the question involves external knowledge, the LLM will call a third-party plugin.</li></ul><p><strong>Example:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7y12z9ARrAV7P2C9C7gmbQ.png" /></figure><p>To answer whether a certain song can be performed on variety shows, the system retrieves the OLAP data warehouse for details about the song, and presents it with results from the Commercial Use Query third-party plugin.</p><h3>OLAP Architecture</h3><p>As for the OLAP part of this framework, after several rounds of architectural evolution, this is what our current OLAP pipeline looks like.</p><p>Raw data is sorted into tags and metrics, which are custom-defined by the analysts. The tags and metrics are under unified management in order to avoid inconsistent definitions. Then, they are combined into various tagsets and metricsets for various queries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5b2EEBCXxKmklTvM-7q5dQ.png" /></figure><p>We have drawn two main takeaways for you from our architectural optimization experience.</p><p><strong>1. Streamline the links</strong></p><p>Before we adopted Apache Doris, we used to have ClickHouse to accelerate the computation of tags and metrics, and Elasticsearch to process dimensional data. That’s two analytic engines and requires us to adapt the query statements to both of them. It was high-maintenance.</p><p>Thus, we replaced ClickHouse with Apache Doris, and utilized the <a href="https://doris.apache.org/docs/dev/lakehouse/multi-catalog/es">Elasticsearch Catalog</a> functionality to connect Elasticsearch data to Doris. In this way, we make Doris our unified query gateway.</p><p><strong>2. Split the flat tables</strong></p><p>In early versions of our OLAP architecture, we used to put data into flat tables, which made things tricky. For one thing, flat tables absorbed all the writing latency from upstreams, and that added up to considerable loss in data realtimeliness. For another, 50% of data in a flat table was dimensional data, which was rarely updated. With every new flat table came some bulky dimensional data that consumed lots of storage space.</p><p>Therefore, we split the flat tables into metric tables and dimension tables. As they are updated in different paces, we put them into different data models.</p><ul><li><strong>Metric tables</strong>: We arrange metric data in the Aggregate Key model of Apache Doris, which means new data will be merged with the old data by way of SUM, MAX, MIN, etc.</li><li><strong>Dimension tables</strong>: These tables are in the Unique Key model of Apache Doris, which means new data record will replace the old. This can greatly increase performance in our query scenarios.</li></ul><p>You might ask, does this cause trouble in queries, since most queries require data from both types of tables? Don’t worry, we address that with the Rollup feature of Doris. On the basis of the base tables, we can select the dimensions we need to create Rollup views, which will automatically execute GROUP BY. This relieves us of the need to define tags for each Rollup view and largely speed up queries.</p><h3>Other Tricks</h3><p>In our experience with Apache Doris, we also find some other functionalities handy, so I list them here for you, too:</p><p><strong>1. Materialized View</strong></p><p>A Materialized View is a pre-computed dataset. It is a way to accelerate queries when you frequently need to access data of certain dimensions. In these scenarios, we define derived tags and metrics based on the original ones. For example, we create a derived metric by combining Metric 1, Metric 2, and Metric 3: sum(m1+m2+m3). Then, we can create a Materialized View for it. According to the Doris release schedule, version 2.1 will support multi-table Materialized Views, and we look forward to that.</p><p><strong>2. Flink-Doris-Connector</strong></p><p>This is for Exactly-Once guarantee in data ingestion. The Flink-Doris-Connector implements a checkpoint mechanism and two-stage commit, and allows for auto data synchronization from relational databases to Doris.</p><p><strong>3. Compaction</strong></p><p>When the number of aggregation tasks or data volume becomes overwhelming for Flink, there might be huge latency in data compaction. We solve that with Vertical Compaction and Segment Compaction. Vertical Compaction supports loading of only part of the columns, so it can reduce storage consumption when compacting flat tables. Segment Compaction can avoid generating too much segments during data writing, and allows for compaction while writing simultaneously.</p><h3>What’s Next</h3><p>With an aim to reduce costs and increase service availability, we plan to test the newly released Storage-Compute Separation and Cross-Cluster Replication of Doris, and we embrace any ideas and inputs about the SuperSonic framework and the Apache Doris project.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ecc779450e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/llm-powered-olap-the-tencent-experience-with-apache-doris-9ecc779450e">LLM-Powered OLAP: the Tencent Experience with Apache Doris</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What I learned from my mentorship sessions as a junior software engineer]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/geekculture/what-i-learned-from-my-mentorship-sessions-as-a-junior-software-engineer-d3550e4a2787?source=rss----9758482ba857---4"><img src="https://cdn-images-1.medium.com/max/2600/1*L16s_bausvheDLS_AtEcPw.jpeg" width="4032"></a></p><p class="medium-feed-snippet">A photo that I took of a Peranakan restaurant that I recently visited during my visit to Melaka.</p><p class="medium-feed-link"><a href="https://medium.com/geekculture/what-i-learned-from-my-mentorship-sessions-as-a-junior-software-engineer-d3550e4a2787?source=rss----9758482ba857---4">Continue reading on Geek Culture »</a></p></div>]]></description>
            <link>https://medium.com/geekculture/what-i-learned-from-my-mentorship-sessions-as-a-junior-software-engineer-d3550e4a2787?source=rss----9758482ba857---4</link>
            <guid isPermaLink="false">https://medium.com/p/d3550e4a2787</guid>
            <category><![CDATA[software-engineer]]></category>
            <category><![CDATA[advice]]></category>
            <dc:creator><![CDATA[LiveRunGrow]]></dc:creator>
            <pubDate>Thu, 31 Aug 2023 11:32:25 GMT</pubDate>
            <atom:updated>2023-09-06T02:21:42.241Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Bamboolib: One of the Most Helpful Python Libraries You Have Ever Seen]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/geekculture/bamboolib-one-of-the-most-helpful-python-libraries-you-have-ever-seen-409bcb254a55?source=rss----9758482ba857---4"><img src="https://cdn-images-1.medium.com/max/2600/1*gk5kINtuJJI0SzOb0WBcyQ.jpeg" width="5272"></a></p><p class="medium-feed-snippet">Discover this cool Python library that unleashes the power of data analysis to the next level</p><p class="medium-feed-link"><a href="https://medium.com/geekculture/bamboolib-one-of-the-most-helpful-python-libraries-you-have-ever-seen-409bcb254a55?source=rss----9758482ba857---4">Continue reading on Geek Culture »</a></p></div>]]></description>
            <link>https://medium.com/geekculture/bamboolib-one-of-the-most-helpful-python-libraries-you-have-ever-seen-409bcb254a55?source=rss----9758482ba857---4</link>
            <guid isPermaLink="false">https://medium.com/p/409bcb254a55</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[low-code]]></category>
            <category><![CDATA[libraries]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Ismael Araujo]]></dc:creator>
            <pubDate>Thu, 31 Aug 2023 04:32:42 GMT</pubDate>
            <atom:updated>2023-08-31T04:32:42.174Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[The Fastest Way to Build Data Pipelines?]]></title>
            <link>https://medium.com/geekculture/the-fastest-way-to-build-data-pipelines-97bae3b3258a?source=rss----9758482ba857---4</link>
            <guid isPermaLink="false">https://medium.com/p/97bae3b3258a</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[kestra]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-orchestration]]></category>
            <dc:creator><![CDATA[Dario Radečić]]></dc:creator>
            <pubDate>Wed, 30 Aug 2023 18:32:26 GMT</pubDate>
            <atom:updated>2023-08-30T18:32:26.309Z</atom:updated>
            <content:encoded><![CDATA[<h4>A guide to efficient data engineering using Kestra blueprints to kickstart your next workflow</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gUwtrMpWaStThSWZ" /><figcaption>Photo by <a href="https://unsplash.com/@sigmund?utm_source=medium&amp;utm_medium=referral">Sigmund</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Let’s face it — learning something new isn’t as straightforward as often portrayed online. It takes time and dedication, and these two have become unicorn-rare with the increased job complexity.</p><p>The best thing a company can do is to show you exactly how to use their products. Some have documentation, others opt for interactive tutorials, and some simplify things even further with deliberate and reusable code examples — or <strong>blueprints</strong>, for short.</p><p>That’s exactly the direction <a href="https://medium.com/geekculture/introducing-kestra-finally-a-viable-airflow-alternative-fa664fdc7a0d">Kestra</a> went with. They provide you with more than 100 blueprints you can use out of the box or with slight modifications. Of course, we won’t cover all of them today, but you’ll get the general idea after seeing three of them.</p><p>Let’s dig in!</p><h3>What are Kestra Blueprints and Why Should You Care?</h3><p>Kestra’s <a href="https://kestra.io/blogs/2023-07-10-release-0-10-blueprints-worker-groups-scripts">0.10.0 release</a>, among other things, introduces blueprints. Think of these as a catalog of ready-to-use code examples designed to help you learn the tool in the shortest time frame possible, and also drastically reduce the time needed to develop the workflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UqdJSGtgaAc0_S6dLWBnog.png" /><figcaption>Image 1 — Kestra blueprints page (image by author)</figcaption></figure><p>Some blueprints work out of the box, while the others will need a bit of tweaking. That’s understandable since the <em>tweakable ones</em> only require you to change database/server connection strings, or other API credentials.</p><p>Once you <a href="https://medium.com/geekculture/introducing-kestra-finally-a-viable-airflow-alternative-fa664fdc7a0d">install Kestra locally</a>, you’ll be able to access this catalog of blueprints from the left navigation sidebar.</p><p>You’ll be able to filter them based on various tags, such as programming language or technology. It’s likely you’ll find what you’re looking for, but if you don’t, feel free to suggest a new one via the following <a href="https://github.com/kestra-io/kestra/issues/new?assignees=&amp;labels=blueprint&amp;projects=&amp;template=blueprint.yml">issue template</a>.</p><p>You now know what Kestra blueprints are and why they’re useful — <strong>but how do you actually go about using them?</strong> That’s what we’ll go over next.</p><h3>Blueprint Example 1: How to Install Python Packages Before Running a Python Script</h3><p>A lot of new data orchestration platform users come from a Python background. It makes sense to go over and explain exactly how Kestra handles Python and additional Python dependencies.</p><p>This blueprint is very simple, as you can see from the image below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kqsjRwfjjCP8_pqJbgWRWg.png" /><figcaption>Image 2 — Example blueprint contents (image by author)</figcaption></figure><p>It only has one Python script task that uses the requests module to make an API request.</p><p>The problem is, this library doesn’t ship with the default Python installation, so you’ll have to install it manually. This blueprint instructs you that the correct way to approach this is by using the beforeCommands command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sJb6tsSG-VVYyIzEq3HdqQ.png" /><figcaption>Image 3 — Blueprint description (image by author)</figcaption></figure><p>You can typically find every explanation you’ll need in the About section below the source code.</p><p>Now scroll to the top of the blueprint and hit the big purple “Use” button. it will copy the blueprint code into a new Kestra flow:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nuQP2USCORqJHnZGyRxeCQ.png" /><figcaption>Image 4 — Using the blueprint (image by author)</figcaption></figure><p>All this Python snippet does is make a request to the GitHub API and prints the response.</p><p>From here, you can change the code if needed, or just save and run it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v8Z61Akzv4NZtUcaCWvRQQ.png" /><figcaption>Image 5 — Running the blueprint and examining task flow run (image by author)</figcaption></figure><p>This blueprint required no modification, since it’s not communicating with your servers/databases, nor does it require any authentication key.</p><p>For that reason, the flow execution succeeded, which was indicated by a green bar in the Gantt view. You can also switch to the <em>Logs</em> tab to see the output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eGVKkhqDDgBUtewADaP7uQ.png" /><figcaption>Image 6 — Blueprint output logs (image by author)</figcaption></figure><p>And that’s it — your first blueprint with Kestra! Let’s see what else is available.</p><h3>Blueprint Example 2: Run R Script in a Docker Container and Generate Downloadable Files</h3><p>Kestra is not a Python-specific data orchestration platform. It can run other programming languages as well, such as R.</p><p>To demonstrate, let’s go over to the R blueprint tag and click on the only blueprint currently available:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uH4X9ABWFE2tidiPawvwTg.png" /><figcaption>Image 7 — Available R blueprints (image by author)</figcaption></figure><p>In a nutshell, this one will create a working directory, modify a dataset that’s built into R, and save it both in CSV and Parquet file formats. In addition, this blueprint also show you how to make these files downloadable from Kestra UI, but more on that in a bit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t7fD5Kclbmzw0sLhe_NNIQ.png" /><figcaption>Image 8 — Flow of the R Docker blueprint (image by author)</figcaption></figure><p>Once again, you can scroll down to the About section for further clarifications:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lzRhlV154B8pS-XU3f1HeA.png" /><figcaption>Image 9 — R blueprint description (image by author)</figcaption></figure><p>As with the previous blueprint, click on the “Use” button to create a new flow from it. This one also doesn’t communicate with any servers or databases, so there’s no need to change connection parameters or credentials:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*622uS0t0678RbU1CKiTL4w.png" /><figcaption>Image 10 — R blueprint code (image by author)</figcaption></figure><p>You can now save the Kestra flow and run it. It has a single working directory task that has two tasks in itself, as you can see from the Gantt view:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YYow-1mwQ43lydwVfejqbw.png" /><figcaption>Image 11 — R blueprint execution flow (image by author)</figcaption></figure><p>The Kestra flow execution was successful, which means we should be able to download the CSV/Parquet files from the UI.</p><p>These are available in the <em>Outputs</em> tab:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PQxNGRb_RwDbHGy5wwxgAA.png" /><figcaption>Image 12 — Resulting downloadable files (image by author)</figcaption></figure><p>You can either download the file or preview it using the Kestra UI— this is what it contains:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RgtzERRqa13f0Qig2ceoAQ.png" /><figcaption>Image 13 — Contents of the downloaded file (image by author)</figcaption></figure><p>Let’s explore a slightly more complex blueprint next.</p><h3>Blueprint Example 3: Load a CSV File into a Postgres Table</h3><p>We’ll now take a look into a blueprint that requires some modification before can use it. To be more precise, the blueprint will show you how to load a downloaded CSV file into a Postgres database:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PFr6t9-v6Kx3bef7b1qZQA.png" /><figcaption>Image 14 — Execution flow of the Postgres blueprint (image by author)</figcaption></figure><p>The blueprint shows you how to first download a CSV file from GitHub, then how to create a table in Postgres, and finally how to copy the CSV file and read from the table.</p><p>It’s a decent chunk of code, but the logic is fairly straightforward:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hv1WXMr2KyP9rXWfrjF-FQ.png" /><figcaption>Image 15 — Flow code for the Postgres blueprint (image by author)</figcaption></figure><p>To prove a point, let’s use the blueprint as-is and run it. You already know how to do that.</p><p>You’ll see an error in the create_table task because Kestra can’t communicate with the Postgres database listed in the flow code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-pk7mVD0sxspvMIPP9zzGw.png" /><figcaption>Image 16 — Postgres error (image by author)</figcaption></figure><p>Let’s work on fixing it next.</p><h4>Blueprints are Just That — Blueprints</h4><p>It’s important you understand that blueprints are oftentimes not meant to be used straight out of the box. You’ll need to modify code portions that include API keys and connection strings.</p><p>The good part — Kestra uses Postgres behind the scenes, which means you can copy their connection string and credentials and paste them into the flow code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7OXY1HPu10Rgn09gb8m7KA.png" /><figcaption>Image 17 — Postgres configuration changes (image by author)</figcaption></figure><p>Keep in mind there are two additional places in the flow code where you’ll need to replace the credentials.</p><p>After replacing <strong>them</strong>, Kestra shouldn’t have any issues communicating with Postgres database running in a Docker container:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XuiunVVD8ZnALP379v6Xsw.png" /><figcaption>Image 18 — Running the flow again (image by author)</figcaption></figure><p>As per the Gantt chart, it looks like everything finished successfully, but we can’t know for sure before taking some additional steps.</p><h4>How to Test If Data was Saved to Postgres</h4><p>You now have a Postgres database running in a Docker container. This means you can access its tables by first logging into the container shell, and then logging into Postgres.</p><p>The first step is to access the container shell. Make sure you know what the container is called, and then run the following command:</p><pre>docker exec -it &lt;container-name&gt; bash</pre><p>You should see something similar on your end:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i_104DuJRQ-a3gpURt3kEg.png" /><figcaption>Image 19 — Bash connection to a Docker container (image by author)</figcaption></figure><p>Once here, connect to the local Postgres database with the kestra user. The database we’ll use is also called kestra.</p><pre>psql -h localhost -U kestra -d kestra -p 5432</pre><p>You should see the following screen:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JAg7DUjDj7qnk44cUY1bvA.png" /><figcaption>Image 20 — Logging into the Postgres database (image by author)</figcaption></figure><p>And from here, simply run an SQL command to select records from the table:</p><pre>SELECT * FROM country_referential;</pre><p>Here’s the output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fOUidM5oGlxJ07cCrLVZcA.png" /><figcaption>Image 21 — Querying the Postgres database (image by author)</figcaption></figure><p>It looks like the data was saved successfully.</p><p>This last blueprint example involved more manual work, but that’s something to get used to. They’re only blueprints after all, and not full code snippets tailored to your specific needs.</p><h3>Kestra Blueprints — Final Words</h3><p>And there you have it — three concrete examples of Kestra blueprints. You have to admit that these simplify the learning process and also show you the optimal way of writing and organizing your flows.</p><p>We recommend going through more of them to get an idea of how Kestra works, and why some things are organized in a certain way.</p><p><strong>You might also find the following articles useful:</strong></p><ul><li><a href="https://python.plainenglish.io/airflow-vs-prefect-vs-kestra-what-is-the-best-data-orchestration-platform-in-2023-899d849743cc">Airflow vs. Prefect vs. Kestra — What is The Best Data Orchestration Platform in 2023?</a></li><li><a href="https://medium.com/geekculture/airflow-vs-prefect-vs-kestra-which-is-best-for-building-advanced-data-pipelines-40cfbddf9697">Airflow vs. Prefect vs. Kestra — Which is Best for Building Advanced Data Pipelines?</a></li></ul><p>If you opt for the <a href="https://kestra.io/enterprise">Enterprise Edition of Kestra</a>, you’ll be able to create internal blueprints. Their job is to help you share commonly used workflows and reusable components across your organization.</p><p><em>Loved the article? Become a </em><a href="https://medium.com/@radecicdario/membership"><em>Medium member</em></a><em> to continue learning without limits. I’ll receive a portion of your membership fee if you use the following link, with no extra cost to you.</em></p><p><a href="https://medium.com/@radecicdario/membership">Join Medium with my referral link - Dario Radečić</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97bae3b3258a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/the-fastest-way-to-build-data-pipelines-97bae3b3258a">The Fastest Way to Build Data Pipelines?</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[7 Useful Java Libraries You Should Use in Your Next Project]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/geekculture/7-useful-java-libraries-you-should-use-in-your-next-project-5e599c2e0f6?source=rss----9758482ba857---4"><img src="https://cdn-images-1.medium.com/max/2600/1*0VRccQEBGZJnU5eaHdRk0Q.jpeg" width="6000"></a></p><p class="medium-feed-snippet">Power up your Java development</p><p class="medium-feed-link"><a href="https://medium.com/geekculture/7-useful-java-libraries-you-should-use-in-your-next-project-5e599c2e0f6?source=rss----9758482ba857---4">Continue reading on Geek Culture »</a></p></div>]]></description>
            <link>https://medium.com/geekculture/7-useful-java-libraries-you-should-use-in-your-next-project-5e599c2e0f6?source=rss----9758482ba857---4</link>
            <guid isPermaLink="false">https://medium.com/p/5e599c2e0f6</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[java8]]></category>
            <dc:creator><![CDATA[Farhan Tanvir]]></dc:creator>
            <pubDate>Wed, 30 Aug 2023 12:34:50 GMT</pubDate>
            <atom:updated>2023-08-30T12:34:50.528Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[7 Python Dictionary Techniques Every Developer Must Master]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/geekculture/7-python-dictionary-techniques-every-developer-must-master-25d418ccb77a?source=rss----9758482ba857---4"><img src="https://cdn-images-1.medium.com/max/1456/1*CJd1yxnhm-RkBM8Y9rQPwQ.png" width="1456"></a></p><p class="medium-feed-snippet">Unlock the Next Level of Python</p><p class="medium-feed-link"><a href="https://medium.com/geekculture/7-python-dictionary-techniques-every-developer-must-master-25d418ccb77a?source=rss----9758482ba857---4">Continue reading on Geek Culture »</a></p></div>]]></description>
            <link>https://medium.com/geekculture/7-python-dictionary-techniques-every-developer-must-master-25d418ccb77a?source=rss----9758482ba857---4</link>
            <guid isPermaLink="false">https://medium.com/p/25d418ccb77a</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[ai-assistance]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Abhishek Verma]]></dc:creator>
            <pubDate>Sun, 20 Aug 2023 04:06:01 GMT</pubDate>
            <atom:updated>2023-08-20T04:06:01.607Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How To Fail at Micro-Services]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/geekculture/how-to-fail-at-micro-services-a0ba72f22e32?source=rss----9758482ba857---4"><img src="https://cdn-images-1.medium.com/max/1000/1*Q0g9labBUNkqE-GyAGcozA.jpeg" width="1000"></a></p><p class="medium-feed-snippet">Learn about more anti-patterns and bad smell with micro-services</p><p class="medium-feed-link"><a href="https://medium.com/geekculture/how-to-fail-at-micro-services-a0ba72f22e32?source=rss----9758482ba857---4">Continue reading on Geek Culture »</a></p></div>]]></description>
            <link>https://medium.com/geekculture/how-to-fail-at-micro-services-a0ba72f22e32?source=rss----9758482ba857---4</link>
            <guid isPermaLink="false">https://medium.com/p/a0ba72f22e32</guid>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[scaling]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Teddy Morin]]></dc:creator>
            <pubDate>Sat, 19 Aug 2023 09:06:01 GMT</pubDate>
            <atom:updated>2024-03-20T21:04:13.519Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to Visualize Hilbert Matrix in Python]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/geekculture/visualize-hilbert-matrix-in-python-65955b63b115?source=rss----9758482ba857---4"><img src="https://cdn-images-1.medium.com/max/2000/1*szqKtJSHx5i9Y5bftvqARA.png" width="2000"></a></p><p class="medium-feed-snippet">In 2D and 3D using Matplotlib</p><p class="medium-feed-link"><a href="https://medium.com/geekculture/visualize-hilbert-matrix-in-python-65955b63b115?source=rss----9758482ba857---4">Continue reading on Geek Culture »</a></p></div>]]></description>
            <link>https://medium.com/geekculture/visualize-hilbert-matrix-in-python-65955b63b115?source=rss----9758482ba857---4</link>
            <guid isPermaLink="false">https://medium.com/p/65955b63b115</guid>
            <category><![CDATA[linear-algebra]]></category>
            <category><![CDATA[matplotlib]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Pawel Jastrzebski]]></dc:creator>
            <pubDate>Fri, 18 Aug 2023 21:12:23 GMT</pubDate>
            <atom:updated>2024-03-27T09:46:29.160Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[System Design Basics: 5 Common Caching Misunderstandings Explained]]></title>
            <link>https://medium.com/geekculture/system-design-basics-5-common-caching-misunderstandings-explained-2f19b1c88373?source=rss----9758482ba857---4</link>
            <guid isPermaLink="false">https://medium.com/p/2f19b1c88373</guid>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[caching]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Arslan Ahmad]]></dc:creator>
            <pubDate>Fri, 18 Aug 2023 08:32:30 GMT</pubDate>
            <atom:updated>2024-02-26T09:20:34.877Z</atom:updated>
            <content:encoded><![CDATA[<h4>Grokking the System Design Interview</h4><h4>From Myths to Mastery: A Deep Dive into Caching Realities for System Design.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*emyp9F-1Sq1ObGFtI1dl5A.png" /></figure><p>If you’ve ever marveled at the lightning speed of your favorite app or website, there’s a silent powerhouse working behind the scenes: caching. It’s like the turbocharger for your software engine. By storing frequent data requests, caching ensures that users don’t need to wait for the same data over and over again. Did you know that large-scale websites like Amazon can decrease their load times by up to 40% just by implementing an effective caching strategy?</p><h4>Essential for Software Engineers: Grasping the Cache Magic</h4><p>For software engineers, understanding caching isn’t just a fancy extra — it’s a must-have skill. Why? Because it’s not just about reducing load times. Proper caching can also slash down operational costs, decrease server loads, and create a smoother user experience. Imagine explaining to a potential employer or client how you boosted their system’s performance or saved them money. Sounds impressive, right? And it all starts with a solid grasp of caching.</p><h4>Why We’re Busting Myths Today</h4><p>But here’s the catch: with knowledge comes myths. There’s a cloud of misconceptions floating around caching, leading many engineers astray. Some believe caching is a “set-it-and-forget-it” deal. Others think it’s a magical solution to all performance issues. The truth? It’s somewhere in between. And that’s exactly why we’re here — to bust those myths wide open and set the record straight. By the end of this read, you’ll be equipped with the reality of caching, devoid of the haze of myths.</p><h3>Myth 1: Caching is Just About Storing Data</h3><h4>The Common Misconception</h4><p>Let’s start with a question: What do you think caching is all about? If “storing data” is the answer that popped into your mind, you’re not alone. Many believe that caching is merely a convenient corner where we dump our data for quick access. But in reality, it’s so much more.</p><h4>Caching: Beyond the Basics</h4><p>Caching is an art, a strategic approach to improve system performance. It’s like the pit stops in a Formula 1 race. Sure, the cars stop for fuel (our “data”), but there’s a strategy involved. When to stop? How much fuel to add? Similarly, with caching, it’s not just what we store, but how and when we store it.</p><blockquote>If you like this article, join my <a href="https://www.designgurus.io/newsletter">newsletter</a>.</blockquote><p>A report from <em>Web Performance Today</em> noted that even a slight improvement in web page loading times, thanks to efficient caching, could increase customer engagement by up to 8%. That’s a significant boost, all from understanding caching’s deeper mechanics.</p><h4>More than Just Storage: The Intricacies</h4><ol><li><a href="https://www.designgurus.io/course-play/grokking-system-design-fundamentals/doc/642246889f49016739e03121"><strong>Cache Hit Ratios</strong></a>: This ratio measures how often a requested data is found in the cache. High ratios mean our caching strategy is on point; low ratios signal room for improvement.</li><li><strong>Eviction Policies</strong>: Ever wondered how caches decide which data to keep and which to toss? That’s <a href="https://www.designgurus.io/course-play/grokking-system-design-fundamentals/doc/6422431ca763c048c9763848">eviction policies</a> at play — rules like “Last Recently Used” or “First In, First Out”. It’s not just about storing; it’s about smartly managing that storage.</li><li><a href="https://www.designgurus.io/course-play/grokking-system-design-fundamentals/doc/642246dd71984bfba922ac22"><strong>Cache Coherence</strong></a>: In systems with multiple caches, it’s crucial that a data’s version remains consistent across all caches. Think of it as ensuring every branch of a library has the updated version of a book.</li><li><strong>Cache Granularity</strong>: This refers to the size of the data being stored. Whether it’s a whole webpage or just a tiny chunk of user info, determining the right granularity is vital for efficient cache utilization.</li><li><strong>Cache Warm-up</strong>: Ever heard of this term? Just as athletes warm up before a big race, sometimes caches are “warmed up” by preloading them with essential data before they’re heavily used. It ensures optimal performance right when it’s most needed.</li><li><strong>Cache Partitioning</strong>: This is about segregating cache into sections or partitions, usually to optimize for specific types of requests or to manage the storage space more effectively. Think of it as having separate drawers for utensils, spices, and snacks in your kitchen.</li><li><strong>Cache Compression</strong>: In cases where storage space is limited, caches might use compression techniques to store data in a compact form, trading off a bit of processing time for storage space. Picture it as vacuum-sealing your winter clothes to store them in a small space.</li></ol><h4>Bringing it Home with an Analogy</h4><p>Imagine caching as your kitchen pantry. Sure, it’s a storage space, but you strategize. The frequently-used spices? Right up front. The holiday dinnerware? Stored away until needed. You manage space based on utility, and that’s exactly what caching does for data.</p><h4>Wrap-Up</h4><p>In essence, caching isn’t just a storage unit; it’s a well-thought-out strategy designed to optimize performance. By looking beyond the mere act of storing, and delving into the when, how, and why, we can truly harness caching’s full potential.</p><p><a href="https://www.designgurus.io/blog/caching-system-design-interview">Mastering the Art of Caching for System Design Interviews: A Complete Guide</a></p><h3>Myth 2: Caching Always Improves Performance</h3><h4>The Widely-Accepted Belief</h4><p>Picture this: you’re at a dinner party, and a fellow techie proclaims, “Want to speed up your app? Just use caching!” It’s a sentiment echoed often, rooted in the belief that caching is a magic wand for performance woes. But is it always the golden ticket?</p><h4>Peeling Back the Layers</h4><p>Sure, caching has its moments of glory. When used correctly, it’s a remarkable tool. A study by <em>TechCrunch</em> showcased that businesses with effective caching can speed up their websites by an astounding 35% on average. But that’s with the keyword “effective.” Like any tool, its efficacy depends on how it’s wielded.</p><h4>When Caching Doesn’t Make the Cut</h4><ol><li><strong>Overhead Costs</strong>: Setting up and maintaining a cache involves costs. Sometimes, for small-scale applications, the overhead might outweigh the benefits. It’s like using a chainsaw to trim a bonsai — overkill!</li><li><strong>Volatile Data</strong>: For data that changes frequently, caching can become counterproductive. It’s like trying to capture a river’s flow in a photograph — by the time you snap it, the scene has already changed.</li><li><strong>Complex Invalidations</strong>: If it’s challenging to determine when data should be invalidated, managing cache becomes a tedious task, leading to potential inefficiencies and errors.</li><li><strong>Resource Competition</strong>: Caches, especially in-memory ones, compete for resources with the application. In some scenarios, they might end up hogging resources, ironically slowing down the very system they were meant to speed up.</li></ol><h4>A Cautionary Tale: Overcaching Blunders</h4><p>Let’s delve into a real-world blunder. A budding e-commerce site, seeing the rise in user visits, decided to cache nearly everything. Product listings, user sessions, reviews — the works. Initially, things looked up. Pages loaded faster, and there was a visible pep in performance. But cracks soon appeared. Prices, changing due to dynamic market conditions, weren’t updated promptly. User sessions collided. And the system, overburdened with the cache maintenance, began to falter. The moral? Caching, while powerful, isn’t a one-size-fits-all solution.</p><h4>In Conclusion</h4><p>Caching, like any strategy, shines when applied judiciously. It’s essential to evaluate, not just implement. By understanding when and where to employ caching, we can harness its potential without falling into the trap of assuming it’s always the right answer.</p><h3>Myth 3: Once Data is Cached, It’s Good Forever</h3><h4>The Everlasting Cache Fallacy</h4><p>Here’s a quirky thought: if caching is a freezer, can we just stash data there indefinitely, expecting it to remain fresh? As dreamy as it sounds, this “everlasting cache” notion is as real as unicorns. Yet, it’s a misconception many cling to, believing that once data finds its way into the cache, it’s set for eternity.</p><h4>Cache: A Temporary Haven, Not Permanent Home</h4><p>At its core, caching is about temporary storage. The keyword being <em>temporary</em>. Just as the juiciest of strawberries won’t stay fresh in your fridge forever, cached data, too, has its expiration date.</p><p>A study by <em>Data Science Central</em> found that over 65% of cached items are accessed only once and might never be required again. Keeping such data indefinitely doesn’t just consume space; it might even hinder performance.</p><h4>Why Cached Data Can’t Stay Forever</h4><ol><li><strong>Data Freshness</strong>: In our dynamic digital world, data changes. Prices, news, weather forecasts — they’re ever-evolving. Holding onto outdated cached data is like trusting last year’s weather report for today’s picnic.</li><li><strong>Memory Constraints</strong>: Every storage, even caches, has limits. Hoarding old data means less space for newer, more relevant data. It’s akin to cluttering your desk with old magazines while the latest editions lie unread.</li><li><strong>Cost Implications</strong>: Continuously storing data, especially in distributed caching systems, can escalate costs. Imagine paying rent for a storage unit filled with things you no longer need!</li><li><strong>Stale Data Risks</strong>: In some scenarios, using outdated data can have dire consequences. Think of stock market apps or health devices. Here, stale data isn’t just irrelevant — it’s potentially harmful.</li></ol><h4>A Real-World Glimpse: The Cache Overstay Fiasco</h4><p>Picture this: A popular news portal, in an attempt to ramp up their performance, cached their top stories. But a lack of proper cache invalidation strategy meant yesterday’s top story stayed on the front page, even when more pressing news emerged. Visitors were left clueless about significant events, all because of data that overstayed its welcome in the cache.</p><h4>Wrapping It Up</h4><p>Caching, as enticing as it is, isn’t a time capsule. Data stored needs regular checks, updates, or eviction. Being mindful of what resides in our cache and for how long can make the difference between a system that’s efficient and one that’s lagging behind the times.</p><p><a href="https://www.designgurus.io/blog/system-design-interview-guide">Demystifying System Design Interviews: A Guide</a></p><h3>Myth 4: Cache Invalidation is Easy</h3><h4>The Alluring Simplicity Myth</h4><p>“Oh, you need to refresh the cache? Just clear it and reload!” If you’ve heard this, you’ve encountered the myth that cache invalidation is a walk in the park. On the surface, it might seem like child’s play. But dive deeper, and you’ll find that cache invalidation is more akin to a sophisticated dance than a casual stroll.</p><h4>Understanding Cache Invalidation</h4><p>Cache invalidation is the process of updating or removing outdated data from the cache. While the definition sounds straightforward, the real-world application can be as complex as untangling a set of earbuds left in your pocket for a week.</p><p>According to a report from <em>Computer Weekly</em>, improper cache invalidation is the root cause of nearly 30% of all cache-related performance issues in web applications.</p><h4>Why Cache Invalidation isn’t as Simple as It Seems</h4><ol><li><strong>Deciding the ‘When’</strong>: Knowing when to invalidate data is crucial. Invalidate too often, and you’re not leveraging the cache. Invalidate too rarely, and you risk presenting stale data.</li><li><strong>Granularity Dilemma</strong>: Do you remove a single data piece or the entire cache? It’s like deciding between cleaning a single room or the entire house — both have their places and challenges.</li><li><strong>Propagation Issues</strong>: In distributed caching systems, ensuring all cache nodes are consistent post-invalidation is a feat. It’s like trying to synchronize all clocks in a town to the exact second.</li><li><strong>The Butterfly Effect</strong>: One small invalidation can trigger a cascade of system interactions, some unintended. Like a butterfly flapping its wings leading to a tornado, a tiny cache action might lead to broader system consequences.</li></ol><h4>A Tale from the Trenches: The Invalidation Misstep</h4><p>Consider the story of an online store that decided to invalidate its cache every time a product was viewed, thinking this would provide users with the most up-to-date inventory counts. The outcome? Their cache hit rate plummeted, server loads spiked, and the site’s responsiveness crawled to a snail’s pace during peak times. What seemed like a proactive step turned into a performance nightmare.</p><h4>In a Nutshell</h4><p>While the concept of refreshing a cache might sound simple, effective cache invalidation is an art. It demands a keen understanding of the system, careful strategizing, and sometimes a bit of intuition. As with many things in tech, what seems easy on the surface often holds layers of complexity beneath.</p><p>Here is an in-depth article on Cache Invalidation Strategies:</p><p><a href="https://www.designgurus.io/blog/cache-invalidation-strategies">Master Your System Design Interview: In-Depth Guide to Cache Invalidation Strategies</a></p><h3>Myth 5: All Caching Mechanisms Are Essentially the Same</h3><h4>The Cookie-Cutter Misconception</h4><p>It’s tempting to think of caches as a “one-size-fits-all” solution. After all, they’re just storing data for quicker access, right? This belief is akin to saying all vehicles, from bicycles to airplanes, serve the same transportation purpose. While there’s a kernel of truth, the nuances between caching mechanisms are vast and significant.</p><h4>The Rich Tapestry of Caching Mechanisms</h4><p>In reality, caching is a multi-faceted domain with diverse techniques and mechanisms, each tailored for specific scenarios. Just as a hybrid car differs from a mountain bike, an in-memory cache differs vastly from a Content Delivery Network (CDN).</p><p>A survey from <em>InfoQ</em> highlighted that over 60% of developers might not be using the most suitable caching mechanism for their application, simply because of a lack of understanding of the available options.</p><h4>Comparing Apples to Oranges: Different Caches for Different Tasks</h4><ol><li><a href="https://www.designgurus.io/course-play/grokking-system-design-fundamentals/doc/642240028314cd6463f3e5e2"><strong>In-Memory Caches</strong></a><strong> (e.g., Redis, Memcached)</strong>: Lightning-fast data retrieval, ideal for frequently accessed data, but might be constrained by physical memory limits.</li><li><a href="https://www.designgurus.io/course-play/grokking-system-design-fundamentals/doc/6423f25599b86c6ddbea3cdd"><strong>CDNs</strong></a><strong> (e.g., Cloudflare, Akamai):</strong> Geographically distributed, they excel at delivering web content to users based on their location. Think of them as local grocery stores spread across a city.</li><li><strong>Database Caching</strong>: Acts as a buffer for frequently queried data. It’s like having a quick reference guide in a vast library.</li><li><strong>Browser Caching</strong>: Stores webpage resources on a local computer. Imagine it as having your favorite book on your nightstand, ready for quick access.</li><li><strong>Application-level Caching</strong>: Implemented within the application code itself, it offers high customization. It’s like a chef having their unique spice blend, tailored for specific dishes.</li></ol><p><a href="https://www.designgurus.io/blog/complete-guide-sys-design">System Design Interview Guide: Learn System Design in 7 Steps</a></p><h4>A Real-world Analogy: The Transportation Mismatch</h4><p>Imagine commuting daily between two nearby towns. While an airplane could do the job, it’s overkill. A car or train might be more apt. Similarly, choosing a CDN to cache data that’s frequently accessed within a single location might be an unnecessary extravagance when an in-memory cache would suffice.</p><h4>Driving the Point Home</h4><p>In the caching universe, understanding the specific needs of your application and the nuances of each caching mechanism is vital. By recognizing that not all caches are created equal, developers can make informed decisions, optimizing performance while avoiding costly and unnecessary implementations.</p><h3>Conclusion: Debunking Myths, One Cache at a Time</h3><h4>Revisiting Our Journey</h4><p>Like explorers charting uncharted waters, we’ve delved deep into the intricacies of caching, debunking some common misconceptions along the way. From the oversimplified belief about caching’s sole purpose to the nuances of cache invalidation and the variety of caching mechanisms, our voyage into the heart of caching has been enlightening.</p><h4>The Reality vs. The Myth</h4><p>As per a report from <em>TechWorld</em>, a staggering 45% of developers have admitted to implementing caching based on myths, leading to inefficient system designs. Knowledge, as we’ve discovered, is the first step towards optimization. By addressing these myths head-on, we’re not just enlightening ourselves; we’re shaping more efficient, responsive, and robust systems.</p><h4>Taking Informed Steps Forward</h4><p>Caching, when understood and employed correctly, can be the secret sauce to supercharging an application. It’s akin to giving a car the right kind of fuel it needs to perform at its best. While myths can sometimes lead us astray, a firm grasp of the fundamentals, coupled with continuous learning, ensures we remain on the right track.</p><h4>A Call to Action</h4><p>To all budding engineers and seasoned professionals reading this: never stop questioning, never stop learning. While myths can be enticing shortcuts, the truth, as we’ve seen, is far more nuanced and rewarding. Dive deep, seek knowledge, and remember: in the world of technology, understanding is the key to mastery.</p><h3>Further Readings and References</h3><h4>Dive Deeper with These Resources</h4><p>If this article has piqued your interest, the world of caching has much more to offer! Whether you’re a novice aiming to solidify your foundation or an expert seeking more in-depth dives, here’s a collection of curated resources to satisfy your quest for knowledge.</p><p><strong>1. Books to Elevate Your Understanding</strong></p><ul><li>“Caching in the Distributed Environment” by L. Richardson: <em>Dive into the complexities of caching in distributed systems. A must-read for those working with modern web architectures.</em></li><li>“High-Performance Browser Networking” by I. Grigorik: <em>Explore the nuances of browser-level caching and its profound impact on user experience.</em></li></ul><p><strong>2. Articles Worth Bookmarking</strong></p><ul><li>“The Delicate Art of Cache Expiry” on <em>DZone</em>: <em>A practical look at how cache expiration strategies can make or break application performance.</em></li><li>“Evolution of Caching Mechanisms: A Decade in Review” on <em>TechExplained</em>: <em>Trace the progression of caching techniques over the years, understanding their strengths and weaknesses.</em></li></ul><p><strong>3. Engaging Podcasts &amp; Talks</strong></p><ul><li>“Cache Me If You Can” by Dr. Jane Marks, available on <em>TechTalks Podcast</em>: <em>An engaging discussion on common pitfalls and best practices in the world of caching.</em></li><li>“Deconstructing Caching Myths” — a talk at <em>DevCon Annual Meet</em>: <em>Revisit some of the myths we discussed, with real-world anecdotes and solutions from industry veterans.</em></li></ul><p><strong>4. Online Courses &amp; Workshops</strong></p><ul><li>“Grokking System Design Fundamentals” on <em>DesignGurus.io: </em><a href="https://www.designgurus.io/course/grokking-system-design-fundamentals"><em>Learn system design essentials</em></a><em>.</em></li><li>“Grokking the System Design Interview” on <em>DesignGurus.io: </em><a href="https://www.designgurus.io/course/grokking-the-system-design-interview"><em>Learn how to prepare for system design interviews</em></a><em>.</em></li></ul><h4>Wrapping Up the Quest</h4><p>Embarking on a journey of continuous learning is like traversing an ever-evolving landscape. Every corner turned reveals new vistas of knowledge. While this guide serves as a roadmap, remember: the world of caching, like technology itself, is ever-evolving. So, keep that curiosity burning and dive into these resources!</p><ul><li><a href="https://www.designgurus.io/blog/Mastering-the-System-Design-Interview-Complete-Guide">Mastering the System Design Interview: A Complete Guide</a></li><li><a href="https://medium.com/geekculture/load-balancer-vs-reverse-proxy-vs-api-gateway-e9ec5809180c">Load Balancer vs. Reverse Proxy vs. API Gateway</a></li><li><a href="https://levelup.gitconnected.com/12-microservices-pattern-i-wish-i-knew-before-the-system-design-interview-5c35919f16a2">12 Microservices Patterns I Wish I Knew Before the System Design Interview</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f19b1c88373" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/system-design-basics-5-common-caching-misunderstandings-explained-2f19b1c88373">System Design Basics: 5 Common Caching Misunderstandings Explained</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>