<?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 Shantanu Mahakale on Medium]]></title>
        <description><![CDATA[Stories by Shantanu Mahakale on Medium]]></description>
        <link>https://medium.com/@shantanum91?source=rss-7e8366f09288------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*j-FbB4NAIo2lOlRJ2C1Qhw.png</url>
            <title>Stories by Shantanu Mahakale on Medium</title>
            <link>https://medium.com/@shantanum91?source=rss-7e8366f09288------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 11:06:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shantanum91/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[Quick Recap: JPA (Java Persistence API)]]></title>
            <link>https://medium.com/@shantanum91/quick-recap-jpa-java-persistence-api-ac755e970462?source=rss-7e8366f09288------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac755e970462</guid>
            <dc:creator><![CDATA[Shantanu Mahakale]]></dc:creator>
            <pubDate>Sun, 27 Sep 2026 13:47:37 GMT</pubDate>
            <atom:updated>2026-09-27T13:47:37.976Z</atom:updated>
            <content:encoded><![CDATA[<p>JPA is a standard in Java for <strong>object-relational mapping (ORM)</strong> — it allows developers to map Java objects to database tables and perform CRUD operations without writing SQL manually.</p><p>It is mainly used with <strong>relational databases (e.g., Oracle, PostgreSQL, MySQL)</strong> and can also be used with <strong>MongoDB</strong> using Spring Data.</p><h3>Core Concepts in JPA</h3><ul><li><strong>Entity</strong> → Represents a table row</li><li><strong>Entity Manager</strong> → Handles DB operations</li><li><strong>Persistence Context</strong> → Cache/session for entities</li><li><strong>Repository</strong> → Interface for CRUD queries</li><li><strong>Transaction</strong> → Ensures atomic operations</li></ul><h3>Mapping Entities (Oracle Example)</h3><pre>@Entity<br>@Table(name = &quot;users&quot;)<br>public class User {<br>@Id<br>@GeneratedValue(strategy = GenerationType.IDENTITY)<br>private Long id;<br>@Column(nullable = false)<br>private String name;</pre><h3>JPA Annotations Cheat Sheet</h3><ul><li><strong>@Entity</strong> → Marks a class as a database entity</li><li><strong>@Table</strong> → Maps the entity to a database table</li><li><strong>@Id</strong> → Defines the primary key</li><li><strong>@GeneratedValue</strong> → Configures primary key generation strategy</li><li><strong>@Column</strong> → Maps a field to a database column</li><li><strong>@OneToMany</strong> → Defines a one-to-many relationship</li><li><strong>@ManyToOne</strong> → Defines a many-to-one relationship</li><li><strong>@Transactional</strong> → Executes a method within a database transaction</li></ul><h3>Spring Data JPA Repository (Oracle Example)</h3><pre>public interface UserRepo extends JpaRepository&lt;User, Long&gt; {<br>List&lt;User&gt; findByName(String name);<br>}</pre><p>👉 No SQL needed — method names generate queries.</p><h3>Transactions (Relational DBs)</h3><pre>@Transactional<br>public void saveUser(User user) {<br>repo.save(user);<br>}</pre><p>👉 Guarantees ACID behavior with Oracle/Postgres/MySQL.</p><h3>JPA with MongoDB (Spring Data)</h3><p>MongoDB is <strong>NoSQL</strong>, so traditional JPA is not used. Instead, we use <strong>Spring Data MongoDB</strong>, which follows a similar repository pattern.</p><h3>Entity for MongoDB:</h3><pre>@Document(collection = &quot;users&quot;)<br>public class User {<br>@Id<br>private String id;<br>private String name;<br>}</pre><h3>Repository:</h3><pre>public interface UserRepo extends MongoRepository&lt;User, String&gt; {}</pre><p>👉 Still works like JPA, but <strong>no joins, no relationships, no transactions</strong> across collections.</p><h3>JPA vs MongoDB — Key Differences</h3><ul><li><strong>Database Type</strong> → JPA (Oracle): Relational (SQL) | MongoDB: NoSQL (Document)</li><li><strong>Schema</strong> → JPA (Oracle): Fixed | MongoDB: Flexible</li><li><strong>Transactions</strong> → JPA (Oracle): ACID | MongoDB: ACID transactions supported, including multi-document transactions</li><li><strong>Joins</strong> → JPA (Oracle): Yes | MongoDB: Limited; typically use embedding or $lookup</li><li><strong>Querying</strong> → JPA (Oracle): JPQL / Criteria | MongoDB: MongoDB Query API</li><li><strong>Repository</strong> → JPA (Oracle): JpaRepository | MongoDB: MongoRepository</li></ul><h3>When to Use JPA (Relational)</h3><p>✔ Complex relationships</p><p>✔ Transactions required</p><p>✔ Strong schema &amp; constraints</p><p>✔ Enterprise applications</p><p><strong>Examples:</strong> Oracle, PostgreSQL, MySQL</p><h3>When to Use MongoDB (NoSQL)</h3><p>✔ Flexible schema</p><p>✔ High scalability</p><p>✔ JSON-style data</p><p>✔ Fast reads/writes</p><p>✔ No complex joins needed</p><p><strong>Examples:</strong> Logs, user profiles, IoT data, analytics</p><h3>Summary</h3><ul><li><strong>Banking / Finance</strong> → <strong>JPA + Oracle</strong><br>Strong consistency, transactions, and structured data</li><li><strong>Microservices</strong> → <strong>JPA + PostgreSQL</strong> or <strong>MongoDB</strong><br>Choose based on data structure and consistency requirements</li><li><strong>IoT / Analytics</strong> → <strong>MongoDB</strong><br>Flexible schema and high-volume data</li><li><strong>High Reads/Writes</strong> → <strong>MongoDB</strong><br>Suitable for high-throughput workloads</li><li><strong>Strict Schema</strong> → <strong>JPA</strong><br>Ideal for structured, relational data and schema enforcement</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac755e970462" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick Recap: Java Threads]]></title>
            <link>https://medium.com/@shantanum91/quick-recap-java-threads-a7332a1f357f?source=rss-7e8366f09288------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7332a1f357f</guid>
            <dc:creator><![CDATA[Shantanu Mahakale]]></dc:creator>
            <pubDate>Sun, 27 Sep 2026 13:44:51 GMT</pubDate>
            <atom:updated>2026-09-27T13:44:51.587Z</atom:updated>
            <content:encoded><![CDATA[<p>Java supports multithreading to perform multiple tasks concurrently. Threads allow efficient use of CPU cores, improve performance, and enable responsive applications. They are a core part of Java concurrency.</p><h3>What is a Thread?</h3><p>A <strong>thread</strong> is a lightweight unit of execution within a process.</p><p>A Java application <strong>starts with a single main thread</strong> but can spawn multiple threads to run tasks in parallel.</p><h3>Ways to Create Threads</h3><h3>1. Extending Thread class</h3><pre>class MyThread extends Thread {<br>public void run() {<br>System.out.println(&quot;Thread running&quot;);<br>}<br>}<br>new MyThread().start();</pre><h3>2. Implementing Runnable</h3><pre>class MyTask implements Runnable {<br>public void run() {<br>System.out.println(&quot;Task executed&quot;);<br>}<br>}<br>new Thread(new MyTask()).start();</pre><h3>3. Using Lambda (Java 8+)</h3><pre>new Thread(() -&gt; System.out.println(&quot;Lambda thread&quot;)).start();</pre><h3>4. Using ExecutorService (Preferred)</h3><pre>ExecutorService exec = Executors.newFixedThreadPool(5);<br>exec.submit(() -&gt; System.out.println(&quot;Task&quot;));<br>exec.shutdown();</pre><h3>Thread States</h3><ul><li><strong>NEW</strong> → Thread created but not started</li><li><strong>RUNNABLE</strong> → Running or ready to run</li><li><strong>BLOCKED</strong> → Waiting to acquire a monitor lock</li><li><strong>WAITING</strong> → Waiting indefinitely for another thread</li><li><strong>TIMED_WAITING</strong> → Waiting for a specified time</li><li><strong>TERMINATED</strong> → Thread has finished execution</li></ul><h3>Thread Lifecycle</h3><p>NEW → RUNNABLE → WAITING/BLOCKED → RUNNABLE → TERMINATED</p><h3>Common Thread Methods</h3><ul><li><strong>start()</strong> → Starts a new thread</li><li><strong>run()</strong> → Contains the code executed by the thread</li><li><strong>sleep(ms)</strong> → Pauses the current thread for a specified duration</li><li><strong>join()</strong> → Waits for another thread to finish</li><li><strong>yield()</strong> → Hints to the scheduler to give other threads a chance to run</li><li><strong>interrupt()</strong> → Requests interruption of a thread</li></ul><h3>Synchronization</h3><p>Used to prevent race conditions when multiple threads access shared resources.</p><pre>synchronized void increment() {<br>count++;<br>}</pre><p>Or using intrinsic locks:</p><pre>synchronized(obj) {<br>// critical section<br>}</pre><h3>Deadlock</h3><p>Occurs when two threads wait for each other’s resources — both get stuck forever.</p><pre>Thread A has Lock1 → waiting for Lock2<br>Thread B has Lock2 → waiting for Lock1</pre><p>👉 Avoid by always acquiring locks in the same order.</p><h3>Thread Pool (Executor Framework)</h3><p>Better than creating threads manually.</p><pre>ExecutorService pool = Executors.newFixedThreadPool(10);<br>pool.submit(task);<br>pool.shutdown();</pre><p>Benefits:</p><ul><li>Reuses threads</li><li>Improves performance</li><li>Manages queue &amp; scheduling</li></ul><h3>Future &amp; Callable (Return Values from Threads)</h3><pre>Callable&lt;Integer&gt; task = () -&gt; 10 * 2;<br>Future&lt;Integer&gt; result = executor.submit(task);<br>System.out.println(result.get()); // 20</pre><h3>Virtual Threads (Java 19+ / 21)</h3><p>Lightweight threads — thousands can be created with minimal overhead.</p><pre>Thread.startVirtualThread(() -&gt; {<br>// task goes here<br>});</pre><p>👉 Game changer for concurrency &amp; high-throughput apps.</p><h3>Summary Table</h3><ul><li><strong>Thread</strong> → Unit of execution</li><li><strong>Runnable</strong> → Task without a return value</li><li><strong>Callable</strong> → Task that returns a result</li><li><strong>ExecutorService</strong> → Manages thread pools and task execution</li><li><strong>synchronized</strong> → Helps prevent race conditions</li><li><strong>Future</strong> → Represents the result of an asynchronous task</li><li><strong>Virtual Thread</strong> → Lightweight thread for high-concurrency workloads</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7332a1f357f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick Recap: Spring Boot Versions]]></title>
            <link>https://medium.com/@shantanum91/quick-recap-spring-boot-versions-25aa53cd2eb6?source=rss-7e8366f09288------2</link>
            <guid isPermaLink="false">https://medium.com/p/25aa53cd2eb6</guid>
            <dc:creator><![CDATA[Shantanu Mahakale]]></dc:creator>
            <pubDate>Wed, 23 Sep 2026 01:31:26 GMT</pubDate>
            <atom:updated>2026-09-23T01:31:26.551Z</atom:updated>
            <content:encoded><![CDATA[<p>Spring Boot simplifies Java backend development by providing <strong>auto-configuration, embedded servers, production-ready features, and rapid development support</strong>. Here’s a version-wise recap focusing on features that actually impact coding experience.</p><h3>Spring Boot 1.x (2014)</h3><ul><li>First release of Spring Boot</li><li><strong>Embedded Tomcat/Jetty</strong> — no external server needed</li><li><strong>Auto-configuration</strong> (core feature introduced)</li><li>Spring Boot Starter dependencies (spring-boot-starter-web)</li><li>application.properties for configuration 👉 Foundation for rapid development in Spring.</li></ul><h3>Spring Boot 2.x (Major Evolution)</h3><h3>Spring Boot 2.0</h3><ul><li>Based on <strong>Spring Framework 5</strong></li><li>Reactive programming with <strong>WebFlux</strong></li><li>Java 8+ required</li><li>Actuator redesigned with /actuator/* endpoints</li><li>Gradle plugin improved 👉 Start of reactive and microservice-ready Spring.</li></ul><h3>Spring Boot 2.1</h3><ul><li>Better Kubernetes support</li><li>Enhanced Actuator metrics (Micrometer)</li><li>Lazy initialization support</li></ul><h3>Spring Boot 2.2</h3><ul><li><strong>Java 11 support</strong></li><li>Reactive health indicators</li><li>Startup time optimization</li></ul><h3>Spring Boot 2.3</h3><ul><li><strong>Docker &amp; Container support</strong></li><li>Better Graceful Shutdown</li><li>Improved tests</li></ul><h3>Spring Boot 2.4</h3><ul><li>New config loading system</li><li>Better support for external configs</li><li>Removed bootstrap.properties for Spring Cloud</li></ul><h3>Spring Boot 2.5</h3><ul><li>Improved embedded server performance</li><li>Layered JARs for Docker image optimization</li><li>Easier startup tracking and metrics</li></ul><h3>Spring Boot 2.6–2.7</h3><ul><li>Deprecation of older patterns (MVC fallback)</li><li>Spring Native &amp; AOT (Ahead-of-Time compilation)</li><li>Hints of moving toward Spring Boot 3 standards</li></ul><p>👉 Spring Boot 2.x focused heavily on microservices, Docker, and reactive architectures.</p><h3>Spring Boot 3.x (Current Stable Major)</h3><ul><li><strong>Java 17 required (minimum)</strong></li><li><strong>Jakarta namespace migration (</strong><strong>javax → </strong><strong>jakarta)</strong></li><li>Built on <strong>Spring Framework 6</strong></li><li>AOT &amp; GraalVM Native Image support</li><li>Better performance &amp; memory footprint</li><li>@HttpExchange &amp; declarative HTTP clients</li><li>Enhanced observability (Micrometer + Actuator) 👉 Major breaking change due to Jakarta migration.</li></ul><h3>Summary</h3><ul><li><strong>Spring Boot 1.x</strong> → Embedded Server, Auto-Configuration</li><li><strong>Spring Boot 2.0</strong> → WebFlux, Java 8+, Actuator Redesign</li><li><strong>Spring Boot 2.3</strong> → Docker Support, Improved Health Checks</li><li><strong>Spring Boot 2.4</strong> → New Configuration Loading</li><li><strong>Spring Boot 2.6–2.7</strong> → Native Image Hints, AOT Preparation</li><li><strong>Spring Boot 3.x</strong> → Jakarta Migration, Java 17+, HTTP Interface Client</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25aa53cd2eb6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick Recap: Angular Versions]]></title>
            <link>https://medium.com/@shantanum91/quick-recap-angular-versions-4796f464590e?source=rss-7e8366f09288------2</link>
            <guid isPermaLink="false">https://medium.com/p/4796f464590e</guid>
            <dc:creator><![CDATA[Shantanu Mahakale]]></dc:creator>
            <pubDate>Sun, 20 Sep 2026 17:29:42 GMT</pubDate>
            <atom:updated>2026-09-20T17:29:42.902Z</atom:updated>
            <content:encoded><![CDATA[<p>Angular continues to evolve with a strong focus on performance, developer productivity, and reduced bundle size. Here’s a version-wise recap from Angular 8 onwards — covering the most relevant features for developers.</p><h3>Angular 8</h3><ul><li><strong>Ivy Engine (Preview)</strong> — New rendering engine</li><li><strong>Differential Loading</strong> — Generates separate bundles for modern &amp; legacy browsers</li><li><strong>Lazy Loading with Dynamic Imports</strong></li></ul><pre>loadChildren: () =&gt; import(&#39;./module&#39;).then(m =&gt; m.Module)</pre><ul><li><strong>Web Worker Support</strong> (ng generate web-worker) 👉 Foundation for future major upgrades.</li></ul><h3>Angular 9</h3><ul><li><strong>Ivy Rendering Engine becomes default</strong></li><li><strong>Smaller bundle sizes</strong></li><li><strong>Faster compilation</strong></li><li><strong>Better debugging &amp; type checking</strong></li><li><strong>Improved Test Performance</strong> 👉 A major change — Ivy officially replaces View Engine.</li></ul><h3>Angular 10</h3><ul><li><strong>Smaller, cleaner package size</strong></li><li><strong>Optional chaining &amp; nullish coalescing (TS 3.9)</strong></li></ul><pre>user?.address?.city<br>value ?? &#39;default&#39;</pre><ul><li><strong>Stricter project setup</strong> (ng new app --strict)</li><li><strong>New Date Range Picker in Angular Material</strong> 👉 Focus on quality and type safety.</li></ul><h3>Angular 11</h3><ul><li><strong>Faster builds &amp; HMR (Hot Module Replacement)</strong></li></ul><pre>ng serve --hmr</pre><ul><li><strong>Automatic font optimization</strong></li><li><strong>Updated ESLint instead of TSLint</strong></li><li><strong>Improved logging &amp; debugging</strong> 👉 Better DX (Developer Experience).</li></ul><h3>Angular 12</h3><ul><li><strong>Removed support for View Engine</strong> → Ivy-only</li><li><strong>Strict mode by default</strong></li><li><strong>Webpack 5 support</strong></li><li><strong>Nullish Coalescing in templates</strong></li></ul><pre>{{ user?.name ?? &#39;Guest&#39; }}</pre><p>👉 Push towards modern tooling.</p><h3>Angular 13</h3><ul><li><strong>No more </strong><strong>ngcc (Angular Compatibility Compiler)</strong></li><li><strong>ESBuild for faster builds</strong></li><li><strong>Simplified Angular Package Format</strong></li><li><strong>Component API improvements</strong> 👉 Cleaned up legacy dependencies — faster builds.</li></ul><h3>Angular 14</h3><ul><li><strong>Standalone Components (major change!)</strong></li></ul><pre>@Component({<br>standalone: true,<br>template: &lt;h1&gt;Hello&lt;/h1&gt;<br>})<br>export class HelloComponent {}</pre><ul><li><strong>Typed Reactive Forms</strong></li><li><strong>Better CLI autocompletion</strong> 👉 Can build apps without NgModule — huge shift.</li></ul><h3>Angular 15</h3><ul><li><strong>Standalone APIs officially stable</strong></li><li><strong>Functional route guards &amp; resolvers</strong></li></ul><pre>const authGuard: CanActivateFn = (route, state) =&gt; true;</pre><ul><li><strong>Improved performance</strong></li><li><strong>Directive composition API</strong> 👉 Encourages modular and cleaner applications.</li></ul><h3>Angular 16</h3><ul><li><strong>Signals (reactivity model, preview)</strong></li></ul><pre>const count = signal(0);<br>count.set(5);</pre><ul><li><strong>Server-side rendering improvements</strong></li><li><strong>Better hydration</strong></li><li><strong>Faster compilation</strong> 👉 Signals simplify state management — major future shift.</li></ul><h3>Angular 17 (Latest Major)</h3><ul><li><strong>Full support for Signals (stable)</strong></li><li><strong>New Control Flow Syntax</strong></li></ul><pre>@if(condition) { ... }<br>@for(item of items) { ... }</pre><ul><li><strong>Better SSR &amp; hydration</strong></li><li><strong>Improved routing with deferrable views</strong></li><li><strong>Standalone apps now the default</strong> 👉 Angular becomes lighter, more React-like.</li></ul><h3>Summary</h3><ul><li><strong>Angular 8</strong> → Ivy <em>(preview)</em>, Differential Loading</li><li><strong>Angular 9</strong> → Ivy by default, Faster Builds</li><li><strong>Angular 10</strong> → Optional Chaining, Strict Mode</li><li><strong>Angular 11</strong> → HMR, ESLint, Font Optimization</li><li><strong>Angular 12</strong> → Ivy-only, Webpack 5</li><li><strong>Angular 13</strong> → ESBuild, Removed ngcc</li><li><strong>Angular 14</strong> → Standalone Components, Typed Forms</li><li><strong>Angular 15</strong> → Functional Guards, Modular Architecture</li><li><strong>Angular 16</strong> → Signals <em>(preview)</em>, SSR Improvements</li><li><strong>Angular 17</strong> → Signals stable, New Control Flow</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4796f464590e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick Recap: Java Versions]]></title>
            <link>https://medium.com/@shantanum91/quick-recap-java-versions-eb40493b84dc?source=rss-7e8366f09288------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb40493b84dc</guid>
            <dc:creator><![CDATA[Shantanu Mahakale]]></dc:creator>
            <pubDate>Sun, 20 Sep 2026 17:27:46 GMT</pubDate>
            <atom:updated>2026-09-27T14:41:55.531Z</atom:updated>
            <content:encoded><![CDATA[<h3>Java Versions Quick Recap: Java 8 to Java 27</h3><p>Java has evolved significantly since Java 8. From Lambdas and Streams to Records, Pattern Matching, Virtual Threads, and modern concurrency features, newer Java versions have made the language more concise, expressive, and scalable.</p><p>Here is a practical Java version recap, focusing on features developers are most likely to use in day-to-day development, interviews, and modern enterprise applications.</p><h3>Java 8: The Most Influential Release</h3><p>Java 8 introduced several features that fundamentally changed how Java applications are written.</p><h3>Key Features</h3><ul><li>Lambda Expressions for functional programming</li><li>Stream API for declarative data processing</li><li>Functional Interfaces with @FunctionalInterface</li><li>Default and Static Methods in Interfaces</li><li>Optional for better handling of potentially absent values</li><li>New Date/Time API with java.time</li><li>Method References using the :: operator</li></ul><p>Example:</p><pre>List&lt;String&gt; names = List.of(&quot;John&quot;, &quot;Jane&quot;, &quot;Mike&quot;);</pre><pre>names.stream()<br>     .filter(name -&gt; name.startsWith(&quot;J&quot;))<br>     .forEach(System.out::println);</pre><p>Java 8 remains highly important because a large amount of enterprise Java code still uses its programming model.</p><h3>Java 9: Modules and Collection Factory Methods</h3><p>Java 9 introduced the Java Platform Module System (JPMS) and several useful API improvements.</p><h3>Key Features</h3><ul><li>Java Platform Module System</li><li>module-info.java</li><li>JShell for interactive Java experimentation</li><li>Factory methods for collections</li><li>Improvements to the Stream API</li></ul><p>Example:</p><pre>List&lt;Integer&gt; numbers = List.of(1, 2, 3);</pre><pre>Set&lt;String&gt; names = Set.of(&quot;John&quot;, &quot;Jane&quot;);</pre><p>Stream improvements included methods such as:</p><pre>takeWhile()<br>dropWhile()<br>iterate()</pre><h3>Java 10: var</h3><p>Java 10 introduced local variable type inference through the var keyword.</p><pre>var name = &quot;Shantanu&quot;;<br>var numbers = new ArrayList&lt;Integer&gt;();</pre><p>The compiler still determines the type at compile time.</p><pre>var name = &quot;Shantanu&quot;;<br>// Equivalent to:<br>String name = &quot;Shantanu&quot;;</pre><p>var can only be used for local variables, not fields, method parameters, or return types.</p><h3>Java 11: LTS and Modern APIs</h3><p>Java 11 was the second major Long-Term Support release after Java 8.</p><h3>Key Features</h3><ul><li>Modern HTTP Client API</li><li>New String methods</li><li>var in lambda parameters</li><li>Various API and JVM improvements</li></ul><p>Example:</p><pre>HttpClient client = HttpClient.newHttpClient();</pre><p>New String methods:</p><pre>&quot;hello&quot;.isBlank();</pre><pre>&quot;line1\nline2&quot;.lines();</pre><pre>&quot;test&quot;.repeat(3);</pre><p>Java 11 became an important enterprise version for applications moving beyond Java 8.</p><h3>Java 12 and Java 13: Switch and Text Block Previews</h3><p>These releases mainly introduced preview versions of features that became permanent later.</p><h3>Java 12</h3><ul><li>Switch Expressions preview</li><li>JVM and garbage collection improvements</li></ul><h3>Java 13</h3><ul><li>Improved Switch Expressions preview</li><li>Text Blocks preview</li><li>More JVM and performance improvements</li></ul><p>The important point is that several ideas introduced here eventually became standard Java features.</p><h3>Java 14: Switch Expressions and Records Preview</h3><p>Java 14 made Switch Expressions a permanent feature.</p><pre>int result = switch (x) {<br>    case 1 -&gt; 100;<br>    case 2 -&gt; 200;<br>    default -&gt; 0;<br>};</pre><h3>Other Important Features</h3><ul><li>Records introduced as a preview feature</li><li>More helpful NullPointerException messages</li></ul><h3>Java 15: Text Blocks</h3><p>Java 15 made Text Blocks a permanent feature.</p><pre>String json = &quot;&quot;&quot;<br>        {<br>            &quot;name&quot;: &quot;John&quot;<br>        }<br>        &quot;&quot;&quot;;</pre><p>Text Blocks are particularly useful when working with:</p><ul><li>JSON</li><li>SQL</li><li>HTML</li><li>Multiline text</li></ul><p>They make embedded content much easier to read and maintain.</p><h3>Java 16: Records and Pattern Matching</h3><p>Java 16 introduced two important language improvements.</p><h3>Records</h3><p>Records provide a concise way to create immutable data carriers.</p><pre>public record User(String name, int age) {}</pre><p>Instead of manually writing constructors, getters, equals(), hashCode(), and toString(), the compiler generates them.</p><h3>Pattern Matching for instanceof</h3><p>Before:</p><pre>if (obj instanceof String) {<br>    String value = (String) obj;<br>    System.out.println(value.toUpperCase());<br>}</pre><p>With pattern matching:</p><pre>if (obj instanceof String value) {<br>    System.out.println(value.toUpperCase());<br>}</pre><h3>Java 17: LTS and Sealed Classes</h3><p>Java 17 is an important Long-Term Support release and remains widely used in enterprise applications.</p><h3>Sealed Classes</h3><p>Sealed classes allow developers to explicitly control which classes can extend or implement a type.</p><pre>public sealed class Animal<br>        permits Dog, Cat {<br>}</pre><h3>Other Improvements</h3><ul><li>Sealed Classes became permanent</li><li>Pattern matching continued to evolve</li><li>Stronger encapsulation</li><li>JVM and performance improvements</li></ul><p>Java 17 became a popular target for organizations migrating from Java 8 or Java 11.</p><h3>Java 18: UTF-8 by Default</h3><p>Java 18 made UTF-8 the default charset for standard Java APIs.</p><h3>Key Improvement</h3><ul><li>UTF-8 became the default charset</li><li>Simple Web Server introduced</li><li>More JVM and API improvements</li></ul><p>This reduced platform-dependent behavior caused by different default character encodings.</p><h3>Java 19: Virtual Threads Preview</h3><p>Java 19 introduced Virtual Threads as a preview feature through Project Loom.</p><pre>Thread.startVirtualThread(() -&gt; {<br>    // Task executed on a virtual thread<br>});</pre><p>Virtual Threads are lightweight threads designed to support large numbers of concurrent tasks.</p><p>They are particularly useful for applications that perform many blocking I/O operations.</p><h3>Java 20: Continued Loom and Pattern Matching Improvements</h3><p>Java 20 continued several major preview features.</p><h3>Important Areas</h3><ul><li>Virtual Threads</li><li>Structured Concurrency</li><li>Record Patterns</li><li>Pattern Matching for switch</li></ul><p>These features continued evolving toward their final forms in later releases.</p><h3>Java 21: LTS and a Major Modern Java Release</h3><p>Java 21 is one of the most important releases after Java 8.</p><h3>Virtual Threads</h3><p>Virtual Threads became a permanent feature.</p><pre>Thread.startVirtualThread(() -&gt; {<br>    System.out.println(&quot;Running in a virtual thread&quot;);<br>});</pre><p>They make it much easier to build highly concurrent applications without creating huge numbers of expensive platform threads.</p><h3>Record Patterns</h3><pre>if (obj instanceof User(String name, int age)) {<br>    System.out.println(name);<br>}</pre><h3>Pattern Matching for switch</h3><pre>String result = switch (obj) {<br>    case Integer i -&gt; &quot;Integer: &quot; + i;<br>    case String s -&gt; &quot;String: &quot; + s;<br>    default -&gt; &quot;Other&quot;;<br>};</pre><h3>Other Important Features</h3><ul><li>Sequenced Collections</li><li>Pattern Matching for switch</li><li>Record Patterns</li><li>Generational ZGC</li><li>String Templates preview</li><li>Structured Concurrency preview</li></ul><p>Java 21 became a major upgrade target for modern enterprise applications.</p><h3>Java 22: Unnamed Variables and Stream Gatherers</h3><p>Java 22 continued the evolution of pattern matching and concurrency.</p><h3>Unnamed Variables and Patterns</h3><p>The underscore can be used when a variable or pattern is required but the value is not needed.</p><pre>if (obj instanceof String _) {<br>    // String value is not needed<br>}</pre><h3>Stream Gatherers</h3><p>Stream Gatherers were introduced as a preview feature to allow developers to create custom intermediate Stream operations.</p><pre>stream.gather(...)</pre><p>Java 22 also continued improvements to structured concurrency and other preview features.</p><h3>Java 23: Continued Pattern Matching and Stream Improvements</h3><p>Java 23 continued several features introduced in previous releases.</p><h3>Important Areas</h3><ul><li>Primitive types in patterns and switch preview</li><li>Stream Gatherers preview</li><li>Module Import Statements preview</li><li>Continued improvements to concurrency and JVM performance</li></ul><p>The six-month release cycle means many modern Java features evolve through multiple preview releases before becoming permanent.</p><h3>Java 24: Simpler Java and JVM Improvements</h3><p>Java 24 continued work on language simplification, concurrency, and JVM performance.</p><h3>Important Areas</h3><ul><li>Stream Gatherers became a permanent feature</li><li>Flexible Constructor Bodies preview</li><li>Module Import Statements preview</li><li>Primitive Types in Patterns preview</li><li>Simple Source Files and Instance Main Methods preview</li><li>JVM and garbage collection improvements</li></ul><p>These releases are useful to know, but most enterprise developers will encounter Java 17, 21, or 25 more often because of the LTS release cycle.</p><h3>Java 25: Latest LTS Release</h3><p>Java 25 was released in September 2025 and is the latest Long-Term Support release.</p><h3>Important Features</h3><ul><li>Module Import Declarations</li><li>Compact Source Files and Instance Main Methods</li><li>Flexible Constructor Bodies</li><li>Continued improvements to pattern matching</li><li>JVM, performance, security, and library improvements</li></ul><h3>Compact Source Files</h3><p>Java 25 makes simple Java programs less verbose by allowing compact source files and instance main methods.</p><p>This makes small Java programs easier to write without requiring the traditional class and static main boilerplate.</p><pre>void main() {<br>    System.out.println(&quot;Hello, Java!&quot;);<br>}</pre><h3>Module Import Declarations</h3><p>Java 25 also introduced permanent support for module import declarations.</p><pre>import module java.base;</pre><p>Java 25 is currently the latest LTS version and is an important version to know for modern enterprise Java development.</p><h3>Java 26: Performance, Security and Modern APIs</h3><p>Java 26 was released in March 2026.</p><h3>Important Areas</h3><ul><li>Improvements to pattern matching</li><li>HTTP Client API improvements, including HTTP/3 support</li><li>Security and cryptography enhancements</li><li>JVM and garbage collection improvements</li><li>Continued Project Leyden work for startup and application performance</li></ul><p>Java 26 is a feature release rather than an LTS release.</p><h3>Java 27: Latest Java Release</h3><p>Java 27 was released on September 15, 2026 and is currently the latest Java release. Java 25 remains the latest LTS version.</p><p>Java 27 continues the six-month Java release cycle and introduces nine JDK Enhancement Proposals, including preview and incubator features.</p><h3>Primitive Types in Patterns</h3><p>Pattern matching continues to evolve so that primitive types can participate in pattern matching, instanceof, and switch.</p><p>This feature is still a preview feature in Java 27.</p><h3>Lazy Constants</h3><p>Java 27 introduces Lazy Constants as a preview API.</p><p>They provide a way to define values that behave like constants while allowing their initialization to happen lazily.</p><h3>Structured Concurrency</h3><p>Structured Concurrency continues to evolve and remains a preview feature in Java 27.</p><p>It aims to make concurrent tasks easier to manage by treating related concurrent operations as a single unit of work.</p><h3>Post-Quantum Cryptography</h3><p>Java 27 also introduces post-quantum hybrid key exchange support for TLS 1.3.</p><p>This combines traditional cryptography with quantum-resistant algorithms to prepare applications for future cryptographic threats.</p><h3>Java Versions at a Glance</h3><p><strong>Java 8 — LTS</strong><br>Lambdas, Streams, Optional, Date/Time API</p><p><strong>Java 9 — Feature Release</strong><br>Modules, JShell, Collection Factory Methods</p><p><strong>Java 10 — Feature Release</strong><br>var — Local Variable Type Inference</p><p><strong>Java 11 — LTS</strong><br>HTTP Client API, String API improvements</p><p><strong>Java 12 — Feature Release</strong><br>Switch Expressions preview</p><p><strong>Java 13 — Feature Release</strong><br>Text Blocks preview</p><p><strong>Java 14 — Feature Release</strong><br>Switch Expressions, Records preview</p><p><strong>Java 15 — Feature Release</strong><br>Text Blocks</p><p><strong>Java 16 — Feature Release</strong><br>Records, Pattern Matching for instanceof</p><p><strong>Java 17 — LTS</strong><br>Sealed Classes, Pattern Matching improvements</p><p><strong>Java 18 — Feature Release</strong><br>UTF-8 by Default, Simple Web Server</p><p><strong>Java 19 — Feature Release</strong><br>Virtual Threads preview</p><p><strong>Java 20 — Feature Release</strong><br>Structured Concurrency and Pattern Matching improvements</p><p><strong>Java 21 — LTS</strong><br>Virtual Threads, Record Patterns, Pattern Matching for switch</p><p><strong>Java 22 — Feature Release</strong><br>Unnamed Variables, Stream Gatherers preview</p><p><strong>Java 23 — Feature Release</strong><br>Pattern Matching improvements, Stream Gatherers</p><p><strong>Java 24 — Feature Release</strong><br>Stream Gatherers, language and JVM improvements</p><p><strong>Java 25 — LTS</strong><br>Compact Source Files, Module Import Declarations</p><p><strong>Java 26 — Feature Release</strong><br>HTTP/3 support, security and JVM improvements</p><p><strong>Java 27 — Feature Release</strong><br>Lazy Constants, Structured Concurrency improvements, post-quantum cryptography support</p><h3>Java LTS Versions</h3><p>The most important LTS versions to remember are:</p><pre>Java 8   → 2014<br>Java 11  → 2018<br>Java 17  → 2021<br>Java 21  → 2023<br>Java 25  → 2025</pre><p>Java follows a six-month release cycle, while LTS releases are provided periodically for organizations that prefer longer support lifecycles. Java 25 is currently the latest LTS release.</p><h3>The Java Evolution in One Line</h3><pre>Java 8<br>Lambdas + Streams<br>        ↓<br>Java 9<br>Modules<br>        ↓<br>Java 10<br>var<br>        ↓<br>Java 11<br>Modern HTTP Client + String APIs<br>        ↓<br>Java 14–16<br>Switch + Records + Pattern Matching<br>        ↓<br>Java 17<br>Sealed Classes + LTS<br>        ↓<br>Java 19–20<br>Virtual Threads Preview<br>        ↓<br>Java 21<br>Virtual Threads + Modern Pattern Matching + LTS<br>        ↓<br>Java 22–24<br>Concurrency + Stream + Language Improvements<br>        ↓<br>Java 25<br>Latest LTS + Compact Source Files<br>        ↓<br>Java 26<br>Performance + Security + HTTP/3<br>        ↓<br>Java 27<br>PQC + Lazy Constants + Structured Concurrency</pre><h3>Final Quick Recap</h3><p>If you are preparing for a Java interview, these are the versions and features worth remembering most:</p><ul><li><strong>Java 8</strong> → Lambdas, Streams, Optional, Date/Time API</li><li><strong>Java 9</strong> → Modules, JShell</li><li><strong>Java 10</strong> → var</li><li><strong>Java 11</strong> → HTTP Client, String APIs</li><li><strong>Java 14</strong> → Switch Expressions</li><li><strong>Java 15</strong> → Text Blocks</li><li><strong>Java 16</strong> → Records, Pattern Matching</li><li><strong>Java 17</strong> → Sealed Classes, LTS</li><li><strong>Java 19</strong> → Virtual Threads preview</li><li><strong>Java 21</strong> → Virtual Threads, Record Patterns, Pattern Matching, LTS</li><li><strong>Java 22–24</strong> → Unnamed Variables, Stream Gatherers, language improvements</li><li><strong>Java 25</strong> → Latest LTS, Compact Source Files, Module Imports</li><li><strong>Java 26</strong> → HTTP/3, security and JVM improvements</li><li><strong>Java 27</strong> → Post-quantum TLS, Lazy Constants, Structured Concurrency preview</li></ul><p>The biggest shift in modern Java is not simply the number of new APIs. Java has progressively moved toward <strong>more concise syntax, functional programming, pattern matching, immutable data models, lightweight concurrency, and better JVM performance</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb40493b84dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick Recap: System Design Components]]></title>
            <link>https://medium.com/@shantanum91/quick-recap-system-design-components-1c8da07edf51?source=rss-7e8366f09288------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c8da07edf51</guid>
            <dc:creator><![CDATA[Shantanu Mahakale]]></dc:creator>
            <pubDate>Fri, 24 Apr 2026 19:04:09 GMT</pubDate>
            <atom:updated>2026-04-24T19:04:09.093Z</atom:updated>
            <content:encoded><![CDATA[<p>In modern distributed systems, different components work together to handle requests, scale applications, and ensure reliability. Here’s a quick summary of commonly used components with real-world tools for each.</p><h3>API Gateway</h3><p>Acts as the <strong>single entry point</strong> for all client requests. It routes requests to internal services, handles authentication, rate limiting, caching, and request validation.</p><p><strong>Tools/Examples:</strong></p><ul><li>Kong</li><li>Amazon API Gateway</li><li>Apigee (Google)</li><li>Nginx (can be configured as gateway)</li><li>Zuul (Netflix OSS)</li></ul><p>👉 Best for microservices architecture to centralize all API traffic.</p><h3>Reverse Proxy</h3><p>Sits between clients and backend servers. It forwards client requests to the appropriate server while hiding the server details. Can also handle caching, SSL termination, compression.</p><p><strong>Tools/Examples:</strong></p><ul><li>Nginx</li><li>Apache HTTP Server</li><li>HAProxy</li><li>Caddy</li></ul><p>👉 Used to improve security and manage traffic flow to backend servers.</p><h3>Load Balancer</h3><p>Distributes incoming traffic across multiple servers to prevent overload and ensure high availability. Helps with scalability and fault tolerance.</p><p><strong>Types:</strong></p><ul><li><strong>Layer 4 (Transport)</strong> — Uses TCP/UDP</li><li><strong>Layer 7 (Application)</strong> — Uses HTTP/HTTPS &amp; application logic</li></ul><p><strong>Tools/Examples:</strong></p><ul><li>AWS ELB / ALB</li><li>HAProxy</li><li>Nginx</li><li>Traefik</li><li>F5 Big-IP</li></ul><p>👉 Ensures no single server becomes a bottleneck.</p><h3>CDN (Content Delivery Network)</h3><p>Caches and delivers static assets (images, videos, scripts) from edge locations closer to users — improving performance and latency.</p><p><strong>Tools/Examples:</strong></p><ul><li>Cloudflare</li><li>Akamai</li><li>AWS CloudFront</li><li>Fastly</li></ul><p>👉 Best for static assets, video streaming, and global content delivery.</p><h3>Message Queue / Streaming</h3><p>Used for <strong>asynchronous communication</strong> between services. Helps with decoupling, buffering, and reliable message delivery.</p><p><strong>Tools/Examples:</strong></p><ul><li>Kafka</li><li>RabbitMQ</li><li>AWS SQS</li><li>Google Pub/Sub</li><li>ActiveMQ</li></ul><p>👉 Ideal when services shouldn’t wait for each other.</p><h3>Cache Layer</h3><p>Stores frequently accessed data to reduce database load and improve speed. Can be in-memory or distributed.</p><p><strong>Tools/Examples:</strong></p><ul><li>Redis</li><li>Memcached</li><li>Hazelcast</li><li>Aerospike</li></ul><p>👉 Great for session storage, lookup data, leaderboards, caching SQL queries.</p><h3>Database Types (Quick Recap)</h3><ul><li><strong>SQL</strong> → Strong consistency <em>(PostgreSQL, MySQL, Oracle)</em></li><li><strong>NoSQL</strong> → High scalability <em>(MongoDB, Cassandra, DynamoDB)</em></li><li><strong>In-Memory</strong> → Ultra-fast reads <em>(Redis, Memcached)</em></li><li><strong>Graph</strong> → Relationship-heavy data <em>(Neo4j)</em></li></ul><h3>Service Discovery</h3><p>Automatically tracks available services and their dynamic locations (IP/ports). Essential in microservices.</p><p><strong>Tools/Examples:</strong></p><ul><li>Consul</li><li>Eureka (Netflix)</li><li>Etcd</li><li>Zookeeper</li></ul><p>👉 Helps services find and communicate with each other without manual config.</p><h3>Summary Table</h3><ul><li><strong>API Gateway</strong> → Client entry point <em>(Kong, AWS API Gateway, Zuul)</em></li><li><strong>Reverse Proxy</strong> → Request forwarding <em>(Nginx, Apache, HAProxy)</em></li><li><strong>Load Balancer</strong> → Traffic distribution <em>(AWS ELB, Nginx, Traefik)</em></li><li><strong>CDN</strong> → Static content delivery <em>(Cloudflare, Akamai)</em></li><li><strong>Message Queue</strong> → Async processing <em>(Kafka, RabbitMQ)</em></li><li><strong>Cache</strong> → Fast data access <em>(Redis, Memcached)</em></li><li><strong>Service Discovery</strong> → Service tracking <em>(Consul, Eureka)</em></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c8da07edf51" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick Recap: Java Streams]]></title>
            <link>https://medium.com/@shantanum91/quick-recap-java-streams-bdf4a2248f96?source=rss-7e8366f09288------2</link>
            <guid isPermaLink="false">https://medium.com/p/bdf4a2248f96</guid>
            <dc:creator><![CDATA[Shantanu Mahakale]]></dc:creator>
            <pubDate>Fri, 24 Apr 2026 19:03:52 GMT</pubDate>
            <atom:updated>2026-04-24T19:03:52.577Z</atom:updated>
            <content:encoded><![CDATA[<p>Java Streams (introduced in Java 8) provide a <strong>functional, declarative way</strong> to process collections. They allow writing cleaner and more readable code using pipelines like:</p><p><strong>source → intermediate operations → terminal operation</strong></p><p>Streams do <strong>not modify original data</strong> — they create a new result.</p><h3>Key Features of Streams</h3><ul><li>Supports <strong>functional programming</strong> style</li><li>Works with <strong>Collections, Arrays, I/O data</strong></li><li><strong>Lazy evaluation</strong> (executed only when needed)</li><li>Supports <strong>parallel processing</strong></li><li><strong>No modification</strong> of original data</li><li><strong>Readable pipelines</strong> for data processing</li></ul><h3>Stream Pipeline</h3><pre>collection.stream()<br>.filter(...)<br>.map(...)<br>.sorted(...)<br>.collect(...);</pre><p><strong>Source</strong> → stream()</p><p><strong>Intermediate Ops</strong> → filter(), map(), sorted()</p><p><strong>Terminal Ops</strong> → collect(), forEach(), reduce()</p><h3>Common Intermediate Operations</h3><ul><li><strong>filter()</strong> → Select elements</li><li><strong>map()</strong> → Transform data</li><li><strong>sorted()</strong> → Sort stream</li><li><strong>distinct()</strong> → Remove duplicates</li><li><strong>limit() / skip()</strong> → Pagination</li><li><strong>peek()</strong> → Debugging</li></ul><h3>Common Terminal Operations</h3><ul><li><strong>collect()</strong> → Convert to collection</li><li><strong>forEach()</strong> → Iterate</li><li><strong>count()</strong> → Total elements</li><li><strong>min() / max()</strong> → Find extremes</li><li><strong>reduce()</strong> → Aggregate result</li><li><strong>toArray()</strong> → Convert to array</li></ul><h3>Examples</h3><h3>Filter &amp; Collect</h3><pre>List&lt;Integer&gt; evens = nums.stream()<br>.filter(n -&gt; n % 2 == 0)<br>.collect(Collectors.toList());</pre><h3>Map (Transform)</h3><pre>List&lt;Integer&gt; doubled = nums.stream()<br>.map(n -&gt; n * 2)<br>.collect(Collectors.toList());</pre><h3>Reduce (Sum)</h3><pre>int sum = nums.stream()<br>.reduce(0, Integer::sum);</pre><h3>Sorting</h3><pre>List&lt;String&gt; sorted = names.stream()<br>.sorted()<br>.collect(Collectors.toList());</pre><h3>Parallel Streams</h3><pre>list.parallelStream()<br>.forEach(System.out::println);</pre><p>👉 Used for large data processing</p><p>⚠️ Avoid for small collections (thread overhead)</p><p>⚠️ Be careful with shared mutable data</p><h3>When to Use Java Streams?</h3><p>✔ Cleaner &amp; readable code</p><p>✔ Complex data transformation</p><p>✔ Large dataset processing</p><p>✔ Aggregations and filtering</p><p>✔ Multi-core parallel processing (parallelStream)</p><p>❌ Avoid when:</p><ul><li>Debugging is complex</li><li>Performance is critical with small data</li><li>Code readability becomes worse</li></ul><h3>Summary</h3><ul><li><strong>Stream</strong> → Data pipeline (no storage)</li><li><strong>Intermediate Ops</strong> → Transform stream</li><li><strong>Terminal Ops</strong> → Produce result</li><li><strong>Immutable</strong> → No data mutation</li><li><strong>Lazy Evaluation</strong> → Runs on demand</li><li><strong>Functional</strong> → Lambda-based operations</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bdf4a2248f96" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick Recap: SQL Databases]]></title>
            <link>https://medium.com/@shantanum91/quick-recap-sql-databases-0df7f3d19245?source=rss-7e8366f09288------2</link>
            <guid isPermaLink="false">https://medium.com/p/0df7f3d19245</guid>
            <dc:creator><![CDATA[Shantanu Mahakale]]></dc:creator>
            <pubDate>Wed, 22 Apr 2026 12:09:39 GMT</pubDate>
            <atom:updated>2026-04-22T12:54:47.128Z</atom:updated>
            <content:encoded><![CDATA[<p>SQL databases follow a <strong>structured schema</strong>, use <strong>tables (rows &amp; columns)</strong>, and guarantee <strong>strong data consistency</strong>. They follow the <strong>ACID properties</strong>, making them ideal when data integrity and relationships are important.</p><p>They are used in banking systems, ERPs, eCommerce, transactions, and any system where correctness is critical.</p><h3>Why SQL Databases?</h3><ul><li>Fixed schema and defined data types</li><li>Strong data consistency and integrity</li><li>Support for transactions using ACID</li><li>Joins and relationships between tables</li><li>Powerful querying using SQL</li><li>Well-suited for transactional systems (OLTP)</li></ul><h3>Popular SQL Databases</h3><h3>PostgreSQL</h3><ul><li>Open-source, highly reliable, ACID-compliant</li><li>Supports advanced data types (JSON, GIS, arrays)</li><li>Known for performance &amp; strong consistency 👉 Best for enterprise apps, analytics, and complex data models.</li></ul><h3>MySQL</h3><ul><li>Widely used open-source database</li><li>Fast reads, easy to set up, community support</li><li>Common in web applications 👉 Best for websites, CMS systems, SaaS apps.</li></ul><h3>Oracle Database</h3><ul><li>Enterprise-grade commercial database</li><li>Powerful for large financial &amp; mission-critical systems</li><li>Supports advanced transaction management 👉 Best for banking, telecom, ERPs, enterprise-level applications.</li></ul><h3>SQL Server (Microsoft)</h3><ul><li>Strong integration with Windows &amp; Azure</li><li>Good for BI/reporting and enterprise apps 👉 Best when using Microsoft ecosystem or Windows stack.</li></ul><h3>ACID Properties (Core of SQL)</h3><ul><li><strong>Atomicity</strong> — All operations in a transaction succeed or none do</li><li><strong>Consistency</strong> — Data always remains valid and rules are enforced</li><li><strong>Isolation</strong> — Concurrent transactions do not affect each other</li><li><strong>Durability</strong> — Once committed, data is never lost</li></ul><h3>Transactions</h3><p>Used when multiple operations must succeed together.</p><p>Example:</p><pre>BEGIN;<br>UPDATE accounts SET balance = balance - 100 WHERE id = 1;<br>UPDATE accounts SET balance = balance + 100 WHERE id = 2;<br>COMMIT;</pre><h3>When to Use SQL Databases?</h3><ul><li>✔ <strong>Financial transactions</strong></li><li>✔ <strong>Strong consistency requirements</strong></li><li>✔ <strong>Structured data with strict schema</strong></li><li>❌ <strong>Highly scalable, unstructured data</strong> → Go with NoSQL</li><li>⚠ <strong>Large-scale analytics</strong> → Use tools like <strong>Snowflake, Redshift</strong></li></ul><h3>Strengths of SQL Databases</h3><ul><li>Strong consistency (ACID)</li><li>Structured &amp; validated data</li><li>Easy to query &amp; analyze</li><li>Mature ecosystem &amp; tooling</li><li>Data integrity via constraints</li></ul><h3>Limitations of SQL Databases</h3><ul><li>Schema changes are difficult</li><li>Not ideal for huge scale-out systems</li><li>Horizontal scaling is harder than NoSQL</li><li>Performance can suffer with millions of writes per second</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0df7f3d19245" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick Recap: NoSQL Databases]]></title>
            <link>https://medium.com/@shantanum91/quick-recap-nosql-databases-2e8a34813f73?source=rss-7e8366f09288------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e8a34813f73</guid>
            <dc:creator><![CDATA[Shantanu Mahakale]]></dc:creator>
            <pubDate>Wed, 22 Apr 2026 12:08:18 GMT</pubDate>
            <atom:updated>2026-04-22T12:32:30.971Z</atom:updated>
            <content:encoded><![CDATA[<p>NoSQL databases are built to handle <strong>scale, flexibility, and high-speed data processing</strong>. They are ideal when data is semi-structured, rapidly changing, or requires horizontal scalability across multiple servers.</p><p>Unlike relational databases, NoSQL databases <strong>do not strictly follow ACID</strong> and often <strong>trade consistency for availability and performance</strong> (as per the CAP Theorem).</p><h3>Types of NoSQL Databases &amp; When to Use Them</h3><h3>1. Key-Value Databases</h3><ul><li>Store data as key-value pairs (like a dictionary/map).</li><li>Best for caching, session stores, user preferences, or quick lookups.</li><li>Extremely fast reads and writes.</li></ul><p><strong>Examples:</strong> Redis, DynamoDB, Riak</p><p><strong>Use When:</strong> You need ultra-fast reads/writes and simple data access by key (e.g., session tokens, caching).</p><h3>2. Document Databases</h3><ul><li>Store data as JSON/BSON-like documents.</li><li>Flexible schema — each document can have different fields.</li><li>Good for real-time apps, product catalogs, user profiles, logs.</li></ul><p><strong>Examples:</strong> MongoDB, CouchDB, Firebase Firestore</p><p><strong>Use When:</strong> Data structure is flexible and changes often (e.g., user profiles, content apps, blogs).</p><h3>3. Column-Based Databases (Wide-Column Stores)</h3><ul><li>Store data column-wise instead of row-wise.</li><li>Optimized for high write throughput and querying large datasets.</li><li>Used in analytics, time-series data, and big data workloads.</li></ul><p><strong>Examples:</strong> Cassandra, HBase, ScyllaDB</p><p><strong>Use When:</strong> You need high write scalability and distributed data handling (e.g., IoT data, logs, analytics).</p><h3>4. Graph Databases</h3><ul><li>Store data as <strong>nodes</strong> and <strong>relationships (edges)</strong>.</li><li>Excellent for relationship-heavy data like social networks, recommendations, fraud detection.</li></ul><p><strong>Examples:</strong> Neo4j, JanusGraph, Amazon Neptune</p><p><strong>Use When:</strong> Relationships between data matter most (e.g., social networks, fraud detection, recommendations).</p><h3>Summary Table — When to Use What?</h3><ul><li><strong>Key-Value</strong> → Best for fast lookup by key<br><em>Example use cases:</em> Session store, caching</li><li><strong>Document</strong> → Best for flexible schema<br><em>Example use cases:</em> User profiles, blogs</li><li><strong>Column-Based</strong> → Best for large-scale writes &amp; analytics<br><em>Example use cases:</em> Time-series data, telemetry</li><li><strong>Graph</strong> → Best for relationship modeling<br><em>Example use cases:</em> Social graphs, fraud detection</li></ul><h3>CAP Theorem &amp; NoSQL</h3><p>A distributed system can guarantee only <strong>two out of three</strong>:</p><ul><li><strong>Consistency</strong></li><li><strong>Availability</strong></li><li><strong>Partition Tolerance</strong></li></ul><p>Which DB guarantees which aspects?</p><ul><li><strong>Cassandra</strong> → Column-Based<br><em>CAP focus:</em> AP (Availability + Partition Tolerance)</li><li><strong>DynamoDB</strong> → Key-Value<br><em>CAP focus:</em> AP (Availability + Partition Tolerance)</li><li><strong>MongoDB</strong> → Document<br><em>CAP focus:</em> CP (Consistency + Partition Tolerance, configurable)</li><li><strong>Neo4j</strong> → Graph<br><em>CAP focus:</em> CP (Consistency + Partition Tolerance)</li></ul><h3>When Not to Use NoSQL?</h3><p>Avoid NoSQL when:</p><ul><li>Strong relationships &amp; joins are needed.</li><li>Complex transactions (ACID) matter.</li><li>Data integrity is critical.</li><li>Schema is fixed and stable.</li></ul><p>In such cases → Use <strong>Relational Databases (PostgreSQL, MySQL, SQL Server)</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e8a34813f73" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick Recap: Databases]]></title>
            <link>https://medium.com/@shantanum91/quick-recap-databases-f59f5b21530b?source=rss-7e8366f09288------2</link>
            <guid isPermaLink="false">https://medium.com/p/f59f5b21530b</guid>
            <dc:creator><![CDATA[Shantanu Mahakale]]></dc:creator>
            <pubDate>Thu, 16 Apr 2026 05:04:31 GMT</pubDate>
            <atom:updated>2026-04-22T12:25:10.609Z</atom:updated>
            <content:encoded><![CDATA[<p>There are different types of databases, each suited for different use cases.</p><h3>Types of Databases</h3><p><strong>Relational Databases (RDBMS)</strong></p><p>Use structured tables with rows and columns. Follow <strong>ACID</strong> properties and use <strong>SQL</strong>for queries. Ideal for structured data and strong consistency.</p><p>Examples: MySQL, PostgreSQL, Oracle, SQL Server</p><p>Best when data relationships and integrity are critical.</p><p><strong>NoSQL Databases</strong></p><p>Designed for <strong>scalability</strong> and <strong>flexible schemas</strong>. Best suited for unstructured or rapidly changing data. They often sacrifice strict consistency for speed and scale (CAP theorem trade-offs).</p><p>Types include:</p><ul><li><strong>Key-Value</strong> (Redis, DynamoDB) → Fast lookup using a key, similar to a dictionary/map.</li><li><strong>Document</strong> (MongoDB, CouchDB) → Stores JSON-like documents with flexible schema.</li><li><strong>Column-Based</strong> (Cassandra, HBase) → Optimized for large-scale writes and reads across columns.</li><li><strong>Graph</strong> (Neo4j, JanusGraph) → Best for relationships and network-style data (nodes &amp; edges).</li></ul><p><strong>In-Memory Databases</strong></p><p>Store data in RAM for extremely fast access. Used for caching, session storage, leaderboards, etc.</p><p>Examples: Redis, Memcached</p><p>Speed over durability — used when performance matters most.</p><p><strong>NewSQL Databases</strong></p><p>Provide SQL-like queries with NoSQL-level scalability.</p><p>Examples: CockroachDB, TiDB, Google Spanner</p><p>Combine ACID guarantees with horizontal scalability.</p><h3>ACID Properties (RDBMS)</h3><ul><li><strong>Atomicity</strong> — All steps in a transaction succeed or none do.</li><li><strong>Consistency</strong> — Data always moves from one valid state to another.</li><li><strong>Isolation</strong> — Parallel transactions don’t affect each other.</li><li><strong>Durability</strong> — Once committed, data is not lost.</li></ul><h3>CAP Theorem (NoSQL)</h3><p>A distributed system can provide only <strong>two</strong> of the following three:</p><ul><li><strong>Consistency</strong> — All nodes see the same data at the same time</li><li><strong>Availability</strong> — System is always responsive</li><li><strong>Partition Tolerance</strong> — Must work even if network fails</li></ul><p>Examples:</p><ul><li>Cassandra → AP</li><li>MongoDB → CP (configurable)</li><li>DynamoDB → AP</li></ul><h3>Indexing</h3><p>Indexes speed up read operations by avoiding full table scans.</p><p>Common types:</p><ul><li><strong>B-Tree Index</strong></li><li><strong>Hash Index</strong></li><li><strong>Composite Index</strong></li></ul><p>Trade-off: Faster reads but <strong>slower writes + more storage</strong>.</p><h3>Transactions</h3><p>Used to group multiple operations as a single logical unit.</p><p>Example:</p><pre>BEGIN;<br>UPDATE accounts SET balance = balance - 100 WHERE id = 1;<br>UPDATE accounts SET balance = balance + 100 WHERE id = 2;<br>COMMIT;</pre><h3>When to Choose Which?</h3><ul><li><strong>Strong consistency</strong> → PostgreSQL / MySQL</li><li><strong>High scalability</strong> → Cassandra / DynamoDB</li><li><strong>Real-time analytics</strong> → ClickHouse / BigQuery</li><li><strong>Caching</strong> → Redis</li><li><strong>Relationships between data</strong> → Neo4j (Graph DB)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f59f5b21530b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>