<?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 Adriano Martins de Oliveira Sousa on Medium]]></title>
        <description><![CDATA[Stories by Adriano Martins de Oliveira Sousa on Medium]]></description>
        <link>https://medium.com/@adrianomartins002?source=rss-45f068b4a2dc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*Pxudqn8kBqrsfZltAhPAjA.jpeg</url>
            <title>Stories by Adriano Martins de Oliveira Sousa on Medium</title>
            <link>https://medium.com/@adrianomartins002?source=rss-45f068b4a2dc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 23:55:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@adrianomartins002/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[Understanding Protocol Buffers (Protobuf) and Working with gRPC in Java]]></title>
            <link>https://medium.com/@adrianomartins002/understanding-protocol-buffers-protobuf-and-working-with-grpc-in-java-572fbb9daeb8?source=rss-45f068b4a2dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/572fbb9daeb8</guid>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Adriano Martins de Oliveira Sousa]]></dc:creator>
            <pubDate>Wed, 29 Oct 2025 06:51:25 GMT</pubDate>
            <atom:updated>2025-10-29T06:51:25.784Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mwSg5_QmvztyOI5GQBGU3w@2x.jpeg" /><figcaption>Photo by Maëva Catteau on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In today’s distributed systems, efficient data serialization and seamless communication between services are essential. That’s where Protocol Buffers (Protobuf) and gRPC come in. Together, they form one of the fastest and most reliable ways to connect microservices, and Java offers great support for both.</p><h4>What Is Protocol Buffers (Protobuf)?</h4><p>Protobuf is a language-neutral, platform-neutral, extensible mechanism for serializing structured data, similar to JSON or XML, but smaller, faster, and strongly typed.</p><p>It was developed by Google to make communication between systems faster and more efficient.</p><h4>Key advantages of Protobuf:</h4><ul><li>Compact binary format → smaller payloads.</li><li>Strongly typed → schema-driven and version-safe.</li><li>Language-agnostic → works with Java, Go, Python, C++, etc.</li><li>Built-in code generation → automatically generates data classes</li></ul><h4>Example of a .proto file:</h4><pre>syntax = &quot;proto3&quot;;<br><br>package com.example.hello;<br><br>service HelloService {<br>  rpc sayHello (HelloRequest) returns (HelloResponse);<br>}<br><br>message HelloRequest {<br>  string name = 1;<br>}<br><br>message HelloResponse {<br>  string message = 1;<br>}</pre><p>This file defines a service and the messages it can send or receive.</p><p>Once compiled, it generates Java classes you can use directly in your code.</p><h4>Setting Up Protobuf and gRPC in a Java Project</h4><ol><li>Add dependencies</li></ol><p>If you use Maven, include:</p><pre>&lt;dependencies&gt;<br>  &lt;dependency&gt;<br>    &lt;groupId&gt;io.grpc&lt;/groupId&gt;<br>    &lt;artifactId&gt;grpc-netty-shaded&lt;/artifactId&gt;<br>    &lt;version&gt;1.66.0&lt;/version&gt;<br>  &lt;/dependency&gt;<br>  &lt;dependency&gt;<br>    &lt;groupId&gt;io.grpc&lt;/groupId&gt;<br>    &lt;artifactId&gt;grpc-protobuf&lt;/artifactId&gt;<br>    &lt;version&gt;1.66.0&lt;/version&gt;<br>  &lt;/dependency&gt;<br>  &lt;dependency&gt;<br>    &lt;groupId&gt;io.grpc&lt;/groupId&gt;<br>    &lt;artifactId&gt;grpc-stub&lt;/artifactId&gt;<br>    &lt;version&gt;1.66.0&lt;/version&gt;<br>  &lt;/dependency&gt;<br>&lt;/dependencies&gt;<br><br>&lt;build&gt;<br>  &lt;extensions&gt;<br>    &lt;extension&gt;<br>      &lt;groupId&gt;kr.motd.maven&lt;/groupId&gt;<br>      &lt;artifactId&gt;os-maven-plugin&lt;/artifactId&gt;<br>      &lt;version&gt;1.7.0&lt;/version&gt;<br>    &lt;/extension&gt;<br>  &lt;/extensions&gt;<br>  &lt;plugins&gt;<br>    &lt;plugin&gt;<br>      &lt;groupId&gt;org.xolstice.maven.plugins&lt;/groupId&gt;<br>      &lt;artifactId&gt;protobuf-maven-plugin&lt;/artifactId&gt;<br>      &lt;version&gt;0.6.1&lt;/version&gt;<br>      &lt;configuration&gt;<br>        &lt;protocArtifact&gt;com.google.protobuf:protoc:3.25.3:exe:${os.detected.classifier}&lt;/protocArtifact&gt;<br>        &lt;pluginId&gt;grpc-java&lt;/pluginId&gt;<br>        &lt;pluginArtifact&gt;io.grpc:protoc-gen-grpc-java:1.66.0:exe:${os.detected.classifier}&lt;/pluginArtifact&gt;<br>      &lt;/configuration&gt;<br>      &lt;executions&gt;<br>        &lt;execution&gt;<br>          &lt;goals&gt;<br>            &lt;goal&gt;compile&lt;/goal&gt;<br>            &lt;goal&gt;compile-custom&lt;/goal&gt;<br>          &lt;/goals&gt;<br>        &lt;/execution&gt;<br>      &lt;/executions&gt;<br>    &lt;/plugin&gt;<br>  &lt;/plugins&gt;<br>&lt;/build&gt;</pre><p>When you run mvn clean compile, the .proto file is automatically compiled to Java classes.</p><h4>Implementing the gRPC Server</h4><pre>public class HelloServiceImpl extends HelloServiceGrpc.HelloServiceImplBase {<br>    @Override<br>    public void sayHello(HelloRequest request, StreamObserver&lt;HelloResponse&gt; responseObserver) {<br>        String message = &quot;Hello, &quot; + request.getName() + &quot;!&quot;;<br>        HelloResponse response = HelloResponse.newBuilder()<br>            .setMessage(message)<br>            .build();<br><br>        responseObserver.onNext(response);<br>        responseObserver.onCompleted();<br>    }<br>}</pre><p>Once your classes are generated, you can create your server implementation by extending the base class generated from the service definition.</p><p>Then, start your gRPC server:</p><pre>public class HelloServer {<br>    public static void main(String[] args) throws IOException, InterruptedException {<br>        Server server = ServerBuilder<br>            .forPort(9090)<br>            .addService(new HelloServiceImpl())<br>            .build();<br><br>        server.start();<br>        System.out.println(&quot;🚀 Server started on port 9090&quot;);<br>        server.awaitTermination();<br>    }<br>}</pre><h4>Creating a gRPC Client</h4><p>The client uses the generated stub to connect to the server.</p><pre>public class HelloClient {<br>    public static void main(String[] args) {<br>        ManagedChannel channel = ManagedChannelBuilder<br>            .forAddress(&quot;localhost&quot;, 9090)<br>            .usePlaintext()<br>            .build();<br><br>        HelloServiceGrpc.HelloServiceBlockingStub stub = HelloServiceGrpc.newBlockingStub(channel);<br><br>        HelloResponse response = stub.sayHello(<br>            HelloRequest.newBuilder().setName(&quot;Adriano&quot;).build()<br>        );<br><br>        System.out.println(&quot;Response: &quot; + response.getMessage());<br>        channel.shutdown();<br>    }<br>}</pre><h4>Why Use gRPC and Protobuf in Modern Java Systems?</h4><ul><li>Speed: Binary serialization is faster than JSON/REST.</li><li>Strong typing: The schema ensures structure and compatibility.</li><li>Streaming support: gRPC supports streaming requests/responses out of the box.</li><li>Cross-language communication: Perfect for polyglot microservices.</li><li>Built-in security: Works smoothly with TLS and authentication layers.</li></ul><p>When to Use It</p><ul><li>Microservices that communicate frequently and need high performance.</li><li>Low-latency systems (like real-time data pipelines).</li><li>Inter-service communication between different programming languages.</li><li>Systems where backward compatibility and schema evolution are critical.</li></ul><p>Avoid gRPC when:</p><ul><li>You need browser-based clients (though gRPC-Web can help).</li><li>Human-readable payloads are necessary for debugging or analytics.</li></ul><h4>Final Thoughts</h4><p>Protobuf and gRPC bring a modern, fast, and efficient way to connect systems, especially when REST APIs start to show their limits.</p><p>By integrating them in your Java stack, you get type safety, code generation, and lightning-fast communication, all essential for scalable microservices.</p><p>If you’re building modern distributed systems, understanding Protobuf and gRPC is no longer optional, it’s a superpower.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=572fbb9daeb8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How the JVM works (2025 edition)]]></title>
            <link>https://medium.com/@adrianomartins002/how-the-jvm-works-2025-edition-805e679ca39d?source=rss-45f068b4a2dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/805e679ca39d</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[jvm]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Adriano Martins de Oliveira Sousa]]></dc:creator>
            <pubDate>Mon, 20 Oct 2025 06:10:07 GMT</pubDate>
            <atom:updated>2025-10-20T06:10:07.812Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Sgfm0FRxVyNE8yUQf-XVg@2x.jpeg" /><figcaption>Photo by <a href="https://leunesmedia.com/">Michiel Leunens</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>The big picture</h4><p>Java code goes through three major phases:</p><ol><li>Compile to bytecode: javac turns your .java into portable class files (bytecode).</li><li>Load, verify, link:the class loader brings classes in, the bytecode verifier checks safety, and the JVM links &amp; initializes them.</li><li>Execute: the interpreter runs bytecode first, the JIT compilers (C1→C2) kick in for hot methods and emit optimized native code for your CPU. This “tiered compilation” balances fast startup and peak throughput.</li></ol><p>Memory is managed automatically by garbage collectors (GC). By default the JVM uses G1 (garbage first) GC; for ultra-low pauses you can opt into ZGC (now generational).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*m9pcLwmV1NHqjVCthbvA9A@2x.jpeg" /></figure><h4>Step-by-step</h4><h4>1) javac → class files</h4><ul><li>Java produces .class files (bytecode). This format is intentionally portable so any compliant JVM can run it.</li></ul><h4>2) Class loading, verification, linking, initialization</h4><ul><li>Loading: Finds classes (JARs, modules) and brings their bytecode into the JVM.</li><li>Verification: Ensures bytecode obeys rules (types, stack discipline, access checks). If it fails, the class is rejected.</li><li>Linking: Preps runtime structures (resolution of symbolic refs); initialization runs static initializers.</li></ul><p>HotSpot stores class metadata in Metaspace (native memory), replacing the old PermGen.</p><h4>3) Runtime data areas</h4><p>The JVM organizes memory into:</p><ul><li>Heap (objects, managed by GC)</li><li>Per-thread stacks (frames for method calls)</li><li>Program counter &amp; native stacks</li><li>Method Area / Metaspace (class metadata)</li></ul><h4>4) Execution engine: interpreter + JIT (tiered)</h4><ul><li>Interpreter runs bytecode immediately for quick startup.</li><li>C1 JIT compiles hot methods quickly (good for warm-up).</li><li>C2 JIT recompiles very hot methods with heavy optimizations for peak speed.</li></ul><p>The JVM profiles running code and moves methods up the tiers dynamically.</p><h4>Garbage collection today</h4><ul><li>G1 is the default collector (since JDK 9), balancing throughput and predictable pauses.</li><li>ZGC is a scalable low-latency collector. Since JDK 21, Generational ZGC improves throughput and heap efficiency by collecting young objects more often while keeping pauses tiny.</li></ul><p>Tip: Start with defaults; reach for ZGC if you need consistently low pauses under heavy allocation.</p><h4>What’s new &amp; relevant in modern JVMs (JDK 21 — 24)</h4><h4>Virtual Threads (Project Loom)</h4><p>Virtual threads (JDK 21) are lightweight threads managed by the JVM. They drastically simplify high-throughput concurrency (millions of blocking tasks) without complex async code. They unmount from carrier threads when blocked (e.g., on I/O), letting the scheduler run others.</p><p>When to use: servers doing lots of I/O (HTTP, DB, messaging). You keep normal blocking style; the JVM handles the scaling.</p><h4>Foreign Function &amp; Memory API (FFM)</h4><p>Final in JDK 22 (JEP 454), FFM allows safe, fast interop with native libraries and memory, replacing much of JNI’s ceremony and fragility. If you need to call C or map native memory, use FFM.</p><h4>AOT Cache for startup (Project Leyden)</h4><p>JDK 24 (JEP 483) introduces an Ahead-of-Time (AOT) cache that stores classes after loading &amp; linking, so subsequent runs skip a big chunk of startup work. Think of it as a next-gen CDS: still portable JVMs, just faster to start. Tooling continues to evolve (e.g., JEP 514 simplifies the CLI workflow).</p><h4>How everything fits together at runtime</h4><ol><li>Your app starts. The JVM may load a prebuilt AOT cache (if present) to accelerate class loading/linking. Otherwise it can use CDS/AppCDS to speed core class loading.</li><li>Class loaders bring in application/framework classes; the verifier checks correctness; linker resolves references; initializers run.</li><li>The interpreter runs bytecode while profiling; C1/C2 JITs compile hot methods; the JVM recompiles and inlines aggressively as it learns.</li><li>GC reclaims memory concurrently in the background (G1 by default; Generational ZGC available for very low latencies).</li><li>With virtual threads, the scheduler parks/unparks tasks efficiently, so you write blocking code that scales. For native calls and zero-copy, FFM gives you safe, direct access without JNI.</li></ol><h4>Practical knobs &amp; observability (safe defaults first)</h4><ul><li>Try virtual threads in I/O-heavy services; it’s mostly code changes, not JVM flags.</li><li>Benchmark with ZGC if you chase p99 latency under load: -XX:+UseZGC (and consider its generational mode).</li><li>Speed startup for big frameworks with JDK 24+ AOT cache; for older JDKs, use CDS/AppCDS.</li></ul><h3>Dynamic Runtime</h3><p>The JVM is a dynamic runtime: it loads and verifies classes, profiles your code live, compiles hot paths to native instructions, and manages memory concurrently — all while offering modern features like virtual threads, FFM, and an AOT startup cache in JDK 24. Out of the box, you get strong defaults (G1 + tiered JIT); when you need lower latency, faster startup, or native interop, the new features are ready.</p><h3>Conclusion</h3><p>The Java Virtual Machine (JVM) is the core of Java’s “write once, run anywhere” philosophy. It abstracts the underlying hardware and operating system, turning compiled bytecode into efficient machine instructions through interpretation and Just-In-Time (JIT) compilation. By automatically managing memory through modern garbage collectors such as G1 and ZGC, the JVM ensures both performance and reliability, freeing developers from the complexity of manual memory control. Its modular design, portability, and continuous evolution make it not just a runtime environment, but a powerful execution platform that supports high-performance, scalable, and secure applications across countless systems worldwide.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=805e679ca39d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Complete Guide to Software Testing]]></title>
            <link>https://medium.com/@adrianomartins002/the-complete-guide-to-software-testing-d83248323021?source=rss-45f068b4a2dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/d83248323021</guid>
            <category><![CDATA[integration-test]]></category>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[unit-testing]]></category>
            <dc:creator><![CDATA[Adriano Martins de Oliveira Sousa]]></dc:creator>
            <pubDate>Mon, 13 Oct 2025 06:01:41 GMT</pubDate>
            <atom:updated>2025-10-13T06:01:41.392Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lrk05HHiWi0Mj_-tubcRdQ@2x.jpeg" /><figcaption>Photo by <a href="http://girlwithredhat.com/">Girl with red hat</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Software testing is one of the most critical parts of building reliable systems.</p><p>It’s not just about finding bugs — it’s about ensuring confidence, stability, and quality in every release.</p><p>Whether you are a backend engineer, a frontend developer, or a DevOps professional, understanding the different types of tests helps you deliver software that users trust.</p><h4>Why Testing Matters</h4><p>Modern development moves fast with continuous integration, frequent releases, and distributed systems.</p><p>Without solid testing practices, every deployment becomes a risk.</p><p>Testing allows teams to detect regressions early, prevent production incidents, and increase developer confidence.</p><p>In short, good tests mean fewer surprises.</p><h4>The Software Testing Pyramid</h4><p>A common way to visualize testing is through a pyramid structure:</p><p>End-to-End Tests. (UI, user flows)</p><p>▲</p><p>Integration Tests. (APIs, components)</p><p>▲</p><p>Unit Tests. (functions, classes)</p><p>The base of the pyramid represents small, fast tests such as unit tests.</p><p>As we move upward, tests become broader and slower, validating integration and user experience.</p><p>The goal is to have more small tests and fewer large ones, ensuring quick feedback and reliability.</p><h4>Unit Testing</h4><p>Goal: Validate individual components in isolation.</p><p>Unit tests are the smallest and fastest type of tests. They verify that specific functions, methods, or classes behave correctly without dependencies.</p><p>They help developers detect bugs early, encourage modular code design, and make refactoring safer.</p><p>Common frameworks include JUnit, Jest, Mocha, and PyTest.</p><h4>Integration Testing</h4><p>Goal: Ensure multiple modules work correctly together.</p><p>Integration tests verify that independently tested components can communicate and exchange data properly.</p><p>They are essential when different layers or services interact, such as APIs, databases, or message queues.</p><p>Typical tools include Spring Boot Test, Postman, or Docker Compose setups.</p><h4>End-to-End (E2E) Testing</h4><p>Goal: Simulate real user behavior across the full system.</p><p>End-to-end tests reproduce complete user workflows through the user interface, backend, and database.</p><p>They validate that the system works as expected in real-world conditions.</p><p>Examples of tools include Cypress, Playwright, and Selenium.</p><h4>Functional Testing</h4><p>Goal: Verify that the system meets its business requirements.</p><p>Functional tests focus on what the software should do, not how it is implemented.</p><p>They ensure that each feature fulfills its purpose as defined by stakeholders.</p><p>Tools such as Cucumber or Robot Framework are commonly used for behavior-driven development (BDD) scenarios.</p><h4>Regression Testing</h4><p>Goal: Ensure that existing functionality remains stable after changes.</p><p>Regression testing is performed after updates, bug fixes, or new feature additions.</p><p>It verifies that older parts of the system still behave as expected.</p><p>Automating regression tests is key to keeping software stable while maintaining development speed.</p><h4>Performance Testing</h4><p>Goal: Evaluate how the system behaves under different loads.</p><p>Performance testing includes several approaches:</p><ul><li>Load testing: measuring behavior under expected traffic.</li><li>Stress testing: pushing the system beyond normal limits.</li><li>Soak testing: evaluating stability during long runs.</li></ul><p>Common tools include JMeter, Gatling, and k6.</p><p>These tests reveal bottlenecks and scalability issues before they reach users.</p><h4>Security Testing</h4><p>Goal: Identify vulnerabilities and ensure data protection.</p><p>Security testing focuses on detecting weaknesses such as injection flaws, insecure APIs, or weak authentication.</p><p>It helps prevent breaches and ensures compliance with standards such as GDPR and ISO.</p><p>Tools often include OWASP ZAP, Burp Suite, or Snyk.</p><h4>UI and UX Testing</h4><p>Goal: Validate design and usability.</p><p>UI testing ensures visual consistency across devices and browsers.</p><p>UX testing focuses on how users interact with the system and whether the interface feels intuitive.</p><p>This type of testing improves accessibility, design accuracy, and overall satisfaction.</p><h3>Acceptance Testing (UAT)</h3><p>Goal: Confirm that the product meets business expectations before release.</p><p>Acceptance testing, often called User Acceptance Testing (UAT), is typically conducted by QA teams or end users.</p><p>It validates that all requirements are met and the system is ready for production deployment.</p><p>Tools such as Cucumber or FitNesse can automate parts of this process.</p><h4>Smoke and Sanity Testing</h4><p>Smoke tests are quick checks performed after a new deployment or build to confirm that the system runs.</p><p>Sanity tests are focused rechecks to verify that specific fixes or new features work as intended.</p><p>These tests are essential for early feedback in continuous integration pipelines.</p><h4>Exploratory Testing</h4><p>Goal: Discover unexpected issues through human intuition.</p><p>Exploratory testing is manual and unscripted.</p><p>It relies on tester experience and creativity to explore the application, find hidden defects, and uncover edge cases that automation might miss.</p><h4>Automated and Manual Testing</h4><p>Automation provides speed, repeatability, and reliability. It is ideal for regression, performance, and integration testing.</p><p>Manual testing brings human judgment, creativity, and usability insights — essential for exploratory and UX testing.</p><p>The best teams combine both approaches, using automation for efficiency and manual testing for insight.</p><h4>Final Thoughts</h4><p>Testing is not a step that happens at the end of a project.</p><p>It is a continuous process that ensures quality from the first line of code to production release.</p><p>Each testing layer serves a specific purpose. Together, they form a safety net that protects both developers and users.</p><p>By investing in testing, teams build software that is maintainable, scalable, and trustworthy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d83248323021" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding databases: SQL and NoSQL]]></title>
            <link>https://medium.com/@adrianomartins002/understanding-databases-sql-and-nosql-b3bdd01cc1f6?source=rss-45f068b4a2dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/b3bdd01cc1f6</guid>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Adriano Martins de Oliveira Sousa]]></dc:creator>
            <pubDate>Fri, 10 Oct 2025 05:51:53 GMT</pubDate>
            <atom:updated>2025-10-10T05:51:53.764Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*29v92PzUSDA49MaRiOyKmQ@2x.jpeg" /><figcaption>Photo by <a href="https://linktr.ee/mktography">Maksym Kaharlytskyi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When we talk about software systems, databases are the beating heart that keeps everything running. Whether it’s a small to-do app or a global streaming platform, data storage and retrieval define performance, scalability, and even the product’s success.</p><p>In this article, we’ll explore the most popular database systems, their strengths and weaknesses, and the role of cache databases in modern architectures.</p><h4>Relational Databases (SQL)</h4><p>Relational databases have been the backbone of enterprise systems for decades. They organize data in tables with rows and columns, enforcing strong consistency and relationships between entities through primary and foreign keys.</p><p>Most Popular SQL Databases</p><ul><li>PostgreSQL</li><li>MySQL / MariaDB</li><li>Microsoft SQL Server</li><li>Oracle Database</li></ul><p><em>Pros</em></p><ul><li>Strong consistency through ACID transactions (Atomicity, Consistency, Isolation, Durability)</li><li>Mature tooling and documentation</li><li>Powerful query language (SQL)</li><li>Structured schema — perfect for complex relationships</li></ul><p><em>Cons</em></p><ul><li>Scaling vertically is often easier than horizontally</li><li>Rigid schema can make rapid iteration harder</li><li>Complex joins might impact performance in huge datasets</li></ul><p>Best use cases: financial systems, ERP, CRM, e-commerce with well-defined data models.</p><h4>NoSQL Databases</h4><p>As data volume exploded and flexibility became key, NoSQL databases rose to prominence. These are optimized for specific data patterns and scale horizontally with ease.</p><p>Main Types</p><ul><li>Document-based: MongoDB, CouchDB</li><li>Key-Value: Redis, DynamoDB</li><li>Columnar: Cassandra, HBase</li><li>Graph: Neo4j, ArangoDB</li></ul><p><em>Pros</em></p><ul><li>Flexible schema, great for rapidly changing data structures</li><li>High scalability, distributed by design</li><li>Optimized for specific workloads (e.g., JSON documents, graphs, wide columns)</li></ul><p><em>Cons</em></p><ul><li>Eventual consistency (depends on model)</li><li>Complex queries sometimes limited</li><li>Less strict data integrity</li></ul><p>Best use cases: social media feeds, analytics platforms, IoT, recommendation systems.</p><h4>Cache Databases</h4><p>Performance is everything in modern systems. This is where cache databases step in — storing frequently accessed data in memory for ultra-fast reads.</p><p>Most Used Cache Databases</p><ul><li>Redis</li><li>Memcached</li></ul><p><em>Pros</em></p><ul><li>Blazing speed, data served from RAM</li><li>Reduces load on primary databases</li><li>Supports TTL (time-to-live) for temporary data</li><li>Ideal for sessions, leaderboards, and API caching</li></ul><p><em>Cons</em></p><ul><li>Data is volatile, loss on restart if not persisted</li><li>Limited capacity (RAM is expensive)</li><li>Not suitable for long-term storage</li></ul><p>Best use cases: session storage, caching responses, rate limiting, pub/sub messaging.</p><h4>The Modern Hybrid Approach</h4><p>In real-world systems, it’s rare to use just one type of database. Modern architectures combine them:</p><ul><li>PostgreSQL for core business data</li><li>MongoDB for flexible, fast document storage</li><li>Redis as a cache layer for performance</li></ul><p>This polyglot persistence approach gives developers the freedom to use the best tool for each problem.</p><h4>Choosing the Right Database</h4><p>Choosing the right database is less about popularity and more about matching your system’s needs. Each project has its own priorities, consistency, scalability, performance, or flexibility, and understanding these helps guide the decision.</p><p>If your application requires strong data integrity and complex relationships, like in banking systems or ERPs, a relational database such as PostgreSQL or MySQL is usually the best choice. They enforce data consistency, support transactions, and offer a robust query language (SQL) for handling relationships efficiently.</p><p>When your priority is scalability and flexibility, especially with rapidly changing or unstructured data, a NoSQL database like MongoDB or Cassandra is more suitable. These databases allow for flexible schemas and can handle massive amounts of data distributed across multiple servers, making them ideal for social platforms, analytics, and real-time applications.</p><p>If your main challenge is performance, for instance, when your system makes repetitive reads or needs low-latency responses, adding a cache layer such as Redis or Memcached can make a dramatic difference. Cache databases store frequently accessed data in memory, reducing the load on your main database and significantly improving response times.</p><p>In many modern architectures, the best solution is a combination of these technologies. You might use PostgreSQL for critical business data, MongoDB for storing dynamic content, and Redis for caching frequently accessed queries. This polyglot persistence approach allows you to take advantage of each database’s strengths, creating a more efficient and resilient system.</p><p>Ultimately, the right choice depends on the nature of your data, the expected scale of your application, and the performance goals you want to achieve. A well-balanced system doesn’t rely on a single database, it strategically uses multiple ones to deliver the best results for each part of the solution.</p><h3>Conclusion</h3><p>Databases are evolving, from traditional SQL to dynamic NoSQL and high-speed caches.</p><p>The key is not to pick one forever, but to understand their strengths and combine them wisely.</p><p>A well-architected system often uses:</p><ul><li>SQL for integrity,</li><li>NoSQL for scalability, and</li><li>Cache for speed.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b3bdd01cc1f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Infrastructure as Code with AWS CDK, Automating the Cloud, One Stack at a Time]]></title>
            <link>https://medium.com/@adrianomartins002/infrastructure-as-code-with-aws-cdk-automating-the-cloud-one-stack-at-a-time-10af09ac8b0e?source=rss-45f068b4a2dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/10af09ac8b0e</guid>
            <category><![CDATA[infrastructure-as-code]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Adriano Martins de Oliveira Sousa]]></dc:creator>
            <pubDate>Thu, 09 Oct 2025 06:02:18 GMT</pubDate>
            <atom:updated>2025-10-09T06:02:18.454Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2DZ2soOB-e0XEgN_IEXHOQ@2x.jpeg" /><figcaption>Photo by <a href="https://pankaj.pro/">Pankaj Patel</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Cloud computing has revolutionized how we deploy and scale systems. But as our environments grow in complexity, with EC2 instances, S3 buckets, load balancers, VPCs, and more, managing all of this manually becomes chaotic.</p><p>This is where Infrastructure as Code (IaC) shines.</p><p>Instead of creating resources manually via the AWS Console, IaC allows developers to describe the entire infrastructure using code, making deployments repeatable, consistent, and version-controlled.</p><h4>What Is Infrastructure as Code?</h4><p>Infrastructure as Code (IaC) is a software engineering approach that lets you define your infrastructure through code, the same way you define your application logic.</p><p>In other words, you describe what infrastructure should exist (servers, databases, IAM roles, etc.) and your IaC tool takes care of creating and managing those resources.</p><p>This concept brings the discipline of software development, versioning, testing, modularity, and automation, to infrastructure management.</p><h4>Why IaC Matters</h4><p>Before IaC, engineers had to:</p><ul><li>Log in to the AWS Console</li><li>Click through endless menus</li><li>Create each resource by hand</li></ul><p>This worked for small projects, but it’s impossible to scale and prone to human errors.</p><p>With IaC, your infrastructure becomes:</p><ul><li>Consistent: The same code builds identical environments (dev, staging, production).</li><li>Fast: Infrastructure can be deployed or destroyed with one command.</li><li>Reusable: Common setups (like VPCs or S3 buckets) can be shared as modules.</li><li>Auditable: Every change is tracked in Git.</li><li>Automated: Easily integrated into CI/CD pipelines.</li></ul><h4>How AWS CDK Fits In</h4><p>The AWS Cloud Development Kit (CDK) is an open-source framework that allows you to define cloud infrastructure using real programming languages, such as TypeScript, Python, Java, C#, and Go.</p><p>Unlike CloudFormation templates (which are static YAML/JSON files), CDK gives you the full power of code:</p><ul><li>You can use loops, conditions, and variables</li><li>Organize code into reusable constructs</li><li>Test and version-control everything like normal software</li></ul><p>Under the hood, CDK compiles your code into CloudFormation templates, so you get the best of both worlds, developer flexibility with AWS-native stability.</p><h4>How AWS CDK Works</h4><p>When you run cdk deploy, three main steps happen:</p><ul><li>Synthesize (cdk synth):</li></ul><p>Your code (TypeScript, Java, etc.) is converted into a CloudFormation JSON/YAML template.</p><p>This describes all your AWS resources.</p><ul><li>Diff (cdk diff):</li></ul><p>CDK compares the currently deployed stack with your code to show what will change.</p><ul><li>Deploy (cdk deploy):</li></ul><p>CloudFormation executes the plan,creating, updating, or deleting resources safely.</p><p>Example: Creating an S3 Bucket and Lambda Function</p><p>Let’s create a simple AWS stack using AWS CDK in TypeScript.</p><h4>Project Structure</h4><p>my-iac-project/</p><p>├── bin/</p><p>│. └── my-iac-project.ts</p><p>├── lib/</p><p>│. └── my-iac-project-stack.ts</p><p>├── package.json</p><p>└── cdk.json</p><h4>1. Initialize the CDK App</h4><pre>mkdir my-iac-project<br>cd my-iac-project<br>cdk init app --language typescript</pre><h4>2. Create an S3 Bucket + Lambda Function</h4><p>Inside lib/my-iac-project-stack.ts:</p><pre>import * as cdk from &#39;aws-cdk-lib&#39;;<br>import { Construct } from &#39;constructs&#39;;<br>import * as s3 from &#39;aws-cdk-lib/aws-s3&#39;;<br>import * as lambda from &#39;aws-cdk-lib/aws-lambda&#39;;<br>import * as s3n from &#39;aws-cdk-lib/aws-s3-notifications&#39;;<br><br>export class MyIacProjectStack extends cdk.Stack {<br>  constructor(scope: Construct, id: string, props?: cdk.StackProps) {<br>    super(scope, id, props);<br><br>    // 1️⃣ Create an S3 bucket<br>    const bucket = new s3.Bucket(this, &#39;MyBucket&#39;, {<br>      bucketName: &#39;my-iac-example-bucket&#39;,<br>      versioned: true,<br>      removalPolicy: cdk.RemovalPolicy.DESTROY, // only for dev!<br>    });<br><br>    // 2️⃣ Create a Lambda function<br>    const func = new lambda.Function(this, &#39;MyFunction&#39;, {<br>      runtime: lambda.Runtime.NODEJS_20_X,<br>      handler: &#39;index.handler&#39;,<br>      code: lambda.Code.fromInline(`<br>        exports.handler = async function(event) {<br>          console.log(&quot;Event:&quot;, JSON.stringify(event, null, 2));<br>          return { statusCode: 200, body: &quot;Hello from Lambda!&quot; };<br>        }<br>      `),<br>    });<br><br>    // 3️⃣ Trigger Lambda when new file uploaded to S3<br>    bucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(func));<br><br>    // Output bucket name<br>    new cdk.CfnOutput(this, &#39;BucketName&#39;, { value: bucket.bucketName });<br>  }<br>}</pre><h4>Then deploy:</h4><pre>cdk synth<br>cdk deploy</pre><h4>Result:</h4><ul><li>An S3 bucket is created.</li><li>A Lambda function is deployed.</li><li>The Lambda automatically triggers when a file is uploaded.</li></ul><h4>Automating Deployments</h4><p>CDK integrates perfectly with CI/CD pipelines.</p><p>You can add steps in GitHub Actions or AWS CodePipeline like:</p><pre>- name: Deploy CDK Stack<br>  run: |<br>    npm install -g aws-cdk<br>    npm ci<br>    cdk synth<br>    cdk deploy --require-approval never</pre><p>This ensures that each push or merge automatically updates your infrastructure.</p><h4>CDK Constructs and Reuse</h4><p>A key concept in CDK is Constructs, reusable building blocks that define a piece of infrastructure.</p><p>You can create your own, or use ready-made ones from the AWS Construct Library or community Construct Hub.</p><p>Example:</p><pre>export class WebAppConstruct extends Construct {<br>  constructor(scope: Construct, id: string) {<br>    super(scope, id);<br><br>    new s3.Bucket(this, &#39;WebAssets&#39;, { versioned: true });<br>  }<br>}</pre><p>Then reuse it in multiple stacks , just like a class or component in software engineering.</p><h4>Best Practices for IaC with CDK</h4><ul><li>Use version control (Git) for every infrastructure change.</li><li>Separate environments: dev, staging, prod as different stacks.</li><li>Use context and environment variables to configure dynamically.</li><li>Keep constructs modular, small, reusable, and documented.</li><li>Tag all resources for cost tracking and governance.</li><li>Validate with cdk diff before every deployment.</li></ul><h3>Conclusion</h3><p>Infrastructure as Code with AWS CDK bridges the gap between developers and operations.</p><p>You no longer need to treat infrastructure as a mysterious black box, it becomes just another part of your codebase.</p><p>By defining your AWS resources in code, you get:</p><ul><li>Fast, reproducible deployments</li><li>Easier collaboration and versioning</li><li>Confidence that every environment is consistent</li></ul><p>Whether you’re spinning up a simple Lambda or an entire microservice architecture, CDK empowers you to automate your cloud infrastructure elegantly and efficiently.</p><p>“If you can code your infrastructure, you can control it — predictably, safely, and at scale.”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10af09ac8b0e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Goodbye Thread Pools: How Java’s Virtual Threads Outperform the Old Model]]></title>
            <link>https://medium.com/@adrianomartins002/goodbye-thread-pools-how-javas-virtual-threads-outperform-the-old-model-5fb7c41984c9?source=rss-45f068b4a2dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fb7c41984c9</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[virtual-threads]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Adriano Martins de Oliveira Sousa]]></dc:creator>
            <pubDate>Wed, 08 Oct 2025 06:38:05 GMT</pubDate>
            <atom:updated>2025-10-08T06:38:05.498Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Sgfm0FRxVyNE8yUQf-XVg@2x.jpeg" /><figcaption>Photo by <a href="https://leunesmedia.com/">Michiel Leunens</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>For years, Java developers struggled with concurrency.</h4><p>We had to choose between:</p><p>1.	Classic Thread Pools: limited, heavy, and hard to scale.</p><p>2.	Reactive frameworks: fast but complex, callback-heavy, and hard to debug.</p><p>Then came Java 21 (LTS) with Virtual Threads : a breakthrough that makes concurrency as simple as writing sequential code, yet scales like the most advanced reactive systems.</p><p>Let’s explore how it changes everything.</p><h4>The Classic Way: Thread Pools and Pain Points</h4><p>For decades, concurrency in Java revolved around Thread and ExecutorService.</p><pre>ExecutorService executor = Executors.newFixedThreadPool(10);<br><br>for (int i = 0; i &lt; 100; i++) {<br>    executor.submit(() -&gt; {<br>        try {<br>            Thread.sleep(1000); // simulate IO<br>            System.out.println(Thread.currentThread().getName());<br>        } catch (InterruptedException e) {<br>            Thread.currentThread().interrupt();<br>        }<br>    });<br>}</pre><p>This looks simple… until it scales.</p><h4>The problems</h4><ul><li>Each thread consumes ~1 MB of stack memory.</li><li>Thousands of waiting threads → OutOfMemoryError or context-switch overhead.</li><li>Thread creation and blocking are expensive.</li><li>You must manage pool sizes carefully to avoid deadlocks or starvation.</li><li>Frameworks pushed toward asynchronous models (CompletableFuture, Reactor, RxJava), powerful but complex to read and debug.</li></ul><p>Result: a constant trade-off between simplicity and scalability.</p><h4>The New Way: Virtual Threads</h4><p>Introduced as a final feature in Java 21, Virtual Threads (Project Loom) turn concurrency upside-down.</p><p>They’re JVM-managed, lightweight threads that behave like normal threads but cost almost nothing to create or block.</p><pre>try (var executor = Executors.newVirtualThreadPerTaskExecutor()) {<br>    for (int i = 0; i &lt; 100_000; i++) {<br>        executor.submit(() -&gt; {<br>            Thread.sleep(1000); // looks blocking, but isn&#39;t expensive!<br>            return Thread.currentThread().getName();<br>        });<br>    }<br>}</pre><h4>What happens behind the scenes</h4><ul><li>The JVM maps many virtual threads to a few carrier OS threads.</li><li>When a virtual thread hits a blocking call (sleep, I/O, etc.), it parks itself and frees the carrier.</li><li>When data arrives, it resumes automatically.</li></ul><h4>This gives you:</h4><ul><li>Millions of concurrent tasks,</li><li>Minimal memory footprint,</li><li>Familiar blocking code — no callbacks or fluxes.</li></ul><h4>Performance Comparison</h4><p>With classic Java threads, each one directly maps to an OS thread, consuming significant memory and CPU for context switching. In practical terms, you might handle a few thousand concurrent tasks before hitting limits.</p><p>Virtual Threads, on the other hand, use just a few OS threads internally.</p><p>Because they’re managed entirely by the JVM, they can run millions of lightweight threads without stressing the system.</p><p>Reactive frameworks achieved similar scalability by avoiding blocking, but at the cost of complexity, forcing developers to use chains of futures or event streams.</p><p>Virtual Threads bring that scalability without any special programming model. You write plain, readable, synchronous Java, and still get the performance of asynchronous systems.</p><p>In short:</p><p>•	Classic threads: simple but heavy.</p><p>•	Reactive frameworks: fast but complex.</p><p>•	Virtual threads: simple and fast.</p><h4>Example: HTTP Fetcher Old vs New</h4><h4>Classic Thread Pool</h4><pre>ExecutorService pool = Executors.newFixedThreadPool(10);<br>List&lt;Future&lt;String&gt;&gt; futures = urls.stream()<br>    .map(url -&gt; pool.submit(() -&gt; fetch(url)))<br>    .toList();</pre><p>→ only 10 requests in parallel, slow when waiting for network.</p><h4>Virtual Threads</h4><pre>try (var exec = Executors.newVirtualThreadPerTaskExecutor()) {<br>    var results = urls.stream()<br>                      .map(url -&gt; exec.submit(() -&gt; fetch(url)))<br>                      .map(f -&gt; f.get())<br>                      .toList();<br>}</pre><p>→ 10 000+ concurrent requests easily, fully blocking style.</p><h4>Developer Experience</h4><p>Virtual Threads don’t just boost performance, they make developers’ lives easier.</p><p>With reactive frameworks, stack traces often lose context, debugging is tricky, and code can quickly become fragmented across callbacks.</p><p>In contrast, Virtual Threads keep your code linear and debuggable, stack traces are clear, logs make sense, and exceptions behave predictably.</p><p>You also don’t need special libraries or new paradigms.</p><p>Most existing blocking APIs (like JDBC or HttpClient) work out of the box with Virtual Threads.</p><p>Developers moving from thread pools will appreciate that migration requires no refactor, you can literally replace your executor with Executors.newVirtualThreadPerTaskExecutor() and start benefiting immediately.</p><p>In summary:</p><p>•	Debugging is easier.</p><p>•	Code is cleaner.</p><p>•	Libraries remain compatible.</p><p>•	Migration is nearly effortless.</p><h4>Best Practices</h4><ul><li>Use for I/O-bound tasks — HTTP, DB, file I/O.</li><li>Keep CPU-intensive tasks in small fixed pools.</li><li>Don’t mix Virtual and Platform threads inside the same pool.</li><li>Monitor properly, each virtual thread is cheap, but you can still overload external systems.</li><li>In frameworks like Spring Boot 3.2+, simply set:</li></ul><pre>@Bean<br>Executor taskExecutor() {<br>    return Executors.newVirtualThreadPerTaskExecutor();<br>}</pre><h4>When Not to Use</h4><p>If your app is mostly CPU-bound (e.g., heavy computations, image processing, ML models), virtual threads won’t help much, they’ll just compete for CPU.</p><p>In that case, use a traditional bounded thread pool.</p><h3>Conclusion</h3><p>Virtual Threads make Java concurrency simple again.</p><p>They combine:</p><p>•	The clarity of synchronous code,</p><p>•	The scalability of async frameworks,</p><p>•	The reliability of the Java platform.</p><p>With Java 21, you can finally write high-concurrency servers without diving into reactive programming or thread-pool tuning.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fb7c41984c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unlocking Java’s Virtual Threads: The Future of Concurrency Made Simple]]></title>
            <link>https://medium.com/@adrianomartins002/unlocking-javas-virtual-threads-the-future-of-concurrency-made-simple-8f8fb32b83e4?source=rss-45f068b4a2dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f8fb32b83e4</guid>
            <category><![CDATA[java-thread]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[java-virtual-threads]]></category>
            <dc:creator><![CDATA[Adriano Martins de Oliveira Sousa]]></dc:creator>
            <pubDate>Tue, 07 Oct 2025 06:04:48 GMT</pubDate>
            <atom:updated>2025-10-07T06:04:48.680Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zQ-j8m-E2xONZnIazwAJiw@2x.jpeg" /><figcaption>Photo by <a href="http://k15.photos/">K15 Photos</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>For decades, Java’s concurrency model revolved around platform threads, operating system (OS) threads managed by the JVM. While powerful, they were expensive, limited in number, and often overkill for workloads that mostly wait on I/O (network, database, file access).</p><p>Then came Project Loom, a multi-year effort to simplify concurrency. Its key deliverable, Virtual Threads, finally became a stable feature in Java 21 (LTS).</p><p>Virtual Threads are lightweight, cheap to create, and designed to handle massive concurrency, think thousands or even millions of simultaneous tasks, all without complicated reactive frameworks.</p><h4>How Virtual Threads Work</h4><p>Traditional Java threads are mapped 1:1 to OS threads, meaning:</p><ul><li>Each Java thread consumes memory (stack space) and kernel resources;</li><li>Context switching between threads is expensive;</li><li>High-scale systems often hit limits before CPU saturation.</li></ul><p>Virtual Threads flip this model. They are managed by the JVM, not the OS, and share a small pool of carrier threads behind the scenes.</p><p>When a virtual thread blocks on I/O, the JVM automatically parks it and frees the carrier to serve another virtual thread.</p><p>When data becomes available again, the virtual thread is resumed, all transparently to your code.</p><p><strong>The result</strong>: blocking code that scales like asynchronous code, but with none of the complexity.</p><h4>Benefits in Practice</h4><ul><li>Massive concurrency: easily run 100 000 + concurrent requests.</li><li>No callback hell: write code in plain blocking style (Thread.sleep(), JDBC calls).</li><li>Simple debugging: stack traces and breakpoints behave like normal threads.</li><li>Backwards compatible: integrates with existing libraries, frameworks, and thread APIs.</li></ul><h4>Best Use Cases</h4><p>Virtual Threads shine in I/O-bound applications, where threads mostly wait for data.</p><p>Examples:</p><ul><li>REST or gRPC servers handling many requests at once</li><li>Database or HTTP clients that issue multiple concurrent calls</li><li>Message brokers, data pipelines, or web crawlers</li><li>Integration and test frameworks that spin many parallel tasks</li></ul><p>They’re not ideal for heavy CPU-bound workloads (e.g., math computations).</p><p>Those still benefit from traditional, limited thread pools to avoid CPU contention.</p><h4>Example: Building a Web Fetcher with Virtual Threads</h4><p>Here’s a compact example showing how you can run hundreds of network requests concurrently, without any reactive code.</p><pre>import java.net.URI;<br>import java.net.http.*;<br>import java.util.List;<br>import java.util.concurrent.*;<br><br>public class VirtualThreadExample {<br><br>    static String fetch(String url) throws Exception {<br>        HttpClient client = HttpClient.newHttpClient();<br>        HttpRequest request = HttpRequest.newBuilder(URI.create(url)).build();<br>        HttpResponse&lt;String&gt; response = client.send(request, HttpResponse.BodyHandlers.ofString());<br>        return response.body().substring(0, 60); // preview part of response<br>    }<br><br>    public static void main(String[] args) throws Exception {<br>        List&lt;String&gt; urls = List.of(<br>            &quot;https://example.com&quot;,<br>            &quot;https://httpbin.org/get&quot;,<br>            &quot;https://api.github.com&quot;<br>        );<br><br>        try (var executor = Executors.newVirtualThreadPerTaskExecutor()) {<br>            var futures = urls.stream()<br>                              .map(u -&gt; executor.submit(() -&gt; fetch(u)))<br>                              .toList();<br><br>            for (Future&lt;String&gt; f : futures) {<br>                System.out.println(&quot;Result: &quot; + f.get());<br>            }<br>        }<br>    }<br>}</pre><h4>How it works</h4><p>1.Executors.newVirtualThreadPerTaskExecutor() creates an executor that spins up a new virtual thread for each task.</p><p>2.Each call to fetch(url) blocks while waiting for the HTTP response, but since they’re virtual threads, the JVM just parks them, keeping carriers free.</p><p>3.You can scale this to thousands of concurrent requests without changing code.</p><p>To see it in action:</p><pre>javac --release 21 VirtualThreadExample.java<br>java VirtualThreadExample</pre><h4>Integration Tip: Using Virtual Threads in Web Frameworks</h4><p>If you’re using Spring Boot 3.2+, you can enable virtual threads for all HTTP requests by adding:</p><pre>@Bean<br>Executor taskExecutor() {<br>    return Executors.newVirtualThreadPerTaskExecutor();<br>}</pre><p>Spring will then execute controller methods in lightweight virtual threads, improving concurrency dramatically for I/O-bound APIs.</p><h4>Conclusion</h4><p>Virtual Threads mark a new era for Java concurrency. They let you:</p><ul><li>Write code in the simplest synchronous style;</li><li>Achieve asynchronous-level scalability;</li><li>Migrate gradually, no rewrites, no new paradigms.</li></ul><p>If your services perform lots of I/O, switching to virtual threads might be the easiest performance win you’ll ever get in Java.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f8fb32b83e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is Everything Supposed to Be in the Cloud Today?]]></title>
            <link>https://medium.com/@adrianomartins002/is-everything-supposed-to-be-in-the-cloud-today-515593e7154d?source=rss-45f068b4a2dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/515593e7154d</guid>
            <category><![CDATA[software-solutions]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Adriano Martins de Oliveira Sousa]]></dc:creator>
            <pubDate>Mon, 06 Oct 2025 05:45:53 GMT</pubDate>
            <atom:updated>2025-10-06T05:45:53.038Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hPGbzg9iA7NO0z_43zyG4Q@2x.jpeg" /><figcaption>Photo by Vladimir Anikeev on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In the last decade, cloud computing became the standard answer for nearly every software architecture question. AWS, Azure, and Google Cloud dominate the conversation, offering scalability, flexibility, and managed services that make life easier for developers and businesses alike.</p><p>But as the cloud grows, so do the questions:</p><ul><li>Should everything really live in the cloud?</li><li>Or are there still valid reasons to stay on-premise or even go hybrid?</li></ul><p>Let’s explore this idea.</p><h4>The Cloud: Power, Scalability, and Convenience</h4><p>There’s no doubt that the cloud revolutionized how we build software. Teams can deploy global applications in minutes, pay only for what they use, and integrate managed databases, storage, and machine learning services without managing a single server.</p><h4>Advantages of going cloud:</h4><ul><li>Scalability: Auto-scaling groups and serverless functions (like AWS Lambda) make handling variable loads effortless.</li><li>Cost flexibility: No need for upfront hardware investments, you pay as you grow.</li><li>Global reach: Data centers across regions provide low latency for users around the world.</li><li>Focus on product: Developers can spend more time on features, not infrastructure.</li></ul><p>For startups or projects needing rapid iteration, the cloud is often unbeatable.</p><h4>When the Cloud Is Not the Perfect Fit</h4><p>However, cloud-first doesn’t always mean cloud-only. There are cases where other approaches make more sense.</p><h4>1. On-Premise for Data Sensitivity</h4><p>Some organizations (especially in finance, defense, or healthcare) need strict control over data. Legal or regulatory requirements may forbid external storage, even if encrypted.</p><p>In such cases, on-premise servers still play an essential role.</p><h4>2. Edge Computing and IoT</h4><p>Applications requiring ultra-low latency, such as autonomous vehicles, factory robotics, or AR/VR devices, benefit from edge computing.</p><p>Instead of sending all data to the cloud, processing happens locally, reducing delay and bandwidth costs.</p><h4>3. Cost Predictability and Control</h4><p>For long-running workloads, cloud costs can grow quickly. Companies sometimes return to private servers to regain cost predictability, especially when infrastructure usage is stable.</p><h4>4. Connectivity Constraints</h4><p>Remote locations or industrial setups without stable internet connections can’t depend entirely on cloud access. Local servers or hybrid solutions ensure reliability.</p><h4>The Rise of Hybrid and Multi-Cloud Strategies</h4><p>Most modern architectures today fall somewhere in between.</p><p>The hybrid approach, combining cloud and on-premise, gives the best of both worlds:</p><ul><li>Use the cloud for web services, backups, and analytics.</li><li>Keep sensitive or high-performance operations locally.</li></ul><p>Additionally, multi-cloud strategies avoid vendor lock-in and improve resilience by distributing workloads between different providers (AWS, Azure, GCP, etc.).</p><h3>The Right Question to Ask</h3><p>Instead of asking “should we move to the cloud?”, teams should ask:</p><p>“What parts of our system benefit from the cloud, and what parts don’t?”</p><p>Some workloads shine in the cloud, others are safer, faster, or cheaper elsewhere.</p><p>It’s not a binary choice, it’s a design decision based on context, performance, cost, and compliance.</p><h3>💡 Conclusion</h3><p>The cloud is a powerful enabler, but not a one-size-fits-all solution.</p><p>The smartest architectures today are flexible, context-aware, and ready to evolve.</p><p>As technology matures, it’s not about choosing cloud vs on-premise, it’s about placing each component where it performs best.</p><p>The future isn’t 100% in the cloud. It’s 100% strategic.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=515593e7154d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Technical Debt: How to Build Better Systems]]></title>
            <link>https://medium.com/@adrianomartins002/technical-debt-how-to-build-better-systems-3352d3904ad6?source=rss-45f068b4a2dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/3352d3904ad6</guid>
            <category><![CDATA[continuous-improvement]]></category>
            <category><![CDATA[tech-debt]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Adriano Martins de Oliveira Sousa]]></dc:creator>
            <pubDate>Sun, 05 Oct 2025 07:11:40 GMT</pubDate>
            <atom:updated>2025-10-05T07:11:40.099Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XiiwW2UWMyl3-4ehgUr-xg@2x.jpeg" /><figcaption>Photo by Eugen Str on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In software engineering, technical debt is one of those invisible forces that silently grows inside systems over time. It’s not about money, it’s about the cost of shortcuts. When teams make quick decisions to deliver features faster, they sometimes trade code quality, testing, or proper architecture for speed. That trade-off accumulates “debt,” and eventually, the team must “pay it back” through refactoring, maintenance, and re-design.</p><p>Technical debt isn’t always bad. In fact, taking on a certain level of it is sometimes strategic, like borrowing time to meet a critical release. But when left unmanaged, it grows into a burden that slows down development, increases bugs, and complicates new feature delivery.</p><h4>What Causes Technical Debt</h4><p>Some common sources include:</p><ul><li>Rushed releases: Prioritizing speed over structure.</li><li>Lack of clear architecture: Building features without scalable foundations.</li><li>Insufficient testing: Skipping tests to save time.</li><li>Outdated dependencies: Old libraries, frameworks, or runtimes.</li><li>Poor documentation: Making it hard for future developers to understand context.</li></ul><p>The key isn’t to avoid all debt, it’s to manage it deliberately.</p><h3>Why It Matters</h3><p>Technical debt impacts not only your codebase but also your team morale and delivery velocity. When the system becomes difficult to change, developers lose confidence, onboarding slows down, and the business feels the drag. Reducing debt improves maintainability, scalability, and long-term innovation capacity.</p><h4>How to Handle Technical Debt</h4><ul><li>Acknowledge and Track It: Add a technical debt register or board where issues are visible.</li><li>Mark them directly in your backlog using a label (e.g., “TechDebt”).</li><li>Quantify the impact, estimate how much time or risk each item carries.</li><li>Include Debt in Sprint Planning: Dedicate a small portion of each sprint (5 — 15%) to reducing technical debt.</li><li>Treat it like any other feature: it delivers business value by improving speed and stability.</li><li>Automate Quality Checks: Use static analysis tools like SonarQube, ESLint, or Checkstyle to detect code smells.</li><li>Automate test coverage reports and build-quality gates in CI/CD pipelines.</li><li>Refactor Continuously: Apply the “Boy Scout Rule”: Leave the code cleaner than you found it.</li><li>Encourage developers to refactor small parts regularly, not in massive refactoring projects.</li><li>Adopt a Strong Code Review Culture: Peer reviews catch issues early and share knowledge.</li><li>Use them as a learning moment, not just gatekeeping.</li><li>Define Architectural Principles: Maintain clear guidelines on architecture, dependencies, and patterns (e.g., microservices vs. monoliths).</li><li>Regularly review architecture decisions to prevent drift.</li><li>Invest in Documentation and Testing: Automate documentation where possible.</li><li>Keep test suites healthy, they are your safety net during refactoring.</li></ul><h4>A Healthy Engineering Culture</h4><p>Dealing with technical debt is less about tools and more about culture. Teams that value quality, code readability, and open communication are more likely to manage debt effectively. Encourage discussions about trade-offs, not blame. Celebrate improvements, not just new features.</p><h3>Conclusion</h3><p>Technical debt is inevitable, but unmanaged technical debt is optional.</p><p>By acknowledging it, tracking it, and dedicating time to refactor continuously, teams can keep systems maintainable and efficient. Think of it as regular “technical hygiene”: small, consistent care prevents costly overhauls later. In the end, clean and well-structured systems don’t just make developers happy , they make the entire organization faster, safer, and more innovative.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3352d3904ad6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Git: The Power of Version Control from the Command Line]]></title>
            <link>https://medium.com/@adrianomartins002/understanding-git-the-power-of-version-control-from-the-command-line-f3548c09506e?source=rss-45f068b4a2dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3548c09506e</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Adriano Martins de Oliveira Sousa]]></dc:creator>
            <pubDate>Sat, 04 Oct 2025 10:28:40 GMT</pubDate>
            <atom:updated>2025-10-04T10:28:40.272Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5LU3VlVWXo150oBw" /><figcaption>Photo by <a href="https://unsplash.com/@synkevych?utm_source=medium&amp;utm_medium=referral">Roman Synkevych</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When we talk about modern software development, one tool stands out as indispensable — <strong>Git</strong>. It is a distributed version control system that allows developers to track changes, collaborate seamlessly, and maintain a complete history of their projects. Whether you are working alone or in a large team, Git ensures that your codebase remains organized, traceable, and recoverable.</p><p>Git was created by <strong>Linus Torvalds</strong> in 2005 to manage the development of the Linux kernel. Since then, it has become the standard version control system used around the world, powering countless open-source and commercial projects.</p><h3>GUI vs Command Line</h3><p>Nowadays, there are many graphical tools (UIs) that make Git operations more visual and intuitive. Tools like <strong>GitHub Desktop</strong>, <strong>Sourcetree</strong>, <strong>GitKraken</strong>, and <strong>VS Code’s Source Control panel</strong> simplify tasks like committing, branching, or merging.</p><p>However, it’s still extremely valuable to learn Git directly through the <strong>command line</strong>. Understanding the commands gives you <strong>deeper control</strong>, helps you <strong>troubleshoot</strong> more effectively, and allows you to work in any environment — even without a UI.</p><p>Learning Git this way helps you master what happens behind the scenes, instead of just clicking buttons.</p><h3>Essential Git Commands and How to Use Them</h3><p>Here’s a clear list of the most important Git commands and what they do:</p><ul><li><strong>git init</strong> — Creates a new Git repository in your current folder.</li><li><strong>git clone [url]</strong> — Clones (copies) an existing repository from a remote source to your local machine.</li><li><strong>git status</strong> — Shows which files are modified, staged, or untracked.</li><li><strong>git add [file]</strong> — Stages a specific file to be included in the next commit.</li><li><strong>git add .</strong> — Stages all modified and new files in the current directory.</li><li><strong>git commit -m “message”</strong> — Records the staged changes with a descriptive message.</li><li><strong>git log</strong> — Displays the commit history of the repository.</li><li><strong>git diff</strong> — Shows the differences between your working directory and the last commit.</li><li><strong>git branch</strong> — Lists all branches in the repository.</li><li><strong>git branch [branch-name]</strong> — Creates a new branch.</li><li><strong>git checkout [branch-name]</strong> — Switches to another branch.</li><li><strong>git merge [branch-name]</strong> — Merges another branch into the current one.</li><li><strong>git pull</strong> — Fetches and merges changes from the remote repository into your local branch.</li><li><strong>git push</strong> — Sends your local commits to the remote repository.</li><li><strong>git remote -v</strong> — Lists the connected remote repositories.</li><li><strong>git fetch</strong> — Retrieves new commits from a remote repository without merging them.</li><li><strong>git reset [file]</strong> — Unstages a file that was previously added.</li><li><strong>git revert [commit-id]</strong> — Creates a new commit that undoes the changes from a specific commit.</li><li><strong>git rm [file]</strong> — Removes a file from both the working directory and the repository.</li><li><strong>git stash</strong> — Temporarily saves changes you’re not ready to commit yet.</li><li><strong>git stash pop</strong> — Restores the last stashed changes.</li><li><strong>git tag [tag-name]</strong> — Creates a tag to mark a specific point in history (for example, a release version).</li><li><strong>git config –global user.name “Your Name”</strong> — Sets your global Git username.</li><li><strong>git config –global user.email “you@example.com”</strong> — Sets your global Git email address.</li><li><strong>git show [commit-id]</strong> — Displays detailed information about a specific commit.</li><li><strong>git restore [file]</strong> — Restores a file to its last committed state.</li><li><strong>git blame [file]</strong> — Shows who last modified each line of a file.</li></ul><h3>Conclusion</h3><p>Mastering Git from the command line gives you more than just a technical advantage — it gives you <strong>confidence</strong> in handling your code. You learn to understand every change, rollback mistakes easily, and manage multiple versions of your project like a pro.</p><p>While visual tools are great, knowing the commands means you’re never limited by an interface. Whether you’re deploying a web application, collaborating with others, or managing a personal project, Git ensures your work remains safe, traceable, and efficient.</p><p>In the end, Git isn’t just a tool — it’s part of the language every developer speaks.</p><p>Would you like me to <strong>adapt this with Medium formatting</strong> (like subtitles, clean spacing, and readability tweaks for posting)? I can make it ready to paste directly into your Medium editor.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3548c09506e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>