<?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 Dushyant Kumar on Medium]]></title>
        <description><![CDATA[Stories by Dushyant Kumar on Medium]]></description>
        <link>https://medium.com/@dushyant.kumar?source=rss-284ebb22bc69------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Dushyant Kumar on Medium</title>
            <link>https://medium.com/@dushyant.kumar?source=rss-284ebb22bc69------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 11:40:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dushyant.kumar/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[Declarative or Imperative Infrastructure as Code: Does AI Make Terraform and Pulumi Obsolete?]]></title>
            <link>https://aws.plainenglish.io/declarative-or-imperative-infrastructure-as-code-does-ai-make-terraform-and-pulumi-obsolete-308e42553295?source=rss-284ebb22bc69------2</link>
            <guid isPermaLink="false">https://medium.com/p/308e42553295</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[iac]]></category>
            <category><![CDATA[pulumi]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Dushyant Kumar]]></dc:creator>
            <pubDate>Tue, 03 Nov 2026 05:37:40 GMT</pubDate>
            <atom:updated>2026-11-03T05:41:11.955Z</atom:updated>
            <content:encoded><![CDATA[<p>A question that comes up in architecture reviews goes like this:</p><p>&gt; “An AI assistant can write a Python program that stands up our whole environment through the AWS SDK in an afternoon. Why are we still learning HCL, fighting Terraform state, and worrying about HashiCorp’s license? Aren’t declarative tools a thing of the past?”</p><p>This post examines that question by looking at what each approach does, what the tools document about their own behavior, and what the licensing and security records show. The scope is hyperscaler infrastructure: networks, IAM, managed databases, storage, compute, and managed services on AWS, Azure, and Google Cloud. Configuring the inside of a VM with Ansible, Chef, or Puppet is a different topic and is not covered here.</p><p>The short version: AI lowers the cost of writing infrastructure definitions. It does not change what a lifecycle engine does after the definition is written, and that is where declarative and imperative approaches differ. The sections below cover that difference, then the two objections usually raised against declarative tools: security vulnerabilities and licensing.</p><p><strong>What is being compared</strong></p><p>The debate is usually framed as “declarative versus imperative”. It often gets mixed up with a different comparison, “HCL versus general-purpose programming languages”, which leads to tools being placed on the wrong side. The two sides are defined below.</p><p><strong>Declarative infrastructure as code</strong> describes the desired end state, and an engine works out the operations needed to reach it and keep it there. The engine owns resource identity, dependency ordering, diffing, replacement, deletion, and recovery. Terraform and OpenTofu do this with HCL. CloudFormation does it with YAML or JSON templates. [1] Azure Resource Manager does it with JSON or Bicep. [2] Kubernetes-based controllers do it with manifests that are continuously reconciled: Google’s Config Connector, AWS Controllers for Kubernetes, Azure Service Operator, and the cloud-neutral Crossplane. [3][4]</p><p><strong>Imperative infrastructure as code</strong> is a program that performs the provisioning itself: call the API to create a VPC, wait, call the API to create a subnet, store the ID somewhere, handle the failure if step four times out. The program owns the lifecycle. The hyperscalers’ first-party SDKs and CLIs are the usual tools for this.</p><p>Pulumi and AWS CDK are where the mix-up happens. Both use TypeScript, Python, Go, or C#, so they are often classed as imperative. Under the definitions above they are declarative. A Pulumi program constructs a resource graph, and the Pulumi engine diffs it against recorded state and applies the difference, the same model Terraform uses. [5] A CDK app synthesizes a CloudFormation template, and CloudFormation deploys it. [6] In both cases the code is the authoring surface and the model underneath is declarative.</p><p>The distinguishing question is therefore not the language but <strong>who owns the lifecycle: the program or an engine.</strong></p><p><strong>What AI changes, and what it does not</strong></p><p>AI assistants can generate Terraform modules, Bicep files, Pulumi programs, and SDK scripts. That lowers the cost of authoring in every format.</p><p>Authoring is one of several costs in the life of an infrastructure definition. The others include:</p><p>- <strong>Reviewing a change</strong> before it reaches production.</p><p>- <strong>Recovering</strong> when a deployment fails partway through.</p><p>- <strong>Detecting and correcting drift</strong> when a resource is edited outside the definition, for example in the console.</p><p>- <strong>Patching</strong> the toolchain when a vulnerability is disclosed.</p><p>- <strong>Migrating</strong> when a tool, license, or API is no longer viable.</p><p>Generating code faster does not by itself reduce these costs. Where AI increases the number of changes a team produces, the review and operating load grows with it. The relevant question for each approach is what it provides to keep that load manageable.</p><p><strong>Reviewability: the plan as the review artifact</strong></p><p>Declarative engines produce a plan before applying a change: Terraform `plan`, Pulumi `preview`, CloudFormation change sets, ARM and Bicep `what-if`. The plan lists, in a bounded and machine-readable form, which resources will be created, updated in place, replaced, or deleted. A reviewer can read the plan without reading the code that produced it, regardless of whether a person or an AI assistant wrote that code.</p><p>A plan is not a guarantee. Unknown values, provider behavior, and changes between preview and apply can alter the outcome. Engines also differ in how tightly the apply is bound to what was reviewed. Terraform can save a plan to a file and apply exactly that plan. [7] `pulumi up` runs the program again and computes a fresh preview, unless update plans are used; Pulumi lists update plans as a preview feature. [8] In every case, the plan is smaller than the code that produced it, and policy tools can evaluate it to block privilege escalation, public exposure, or destructive replacement.</p><p>An imperative provisioner has no equivalent artifact. The only way to know what an SDK script will do is to read the script, including its retry logic, conditional branches, and any state store it uses. Review effort therefore scales with the size of the program, not with the size of the change.</p><p><strong>The cost of imperative IaC: rebuilding the engine</strong></p><p>A team that writes its own provisioner takes on the problems an engine would otherwise handle:</p><p>- <strong>Idempotency.</strong> If a create call times out, was the resource created? Running the script twice must not create duplicates.</p><p>- <strong>Resource identity.</strong> When a definition is renamed, how does the script know it maps to an existing resource rather than a new one?</p><p>- <strong>Dependency ordering and parallelism.</strong> Which resources can be created concurrently, and which must wait?</p><p>- <strong>Replacement semantics.</strong> Which property changes require destroying and recreating a resource, and how is data protected when that happens?</p><p>- <strong>Partial failure and rollback.</strong> What is the recovery procedure when step 12 of 40 fails?</p><p>- <strong>Drift detection.</strong> How does the script learn that a security group was changed in the console?</p><p>- I<strong>mport and adoption.</strong> How are pre-existing resources brought under management?</p><p>- <strong>State.</strong> Where is the record of what the script owns, and how is that record protected and backed up?</p><p>Terraform, Pulumi, CloudFormation, and ARM each implement these functions, with the limitations described in the next section, and each is maintained by a dedicated engineering team. A custom provisioner has to implement them in-house.</p><p>Some hyperscaler APIs help with individual calls: idempotency tokens, asynchronous operation handles, and preconditions. These features apply per call. They do not provide an end-to-end lifecycle or a plan.</p><p>The comparison is therefore between a third-party engine and an in-house engine that covers the same functions, rather than between a third-party engine and plain SDK calls.</p><p>Imperative code is still used where it fits: when an engine cannot express something, for narrow one-off tasks, and in generators that <em>*emit*</em> declarative definitions for an engine to deploy. AWS CDK is an example of the last case: code that produces a CloudFormation template. [6] A generator reduces repetition while leaving the lifecycle with the engine. A provisioner moves the lifecycle into the program.</p><p><strong>Declarative does not mean safe, and it does not mean YAML</strong></p><p>Two points cause confusion in this debate.</p><p>First, declarative is not a file format. Terraform uses HCL (or an equivalent JSON syntax). CloudFormation accepts YAML or JSON. ARM is JSON; Bicep is a DSL that compiles to it. Pulumi and CDK use general-purpose languages. Conversely, a YAML file that lists imperative pipeline steps is a script written in YAML syntax. “Declarative” describes who owns the lifecycle, not what the file looks like.</p><p>Second, declarative does not mean automatically safe or automatically reconciled. A ten-line HCL block can grant administrator access. The Terraform and Pulumi CLIs only act when invoked. CloudFormation’s drift detection covers only resources that support it (others are reported as `NOT_CHECKED`) and only checks properties that are explicitly set in the template. [9] The hosted products close part of this gap: Pulumi Deployments can detect drift on a schedule and optionally remediate it by re-applying the program, and HCP Terraform runs scheduled drift detection as part of its health assessments. [10][11] Scheduled re-apply is not continuous reconciliation. Continuous reconciliation comes from the Kubernetes controller model, which GitOps builds on. The OpenGitOps principles require desired state to be declarative, versioned and immutable, pulled automatically, and continuously reconciled. [12] A hand-written SDK provisioner has no declared desired state for a controller to reconcile toward, so it does not meet the first principle. Running a script on every git push is CI, not reconciliation.</p><p><strong>Objection one: these tools have vulnerabilities</strong></p><p>They do. HashiCorp publishes security bulletins for Terraform, and vulnerabilities in Terraform, OpenTofu, and Pulumi components are tracked in public databases such as OSV. [13] Infrastructure tools also run with broad cloud permissions, so the concern is legitimate.</p><p>A custom provisioner has its own dependency chain: the hyperscaler SDK, the language runtime, every transitive package, the CI runner, and the credentials it holds. Vulnerabilities in those components are disclosed through the same channels. Vulnerabilities in the custom orchestration logic itself have no public advisory process; finding and fixing them falls to the team that wrote it.</p><p>The security controls are largely the same for both approaches, and they apply to the system rather than to the tool: pinned and verified engine, provider, and SDK versions; an inventory of components and a process for watching advisories; short-lived, least-privilege deployment credentials; separation of production from pull-request execution; and treating state, plans, and logs as sensitive data.</p><p>Advisory counts are not a useful comparison between products, because scope, reporting practices, and exposure differ. The operating burden of applying these controls is a more meaningful measure.</p><p><strong>Objection two: licensing is a moving target</strong></p><p>In August 2023 HashiCorp moved Terraform from the Mozilla Public License 2.0 to the Business Source License 1.1. The license permits internal production use and restricts offering Terraform to third parties as a competitive hosted or embedded product; each version converts to MPL 2.0 four years after release. [14] In February 2025 IBM completed its acquisition of HashiCorp, so the license holder has also changed. [15] For organizations using Terraform internally, the BSL terms do not restrict that use. The change did show that the terms can change.</p><p>The community response was OpenTofu, a fork under MPL 2.0 that is a Linux Foundation project and, since April 2025, a CNCF Sandbox project. [16] Pulumi’s core has been licensed under Apache 2.0 since it was open-sourced. [17] CloudFormation and ARM are services with no separate tool license; their use is governed by the cloud provider agreement. The Bicep tooling is open source under the MIT license. [18]</p><p>Licensing for declarative IaC therefore covers a range: no tool license (CloudFormation, ARM), permissive open source (OpenTofu, Pulumi, Bicep), and source-available with restrictions (Terraform). Licensing concerns about one tool can be addressed by choosing another declarative tool, without moving to an imperative approach.</p><p>The same measures reduce exposure to licensing changes, vulnerabilities, and a vendor or project ending:</p><p>- Separate intent (which resources, which properties, which environments) from engine-specific code.</p><p>- Document resource identifiers and ownership, so that a replacement engine can import existing resources rather than recreate them.</p><p>- Test a limited migration periodically.</p><p>- Keep each resource managed by only one engine at a time.</p><p>These measures depend on the desired state being explicit. In a declarative definition it is written down and can be re-expressed for a different engine. In an imperative provisioner it is implicit in the procedural code and has to be reconstructed before a migration.</p><p><strong>Are Terraform and Pulumi obsolete?</strong></p><p>The available evidence points the other way. Google replaced its own native engine, Deployment Manager, with Infrastructure Manager, which is a managed Terraform service; Deployment Manager support ended on April 1, 2026. [19][20] OpenTofu joined the CNCF in April 2025. [16] Pulumi and HCP Terraform have added scheduled drift detection and remediation. [10][11]</p><p>What AI does change is the cost of authoring. Pulumi and CDK already separate authoring (a general-purpose language) from execution (a declarative engine). As assistants generate definitions in any format, the authoring language becomes less of a deciding factor, and the engine’s capabilities become more of one: planning, state, diffing, replacement, recovery, and the reviewable plan. An approach that generates SDK scripts instead of definitions gives those capabilities up.</p><p><strong>Practical implications</strong></p><p>- <strong>Engine choice.</strong> Native engines (CloudFormation, ARM/Bicep) have no third-party tool license and no separate state backend to host. On Google Cloud, the supported native option, Infrastructure Manager, runs Terraform. [19] For multiple clouds or a shared workflow across clouds, Terraform, OpenTofu, and Pulumi each support all three hyperscalers, under the licenses described above.</p><p>- <strong>AI-authored changes.</strong> The review controls that declarative engines support apply equally to AI-generated definitions: an engine-generated plan, policy checks against that plan, and human approval of destructive changes. An assistant that holds production credentials and applies its own output bypasses all three.</p><p>- <strong>Code generation.</strong> Generators that emit declarative definitions, such as CDK, keep the lifecycle in the engine. Custom provisioners move it into code the team must maintain.</p><p>- <strong>Exit planning.</strong> Separating intent from engine-specific code, documenting identifiers and ownership, and testing imports into a replacement engine limit the cost of a future migration, whatever its cause.</p><p><strong>Sources</strong></p><p>Licenses, resource coverage, and security disclosures change over time. Verify exact versions and terms before making an adoption decision.</p><p>1. [AWS: What is CloudFormation?](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html)</p><p>2. [Microsoft: Bicep overview](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/overview).</p><p>3. [Google Cloud: Config Connector overview, reconciliation, and security considerations](https://cloud.google.com/config-connector/docs/overview).</p><p>4. [AWS Controllers for Kubernetes](https://aws-controllers-k8s.github.io/community/docs/community/overview/), [Azure Service Operator](https://azure.github.io/azure-service-operator/), and [Crossplane](https://www.crossplane.io/).</p><p>5. [Pulumi: How Pulumi works](https://www.pulumi.com/docs/iac/concepts/how-pulumi-works/).</p><p>6. [AWS CDK: infrastructure in code deployed through CloudFormation](https://docs.aws.amazon.com/cdk/v2/guide/home.html).</p><p>7. [Terraform: the `plan` command and saved plan files](https://developer.hashicorp.com/terraform/cli/commands/plan).</p><p>8. [Pulumi: update plans](https://www.pulumi.com/docs/iac/concepts/update-plans/).</p><p>9. [AWS: CloudFormation drift detection and its limitations](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html).</p><p>10. [Pulumi Deployments: drift detection and remediation](https://pulumi.com/docs/deployments/deployments/drift/).</p><p>11. [HCP Terraform: health assessments and drift detection](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/health).</p><p>12. [OpenGitOps principles](https://opengitops.dev/).</p><p>13. [HashiCorp security bulletins](https://discuss.hashicorp.com/c/security/52) and the [OSV vulnerability database](https://osv.dev/list?q=terraform). These are disclosure channels, not a complete inventory of every dependency or hosted product.</p><p>14. [HashiCorp: adopting the Business Source License](https://www.hashicorp.com/blog/hashicorp-adopts-business-source-license) and [Terraform’s current repository license](https://github.com/hashicorp/terraform/blob/main/LICENSE). For the fork community’s perspective, see the [OpenTofu manifesto](https://opentofu.org/manifesto/), which is advocacy rather than neutral legal guidance.</p><p>15. [IBM: completion of the HashiCorp acquisition](https://newsroom.ibm.com/2025-02-27-ibm-completes-acquisition-of-hashicorp,-creates-comprehensive,-end-to-end-hybrid-cloud-platform).</p><p>16. [OpenTofu’s repository license](https://github.com/opentofu/opentofu/blob/main/LICENSE) and [CNCF: OpenTofu project page](https://www.cncf.io/projects/opentofu/).</p><p>17. [Pulumi’s core repository license](https://github.com/pulumi/pulumi/blob/master/LICENSE).</p><p>18. [Bicep’s repository license](https://github.com/Azure/bicep/blob/main/LICENSE).</p><p>19. [Google Cloud: Infrastructure Manager overview](https://cloud.google.com/infrastructure-manager/docs/overview).</p><p>20. [Google Cloud: Deployment Manager deprecation](https://cloud.google.com/deployment-manager/docs/deprecations).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=308e42553295" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/declarative-or-imperative-infrastructure-as-code-does-ai-make-terraform-and-pulumi-obsolete-308e42553295">Declarative or Imperative Infrastructure as Code: Does AI Make Terraform and Pulumi Obsolete?</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond Remote Write — Native OTLP Integration in Prometheus 3.0]]></title>
            <link>https://medium.com/@dushyant.kumar/beyond-remote-write-native-otlp-integration-in-prometheus-3-0-6f41cd7b9511?source=rss-284ebb22bc69------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f41cd7b9511</guid>
            <category><![CDATA[prometheus]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[metrics]]></category>
            <category><![CDATA[otlp]]></category>
            <dc:creator><![CDATA[Dushyant Kumar]]></dc:creator>
            <pubDate>Sun, 26 Jan 2025 17:00:46 GMT</pubDate>
            <atom:updated>2025-01-26T17:00:46.648Z</atom:updated>
            <content:encoded><![CDATA[<h3>Beyond Remote Write — Native OTLP Integration in Prometheus 3.0</h3><p>Prometheus has long been a dominant force in metrics monitoring. While Prometheus Remote Write has been the standard for extending its capabilities, the introduction of native OTLP ingestion in Prometheus 2.45 (and further improvements in 3.0) presents a compelling alternative. This blog post revisits the comparison, focusing on this key update.</p><h3>Prometheus Remote Write: The Proven Path</h3><p>Prometheus Remote Write remains a robust mechanism for sending collected metrics to external storage systems. Its benefits include:</p><ul><li><strong>Long-term storage and scalability:</strong> Addresses Prometheus’s local storage limitations and enables distributed metric handling.</li><li><strong>Centralized monitoring:</strong> Aggregates metrics from multiple Prometheus instances.</li><li><strong>Established ecosystem:</strong> Wide support from various monitoring tools and services.</li></ul><p><strong>How it works:</strong> Metrics are encoded in protobuf and sent over HTTP to a remote endpoint (e.g., <a href="https://thanos.io/">Thanos</a>, <a href="https://cortexmetrics.io/">Cortex</a>).</p><p><strong>Advantages:</strong></p><ul><li><strong>Maturity and widespread adoption:</strong> Well-tested and widely used.</li><li><strong>Efficient data transfer:</strong> Protobuf offers compact transmission.</li><li><strong>Direct Prometheus integration:</strong> Seamlessly integrates with existing setups.</li></ul><p><strong>Disadvantages:</strong></p><ul><li><strong>Limited standardization:</strong> While the protobuf format is defined, implementation variations exist.</li><li><strong>Prometheus-centric:</strong> Primarily designed for Prometheus metrics.</li></ul><h3>Prometheus embraces Opentelemetry: Native OTLP support for metrics</h3><p>With Prometheus 2.45 and especially 3.0, Prometheus gained native support for receiving metrics via OTLP. This means Prometheus can directly ingest metrics formatted according to the OTLP specification, eliminating the need for intermediary translation layers.</p><p><strong>How it works:</strong> Prometheus exposes an endpoint that accepts OTLP metrics (typically over gRPC or HTTP). These metrics are then directly stored in Prometheus’s time-series database.</p><p><strong>Advantages:</strong></p><ul><li><strong>Native Prometheus support:</strong> Direct ingestion simplifies the architecture and improves performance.</li><li><strong>Vendor-neutral and open standard:</strong> Promotes interoperability with other observability tools.</li><li><strong>Multi-signal support:</strong> Handles metrics, traces, and logs, aligning with a unified observability approach.</li><li><strong>Growing ecosystem:</strong> Rapid adoption across the observability landscape.</li></ul><p><strong>Disadvantages:</strong></p><ul><li><strong>Relatively newer in the Prometheus context:</strong> While OTLP itself is maturing, the native integration in Prometheus is more recent than Remote Write.</li><li><strong>Potential overhead:</strong> Encoding/decoding OTLP can introduce some overhead, although native integration mitigates this.</li></ul><h3>The Key Difference: Native vs. Remote</h3><p>The most significant difference is the level of integration with Prometheus. Remote Write is a <em>separate</em> mechanism for <em>sending</em> data <em>out</em> of Prometheus. OTLP ingestion is a <em>native</em> mechanism for <em>receiving</em> data <em>into</em> Prometheus. This has several implications:</p><ul><li><strong>Simplicity:</strong> OTLP ingestion simplifies the architecture by eliminating the need for external storage systems for basic OTLP metric collection.</li><li><strong>Performance:</strong> Native integration often leads to better performance compared to sending data externally and potentially retrieving it later.</li><li><strong>Flexibility:</strong> OTLP’s multi-signal support allows for a more unified observability strategy.</li></ul><h3>Choosing the Right Approach: A Modern View</h3><p><strong>Use Remote Write if:</strong></p><ul><li>You require long-term storage or global querying across multiple Prometheus instances (using Thanos or Cortex).</li><li>You’re using a monitoring service that primarily supports Remote Write.</li><li>You have a complex existing setup heavily reliant on Remote Write.</li></ul><p><strong>Use OTLP Ingestion if:</strong></p><ul><li>You’re starting a new project or want to modernize your existing setup.</li><li>You prioritize vendor neutrality and interoperability with other OTel-compliant tools.</li><li>You want a simpler architecture for collecting OTLP metrics.</li><li>You’re already using or planning to use other OpenTelemetry signals (traces, logs).</li></ul><h3>Enabling OTLP in Prometheus</h3><p>To enable OTLP ingestion, you can use the following command-line flag:</p><p>prometheus — web.enable-otlp-receiver</p><p>This flag instructs Prometheus to serve an OTLP metrics receiver on the HTTP path /api/v1/otlp/v1/metrics. For more details, please refer <a href="https://prometheus.io/docs/guides/opentelemetry/">Prometheus documentation on OTLP</a>.</p><p>Sample Application<strong><em> </em></strong>— Please find <a href="https://github.com/cafedemo/modulith">sample spring boot application</a> sending application metrics over OTLP to Prometheus server.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f41cd7b9511" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spring Modulith — A modular approach towards application architecture]]></title>
            <link>https://medium.com/@dushyant.kumar/spring-modulith-a-modular-approach-towards-application-architecture-532e7d7bdc4c?source=rss-284ebb22bc69------2</link>
            <guid isPermaLink="false">https://medium.com/p/532e7d7bdc4c</guid>
            <category><![CDATA[domain-driven-design]]></category>
            <category><![CDATA[spring]]></category>
            <category><![CDATA[microservices-pattern]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[spring-modulith]]></category>
            <dc:creator><![CDATA[Dushyant Kumar]]></dc:creator>
            <pubDate>Sat, 18 Jan 2025 06:00:25 GMT</pubDate>
            <atom:updated>2025-01-18T06:01:36.567Z</atom:updated>
            <content:encoded><![CDATA[<h3>Spring Modulith — A modular approach towards application architecture</h3><p>Spring Modulith combines the best of both monolithic and microservice architectures. It promotes building modular monoliths, enabling developers to structure and deploy applications as logical modules. Each module encapsulates a self-contained, well-defined domain functionality that can be developed, tested, and deployed independently.</p><h4>What are Modules?</h4><p>A module represents a business domain or subdomain identified during the Domain-Driven Design process.</p><p>A more generic approach to architecture involves defining components that map to the underlying framework. For example, a monolithic application with a layered architecture will define presentation layer components, business layer components, and data layer components.</p><p>Modulith suggests adopting a more domain-driven design approach to creating architecture. With well-defined domains, an architect can make better decisions regarding the architecture of each module (domain). Spring Modulith allows the creation of a monolith with domains that are more observable, simpler, and maintainable.</p><p>A domain with an object model, domain events, and boundary context can be easily developed using Spring Modulith. A developer can map domain architecture to Spring components using Spring Modulith.</p><h4>Modulith compared with Microservices</h4><p>A microservices architectural pattern uses domains to define one or more services in a well-defined choreographed structure.</p><p>Spring Modulith is an architecture that can implement design patterns used in microservices. For example, Spring Modulith’s observability starter allows monitoring a transaction using distributed tracing across modules.</p><figure><img alt="Trace using Grafana Tempo" src="https://cdn-images-1.medium.com/max/1024/1*1ZFGtvAajhgOmVKEhWnnVg.png" /><figcaption>Distributed Trace across modules using Grafana Tempo</figcaption></figure><p>In scenarios where accelerated time to market is essential and there aren’t sufficient resources or time to develop a fully-realized microservices architecture, Spring Modulith proves invaluable. It facilitates the swift creation of production-ready applications with reduced infrastructure and lower costs compared to a microservices-based solution. As the application gains momentum and demands a transition to microservices architecture, the Strangler Fig pattern can be employed to incrementally refactor individual modules. This dual-phase approach ensures a faster initial rollout and a smooth, systematic transition to a microservices architecture when needed.</p><h4><strong>Simplifying Existing Microservices Architectures</strong></h4><p>Many microservice implementations suffer from the “distributed monolith” or “Death Star” anti-pattern, where an excessive number of services lead to overly complex inter-service communication and transaction management. To mitigate or avoid this problem, an architect can use Spring Modulith to combine smaller, related services into larger, more cohesive units. Due to Spring Modulith’s compatibility with microservices design patterns, this consolidation is relatively straightforward.</p><p>For a sample Spring Modultih application, visit <a href="https://github.com/cafedemo/modulith">Github Repo</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=532e7d7bdc4c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>