<?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 José Escrich on Medium]]></title>
        <description><![CDATA[Stories by José Escrich on Medium]]></description>
        <link>https://medium.com/@jescrich_57703?source=rss-edd6ede222e9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*dtKMYzigEnUK67uC</url>
            <title>Stories by José Escrich on Medium</title>
            <link>https://medium.com/@jescrich_57703?source=rss-edd6ede222e9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 10:34:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jescrich_57703/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[Error Detection in Enterprise Software: Time, Costs, and Challenges]]></title>
            <link>https://medium.com/@jescrich_57703/error-detection-in-enterprise-software-time-costs-and-challenges-abff479ea24f?source=rss-edd6ede222e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/abff479ea24f</guid>
            <category><![CDATA[incident-management]]></category>
            <category><![CDATA[observability-tools]]></category>
            <category><![CDATA[enterprise-architecture]]></category>
            <category><![CDATA[on-call-rotation]]></category>
            <category><![CDATA[on-call]]></category>
            <dc:creator><![CDATA[José Escrich]]></dc:creator>
            <pubDate>Thu, 26 Jun 2025 23:35:12 GMT</pubDate>
            <atom:updated>2025-06-26T23:35:12.145Z</atom:updated>
            <content:encoded><![CDATA[<h3>Time and Costs Associated with Software Error Detection</h3><p>Late detection of errors in enterprise software consumes significant amounts of time and resources. Developers typically spend a considerable portion of their work — sometimes over half — debugging and correcting software issues. Globally, millions of developer hours per year are lost to debugging, translating to billions of dollars annually. Resolving a single software issue can take an average of 13 engineering hours. Enterprises in the United States alone invest billions each year just identifying and fixing software defects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aUx7OyDKD_2VzlOLyLCELA.png" /></figure><p>Beyond developer time, business operations suffer greatly from undetected errors, as system downtime can incur costs averaging thousands of dollars per minute due to operational disruptions, customer impact, and reputational damage. Organizations often track metrics like Mean Time to Detect (MTTD) and Mean Time to Resolve (MTTR) to evaluate their incident response capabilities. Yet, many companies still face significant delays between the occurrence of an error and its detection, escalating both financial and operational losses.</p><h3>Typical Procedure for Finding Production Errors Through Log Analysis</h3><p>When a problem arises in a production environment, IT teams generally follow these steps:</p><ol><li><strong>Symptom or Initial Alert Detection:</strong> Teams receive alerts via monitoring tools or user reports that highlight an issue or affected service.</li><li><strong>Collection of Relevant Logs:</strong> Engineers extract logs from servers or centralized systems across distributed components.</li><li><strong>Searching for Clues in Logs:</strong> Analysts comb through logs looking for error codes, severity flags, or abnormal patterns.</li><li><strong>Identification of Suspicious Logs:</strong> Candidates for the root cause are shortlisted based on timestamp correlation or error indicators.</li><li><strong>Tracing Errors in the Source Code:</strong> Logs are mapped to the corresponding source code using stack traces or logging statements.</li><li><strong>Diagnosis and Reproduction:</strong> Engineers attempt to replicate the issue or diagnose it through further inspection of the affected module.</li></ol><p>This process is often repeated multiple times and can involve incorrect assumptions, making it frustratingly slow and mentally taxing.</p><h3>Challenges in Analyzing Extensive and Dispersed Logs</h3><p>Modern systems produce massive volumes of log data. Detecting errors amid this noise is a needle-in-a-haystack problem. Key challenges include:</p><ul><li><strong>Overwhelming Volume and Noise:</strong> Logs are flooded with routine entries, hiding anomalies.</li><li><strong>Lack of Centralization:</strong> Logs from various services are fragmented across systems.</li><li><strong>Non-Obvious Indicators:</strong> Many issues don’t throw explicit errors but cause subtle behavioral shifts.</li><li><strong>Complex Distributed Architectures:</strong> Tracing logs across services becomes daunting without strong correlation mechanisms.</li></ul><p>While traditional log management solutions help, the sheer complexity of modern architectures often surpasses what human operators can keep up with.</p><h3>WHAWIT: A New Era of Autonomous Error Detection</h3><p>This is where <strong>WHAWIT</strong> changes the game. Designed for modern observability, WHAWIT uses a non-deterministic analysis engine that can connect to your existing logging sources — such as Datadog, New Relic, or even raw flat files — and instantly translate logs into actionable insights. Instead of digging through logs, you simply ask a question in natural language:</p><blockquote><em>“Why did the payment service fail at 2:14 AM?”</em></blockquote><p>WHAWIT analyzes the complete context, correlates anomalies, and delivers a high-confidence diagnosis in seconds — cutting MTTR by over 80% on average.</p><p>Key benefits:</p><ul><li>✅ <strong>No dashboards or grep needed</strong></li><li>✅ <strong>Instant analysis across services</strong></li><li>✅ <strong>Reduces engineer time spent debugging</strong></li><li>✅ <strong>Prevents lost revenue by resolving incidents faster</strong></li><li>✅ <strong>Pays for itself after a single major incident</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*orff7MTCzyTRNM7-tJuBpQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AtyApE6V_4uUxdvzqkCzlA.png" /></figure><p>Whether you’re a DevOps engineer on call at 3 AM or a CTO evaluating risk mitigation strategies, WHAWIT helps your team move from firefighting to foresight.</p><h3>Common Tools for Log Analysis and Error Monitoring</h3><p>Traditional tools still play an important role:</p><ul><li><strong>Splunk:</strong> Real-time indexing and alerting across large data streams.</li><li><strong>Elastic Stack (ELK):</strong> Open-source search and visualization.</li><li><strong>Datadog:</strong> Unified observability platform.</li><li><strong>Sentry:</strong> Real-time error tracking and developer-centric diagnostics.</li></ul><p>But even these require human interaction, custom dashboards, or predefined alerting rules. WHAWIT complements these tools by <strong>eliminating manual guesswork</strong> and proactively offering root-cause insights through a conversational interface.</p><h3>Conclusion: From Challenge to Opportunity</h3><p>The difficulty in detecting and diagnosing software errors is not just a technical inconvenience — it’s a business liability. While observability stacks provide necessary visibility, they still rely heavily on human cognition and structured investigation.</p><p><strong>WHAWIT</strong> represents a leap forward: from reactive monitoring to autonomous understanding. By bridging the gap between logs and answers, WHAWIT offers a smarter, faster, and more cost-effective way to manage the chaos of production incidents.</p><p>👉 <a href="https://app.whawit.ai/">Explore WHAWIT</a> and try the ROI calculator to see how much your team could save.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abff479ea24f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Harnessing the Adapter Pattern in Microservice Architectures for Vendor Agnosticism]]></title>
            <link>https://medium.com/@jescrich_57703/harnessing-the-adapter-pattern-in-microservice-architectures-for-vendor-agnosticism-debc21d2fe21?source=rss-edd6ede222e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/debc21d2fe21</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[José Escrich]]></dc:creator>
            <pubDate>Tue, 07 Nov 2023 14:53:17 GMT</pubDate>
            <atom:updated>2023-11-07T14:53:17.144Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vVJFooCrWB6QPBmM9OxAiw.png" /></figure><p>In a microservice environment characterized by diverse vendor APIs and disparate payload structures, the Adapter Service Pattern emerges as a vital strategy. This article explores the design and implementation of an adapter as a standalone microservice, complete with Swagger documentation, facilitating seamless and maintainable vendor integrations.</p><p>Microservices architectures thrive on the principles of modularity and flexibility, yet they face the challenge of integrating with multiple external vendor APIs, each with unique payload structures. The Adapter Service Pattern, implemented as a distinct microservice with a clear Swagger definition, offers a robust solution. This approach ensures that microservices remain loosely coupled and that external API changes have minimal impact on the system.</p><h3>The Adapter Service Pattern</h3><p>The traditional Adapter Pattern is a well-established design principle used within applications to reconcile differences between two incompatible interfaces, allowing them to work together seamlessly. Typically, this pattern is implemented within the application itself, where it directly wraps an incompatible interface in a compatible one, translating requests and responses on-the-fly.</p><p>In contrast, the Adapter Service Pattern elevates this concept to the architectural level in a microservices ecosystem. Instead of embedding adapters in individual applications or services, the Adapter Service Pattern advocates for the creation of a dedicated microservice whose sole responsibility is to act as the intermediary between the system and external vendor APIs. This microservice encapsulates all the logic needed to translate and map disparate data formats to and from a Canonical Data Model, thereby serving as a central point of integration.</p><p>The main difference lies in the scope and the level of abstraction: The traditional Adapter Pattern is a design solution within the codebase of a service, while the Adapter Service Pattern is an architectural component that operates at the network level, potentially serving multiple services within the microservices architecture. This separation of concerns not only simplifies individual microservices by offloading the integration complexity but also offers a more scalable and maintainable approach to handling external API integrations.</p><h3>Advantages of an Adapter Service in Microservices</h3><p>An Adapter Service, as a standalone component, offers distinct advantages:</p><ol><li><strong>Decoupling:</strong> It decouples the internal services from the intricacies of external APIs.</li><li><strong>Centralized Management:</strong> All adaptations occur in a single service, simplifying management and monitoring.</li><li><strong>Scalability:</strong> The Adapter Service can scale independently based on the load from external vendors.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6dKiglSkut5zSgJ19vJ9iQ.png" /><figcaption>An adapter service illustration</figcaption></figure><p>The diagram presents a microservices architecture designed to handle vendor integrations.</p><ul><li><strong>Consumer</strong>: This represents the client or user who makes requests.</li><li><strong>API Gateway</strong>: This is the primary entry point for all incoming requests from consumers. It acts as a reverse proxy, routing requests to the appropriate services within the architecture. The API Gateway may also handle cross-cutting concerns such as authentication, SSL termination, and rate limiting.</li><li><strong>Products Service</strong>: This is a microservice responsible for managing product-related operations.</li><li><strong>Orders Service</strong>: Similarly, this microservice handles everything related to order processing. It has its own dedicated database for managing orders data.</li><li><strong>Vendor Service</strong>: This component acts as a liaison between the Orders Service and the specific vendor services. It’s an aggregator of vendor adapters or a separate microservice that directly communicates with each Vendor Adapter Service.</li><li><strong>Vendor A/B/C Adapter Service</strong>: These are specialized microservices that translate or adapt the requests and responses between the Orders Service and the external vendor services. Each adapter service is tailored to interact with a specific vendor, ensuring that data formats and protocols match the vendor’s requirements.</li><li><strong>Vendor A/B/C</strong>: These represent the external vendor services that the architecture needs to integrate with. They are the final recipients of requests routed through the adapter services.</li><li><strong>Vendor D Native</strong>: This Vendor service can interact directly with the architecture without the need for an adapter service, it already adheres to the expected communication protocols and data formats.</li></ul><h3>Designing an Adapter Service with Swagger</h3><p>Swagger, or OpenAPI, provides a language-agnostic specification for REST APIs, which is invaluable for designing an Adapter Service. This section outlines how to define the Swagger specification for an Adapter Service that abstracts multiple vendor APIs.</p><p><strong>Implementing an Adapter Service with TypeScript and Swagger</strong></p><p>When implementing an Adapter Service that conforms to a Swagger (OpenAPI) specification, it’s essential to define clear and concise models for the incoming and outgoing data structures. In this context, OrderRequest will represent the incoming order data as received from various vendors, while OrderResponse will be the standardized data format that our microservices will consume and understand.</p><p><strong>Example Swagger Definition</strong></p><pre>swagger: &#39;2.0&#39;<br>info:<br>  description: Adapter Service API for Order Processing<br>  version: 1.0.0<br>  title: Order Adapter Service<br><br>paths:<br>  /orders:<br>    post:<br>      summary: Accepts and transforms an order request into a standardized response<br>      operationId: transformOrderRequest<br>      consumes:<br>        - application/json<br>      produces:<br>        - application/json<br>      parameters:<br>        - in: body<br>          name: orderRequest<br>          description: Order data from the vendor<br>          required: true<br>          schema:<br>            $ref: &#39;#/definitions/OrderRequest&#39;<br>      responses:<br>        200:<br>          description: Successfully transformed order request to standard response<br>          schema:<br>            $ref: &#39;#/definitions/OrderResponse&#39;<br>        400:<br>          description: Invalid order request<br><br>definitions:<br>  OrderRequest:<br>    type: object<br>    required:<br>      - vendorId<br>      - orderDetails<br>    properties:<br>      vendorId:<br>        type: string<br>        description: Unique identifier for the vendor<br>      orderDetails:<br>        $ref: &#39;#/definitions/OrderDetails&#39;<br>  <br>  OrderDetails:<br>    type: object<br>    required:<br>      - orderId<br>      - items<br>    properties:<br>      orderId:<br>        type: string<br>        description: Vendor&#39;s order identifier<br>      items:<br>        type: array<br>        items:<br>          $ref: &#39;#/definitions/Item&#39;<br><br>  Item:<br>    type: object<br>    required:<br>      - sku<br>      - quantity<br>    properties:<br>      sku:<br>        type: string<br>        description: Stock Keeping Unit to uniquely identify a product<br>      quantity:<br>        type: integer<br>        description: The quantity of the product ordered<br>  <br>  OrderResponse:<br>    type: object<br>    required:<br>      - orderId<br>      - customer<br>      - items<br>      - status<br>    properties:<br>      orderId:<br>        type: string<br>        description: A unique identifier for the order within our system<br>      customer:<br>        $ref: &#39;#/definitions/Customer&#39;<br>      items:<br>        type: array<br>        items:<br>          $ref: &#39;#/definitions/Product&#39;<br>      status:<br>        type: string<br>        description: The status of the order<br>        enum:<br>          - received<br>          - processing<br>          - shipped<br>          - delivered<br><br>  Customer:<br>    type: object<br>    required:<br>      - customerId<br>      - name<br>      - email<br>    properties:<br>      customerId:<br>        type: string<br>        description: A unique identifier for the customer<br>      name:<br>        type: string<br>        description: The name of the customer<br>      email:<br>        type: string<br>        description: The email address of the customer<br><br>  Product:<br>    type: object<br>    required:<br>      - sku<br>      - name<br>      - price<br>    properties:<br>      sku:<br>        type: string<br>        description: Stock Keeping Unit to uniquely identify a product<br>      name:<br>        type: string<br>        description: The name of the product<br>      price:<br>        type: number<br>        format: double<br>        description: The price of a single product unit</pre><p>In this Swagger definition, OrderRequest captures the essence of what the Adapter Service expects to receive from an external vendor’s order system. The Adapter Service will process this request and produce an OrderResponse, which is a standardized data model suitable for use by internal services.</p><p>This structure not only aids in consistent data handling across services but also provides a clear contract for any external vendors or services that need to integrate with the microservice ecosystem, thus ensuring that all parties have a common understanding of the data exchange formats.</p><h3>Canonical Data Model in Adapter Services</h3><p>A Canonical Data Model (CDM) is an architectural pattern used in complex systems integration to provide a consistent, unified data representation of different data formats. It serves as a single point of reference for all data exchanges in a system, reducing the number of data transformations between systems and simplifying the landscape of integration.</p><p>In microservices, a CDM is crucial when services need to communicate with each other or with external APIs. Without a CDM, each service might require a bespoke adapter for each interaction, increasing the complexity and potential for errors. The CDM simplifies this by ensuring all services “speak” the same language, irrespective of the source or destination of the data.</p><p>For instance, consider a scenario where various microservices interact with multiple shipping providers, each with its own unique data format for shipment tracking information. Without a CDM, each service would need to understand and translate each provider’s format. With a CDM, each provider’s data is translated once into the canonical form, and all internal services use this form, ensuring consistency and simplifying the integration process.</p><h3>Example of a Canonical Data Model</h3><p>Let’s say we’re working with order data from different e-commerce platforms. Each platform may have different field names and formats for order details. The CDM would provide a unified structure that captures the essential order information in a consistent format.</p><p>Here is a simple CDM expressed in TypeScript for an e-commerce order:</p><pre>interface CanonicalOrder {<br>  id: string; // A unique identifier for the order<br>  customer: {<br>    id: string; // A unique identifier for the customer<br>    name: string; // The name of the customer<br>    email: string; // The email address of the customer<br>  };<br>  items: Array&lt;{<br>    sku: string; // Stock Keeping Unit to uniquely identify a product<br>    name: string; // The name of the product<br>    quantity: number; // The quantity of the product ordered<br>    price: number; // The price of a single product unit<br>  }&gt;;<br>  orderDate: Date; // The date the order was placed<br>  deliveryDate: Date; // The date the order is expected to be delivered<br>  status: &#39;received&#39; | &#39;processing&#39; | &#39;shipped&#39; | &#39;delivered&#39;; // The status of the order<br>}</pre><p>In this example, the CanonicalOrder interface provides a template for what order information is needed and how it should be structured. This model would be the target for all transformations done by the Adapter Service when receiving data from external vendor APIs. The Adapter Service would map the vendors’ disparate data fields into this canonical form, which is then consistently used by all internal services, databases, and applications.</p><p>By using a CDM, you ensure that despite the heterogeneity of external data sources, internally, the services can rely on a uniform and predictable data structure, greatly simplifying development, maintenance, and scaling of the system.</p><h3>Case Study: A TypeScript Adapter Service</h3><p>The Adapter Service Pattern, with its dedicated microservice and Swagger documentation, provides a systematic approach to managing external vendor integrations. It enhances the robustness and maintainability of microservices by encapsulating the complexity of external communications within a dedicated service.</p><h3>An API gateway as a dispatcher</h3><p>An API gateway serves as the entry point for all client requests, acting as a reverse proxy to forward requests to various microservices. It can efficiently dispatch calls to different vendors by inspecting certain aspects of the incoming request, such as headers or the host header. The host header, in particular, is used to identify the destination service, allowing the gateway to route the request appropriately.</p><p>When a client makes a request to a vendor service, the API gateway examines the host header to determine the intended recipient of the request. For example, if the request contains a header with the value “<a href="http://vendora.services.company.com/">vendorA.services.company.com</a>,” the API gateway can route the request to the appropriate adapter service that handles communication with Vendor A.</p><p>In addition to the host header, custom headers can also be utilized for routing decisions. The gateway can be configured to look for specific custom headers that indicate the desired service or vendor. For instance, a custom header like “X-Vendor-Service: VendorB” could instruct the gateway to send the request to the Adapter Service configured for Vendor B.</p><p>This approach allows for a flexible and dynamic routing mechanism that can easily accommodate the addition of new vendors or changes in the services provided by existing vendors. It provides a centralized point to manage routing logic, making it easier to maintain and update as the ecosystem of vendor services evolves. Furthermore, it abstracts the complexity of the routing from the clients, presenting a unified interface that simplifies client interactions with the backend systems.</p><h3>Conclusion</h3><p>In conclusion, we dived into the intricacies of establishing a microservices architecture that adeptly manages multiple vendor integrations. The pivotal role played by the Adapter Service Pattern illustrates the sophistication required to create seamless interoperability within such a complex system. The strategic use of a Canonical Data Model and the employment of adapters underscore the importance of a well-thought-out approach to system design, where adaptability and scalability are paramount. As we progress in an ever-more connected and vendor-diverse ecosystem, these architectural considerations stand at the forefront, dictating the efficiency and agility of business operations. Embracing these patterns and models is essential for any enterprise looking to thrive in the fast-paced and modular world of modern software development and system integration.</p><p>About me: <a href="https://www.linkedin.com/in/jescrich/">https://www.linkedin.com/in/jescrich/</a></p><p><strong>References:</strong></p><ol><li>Gamma, E., Helm, R., Johnson, R., &amp; Vlissides, J. (1994). <em>Design Patterns: Elements of Reusable Object-Oriented Software</em>. This foundational text introduces the Adapter Pattern within the broader context of design patterns in software engineering.</li><li>Brown, K. and Woolf, B., 2016. Implementation Patterns of Microservices Architectures. HILLSIDE Proc. of Conf. on Pattern Lang. of Prog. 22 (October 2016), 35 pages. <a href="https://www.hillside.net/plop/2016/papers/proceedings/papers/brown.pdf">https://www.hillside.net/plop/2016/papers/proceedings/papers/brown.pdf</a></li><li>Fowler, M. (2002). <em>Patterns of Enterprise Application Architecture</em>. Discusses patterns that are commonly found in enterprise applications, including the use of a Canonical Data Model to integrate data from various sources.</li><li>Microsoft Azure Architecture Center. (n.d.). <em>Cloud Design Patterns</em>. Retrieved from <a href="https://docs.microsoft.com/en-us/azure/architecture/patterns/">https://docs.microsoft.com/en-us/azure/architecture/patterns/</a>. Provides a collection of cloud design patterns that can be beneficial when designing Adapter Services for cloud-native applications.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=debc21d2fe21" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>