<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shweta</title>
    <description>The latest articles on DEV Community by Shweta (@shweta_aee818203e9dffed84).</description>
    <link>https://dev.to/shweta_aee818203e9dffed84</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3619472%2F3ded3cde-e11a-46da-ac5d-9e518f5538b3.jpg</url>
      <title>DEV Community: Shweta</title>
      <link>https://dev.to/shweta_aee818203e9dffed84</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shweta_aee818203e9dffed84"/>
    <language>en</language>
    <item>
      <title>☕ Threads in the Java Café — The Story of Concurrency</title>
      <dc:creator>Shweta</dc:creator>
      <pubDate>Sun, 23 Nov 2025 11:05:35 +0000</pubDate>
      <link>https://dev.to/shweta_aee818203e9dffed84/threads-in-the-java-cafe-the-story-of-concurrency-5707</link>
      <guid>https://dev.to/shweta_aee818203e9dffed84/threads-in-the-java-cafe-the-story-of-concurrency-5707</guid>
      <description>&lt;p&gt;Imagine a café called Java Café, where every customer order is a task.&lt;br&gt;
You’re the café manager — and your baristas are threads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧍‍♂️ Single Barista Mode&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At first, there’s just one barista.&lt;br&gt;
He takes one order, finishes it, then starts the next.&lt;/p&gt;

&lt;p&gt;Efficient? Sure — until rush hour hits.&lt;br&gt;
Customers wait, frustrated.&lt;br&gt;
That’s your single-threaded application — simple, but not scalable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;👯‍♀️ Multi-Barista Mode&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now you hire more baristas — each handles one order.&lt;br&gt;
That’s multithreading.&lt;/p&gt;

&lt;p&gt;The café runs faster, but soon chaos begins:&lt;br&gt;
two baristas reach for the same milk frother at once —&lt;br&gt;
a race condition! 🏃‍♀️&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🚧 Synchronization Zone&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To fix this, you make a rule:&lt;/p&gt;

&lt;p&gt;“Only one barista can use the frother at a time.”&lt;/p&gt;

&lt;p&gt;That’s synchronization.&lt;br&gt;
It prevents clashes, but if a barista forgets to release the frother,&lt;br&gt;
everyone waits — a deadlock ☠️&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧾 Callable vs Runnable&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Some baristas just finish tasks and move on (Runnable).&lt;br&gt;
Others return the finished drink to you (Callable) —&lt;br&gt;
the result of their work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧑‍💼 Executor Service&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Eventually, you hire a manager —&lt;br&gt;
someone who assigns tasks to available baristas&lt;br&gt;
and manages the queue efficiently.&lt;br&gt;
That’s the ExecutorService in Java.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💬 The Moral&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Threads aren’t chaos — they’re choreography.&lt;br&gt;
When managed well, your café serves everyone quickly, safely, and happily.&lt;br&gt;
When mismanaged… your café (and app) becomes a mess.&lt;/p&gt;

&lt;p&gt;☕ Concurrency done right = &lt;strong&gt;Productivity + Performance.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;✍️ By Shweta&lt;/p&gt;

&lt;p&gt;Technical Lead | Mindful Tech Educator 🌱&lt;br&gt;
Explaining complex tech through simple stories.&lt;/p&gt;

</description>
      <category>java</category>
      <category>multithreading</category>
      <category>programming</category>
      <category>developers</category>
    </item>
    <item>
      <title>🧹 The Garbage Collector of Java City — A Story About Memory and Mess</title>
      <dc:creator>Shweta</dc:creator>
      <pubDate>Sat, 22 Nov 2025 05:01:52 +0000</pubDate>
      <link>https://dev.to/shweta_aee818203e9dffed84/the-garbage-collector-of-java-city-a-story-about-memory-and-mess-414d</link>
      <guid>https://dev.to/shweta_aee818203e9dffed84/the-garbage-collector-of-java-city-a-story-about-memory-and-mess-414d</guid>
      <description>&lt;p&gt;Welcome to Java City — a place where objects live, work, and sometimes… get forgotten.&lt;/p&gt;

&lt;p&gt;Every time you write:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;new Employee("Shweta");&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You’re actually building a house in Java City and moving someone in — in this case, Employee Shweta.&lt;/p&gt;

&lt;p&gt;Thousands of such objects are created every day — Employees, Invoices, Strings, Lists…&lt;br&gt;
And like every growing city, memory space is limited.&lt;/p&gt;

&lt;p&gt;At first, everything is fine. Each object has a place to live.&lt;br&gt;
But as developers build more features — more houses, more records, more data —&lt;br&gt;
some objects get abandoned.&lt;/p&gt;

&lt;p&gt;No one remembers them anymore.&lt;br&gt;
No variable points to them.&lt;br&gt;
They just… exist, taking up space, doing nothing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧍‍♂️ The Forgotten Citizens&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An old UserSession that’s no longer active.&lt;br&gt;
A temporary StringBuilder you used once.&lt;br&gt;
A List from a method that already returned.&lt;/p&gt;

&lt;p&gt;All these are forgotten citizens of Java City — still occupying homes, but no one knows they’re there.&lt;/p&gt;

&lt;p&gt;Left unchecked, the city would soon run out of land —&lt;br&gt;
and your program would crash with an OutOfMemoryError.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧹 The Arrival of the Garbage Collector&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That’s when the Garbage Collector (GC) arrives —&lt;br&gt;
the silent janitor of Java City.&lt;/p&gt;

&lt;p&gt;He walks through every street, checking:&lt;/p&gt;

&lt;p&gt;“Is anyone still referencing this house?”&lt;br&gt;
“Is there a variable or an object pointing here?”&lt;/p&gt;

&lt;p&gt;If no one answers — the GC marks that house for demolition.&lt;br&gt;
Later, it sweeps those homes away, freeing up land.&lt;/p&gt;

&lt;p&gt;No ceremony. No drama. Just quiet cleanup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;⚙️ The GC’s Secret Art — Mark and Sweep&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It’s not random destruction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mark phase:&lt;/strong&gt;&lt;br&gt;
The GC starts from roots (like active threads, static variables, and stack references).&lt;br&gt;
Anything reachable from these roots gets marked as alive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sweep phase:&lt;/strong&gt;&lt;br&gt;
Every unmarked house is cleared — memory reclaimed.&lt;/p&gt;

&lt;p&gt;This process keeps the city alive and thriving — without developers manually deleting anything.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💡 The Modern Twist — Different Neighborhoods&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Java City has multiple zones:&lt;/p&gt;

&lt;p&gt;Young Generation → Where new objects are born.&lt;/p&gt;

&lt;p&gt;Old Generation → Where long-living ones settle.&lt;/p&gt;

&lt;p&gt;Metaspace → Where class definitions live.&lt;/p&gt;

&lt;p&gt;The GC behaves differently in each area:&lt;br&gt;
Cleaning the young area often (minor collections) and the old one less frequently (major collections).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;⚠️ When the GC Gets Overworked&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Even the best janitor has limits.&lt;/p&gt;

&lt;p&gt;If you keep creating new objects faster than GC can clean up —&lt;br&gt;
he gets overwhelmed.&lt;/p&gt;

&lt;p&gt;You’ll see pauses, lag, even stop-the-world events —&lt;br&gt;
when the GC halts everything to catch up.&lt;/p&gt;

&lt;p&gt;That’s when tuning memory, reducing object creation, and reusing resources become crucial.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💬 The Moral&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Garbage Collector isn’t magic — it’s your ally.&lt;/p&gt;

&lt;p&gt;It saves you from the chaos of manual memory management.&lt;br&gt;
But if you overwork memory, even the best janitor can’t save your city.&lt;/p&gt;

&lt;p&gt;So the next time your app slows down,&lt;br&gt;
remember — somewhere inside Java City,&lt;br&gt;
a tired GC is whispering…&lt;/p&gt;

&lt;p&gt;“I’m cleaning as fast as I can.” 🧹&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;👩‍💻 About the Author&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Shweta is a &lt;strong&gt;Technical Lead&lt;/strong&gt; who explains backend and cloud concepts through simple, story-driven examples and real-world developer insights.&lt;/p&gt;

</description>
      <category>java</category>
      <category>diversity</category>
      <category>backend</category>
      <category>developers</category>
    </item>
    <item>
      <title>🏰 CloudFormation Explained as a Story — The Blueprint of CloudVille</title>
      <dc:creator>Shweta</dc:creator>
      <pubDate>Wed, 19 Nov 2025 18:25:10 +0000</pubDate>
      <link>https://dev.to/shweta_aee818203e9dffed84/cloudformation-explained-as-a-story-the-blueprint-of-cloudville-29m8</link>
      <guid>https://dev.to/shweta_aee818203e9dffed84/cloudformation-explained-as-a-story-the-blueprint-of-cloudville-29m8</guid>
      <description>&lt;p&gt;Imagine you’re the Chief Architect of a futuristic city called CloudVille.&lt;/p&gt;

&lt;p&gt;Every time a new district needs to be built—homes, roads, power lines, streetlights, water systems—your team builds everything manually.&lt;/p&gt;

&lt;p&gt;It works… but not really.&lt;/p&gt;

&lt;p&gt;One engineer wires things differently.&lt;/p&gt;

&lt;p&gt;Someone forgets a streetlight.&lt;/p&gt;

&lt;p&gt;Two districts were supposed to be identical… they’re not.&lt;/p&gt;

&lt;p&gt;And if a district collapses? Rebuilding takes forever.&lt;/p&gt;

&lt;p&gt;Your city is growing fast, and chaos is becoming expensive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🏗️ Enter CloudFormation — The Magical Blueprint&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One day, the Council of CloudVille gives you a special book.&lt;/p&gt;

&lt;p&gt;Each page describes an entire district:&lt;/p&gt;

&lt;p&gt;What buildings exist&lt;/p&gt;

&lt;p&gt;How big they are&lt;/p&gt;

&lt;p&gt;How roads connect&lt;/p&gt;

&lt;p&gt;What power grid they use&lt;/p&gt;

&lt;p&gt;You write the plan once, give it to the magical builders, and…&lt;/p&gt;

&lt;p&gt;➡️ The entire district appears exactly as described.&lt;br&gt;
Every time. Anywhere.&lt;/p&gt;

&lt;p&gt;This book is &lt;strong&gt;AWS CloudFormation.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🏙️ What You Can Build With the Blueprint&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;CloudFormation can describe every piece of your cloud “city”:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VPC&lt;/strong&gt; → Roads &amp;amp; boundaries&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Subnets&lt;/strong&gt; → Neighborhoods&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EC2 instances&lt;/strong&gt;→ Houses&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Load Balancers&lt;/strong&gt; → Traffic roundabouts&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IAM Roles&lt;/strong&gt; → Access rules&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;S3 Buckets&lt;/strong&gt; → Storage warehouses&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RDS&lt;/strong&gt; → Records office&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security Groups&lt;/strong&gt; → Gatekeepers&lt;/p&gt;

&lt;p&gt;Infrastructure stops being guesswork — it becomes a declaration.&lt;/p&gt;

&lt;p&gt;🔁 &lt;strong&gt;Reproducibility: Clone Your City in Seconds&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Finance wants:&lt;/p&gt;

&lt;p&gt;Test&lt;/p&gt;

&lt;p&gt;Staging&lt;/p&gt;

&lt;p&gt;Disaster Recovery&lt;/p&gt;

&lt;p&gt;Manually, this takes days.&lt;/p&gt;

&lt;p&gt;With CloudFormation?&lt;/p&gt;

&lt;p&gt;✨ Run the same blueprint → get identical districts.&lt;br&gt;
No mistakes. No missing lights. No weird differences.&lt;/p&gt;

&lt;p&gt;🧩 &lt;strong&gt;Updates Become Safe Renovations&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Need to:&lt;/p&gt;

&lt;p&gt;Add a DB replica?&lt;/p&gt;

&lt;p&gt;Increase server capacity?&lt;/p&gt;

&lt;p&gt;Add a new subnet?&lt;/p&gt;

&lt;p&gt;Change security rules?&lt;/p&gt;

&lt;p&gt;Doing this manually = high chance of a mess.&lt;/p&gt;

&lt;p&gt;CloudFormation?&lt;/p&gt;

&lt;p&gt;You update the blueprint&lt;/p&gt;

&lt;p&gt;CloudFormation figures out the difference&lt;/p&gt;

&lt;p&gt;It performs a controlled renovation&lt;/p&gt;

&lt;p&gt;Rollback happens automatically if anything fails&lt;/p&gt;

&lt;p&gt;Nothing breaks accidentally.&lt;/p&gt;

&lt;p&gt;🛑 &lt;strong&gt;Rollback: Your Safety Net&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Adding a new power station fails?&lt;/p&gt;

&lt;p&gt;In real life → disaster.&lt;/p&gt;

&lt;p&gt;With CloudFormation:&lt;/p&gt;

&lt;p&gt;“Upgrade failed. Restoring previous city.”&lt;/p&gt;

&lt;p&gt;✨ Automatic rollback.&lt;/p&gt;

&lt;p&gt;🔒 &lt;strong&gt;Drift Detection: Catches Sneaky Manual Changes&lt;/strong&gt;&lt;br&gt;
Someone manually:&lt;/p&gt;

&lt;p&gt;Opens a port&lt;/p&gt;

&lt;p&gt;Changes an instance size&lt;/p&gt;

&lt;p&gt;Edits a security rule&lt;/p&gt;

&lt;p&gt;CloudFormation checks and tells you:&lt;/p&gt;

&lt;p&gt;🔍 “Your city no longer matches the blueprint.”&lt;/p&gt;

&lt;p&gt;You choose whether to fix the city or update the blueprint.&lt;/p&gt;

&lt;p&gt;🔥 &lt;strong&gt;Disaster Recovery: Rebuild an Entire City in Minutes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If a whole region of CloudVille is destroyed:&lt;/p&gt;

&lt;p&gt;Open the blueprint in another region and say:&lt;/p&gt;

&lt;p&gt;“Rebuild this.”&lt;/p&gt;

&lt;p&gt;Minutes later — the entire district is back.&lt;/p&gt;

&lt;p&gt;That’s true infrastructure-as-code.&lt;/p&gt;

&lt;p&gt;📚 &lt;strong&gt;Final Takeaway&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;CloudFormation gives you:&lt;/p&gt;

&lt;p&gt;✔️ A blueprint for your infrastructure&lt;br&gt;
✔️ Reliable, repeatable environments&lt;br&gt;
✔️ Automated provisioning&lt;br&gt;
✔️ Safe updates with rollback&lt;br&gt;
✔️ Drift detection&lt;br&gt;
✔️ Fast disaster recovery&lt;/p&gt;

&lt;p&gt;It’s not just &lt;strong&gt;YAML&lt;/strong&gt;.&lt;br&gt;
It’s city-building for the cloud.&lt;/p&gt;

&lt;p&gt;👩‍💻** About the Author**&lt;/p&gt;

&lt;p&gt;Shweta is a Technical Lead who simplifies cloud and backend concepts using stories, analogies, and real-world architecture insights.&lt;/p&gt;

</description>
      <category>java</category>
      <category>cloud</category>
      <category>architecture</category>
      <category>aws</category>
    </item>
  </channel>
</rss>
