<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Aura – Architecture Improvements Proposals</title>
    <link>/docs/architecture-improvements-proposals/</link>
    <description>Recent content in Architecture Improvements Proposals on Aura</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    
	  <atom:link href="/docs/architecture-improvements-proposals/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Docs: </title>
      <link>/docs/architecture-improvements-proposals/202506-dapr-analysis/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/architecture-improvements-proposals/202506-dapr-analysis/</guid>
      <description>
        
        
        &lt;h1 id=&#34;dapr-analysis&#34;&gt;DAPR analysis&lt;/h1&gt;


&lt;div class=&#34;pageinfo pageinfo-primary&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://dapr.io/&#34;&gt;DAPR (Distributed Application Runtime)&lt;/a&gt; is a framework designed to simplify the development of microservices-based applications.&lt;/p&gt;
&lt;p&gt;It provides a set of building blocks that help developers address common challenges in distributed applications, such as service communication, state management, event publishing and subscription, and more.&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&#34;change-motivation&#34;&gt;Change motivation&lt;/h2&gt;
&lt;p&gt;The motivation behind adopting DAPR in our microservices platform is to &lt;strong&gt;enhance the development and operational efficiency&lt;/strong&gt; of distributed applications.&lt;/p&gt;
&lt;p&gt;DAPR provides a standardized way to handle common microservices challenges, such as service discovery, state management, and event-driven communication, which can significantly &lt;strong&gt;reduce the complexity of building and maintaining microservices architectures&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;
&lt;p&gt;Currently, our platform relies on custom implementations for these functionalities, leading to increased development time and potential inconsistencies. By integrating DAPR, we aim to streamline our microservices development process, improve scalability, and enhance the overall reliability of our applications.&lt;/p&gt;
&lt;p&gt;Moreover, DAPR would minimize the &lt;strong&gt;complexity of new services deployment&lt;/strong&gt; leaning on features such as automatic service discovery and built-in support for various state stores and message brokers. This will allow our development teams to focus more on business logic rather than infrastructure concerns, ultimately accelerating our time to market and improving the maintainability of our codebase.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Date&lt;/th&gt;
&lt;th&gt;Proposal leadership team&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;June 2025&lt;/td&gt;
&lt;td&gt;Aura Engineering team&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;advantages-of-using-dapr-in-a-microservices-platform&#34;&gt;Advantages of using DAPR in a microservices platform&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Complexity abstraction&lt;/strong&gt;: DAPR abstracts the complexity of communication between microservices, allowing developers to focus on business logic.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Portability&lt;/strong&gt;: Being language and platform agnostic, DAPR can run in any environment, whether in the cloud or on-premises servers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scalability&lt;/strong&gt;: It facilitates horizontal scalability of services, enabling applications to grow as needed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interoperability&lt;/strong&gt;: DAPR supports multiple programming languages and protocols, making it easier to integrate heterogeneous services.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security&lt;/strong&gt;: It provides built-in mechanisms for authentication and authorization between services.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rich ecosystem&lt;/strong&gt;: Includes building blocks such as service invocation, state management, event publishing/subscription, and more.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;dapr-architecture&#34;&gt;DAPR architecture&lt;/h2&gt;
&lt;p&gt;DAPR&amp;rsquo;s architecture is designed to provide a flexible and modular framework for building distributed applications.&lt;/p&gt;
&lt;p&gt;It consists of a control plane and a data plane, where the control plane manages configurations and policies, while the data plane handles the actual service interactions.&lt;/p&gt;
&lt;h3 id=&#34;architecture-diagram&#34;&gt;Architecture diagram&lt;/h3&gt;
&lt;p&gt;Below is a visual representation of DAPR&amp;rsquo;s architecture:&lt;/p&gt;
&lt;pre class=&#34;mermaid&#34;&gt;graph TD
    classDef graphTitle font-size: 20px, font-weight: bold, fill:#f0f0f0, stroke:#333, stroke-width:2px;
    subgraph Control Plane
        A[Configuration Management]
        B[Policy Enforcement]
        C[Monitoring and Observability]
        D[Service Discovery]
        E[Scaling and Resilience]
    end
        F[Sidecars]
    subgraph Data Plane
        G[Service Invocation]
        H[State Management]
        I[Publish and Subscribe]
        J[Bindings]
    end

    A --&amp;gt; F
    B --&amp;gt; F
    C --&amp;gt; F
    D --&amp;gt; F
    E --&amp;gt; F
    F --&amp;gt; G
    F --&amp;gt; H
    F --&amp;gt; I
    F --&amp;gt; J&lt;/pre&gt;
&lt;p&gt;This diagram illustrates how the control plane and data plane interact to enable DAPR&amp;rsquo;s functionalities, ensuring seamless communication and management of distributed applications.&lt;/p&gt;
&lt;h3 id=&#34;components-of-dapr-architecture&#34;&gt;Components of DAPR Architecture&lt;/h3&gt;
&lt;p&gt;DAPR&amp;rsquo;s architecture is composed of several key components that work together to enable microservices communication and management:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Sidecars&lt;/strong&gt;: These are lightweight containers that run alongside each microservice, providing DAPR&amp;rsquo;s functionalities such as service invocation, state management, and event handling.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Building blocks&lt;/strong&gt;: DAPR offers modular building blocks for common tasks, including:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Service invocation&lt;/strong&gt;: Enables direct communication between services.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;State management&lt;/strong&gt;: Provides distributed state storage.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Publish and subscribe&lt;/strong&gt;: Facilitates event-driven communication.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bindings&lt;/strong&gt;: Connects services to external systems like databases and message queues.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Control plane&lt;/strong&gt;: Manages the configuration, security, and monitoring of DAPR instances across the platform.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data plane&lt;/strong&gt;: Handles the actual runtime operations, including service-to-service communication and data processing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;APIs&lt;/strong&gt;: DAPR exposes APIs that developers can use to interact with its features programmatically.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;These components collectively simplify the development and operation of distributed applications, ensuring scalability, portability, and ease of integration.&lt;/p&gt;
&lt;h3 id=&#34;sidecars-in-dapr&#34;&gt;Sidecars in DAPR&lt;/h3&gt;
&lt;p&gt;In the context of DAPR, a &amp;ldquo;sidecar&amp;rdquo; is a container that runs alongside each microservice on the same machine or pod. This container acts as an intermediary that provides DAPR capabilities to the microservice. Sidecars enable:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Service communication&lt;/strong&gt;: Facilitate service invocation and message transmission.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;State management&lt;/strong&gt;: Provide distributed state storage.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Event publishing and subscription&lt;/strong&gt;: Allow services to communicate through events.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integration with external resources&lt;/strong&gt;: Simplify connections to databases, message queues, and other external services.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;sequence-diagram-communication-flows-in-dapr&#34;&gt;Sequence diagram: communication flows in DAPR&lt;/h4&gt;
&lt;p&gt;Below is a simplified sequence diagram illustrating how communication works in DAPR:&lt;/p&gt;
&lt;pre class=&#34;mermaid&#34;&gt;sequenceDiagram
    participant ServiceA
    participant DAPR-SidecarA
    participant DAPR-SidecarB
    participant ServiceB

    ServiceA-&amp;gt;&amp;gt;DAPR-SidecarA: Invoke ServiceB
    DAPR-SidecarA-&amp;gt;&amp;gt;DAPR-SidecarB: Forward request
    DAPR-SidecarB-&amp;gt;&amp;gt;ServiceB: Deliver request
    ServiceB-&amp;gt;&amp;gt;DAPR-SidecarB: Respond
    DAPR-SidecarB-&amp;gt;&amp;gt;DAPR-SidecarA: Forward response
    DAPR-SidecarA-&amp;gt;&amp;gt;ServiceA: Deliver response&lt;/pre&gt;
&lt;p&gt;This diagram demonstrates how DAPR sidecars facilitate communication between services, ensuring seamless interaction and abstraction of complexity.&lt;/p&gt;
&lt;h3 id=&#34;events-in-dapr&#34;&gt;Events in DAPR&lt;/h3&gt;
&lt;p&gt;DAPR uses a publish-and-subscribe model to manage events. This model allows services to communicate asynchronously and decoupled. Events in DAPR have the following characteristics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Decoupling&lt;/strong&gt;: Event producers and consumers do not need to know each other.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scalability&lt;/strong&gt;: The system can handle large volumes of events without affecting performance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compatibility with multiple brokers&lt;/strong&gt;: DAPR supports various messaging systems such as Kafka, RabbitMQ, Azure Service Bus, among others.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ease of use&lt;/strong&gt;: Developers can define their subscriptions and publications easily through configurations.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;state-management-with-redis&#34;&gt;State management with Redis&lt;/h3&gt;
&lt;p&gt;DAPR supports state management by providing a distributed state store that can be backed by various storage solutions, including Redis. Redis is a popular in-memory data structure store that is often used for caching, session management, and real-time analytics.&lt;/p&gt;
&lt;h4 id=&#34;how-dapr-uses-redis-for-state-management&#34;&gt;How DAPR uses Redis for state management&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Configuration&lt;/strong&gt;: Developers can configure DAPR to use Redis as the state store by specifying Redis connection details in the DAPR configuration file.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Key-value storage&lt;/strong&gt;: Redis allows DAPR to store and retrieve state in a key-value format, making it simple and efficient.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Persistence&lt;/strong&gt;: While Redis is primarily an in-memory store, it can persist data to disk for durability.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scalability&lt;/strong&gt;: Redis can be scaled horizontally to handle large amounts of state data across distributed systems.&lt;/li&gt;
&lt;/ol&gt;
&lt;h5 id=&#34;example-use-case&#34;&gt;Example use case&lt;/h5&gt;
&lt;p&gt;Imagine a shopping cart application where user session data needs to be stored temporarily. DAPR can use Redis to store the cart state, ensuring fast access and updates:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Write state&lt;/strong&gt;: When a user adds an item to the cart, DAPR writes the state to Redis.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Read state&lt;/strong&gt;: When the user views the cart, DAPR retrieves the state from Redis.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Delete state&lt;/strong&gt;: When the user checks out, DAPR deletes the state from Redis.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By leveraging Redis, DAPR ensures efficient and reliable state management for distributed applications.&lt;/p&gt;
&lt;h3 id=&#34;control-plane-in-dapr&#34;&gt;Control plane in DAPR&lt;/h3&gt;
&lt;p&gt;The control plane in DAPR is responsible for managing the overall configuration, security, and monitoring of the runtime environment. It ensures that the distributed application operates smoothly and adheres to defined policies.&lt;/p&gt;
&lt;h4 id=&#34;key-responsibilities-of-the-control-plane&#34;&gt;Key responsibilities of the control plane&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Configuration management&lt;/strong&gt;: The control plane handles the configuration of DAPR components, including sidecars, building blocks, and integrations with external systems.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Policy enforcement&lt;/strong&gt;: It ensures that security policies, resource limits, and other operational rules are applied consistently across the platform.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitoring and observability&lt;/strong&gt;: The control plane provides tools and interfaces for monitoring the health and performance of DAPR instances and microservices.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Service discovery&lt;/strong&gt;: It facilitates the discovery of services within the distributed application, enabling seamless communication between microservices.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scaling and resilience&lt;/strong&gt;: The control plane supports scaling operations and ensures resilience by managing failover and recovery mechanisms.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;By centralizing these responsibilities, the control plane simplifies the management of distributed applications and enhances their reliability and security.&lt;/p&gt;
&lt;h3 id=&#34;cost-implications-of-dapr&#34;&gt;Cost implications of DAPR&lt;/h3&gt;
&lt;p&gt;When adopting DAPR, it is important to consider the cost implications of its components:&lt;/p&gt;
&lt;h4 id=&#34;sidecars&#34;&gt;Sidecars&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Lightweight and efficient&lt;/strong&gt;: DAPR sidecars are designed to be lightweight, consuming minimal resources. They run alongside microservices and provide essential functionalities without adding significant overhead.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Almost free&lt;/strong&gt;: The resource usage of sidecars is negligible in most scenarios, making them an economical choice for enabling DAPR features.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;control-plane&#34;&gt;Control plane&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Resource intensive&lt;/strong&gt;: Unlike sidecars, the control plane requires dedicated resources to manage configurations, policies, monitoring, and scaling operations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Operational costs&lt;/strong&gt;: The control plane introduces additional costs related to infrastructure, maintenance, and monitoring tools.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scalability considerations&lt;/strong&gt;: As the platform scales, the control plane may need to be expanded to handle increased workloads, further adding to the costs. This would mean deploying new nodes in the environment, that would also mean extra charges.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The overall cost of the control plane is based on the number of nodes needed to support it. As an estimation, it would need adding 1 extra node to the current environment in the case of the production environment in Spain and 2 extra nodes in the case of the production environment in Brazil. Assuming the cost of each node of the family &lt;em&gt;&lt;strong&gt;D4as v4&lt;/strong&gt;&lt;/em&gt; is around 150 € per month (this is the raw price shown publicly in Microsoft pricing page, without any discounts and for west europe region), the monthly cost for the control plane would be approximately:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Spain: 1 nodes * 150 € = 150 € per month&lt;/li&gt;
&lt;li&gt;Brazil: 2 nodes * 150 € = 300 € per month&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Prices in June 2025 &lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;
&lt;img src=&#34;../../images/architecture-improvements-proposals/microsoft-vm-pricing-june2025.png&#34; alt=&#34;Microsoft VM prices&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;DAPR is a powerful tool for building distributed applications based on microservices. Its focus on &lt;strong&gt;simplicity&lt;/strong&gt;, &lt;strong&gt;portability&lt;/strong&gt;, and &lt;strong&gt;scalability&lt;/strong&gt; makes it an ideal choice for developers looking to optimize their microservices platforms. Sidecars and the event model are key components that facilitate communication and integration between services, making applications more robust and easier to maintain.&lt;/p&gt;
&lt;div class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id=&#34;fn:1&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://azure.microsoft.com/en-us/pricing/details/virtual-machines/linux/?cdn=disable#pricing&#34;&gt;https://azure.microsoft.com/en-us/pricing/details/virtual-machines/linux/?cdn=disable#pricing&lt;/a&gt;&amp;#160;&lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

      </description>
    </item>
    
  </channel>
</rss>
