<?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 Emin Bilgic on Medium]]></title>
        <description><![CDATA[Stories by Emin Bilgic on Medium]]></description>
        <link>https://medium.com/@emin_bilgic?source=rss-2b8f547aa00c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*UaOvk_CXo80fNVRkXmXFnw.jpeg</url>
            <title>Stories by Emin Bilgic on Medium</title>
            <link>https://medium.com/@emin_bilgic?source=rss-2b8f547aa00c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 16:22:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@emin_bilgic/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[When Microservices Backfire: Real-World Failures You Can’t Ignore]]></title>
            <link>https://medium.com/iyzico-engineering/when-microservices-backfire-real-world-failures-you-cant-ignore-e14d78e2cfa3?source=rss-2b8f547aa00c------2</link>
            <guid isPermaLink="false">https://medium.com/p/e14d78e2cfa3</guid>
            <category><![CDATA[iyzico]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[articles]]></category>
            <dc:creator><![CDATA[Emin Bilgic]]></dc:creator>
            <pubDate>Mon, 10 Mar 2025 16:58:14 GMT</pubDate>
            <atom:updated>2025-03-10T16:58:14.275Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*vU-aeHh9gyVWhoAoXlXaYA.png" /></figure><p><strong>Every pattern trades one problem for another</strong>. While microservices solve monolithic bottlenecks, they introduce distributed system complexities that can cripple teams unprepared for operational, technical, and financial overhead. From debugging multi-service transactions to managing spiraling cloud costs, this post dissects the <strong>hidden pitfalls</strong> of popular microservice patterns. Using real-world failures (e.g., Ticketmaster outages, Sony’s 48-hour rebuilds), we’ll explore why “modularity at all costs” can backfire — and when sticking to a monolith might save your sanity.</p><h3>Table of Contents</h3><ol><li><strong>API Gateway</strong>: When the Front Door Becomes a Bottleneck</li><li><strong>Service Discovery</strong>: The Maze of Dynamic Systems</li><li><strong>Circuit Breaker</strong>: False Alarms and Fragile Fallbacks</li><li><strong>Saga Pattern</strong>: The Debugging Nightmare</li><li><strong>Database per Service</strong>: Data Duplication Dilemmas</li><li><strong>Event Sourcing</strong>: When History Becomes a Burden</li><li><strong>Sidecar (Service Mesh)</strong>: The Hidden Tax of Complexity</li><li><strong>Summary</strong>: Is the Trade-Off Worth It?</li></ol><h3>API Gateway</h3><h4>Usage &amp; Purpose</h4><p>Acts as a single entry point for clients (web, mobile, or IoT) to interact with backend microservices. It simplifies client-side code by aggregating responses and centralizes security and traffic management.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*2KUDtuU-gFHGKIsGDNUgmg.png" /></figure><h4>Advantages</h4><p><strong>Simplified Client-Side Code</strong>: Combines responses (e.g., merging user profiles with order history) into a single API call.<br><strong>Centralized Security</strong>: Enforces OAuth, JWT validation, and DDoS protection at one layer.<br><strong>Traffic Management</strong>: Handles load balancing, caching, and A/B testing for optimized performance.</p><h4>Disadvantages</h4><p>A crashed gateway renders the entire system unusable, making it a <strong>Single Point of Failure (SPOF)</strong>. While redundant deployments can mitigate this, configuration drift or cloud outages can still cause downtime. For example, even a minor misconfiguration can lead to catastrophic failures during high-traffic events.</p><p>API gateways also introduce <strong>Latency Overhead</strong>, adding 30–100ms per request due to routing and aggregation steps. This delay can be detrimental in real-time systems like trading platforms, where milliseconds matter.</p><p>Finally, balancing resilience and performance demands careful scaling strategies, often resulting in <strong>Operational Costs</strong>. Teams must invest in failover mechanisms, monitoring tools, and skilled personnel to manage the gateway effectively.</p><h4>Real-World Evidence</h4><p><strong>Ticketmaster Outage (2018)</strong><br>During a high-demand ticket sale, a misconfigured API gateway caused a global outage, costing millions in lost revenue. The gateway failed to handle traffic spikes, and redundant instances were improperly configured, leaving no failover. This incident highlights the risks of relying on a single entry point for critical systems.</p><p><strong>Best Buy Black Friday Crash (2019)</strong><br>Overloaded API gateways could not scale dynamically during peak Black Friday traffic, leading to a 2-hour outage. The system’s inability to handle sudden traffic surges underscores the challenges of managing gateways under stress.</p><h3>Service Discovery (e.g., Netflix Eureka)</h3><h4>Usage &amp; Purpose</h4><p>Automatically tracks dynamic service instances (IPs, ports) in cloud environments. Critical for auto-scaling and failover in distributed systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*5JfVoJLG0hkIjfm75FGOjg.png" /><figcaption>Service Discovery</figcaption></figure><h4>Advantages</h4><p><strong>Dynamic Scaling</strong>: Detects new instances without manual intervention, ideal for Kubernetes clusters.<br><strong>Resilience</strong>: Redirects traffic from failed nodes to healthy ones, reducing downtime.</p><h4>Disadvantages</h4><p>Service discovery demands constant health checks and registry updates, especially in dynamic environments like Kubernetes. Maintaining tools such as Netflix Eureka or Consul introduces <strong>operational overhead</strong>, requiring continuous monitoring to ensure service availability.</p><p>As systems scale — such as Uber’s architecture with over 4,000 services — <strong>lookup latency</strong> increases, slowing down critical workflows. This can lead to performance bottlenecks in highly distributed environments.</p><p>Additionally, <strong>misconfigurations</strong> in service discovery can cause traffic to be routed to unhealthy nodes, amplifying failures rather than mitigating them. If the discovery service itself fails, <strong>network dependency</strong> issues arise, preventing new instances from being registered or detected, which can cripple system availability.</p><p>For smaller teams, the complexity of managing a discovery system often outweighs its benefits, making a monolithic approach more practical.</p><h4>Real-World Evidence</h4><p><strong>AWS Outage (2021)</strong><br>A cascading failure in AWS’s health check system led to widespread disruptions in service discovery. Many applications relying on AWS’s Elastic Load Balancing (ELB) and Route 53 for service registration could not detect healthy instances, leading to traffic misrouting and downtime. Companies such as Slack and Adobe experienced significant outages as their microservices failed to discover available nodes, demonstrating the fragility of centralized discovery mechanisms during cloud provider failures.</p><h3>Circuit Breaker (e.g., Hystrix)</h3><h4>Usage &amp; Purpose</h4><p>Monitors service health and blocks requests to failing services to prevent system-wide crashes. Commonly used in payment processing and inventory systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*vzorwu6TsikpfT3ODtGOoQ.png" /><figcaption>Circuit Breaker</figcaption></figure><h4>Advantages</h4><p><strong>Fault Isolation</strong>: Limits failures to a single service (e.g., a broken payment gateway).<br><strong>Graceful Degradation</strong>: Returns cached data or default responses during outages.</p><h4>Disadvantages</h4><p>Circuit breakers are designed to prevent cascading failures, but <strong>overly sensitive configurations</strong> can block healthy services, creating artificial downtime. If thresholds are set too aggressively, temporary slowdowns or minor errors can trigger a full shutdown, unnecessarily halting service availability.</p><p>Teams often <strong>neglect fallback mechanisms</strong>, such as serving cached responses or rerouting traffic, leading to poor user experiences when failures occur—this lack of resiliency results in abrupt errors instead of graceful degradation.</p><p><strong>Manual intervention</strong> is frequently required to reset tripped circuit breakers, prolonging recovery times. Teams must manually assess and restart services without proper automation, delaying system restoration.</p><p>Additionally, <strong>false positives</strong> — where healthy services are incorrectly blocked — force teams into excessive monitoring, increasing operational burden and partially defeating the purpose of automation.</p><h4>Real-World Evidence</h4><p><strong>GitLab Outage (2020)</strong><br>During a routine database upgrade, GitLab’s circuit breaker misinterpreted the temporary slowdown as a failure and <strong>blocked legitimate traffic</strong>, effectively cutting off access to critical services. Since fallback logic had not been properly implemented, users encountered hard failures instead of degraded but functional responses.</p><p>Recovery was further delayed because the circuit breaker required <strong>manual intervention</strong> to reset. This led to a <strong>6-hour outage</strong>, impacting software development workflows and demonstrating the risks of relying too heavily on automated failure prevention without appropriate tuning.</p><h3>Saga Pattern</h3><h4>Usage &amp; Purpose</h4><p>Manages distributed transactions across services using compensating actions (e.g., refunds). Essential for workflows like e-commerce orders or hotel bookings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p4-7kL_sVuNh9gxaqgKAJw.png" /><figcaption>Saga Patterns</figcaption></figure><h4>Advantages</h4><p><strong>Eventual Consistency</strong>: Ensures transactions are complete even if intermediate steps fail.<br><strong>Decentralized Control</strong>: Each service manages its transaction steps.</p><h4>Disadvantages</h4><p>The Saga Pattern’s <strong>Compensation Complexity</strong> is a major drawback. Undoing multi-step transactions requires writing custom code for each compensating action (e.g., refunds, cancellations), which is error-prone and time-consuming.</p><p>Debugging distributed transactions is another challenge. Tracing a failed saga across services demands correlated logging systems, often leading to <strong>Debugging Nightmares</strong>. Without proper tooling, engineers spend hours piecing together fragmented logs.</p><p>Finally, <strong>Partial Failures</strong> leave the system in an inconsistent state. If one step fails, the entire transaction remains incomplete until manually resolved, creating frustration for users and teams alike.</p><h4>Real-World Evidence</h4><p><strong>Monzo Bank (2019)</strong><br>Debugging a payment saga across 15 services took 10+ hours due to fragmented logs. Engineers manually traced events across Kafka topics and service logs to identify the failed step. This incident highlights the operational burden of managing complex workflows in distributed systems.</p><p><strong>British Airways (2017)</strong><br>A payment service outage caused incomplete bookings, but compensation logic failed to roll back reservations. Thousands of customers were left with incomplete bookings, requiring manual fixes. This failure demonstrates the risks of relying on custom compensation logic in critical workflows.</p><h3>Database per Service</h3><h4>Usage &amp; Purpose</h4><p>Each service owns its database, decoupling storage and enabling polyglot persistence. Avoids the bottlenecks of shared databases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*en4zWQQRYp_eLJWeDtmCjw.png" /><figcaption>Database per Service</figcaption></figure><h4>Advantages</h4><p><strong>Independent Scaling</strong>: Scale high-traffic databases (e.g., orders) without affecting others.<br><strong>Technology Flexibility</strong>: Use SQL for analytics and NoSQL for product catalogs.</p><h4>Disadvantages</h4><p>Decentralized databases often lead to <strong>data duplication</strong>, where the same customer information exists in multiple services, such as “users,” “orders,” and “notifications.” This redundancy significantly <strong>inflates storage costs</strong> and complicates data consistency.</p><p>Querying across multiple services requires <strong>multiple API calls</strong> since traditional relational joins are not possible across independent databases. This <strong>query complexity</strong> can slow down responses, making real-time analytics and reporting more challenging.</p><p>Maintaining <strong>data synchronization</strong> between services introduces additional <strong>latency and operational overhead</strong>. Teams may implement event-driven mechanisms to ensure consistency, yet eventual consistency can still lead to issues like <strong>inventory mismatches</strong> in e-commerce platforms during high-traffic events.</p><h4>Real-World Evidence</h4><p><strong>SoundCloud (2017)</strong><br>As SoundCloud expanded its microservices architecture, <strong>data redundancy became a critical issue</strong>. Multiple services stored overlapping data, causing <strong>storage costs to triple</strong>. This led to significant operational inefficiencies and forced SoundCloud to <strong>scale back its microservices approach</strong>, consolidating some services and rethinking its database strategy to reduce redundancy.</p><h3>Event Sourcing</h3><h4>Usage &amp; Purpose</h4><p>Event Sourcing records state changes as an <strong>immutable, append-only sequence of events</strong> (e.g., OrderCreated, PaymentProcessed), replacing traditional CRUD updates. It enables systems to <strong>reconstruct historical states</strong>, audit actions, and support temporal queries (e.g., “What was the user’s balance at noon?”). Ideal for domains requiring auditability (e.g., banking, healthcare) or complex workflows (e.g., order tracking). Often paired with <strong>CQRS</strong> to separate read/write operations, optimizing performance and scalability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*tk4CIytOSiA1DFsuOHaNqw.png" /><figcaption>Event Sourcing</figcaption></figure><h4>Advantages</h4><p><strong>Audit Trail</strong>: Provides a complete, tamper-evident history for compliance and debugging.<br><strong>Event Replay</strong>: Rebuild state or fix bugs by replaying events like resolving payment disputes.<br><strong>Temporal Queries</strong>: Answer time-specific questions without altering historical data.<br><strong>Decoupled Workflows</strong>: Integrates seamlessly with event-driven architectures, enabling asynchronous processing (e.g., triggering inventory updates after orders).<br><strong>Financial Compliance</strong>: Banks use Event Sourcing to audit transactions and meet regulatory requirements.</p><h4>Disadvantages</h4><p>Event Sourcing introduces <strong>schema evolution challenges</strong>, making it difficult to modify event structures. Adding new fields or altering event formats requires <strong>backward compatibility</strong>, and failing to manage this properly can lead to <strong>technical debt</strong> over time.</p><p>High-throughput systems often face <strong>event explosions</strong>, where <strong>massive event logs</strong> accumulate rapidly. This <strong>inflates storage costs</strong> and <strong>slows down query performance</strong>. Restoring the system state by replaying terabytes of events can take <strong>hours or even days</strong>, severely impacting system availability.</p><p>Additionally, <strong>rebuild delays</strong> pose a critical risk. If the event store becomes corrupted, restoring consistency can <strong>violate SLAs</strong>(Service Level Agreements) and disrupt business operations. Since systems relying on event sourcing must replay all past events to reconstruct the state, any failure in this process can significantly delay service recovery.</p><h4>Real-World Evidence</h4><p><strong>Sony PlayStation Network Outage (2021)</strong><br>A <strong>corrupted event store</strong> forced Sony’s PlayStation Network to undergo a <strong>48+ hour recovery process</strong>, frustrating users and delaying service restoration. Since the system relied on event logs to reconstruct the state, the team had to <strong>replay terabytes of historical events</strong>, highlighting the risks of relying solely on event sourcing for critical infrastructure.</p><p><strong>Capital One Fraud Detection Slowdown (2022)</strong><br>Capital One’s real-time fraud detection system experienced a <strong>40% performance drop</strong> due to <strong>event-sourcing bottlenecks</strong>. Querying billions of historical events <strong>introduced significant latency</strong>, slowing down fraud detection capabilities. This incident underscores the <strong>scalability challenges</strong> of event-driven architectures, particularly in high-throughput environments where immediate insights are crucial.</p><h3>Sidecar (Service Mesh, e.g., Istio)</h3><h4>Usage &amp; Purpose</h4><p>Attaches a helper container to services to offload cross-cutting tasks like logging, security, and observability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*UwI8PUxHTjdALUZuuoeD7g.png" /><figcaption>Sidecar</figcaption></figure><h4>Advantages</h4><p><strong>Standardized Observability</strong>: Centralizes metrics, logs, and traces for monitoring.<br><strong>Security</strong>: Enforces mutual TLS and role-based access control (RBAC).</p><h4>Disadvantages</h4><p>Sidecars introduce <strong>resource overhead</strong>, consuming <strong>10–20% of pod memory and CPU</strong>, which increases <strong>cloud costs</strong> — a significant concern in large-scale Kubernetes deployments.</p><p>Maintaining a service mesh adds <strong>operational complexity</strong>, as upgrading components like <strong>Istio</strong> can <strong>break communication between services</strong>, requiring <strong>extensive testing and debugging</strong>. Additionally, sidecar-based architectures rely heavily on YAML configurations, which can be <strong>error-prone and difficult to manage</strong>.</p><p>Finally, <strong>stability risks</strong> arise due to potential <strong>memory leaks</strong> or <strong>misconfigurations</strong>. If a sidecar malfunctions, it can <strong>crash the entire pod</strong>, disrupting service availability. The burden of monitoring, troubleshooting, and optimizing sidecars often outweighs the benefits, especially for smaller teams.</p><h4>Real-World Evidence</h4><p><strong>Airbnb Productivity Drop (2022)</strong><br>Airbnb engineers reported a <strong>30% drop in productivity</strong> during the adoption of Istio, largely due to the <strong>complexity of YAML configurations</strong>. Managing policies, traffic rules, and security settings required <strong>significant manual effort</strong>, slowing down development cycles and increasing cognitive load.</p><p><strong>Lyft Sidecar Memory Leaks</strong><br>Lyft encountered <strong>frequent pod crashes</strong> due to <strong>sidecar memory leaks</strong> in their service mesh. These leaks gradually consumed resources, causing <strong>daily service disruptions</strong> until engineers identified and patched the issue. This highlights the <strong>operational risks</strong> of relying on sidecars without rigorous monitoring.</p><h3>Summary</h3><p>Microservice design patterns promise agility and scalability, but they demand a steep price. <strong>API Gateways</strong> become single points of failure, <strong>Saga Patterns</strong> drown teams in compensation logic, and <strong>Event Sourcing</strong> risks event explosions that cripple storage systems. Operational overheads — like managing service discovery or Istio’s YAML sprawl — can paralyze small teams, while decentralized databases inflate costs and fragment data. The allure of microservices fades when faced with debugging distributed transactions or rebuilding corrupted event logs for days. Before jumping on the bandwagon, ask: <strong>Does my system <em>truly</em> need this complexity?</strong> Often, a well-structured monolith outperforms a fragmented microservice maze.</p><h3>Key Highlights</h3><ul><li><strong>Complexity ≠ Progress</strong>: Microservices amplify debugging, testing, and monitoring challenges.</li><li><strong>Costs Add Up</strong>: Infrastructure, tooling, and team scaling costs often exceed expectations.</li><li><strong>Real-World Warnings</strong>: Failures at Monzo, Sony, and GitLab illustrate systemic risks.</li><li><strong>Mitigate Wisely</strong>: Adopt patterns <em>only</em> when benefits (e.g., scalability, auditability) justify the trade-offs.</li></ul><h3>References</h3><p><strong>Ticketmaster Outage (2018)</strong><br><em>Source</em>: <a href="https://www.theregister.com/2018/07/12/ticketmaster_outage/">The Register — Ticketmaster outage caused by misconfigured AWS instanc</a>e</p><p><strong>AWS Outage (2021)</strong><br><em>Source</em>: <a href="https://aws.amazon.com/message/12721/">AWS Post-Mortem — 2021 US-EAST-1 Outage</a></p><p><strong>GitLab Outage (2020)</strong><br><em>Source</em>: <a href="https://about.gitlab.com/blog/2020/02/10/postmortem-for-april-25-2019-outage/">GitLab Post-Mortem — Database Incident</a></p><p><strong>Monzo Bank Saga Debugging (2019)</strong><br><em>Source</em>: <a href="https://monzo.com/blog/2019/09/27/we-built-network-isolation-for-1-500-services">Monzo Blog — Network Isolation for 1,500 Services</a></p><p><strong>SoundCloud Scaling Back Microservices (2017)</strong><br><em>Source</em>: <a href="https://developers.soundcloud.com/blog/building-products-at-soundcloud-part-3-microservices-in-scala">SoundCloud Blog — Microservices in Scala</a></p><p><strong>Sony PlayStation Network Outage (2021)</strong><br><em>Source-1</em>: <a href="https://www.videogameschronicle.com/news/sony-has-reportedly-struggled-to-fix-ps5-system-errors-since-launch/">Video Games Chronicle — PS5 System Errors</a><br><em>Source-2: </em><a href="https://learn.microsoft.com/en-us/azure/architecture/patterns/event-sourcing"><em>Event Resourcing Microsoft</em></a></p><p><strong>Airbnb’s Istio Adoption Challenges (2022)</strong><br><em>Source</em>: <a href="https://medium.com/airbnb-engineering/https-medium-com-airbnb-engineering-service-mesh-at-airbnb-464f4c3b5c72">Airbnb Engineering Blog — Service Mesh at Airbnb</a></p><p><strong>Uber’s Microservice Challenges</strong><br><em>Source</em>: <a href="https://www.uber.com/en-GB/blog/engineering/">Uber Engineering Blog — Scaling Microservices</a></p><p><strong>Capital One Event Sourcing Pitfalls</strong><br><em>Source</em>: <a href="https://www.capitalone.com/tech/software-engineering/event-sourcing-pitfalls/">Capital One Tech Blog — Event Sourcing Challenges</a></p><p><strong>Lyft’s Service Mesh Scaling Issues</strong><br><em>Source-1</em>: <a href="https://eng.lyft.com/scaling-service-mesh-at-lyft-2f7c9f9a4c0c">Lyft Engineering Blog — Service Mesh at Lyft</a><br><em>Source-2: </em><a href="https://github.com/istio/istio/issues/48028">https://github.com/istio/istio/issues/48028</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e14d78e2cfa3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/iyzico-engineering/when-microservices-backfire-real-world-failures-you-cant-ignore-e14d78e2cfa3">When Microservices Backfire: Real-World Failures You Can’t Ignore</a> was originally published in <a href="https://medium.com/iyzico-engineering">iyzico.engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[System Design: Design Atlassian Tagging System]]></title>
            <link>https://medium.com/@emin_bilgic/system-design-design-atlassian-tagging-system-756f6211d3d1?source=rss-2b8f547aa00c------2</link>
            <guid isPermaLink="false">https://medium.com/p/756f6211d3d1</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <dc:creator><![CDATA[Emin Bilgic]]></dc:creator>
            <pubDate>Mon, 11 Nov 2024 22:06:01 GMT</pubDate>
            <atom:updated>2025-01-13T10:27:47.299Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*dlklYGxOW6PsjT9JPgsE0g.png" /></figure><h4>Summary</h4><p>I’ve been studying system design and because I couldn’t find a blog resource for the Atlassian Tagging System I decided to write one. There are some resources on the internet for tagging system design for Twitter, Stack Overflow, or TikTok. Still, I couldn’t find anything similar to their system, so I shared my research outcome.</p><p>We are asked to design a tagging system that manages three of Atlassian&#39;s existing products: Jira tickets, Confluence pages, and GitLab merge requests. The system should be able to configure more products in the future, so we need it to be product-agnostic.</p><h4>System Design</h4><p>Some services manage tags, which are separated from the product service. In this scenario, tags should associate the contents of these different products. Meanwhile, <em>DEV-1111</em> is a tag used by a GitLab merge request and a Jira ticket, and <em>BUG-2222</em> is a tag used by another Jira ticket and Confluence document. These tags should be open to support future products.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*B4gnL2687P2R6zvhgtJx9w.png" /></figure><h4>Requirements</h4><ul><li>Create, delete, and update operations</li><li>Being able to get all contents for a tag</li><li>Get daily most popular tags</li></ul><h4>Clarification</h4><p>After explaining the problem, we shouldn’t jump into the design because every system is different, and a good system design interview is open-ended. Various solutions can fit the requirements; to narrow the scope of the problem, we need to ask questions, which is the most important part of the interview.</p><p>Q: To calculate throughput accurately, does a tag contain a description or any other metadata?</p><p>A: Consider a tag containing only a name.</p><p>Q: How many characters can a tag name have?</p><p>A: A tag can have up to 16 characters.</p><p>Q: Is mobile app or desktop apps supported or it&#39;s only a web app?</p><p>A: Let&#39;s say it’s only a web app for now.</p><p>Q: What is the scale of this application?</p><p>A: It should support 1 million daily active users and each makes 10 operations per day.</p><p>Q: What is the read/write ratio of the system?</p><p>A: Let’s say 10 read operations per write.</p><h4>Back of the Envolve Estimations</h4><p>We shouldn’t spend so much time finding throughput and traffic data accurately. For example, here we have said there are a million users and each makes 10 operations per day, that means 10 million operations have been made per day. The system’s read/write ratio is 1/10 so one of each 11 operations is a write operation. But no need to spend time dividing 10 million by 11, you can say 1 million write and 9 million read operations have been made per day. System Design Interview by Alex Xhu says:</p><blockquote>Rounding and Approximation, it is difficult to perform complicated math operations during interview. There is no need to spend valuable time to solve complicated math problems. Precision is not expected …</blockquote><p>A tag can have up to 16 characters. Since the system uses UTF-8 encoding, each character requires <strong>1–4 bytes</strong>, depending on the character type. Assuming an average of <strong>2 bytes per character</strong>, each tag will require:</p><ul><li><strong>Bytes per tag:</strong> 16 characters × 2 bytes = 32 bytes</li></ul><p>For 10 million tags, the total daily data generated is:</p><ul><li><strong>Total throughput:</strong> 10,000,000 × 32 bytes = 320,000,000 bytes = <strong>320 MB</strong></li></ul><h3>User Operations</h3><ul><li><strong>Daily Active Users (DAU):</strong> 1 million</li><li><strong>Operations per User per Day:</strong> 10</li><li><strong>Total Daily Operations:</strong> 10,000,000</li></ul><h3>Read and Write Distribution</h3><ul><li><strong>Read/Write Ratio:</strong> 10 reads per write</li><li><strong>Total Write Operations:</strong> 1 million write operations/day</li><li><strong>Total Read Operations:</strong> 9 million read operations/day</li></ul><h3>Tag Storage Requirements</h3><ul><li><strong>Tag Length:</strong> Maximum 16 characters</li><li><strong>Daily New Tags:</strong> 1 million tags/day</li><li><strong>Monthly New Tags:</strong> 30 million tags/month</li><li><strong>Storage Requirement per Day:</strong> 1,000,000 tags × 32 bytes = <strong>32 MB/day</strong></li><li><strong>Storage Requirement per Month:</strong> 32 MB × 30 days = <strong>960 MB (~1 GB)</strong></li></ul><h3>Network and Database Load</h3><ul><li><strong>Daily Data Transfer:</strong> Approximately <strong>320 MB/day</strong> for new tag data</li><li><strong>Database Operations:</strong> Capable of handling 1 million writes/day and 9 million reads/day</li></ul><h3>Retrieval Operations</h3><ol><li><strong>Get All Contents for a Tag: </strong>Frequent read operation, optimized using indexing and caching.</li><li><strong>Get Daily Most Popular Tags: </strong>Requires counting and ranking tags by usage, leveraging an in-memory data store like Redis for efficiency.</li></ol><p>We need to clarify that all of the designs may not be doable in 1 hour of interview time, so if you are new to studying system design don’t worry, do whatever you can. Also, there is no perfect design here, all of the components and decisions are open to discussion. You can tell your opinion in the comments to suggest something, I’d appreciate it.</p><h3>High-Level Design</h3><h4>Design 1: Master-Slave Database for Create and Search Services</h4><p>This design uses a master database to handle write operations and slave databases for read-heavy services, such as search. Changes in the master are replicated to the slave databases, optimizing for consistent writes and scalable reads.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eLvDma8RCWzOUf8E5nIRTw.png" /></figure><p><strong>Pros</strong>:</p><ul><li><strong>Simple Setup</strong>: Easier to manage and implement.</li><li><strong>Consistent Writes</strong>: Strong data consistency with a single write source.</li><li><strong>Optimized Reads</strong>: Offloads read traffic to slave databases, improving performance.</li></ul><p><strong>Cons</strong>:</p><ul><li><strong>Replication Lag</strong>: Potential delays in syncing to slaves.</li><li><strong>Single Point of Failure</strong>: Master database issues halt writes.</li><li><strong>Scaling Limits</strong>: Scaling can be challenging for high-throughput needs.</li></ul><h4>Design 2: Read-Only Databases with SQS and AWS Lambda for Asynchronous Writes</h4><p>This setup uses read-only databases for fast search operations while handling writes asynchronously with SQS (for queuing) and AWS Lambda (for processing). This allows high scalability and performance in handling searches while asynchronously updating the databases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*se2BQy1At2BDFZ6S5mguEA.png" /></figure><p><strong>Pros</strong>:</p><ul><li><strong>Scalable Reads</strong>: Horizontal scaling of read-only databases.</li><li><strong>Event-driven</strong>: Efficiently handles writing tasks without constant computing.</li><li><strong>Cost-Effective</strong>: Scales with usage, lowering costs for intermittent tasks.</li></ul><p><strong>Cons</strong>:</p><ul><li><strong>Eventual Consistency</strong>: Asynchronous writes mean data updates may not appear immediately.</li><li><strong>Complex Error Handling</strong>: SQS and Lambda add retry and failure management complexity.</li><li><strong>Delayed Writes</strong>: Asynchronous processing can introduce propagation delays.</li></ul><h3>Why We Chose SQS and AWS Lambda</h3><p>SQS and AWS Lambda allow scalable, event-driven task handling. SQS queues write, decoupling them from immediate processing, while AWS Lambda handles tasks on-demand. This setup optimizes system resources, reduces operational overhead, and suits applications that don’t require instant consistency, making it ideal for tagging systems with high read and moderate write demands.</p><h3>It is worth mentioning during the interview:</h3><h4>Database Choice and Structure</h4><ul><li><strong>Database Type</strong>: Relational (MySQL/PostgreSQL) for structured data; NoSQL (MongoDB/Cassandra) for high write throughput and flexible schema</li><li><strong>Database Sharding</strong>: Initially not necessary but plan for future scaling with sharding to distribute load</li></ul><h4>Indexing</h4><ul><li><strong>Tag Name Index</strong>: For quick lookups</li><li><strong>Popularity Index</strong>: To track and retrieve popular tags efficiently</li></ul><h4>Caching</h4><ul><li><strong>Cache Type</strong>: In-memory store (Redis/Memcached)</li><li><strong>Data to Cache</strong>: Frequently accessed tags and popular tag lists</li></ul><h4>Load Balancing</h4><ul><li><strong>Load Balancer Options</strong>: Software (HAProxy/Nginx) or cloud-based (AWS ELB, Google Cloud Load Balancing)</li><li><strong>Purpose</strong>: Distribute incoming traffic across multiple servers to prevent overload</li></ul><h4>Scalability Considerations</h4><ul><li><strong>Vertical Scaling</strong>: Increase server capacity (CPU, RAM)</li><li><strong>Horizontal Scaling</strong>: Add more servers to distribute load, ensuring high availability and handling large-scale growth</li></ul><h4>Write and Read Optimization</h4><ul><li><strong>Write Optimization</strong>: Batch writes and use asynchronous processing with message queues (Kafka/RabbitMQ)</li><li><strong>Read Optimization</strong>: Use read replicas and ensure queries are optimized for performance</li></ul><h4>Tracking and Retrieving Popular Tags</h4><ul><li><strong>Tracking</strong>: Use in-memory counters (e.g., Redis) for real-time tracking and daily aggregation for reporting</li><li><strong>Retrieving</strong>: Query counters or aggregated data to get the list of most popular tags</li></ul><h4>Monitoring and Maintenance</h4><ul><li><strong>Monitoring Tools</strong>: Application Performance Monitoring (APM) tools (New Relic, Datadog), database-specific monitoring tools (pgAdmin for PostgreSQL)</li></ul><p><a href="https://en.wikipedia.org/wiki/Atlassian#cite_note-8">https://en.wikipedia.org/wiki/Atlassian#cite_note-8</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=756f6211d3d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Aspect-Oriented Programming in Java]]></title>
            <link>https://faun.pub/aspect-oriented-programming-in-java-810f60bbb077?source=rss-2b8f547aa00c------2</link>
            <guid isPermaLink="false">https://medium.com/p/810f60bbb077</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[patterns]]></category>
            <category><![CDATA[spring]]></category>
            <category><![CDATA[spring-boot]]></category>
            <dc:creator><![CDATA[Emin Bilgic]]></dc:creator>
            <pubDate>Tue, 12 Sep 2023 06:02:18 GMT</pubDate>
            <atom:updated>2023-11-25T16:28:29.701Z</atom:updated>
            <content:encoded><![CDATA[<p>Unlocking the Power of Aspect-Oriented Programming for Enhanced Java Applications</p><h4>Summary</h4><p>Explore Aspect-Oriented Programming (AOP) with AspectJ in Java. This article introduces AOP concepts, demonstrates AOP integration with Spring, and covers various advice types and joinpoints. Learn to enhance method behavior and handle common errors in AOP. Implement some basic demonstrations to understand what aspect-oriented programming does and then try to dive deep into AspectJ.</p><h4>Key Concepts in AOP</h4><p>There are 3 main terms in the Spring AOP. We will understand what they are when we are having a demonstration now, even so here are brief descriptions of them.</p><ul><li>Pointcut: Defines where to apply advice.</li><li>Joinpoint: A specific execution point.</li><li>Advice: Code executed at a joinpoint.</li></ul><p>Let&#39;s see a quick example then we can examine the terms particularly.</p><h4>Demonstration</h4><p>We will use the spring’s AOP dependency because it&#39;s much easier to configure if you have a spring boot project.</p><pre>&lt;dependency&gt; <br>  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br>  &lt;artifactId&gt;spring-boot-starter-aop&lt;/artifactId&gt; <br>&lt;/dependency&gt;</pre><p>For the first step, let&#39;s create a simple service class with a method to test our aspect.</p><pre>@Service<br>public class MyService { <br>  public void run() {<br>     System.out.println(“***Method called”);<br>  }<br>}</pre><p>Now we will create our aspect class which can contain our main components; pointcut, joinpoint, and advice. Then add a method with <em>@Before</em> advice and execution joinpoint for now. Then we will see a proper message logged before the method call.</p><pre>import org.aspectj.lang.annotation.Aspect;<br><br>@Aspect<br>@Service<br>public class MyAspect {<br>  @Before(&quot;execution(* run(..))&quot;)<br>  public void beforeAdviceWithExecutionJoinPoint() {<br>     System.out.println(&quot;Before method called&quot;);<br>  }<br>}</pre><p><strong>Output:</strong></p><blockquote>Before method called<br>***Method called</blockquote><pre>@Pointcut(“execution(* run(..))”)<br>public void executionPointcut() {}<br><br>@Before(&quot;executionPointcut()&quot;)<br>public void beforeAdviceWithExecutionPointcut() {<br>  System.out.println(&quot; Before method called&quot;);<br>}</pre><p>Here is a pretty simple example without using any <em>@Pointcut, </em>and it will create the same output as the example above. You can achieve most of the things without using pointcuts. But maintains your aspect class’s structure and allows you to manage your advice flexibly.</p><h4>Deeper Understanding of Advices</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*ydy9g5cto_7Y4v1qozsdlw.png" /></figure><p>Here we explore how to use various advice types, including <em>@Around</em>, <em>@Before</em>, <em>@After</em>, <em>@AfterReturning</em>, and <em>@AfterThrowing</em>, to intercept and enhance the behavior of methods defined by <em>executionPointcut()</em> our Spring application. Gain insights into method execution flow control.</p><pre>@Around(&quot;executionPointcut()&quot;)<br>public Object aroundAdviceWithExecutionPointcut(ProceedingJoinPoint joinPoint) throws Throwable {<br> System.out.println(&quot; Around method called (before)&quot;);<br> Object proceed = joinPoint.proceed(); // this is the actual method call<br> System.out.println(&quot; Around method called (after)&quot;);<br> return proceed;<br>}<br><br>@Before(“executionPointcut()”)<br>public void beforeAdviceWithExecutionPointcut() {<br> System.out.println(“ Before method called”);<br>}<br><br>@After(“executionPointcut()”)<br>public void afterAdviceWithExecutionPointcut() {<br> System.out.println(“ After method called”);<br>}<br><br>@AfterReturning(“executionPointcut()”)<br>public void afterReturningAdviceWithExecutionPointcut() {<br> System.out.println(“ After returning method called”);<br>}<br><br>//Works only if the method throws an exception<br>@AfterThrowing(“executionPointcut()”)<br>public void afterThrowingAdviceWithExecutionPointcut() {<br> System.out.println(“ After throwing method called”);<br>}</pre><p><strong>Here is the output:</strong></p><blockquote>Around method called before<br> Before method called<br>***Method called<br> After returning method called<br> After method called<br> Around method called after</blockquote><h4>A frequently occurred error during my research</h4><p>Because I encountered this interesting error when having demonstrations on Aspect Oriented Programming, I would like to explain it here. The error is thrown by the code generation library (CGLIB) that is used by the Spring:</p><blockquote>Could not generate CGLIB subclass of class org.springframework.boot.autoconfigure.AutoConfigurationPackages$BasePackages: Common causes of this problem include using a final class or a non-visible class.</blockquote><p>Actually, there is a huge hint, the error log tells us we are trying to touch <em>final or non-visible classes</em>. So basically reason this error is because of the broad scope of one of the joinpoints. An example malformed joinpoint code is:</p><pre>@Before(“execution(* *(..))”)<br>public void beforeAdvice() {<br>   System.out.println(“Before method called”);<br>}</pre><p>Even if you narrow the scope to the main module of your project will fix this issue:</p><pre>@Before(“execution(* com.example.springaspects..*(..))”)</pre><h4>Conclusion</h4><p>In conclusion, Aspect-Oriented Programming with AspectJ offers powerful tools to enhance Java applications. Understanding AOP concepts, integrating them with Spring, and mastering advice types and joinpoints can significantly improve code modularity and maintainability. Be mindful of common errors and adopt AOP judiciously to unlock its full potential in your projects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*h1O2qqDT7KFZfcTd.png" /></figure><h4>👋 If you find this helpful, please click the clap 👏 button below a few times to show your support for the author 👇</h4><h4>🚀Join FAUN Developer Community &amp; Get Similar Stories in your Inbox Each Week</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=810f60bbb077" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/aspect-oriented-programming-in-java-810f60bbb077">Aspect-Oriented Programming in Java</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The best way of managing test data]]></title>
            <link>https://medium.com/@emin_bilgic/how-to-manage-test-data-6983d0a0c75a?source=rss-2b8f547aa00c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6983d0a0c75a</guid>
            <category><![CDATA[test]]></category>
            <category><![CDATA[spring]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Emin Bilgic]]></dc:creator>
            <pubDate>Tue, 18 Apr 2023 07:38:10 GMT</pubDate>
            <atom:updated>2023-04-18T13:11:06.115Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9xk0w48y4zQ3Auy48nHi_Q.jpeg" /><figcaption><a href="https://unsplash.com/photos/5mZ_M06Fc9g">https://unsplash.com/photos/5mZ_M06Fc9g</a></figcaption></figure><p>In test development, one of the suffering phases is creating test data cleanly. In most scenarios, test data takes a lot of room on a line basis. And creation test dummies may give you too much suffering, we are going to examine 2 approaches to test data management for integration testing by using the Spring Boot application as an example. These two approaches are:</p><ol><li><strong>Creating initial data by SQL script</strong> (Integration tests).</li><li><strong>Using builder classes to create data</strong> (Both integration and unit tests).</li></ol><h3><strong>Creating initial data by SQL script</strong></h3><p>In my opinion, the easiest way to create data for integration tests is to create data initially when the test database is up but it makes your test profiles bulky and slow. Because you are creating massive data before your tests run even if you will have run a single test. Nevertheless, as I just told you it is the easiest way to create data for your integration tests.</p><p>No complex configuration need for this through Spring Boot, you just need to create some SQL scripts that obey your constraints. Then tell your class what to run and -if you would like- when to run these scripts by using SQL annotation in spring.</p><p><em>Your test class:</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3701c2389e34ae778e0b264d3eadf6ee/href">https://medium.com/media/3701c2389e34ae778e0b264d3eadf6ee/href</a></iframe><blockquote>You may want to have a separate script for clearing the database after the test methods.</blockquote><p><em>SQL file that contains scripts :</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6d19e956b869c57cf382ee80dadd2fa3/href">https://medium.com/media/6d19e956b869c57cf382ee80dadd2fa3/href</a></iframe><h3><strong>Using builder classes to create data</strong></h3><p>If we separate a test method into three sections, the first would be creating data, the second would be triggering related methods, and the third would be assertions. Here when we are examining the first part of testing, I think the most efficient way is the creating test data in the test class. Obviously, creating them manually is just as painful as the other ways, even if you use the <em>before</em> methods.</p><p>According to these, we are gonna use builder classes to create test data effectively. But first, you can see an example of how much space creating test data takes below if you create manually:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4429db9cb12a05d0d00dd74bae73a02c/href">https://medium.com/media/4429db9cb12a05d0d00dd74bae73a02c/href</a></iframe><h4>The solution, the builder pattern</h4><p>Builder classes are simply data class copies of our real entities. Have some additional methods created by the builder pattern and some fields with default values. Also, we are going to overload some methods to be able to use when both integration and unit testing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*BzTiZlnPFZfCN-jfFBq3Xg.png" /></figure><p>The first part of a builder class contains the exact fields of the entity class with some default values. It allows us to create test data in a fast way if field properties do not make sense.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c91e8ee09859c462af13075fbe488222/href">https://medium.com/media/c91e8ee09859c462af13075fbe488222/href</a></iframe><p>Then we are adding some methods like setter but created by using the builder pattern. This means every single setter methods return the parent object so we can call them such as a chain. Here we named them by using the ‘<em>with’</em> keyword to make chains more readable. It is closer to human language in this way. Some resources call this a <strong>Fluent Builder</strong> pattern.</p><blockquote><em>A car; with id, with plate, with model</em>.</blockquote><p>It will be used like:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/91be26b17aa63378eaedd0f3ac0b5e79/href">https://medium.com/media/91be26b17aa63378eaedd0f3ac0b5e79/href</a></iframe><p>Although we are returning the self-object in our setter methods, we have to call the <em>build</em> method to build the target entity. It is required if you have a separate builder class instead of having an entity class created with the builder pattern. Nevertheless, it provides us with a clean and flexible way to use these classes both unit and integration tests.</p><p>Now, here we are gonna overload <em>build </em>methods three times through which we will be able to create relational data according to our needs.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7fa6e4bf9a91a35c6e6ccb72647621cb/href">https://medium.com/media/7fa6e4bf9a91a35c6e6ccb72647621cb/href</a></iframe><p>The first one only will be used for unit tests or mocked data and will not be saved to any database.</p><p>The second one will create a <em>car </em>entity with previously assigned values and will save just this to the database.</p><p>The final one will create and save both the <em>car </em>and <em>model </em>to the database in addition to the second one.</p><p>Let&#39;s see how easy to create integration test data by using it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/93a76a405a698c152f934dd17b7b73a3/href">https://medium.com/media/93a76a405a698c152f934dd17b7b73a3/href</a></iframe><h4>In conclusion</h4><p>Although you are duplicating your entities when you create builder classes, that allows you to use default fields for these entities and reassign them when required. Also because you are using test context, it’s not gonna affect your jar’s size after the build. You can also prefer using mock static methods from Mockito but they are not useful for your integration tests and in most scenarios, you need to define fields of objects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6983d0a0c75a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Debug Your Backend in Production]]></title>
            <link>https://medium.com/@emin_bilgic/debug-your-website-in-production-8d2986068f34?source=rss-2b8f547aa00c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d2986068f34</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Emin Bilgic]]></dc:creator>
            <pubDate>Wed, 25 May 2022 09:17:06 GMT</pubDate>
            <atom:updated>2022-08-02T07:26:07.157Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8HiqWaDfqPkna5Vi.png" /></figure><h3><strong>Summary</strong></h3><p>Debugging applications that run in a remote environment is so painful because setting breakpoints to these applications is impossible. We will talk about a next-generation debugging tool named <a href="https://www.runsidekick.com/">Sidekick</a> in this story. It is a remote and real-time application debugger that helps you solve problems where and when they occur without requiring you to stop or rebuild your application.</p><h3>What is remote debugging</h3><p>Remote debugging means having the ability to debug an application running on a machine that is not owned or controlled by yourself in software development literature. It may be needless in some scenarios where you run an application in your local environment. Still, if you could debug this application after deploying it to any remote environment, it starts to make sense.</p><h3>The advantages of remote debugging</h3><ul><li>Debug without interrupting the execution of an application</li><li>Debug applications that are running in a remote environment</li><li>Set a non-intrusive breakpoint to your code</li><li>Collect actionable data from your remote application</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*II_s2X3jBqSHE0t-HMG3Xg.gif" /><figcaption><em>Remote debugging a web application</em></figcaption></figure><h3>Set Up Project</h3><h4>Create a Sample Application</h4><p>Sidekick tested with lots of frameworks of NodeJS, Java, and Python. We will use the Express framework with NodeJS in this tutorial. You can use similar steps for other languages or other frameworks.</p><p>As an example project, I will use <a href="https://github.com/planetoftheweb/expressjs">this tutorial repository</a>. It is a basic express website. You can use any other project or your own project instead.</p><h4>Integrate Sidekick</h4><p>Integration sidekick is a piece of cake because it only required a few lines of code to be added. But first, we need to install the Sidekick agent with the command below:</p><pre><em>$ </em><strong>npm install @runsidekick/sidekick-agent-nodejs</strong></pre><p>After installing the agent, add these two lines to your root app.js file. We recommend using your API key as an environment variable to hold your Sidekick workspace safe. You can find the integrated project’s repository <a href="https://github.com/meminb/expressjs-sidekick">here</a>.</p><pre><strong>var sidekickDebugger = require(‘@runsidekick/sidekick-agent-nodejs’);</strong></pre><pre><strong>sidekickDebugger.start({</strong></pre><pre><strong>   apiKey: process.env.SIDEKICK_APIKEY //or “YOUR-SIDEKICK-API-KEY”,</strong></pre><pre><strong>});</strong></pre><h4>Push to Version control</h4><p>To be able to remote debug, your code must be readable for the Sidekick. We will push our code to Github in this step so the Sidekick can read the code from there then.</p><p>Be careful that your code will be running on your local environment is the same as the code you pushed version control in this step. Otherwise, errors will occur when debugging.</p><p>Sidekick support GitHub, GitLab, and BitBucket for now. You can publish your project on one of them you want. <a href="https://github.com/meminb/expressjs-sidekick">Here</a> is the demo project I used for this project.</p><h4>Get Your API-Key</h4><p>After you sign up for <a href="https://app.runsidekick.com/landing">Sidekick</a>, a quick tutorial for a sample Java application will welcome you. You can skip it because we will examine the nodeJS equivalent in this article in detail.</p><p>All you need to do in this step is sign up for Sidekick and pass the basic steps that ask your name and etc. Then get your <strong>API key </strong>from the welcome page. We will come back to this page soon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7x373sBeCgfsI7bk" /><figcaption><em>Getting your API key from Sidekick</em></figcaption></figure><h4>Run Application</h4><p>You can run the application on a docker container as well. No additional implementation on your code is required. Just follow the <a href="https://docs.runsidekick.com/installation/installing-agents/node.js/installation-1">docs</a> for this step.</p><p>Because we used our API key as an environment variable, we need to define it first. I will just export the API key like below:</p><pre><em>$</em><strong><em> </em>export SIDEKICK_APIKEY=&lt;YOUR-APIKEY&gt;</strong></pre><p>Then run the application simply:</p><pre><em>$</em><strong><em> </em>npm start</strong></pre><h3>Debug your application remotely</h3><h4>Choose the repository, branch, and commit</h4><p>Everything’s done now. Let’s go back to the Sidekick console and choose repository, branch, and commit. As we mentioned, it is essential to select the correct commit that your application is running on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iA81hhqHlM4XFt1J" /><figcaption>Selecting the application’s repository, branch, and commit from the version control</figcaption></figure><h4>Choose the application that you want to debug</h4><p>Then you will be able to see the applications running with the sidekick agent and your API key. Choose the application you want to debug:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hkTO19v7nng19-ne" /><figcaption>Choosing the running application</figcaption></figure><h3>Enjoy remote debugging!</h3><p>Now set a breakpoint to one of your backend services. In this example, I set a breakpoint for the <em>routers/speakers’ </em>service of my project.</p><p>After any trigger of the breakpoint line in your running application shown in the example, tracepoint’s event will appear on the sidekick console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*II_s2X3jBqSHE0t-HMG3Xg.gif" /><figcaption><em>Remote debugging a web application</em></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d2986068f34" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to send and receive messages between AWS Lambda and Amazon SQS]]></title>
            <link>https://medium.com/@emin_bilgic/aws-lambda-and-sqs-demonstration-5c569627f70b?source=rss-2b8f547aa00c------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c569627f70b</guid>
            <category><![CDATA[aws-sqs]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <dc:creator><![CDATA[Emin Bilgic]]></dc:creator>
            <pubDate>Wed, 27 Apr 2022 10:49:37 GMT</pubDate>
            <atom:updated>2022-05-25T09:09:50.053Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*j_XljFc-vwCgl2Wq.png" /></figure><p>Amazon SQS can trigger an AWS Lambda function by sending a request and can be triggered by an AWS Lambda function by receiving a message from it. We will demonstrate a scenario that realizes those two cases for an educational purpose for beginners.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/306/1*Dk_FuDr0l1fbRhY8kvBdjw.png" /></figure><p>In this brief article, we will learn how to <strong>trigger an AWS Lambda function from an Amazon SQS queue </strong>and <strong>send a message to an Amazon SQS queue from an AWS Lambda function. </strong>To manage our stack we will use AWS Cloud Development Kit (CDK) written in Typescript language because of its popularity. You can check the completed project from my <a href="https://github.com/meminb/SQS-Lambda-Example-With-CDK">GitHub</a>.</p><h3>Step by step creating and deploying the app</h3><h4>1. Initialize CDK template:</h4><p>Run the command below in an empty directory and your app will be created in a few seconds.</p><pre>$ cdk init app — language=typescript</pre><h4>2. Create the <em>ExampleLambda</em> function</h4><p>We will deploy the function as an asset so let’s create a lambda function. I have created the function inside the <em>lib/src </em>directory in my project. It is a pretty simple Nodejs code that sends the given event as a message to the SQS resource that has the URL that comes from environment variables.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/62845f5b73f25143a63f66414d30484c/href">https://medium.com/media/62845f5b73f25143a63f66414d30484c/href</a></iframe><blockquote>Do not use ES6 for your Lambda function because AWS Lambda does not support this yet.</blockquote><h4>3. Create other resources:</h4><p>To create the other resources of the project, go to the stack constructor file in the <em>lib </em>directory. Here we have two SQS queues, one Lambda Functions, and some helper resources to run them properly.</p><p>First, create 2 SQS resources like the below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a35a47f58401b7675c1c4440a237d5b8/href">https://medium.com/media/a35a47f58401b7675c1c4440a237d5b8/href</a></iframe><p>There is no other thing that we should know here.</p><p>Secondly, create the lambda function and set the directory of your code handler. But above all, set the SQS URL that we will send a message from that lambda.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/31f65f43430aa1241675ba6ac03560ae/href">https://medium.com/media/31f65f43430aa1241675ba6ac03560ae/href</a></iframe><p>At this point, the <strong>ExampleLambda </strong>function is created and it communicated with the <strong>SecondQueue</strong> SQS queue successfully.</p><p>But we need to give permission to send messages to this queue otherwise there will occur a permission error.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/63ad915228875b56ee8f2ef91baf9fb2/href">https://medium.com/media/63ad915228875b56ee8f2ef91baf9fb2/href</a></iframe><p>Finally, we will add the <strong>FirstQueue </strong>queue as an event source to our Lambda function to receive messages from it. Here we don’t need to give any permission to our Lambda function because the event source object assigns related permissions to it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/35f95cf9e491b66a9b498a79beb60b8a/href">https://medium.com/media/35f95cf9e491b66a9b498a79beb60b8a/href</a></iframe><p>Also, we set <em>batchSize </em>to 1, so each message we sent to the <strong>FirstQueue</strong> queue will reach the Lambda function without waiting for other messages.</p><h3>Validating the flow</h3><p>That’s all, now that we created all the required resources let’s deploy the stack and test if the messages will reach the <strong>SecondQueue.</strong></p><pre><em>$ cdk deploy</em></pre><p>After deployment, you can send a message to the <strong>FirstQueue </strong>from your terminal:</p><pre><em>$ </em>aws sqs send-message — queue-url &lt;Your Queue URL&gt; — message-body “Information about the largest city in Any Region.” — delay-seconds 2</pre><p>Let’s check if our message reached the <strong>SecondQueue.</strong></p><p>I am using <a href="http://start.thundra.io/">Thundra APM</a> to monitor my serverless resources but you can also simply check the <strong>monitoring </strong>section from the AWS console.</p><p>In Thundra Console, you can examine the whole flow of our application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PAJ8VvTZZl3dby66" /><figcaption>Architecture page on Thundra APM</figcaption></figure><p>If you are using the AWS console, you will see the invocations on the monitoring section of the Lambda Function page or received messages on the monitoring section of the SQS page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/0*1nN_S5aLWl1qzGmF" /><figcaption>AWS Console Lambda Monitoring Section</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c569627f70b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fastest Runtime For AWS Lambda Functions]]></title>
            <link>https://medium.com/@emin_bilgic/fastest-runtime-for-aws-lambda-functions-b068b102bc5e?source=rss-2b8f547aa00c------2</link>
            <guid isPermaLink="false">https://medium.com/p/b068b102bc5e</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[serverless]]></category>
            <dc:creator><![CDATA[Emin Bilgic]]></dc:creator>
            <pubDate>Wed, 30 Mar 2022 08:26:54 GMT</pubDate>
            <atom:updated>2022-04-11T12:15:04.058Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LeGpXmSIKfjuh1yp.png" /></figure><h3>Summary</h3><p>AWS Lambda is a compute service that lets you run code without any infrastructure management and it natively supports Java, Go, NodeJS, .Net, Python, and Ruby runtimes. In this article, we will compare the performances of the same hello world Lambda functions written in Java, Go, NodeJS, .Net, and Python runtimes.</p><h3>Structure of the Template</h3><p>We are using simple hello world functions to test invocation times of Lambdas’ by using the AWS SAM templates. When we compare them first we will use the latest versions of the runtimes the AWS SAM provided us. You can check the complete deployment package from this <a href="https://github.com/meminb/AWS-Lambda-Runtime-Comparation">Github</a> repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/0*rqacpPRDQWk-DtFx.png" /></figure><h3>Comparing Lambda’s by Runtime</h3><p>To compare these functions dynamically, the newly introduced Thundra APM’s <a href="https://blog.thundra.io/introducing-custom-dashboards-visualize-and-analyze-your-data">custom dashboard</a> widget is a pretty proper choice. Integrated functions already exist in the <a href="https://github.com/meminb/AWS-Lambda-Runtime-Comparation">Github repository</a>, you can easily clone the repo and change the Thundra API Key with yours in SAM templates. For more information check APM <a href="https://apm.docs.thundra.io/">docs</a> from here or sign up for Thundra from <a href="https://start.thundra.io/apps">here</a>.</p><p>Let’s check the differences between runtimes by building widgets in a custom dashboard in Thundra APM. In this scenario, we only deployed the stack that contains the latest versions of runtimes. So filtering the functions with the runtimes and average durations would be enough for us to create the “<em>Max durations</em>” widget. All of the functions’ average invocation times are shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/0*BWO2OdnNocbfn9qf.gif" /></figure><p>Compiled languages’ cold start durations are significantly greater than the others but their max durations get closer to the others after warming up. Java has the highest cold start duration with approximately 5.000 milliseconds. In contrast to that, the interpreted languages have almost no performance difference between when they hit the cold start and for their later invokes.</p><p>Also, we can clearly see that .Net has a much better cold start performance than Java even if both are compiled languages. Let’s look from a different perspective by excluding Java and taking a closer look at the other runtimes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/0*MegXwANkEhqgjAaL.gif" /></figure><p>Go has approximately 400ms long cold start duration but invocation time goes down and invocations start to happen instantly after cold start. We see dazzling performance results in Python and NodeJS runtimes. It looks like they are almost not affected by cold start and invocations always run instantly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/0*GWcmDu0CMoLjcfHT.png" /></figure><p>I acknowledge that the package size has a proportional effect on cold start duration for the same runtimes. We can generally accept this for the different runtimes except for Java And Go. But Go has the 3rd fastest cold start duration even though it has a big size like 4.7MB.</p><h3>Conclusion</h3><p>One of the biggest differences between compiled and interpreted languages is that interpreted languages need less time to analyze source code but the overall time to execute the process is much slower. In this context, we can clearly understand the reason why languages like NodeJS and Python have dazzling performances against cold starts.</p><p>In my experimentation, I’ve observed that Java and .Net performed worse than the other runtimes when we compare the invocation durations. I think it’s because Lambdas don’t have a large enough process to bridge the difference between interpreter and compiler. So if we tried to do a heavier and more complex process instead of returning the ‘’Hello World’ message, compiled languages would have better performances after warming up. Here are some other graphs created with the Thundra APM Dashboard queries:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/0*mZTM_fTYaJKFabkD.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/0*XTe-ImbaE2718a0R.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/0*Uv-9ByQzGFrbxzNl.png" /></figure><h3>Bonus Section: Comparison between versions</h3><p>There are different versions of the runtimes I used in my experimentation. I compared the 3 different Java versions (java8, java8.al2, java11), 3 different NodeJS versions (Node10, Node12, Node14), 4 different Python versions (Python3.6, Python3.7, Python3.8, Pyton3.9), 2 different DotNet versions (.netcore3.1, .net6 ).</p><p>When comparing the versions of these runtimes, we will not be able to see any difference in Lambda functions’ behavior, but it would not hurt to check them anyway.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/0*IbqEYa-K5V_m0eut" /></figure><h3>DotNet</h3><p>According to Microsoft’s announcements, DotNet-6 is %40 faster than DotNet-5. In this post, we compared DotNet-3.1 and DotNet-6 and we can clearly see that both cold start and warmed invocation times for DotNet-6 are much better than DotNet-3.1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*A0N0nMmVVabhNgqp" /></figure><p>Also, memory usage for DotNet-6 is pretty lighter than DotNet-3.1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a2AFbE5v2_Q7nBQW" /></figure><h3>Python</h3><p>There is no invocation duration difference between python versions but there are memory usage differences here. Python 3.8 has better memory usage results than the other 3 Python versions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/0*AwnhfPPL4qk_PqoN" /></figure><h3>Java</h3><p>You can see the invocation duration difference between Java versions below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/0*SPqO9NhFvUcPWvqa" /></figure><h3>Node</h3><p>Invocation durations only make difference for a cold start.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/0*kjpIgpS5_ATiYKwz" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b068b102bc5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Monitoring CI/CD Workflows]]></title>
            <link>https://faun.pub/monitoring-ci-cd-workflows-1fbf78f6b91c?source=rss-2b8f547aa00c------2</link>
            <guid isPermaLink="false">https://medium.com/p/1fbf78f6b91c</guid>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[test]]></category>
            <category><![CDATA[workflow]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <dc:creator><![CDATA[Emin Bilgic]]></dc:creator>
            <pubDate>Wed, 05 Jan 2022 19:35:38 GMT</pubDate>
            <atom:updated>2022-01-05T19:35:38.042Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*FwcGHa47vleKDQ9v" /><figcaption>Lifecycle of CI/CD</figcaption></figure><p><strong>Summary</strong></p><blockquote>CI/CD is a method to frequently deliver apps to customers by introducing automation into the stages of app development.</blockquote><p>It is the brief definition of CI/CD from the Red Hat community. So, CI/CD pipelines can be defined as the steps for developers to deliver a new software version or product. In the <em>CI </em>part; pipelines build code and run tests, in the<em> CD </em>part; pipelines deploy and deliver the new version<em>.</em></p><p>That can be hard to monitor your pipeline progress and test runs in this context. In this article, we will examine how to monitor a CI/CD workflow that uses Github Actions by using the Foresight product of Thundra that I am currently an employee of.</p><p><strong>Example Open Source Projects</strong></p><p>We will use two open-source projects in this section. These are <a href="https://github.com/payara/Payara">Payara</a> and <a href="https://github.com/dcm4che/dcm4che">dcm4che</a> in Github. I chose them for this article because they have significant build and test run time so we can understand the difficulty of monitoring workflows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*739uYMVfYORrpY7bjupyWw.png" /><figcaption>Logos of Payara &amp; dcm4che</figcaption></figure><blockquote>Payara Server is a middleware platform that supports reliable and secure deployments of Java EE and MicroProfile applications in any environment.</blockquote><blockquote>dcm4che is a collection of open-source applications and utilities for the healthcare enterprise.</blockquote><p>Actually, we don’t need to know what these projects do, we are just interested in building these projects and running their tests with workflows.</p><p>We cannot use this projects’ workflows for this demo so, we will create mock workflows. In this case, we need to create 2 different workflows for each project. One of them is for building projects and another one is running tests.</p><blockquote>Using separate workflows for test and build is not a best practice but we do not have a chance to run the Continuous Development section and deploy this code anywhere.</blockquote><p>After forking these projects, create 2 workflows for each. The first one does not run tests and only builds the project.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/94eb9e789f0943aef643f34dbdb93c0b/href">https://medium.com/media/94eb9e789f0943aef643f34dbdb93c0b/href</a></iframe><p><em>Also, you can check the </em><a href="https://github.com/meminb/dcm4che"><em>dcm4che</em></a><em> and </em><a href="https://github.com/meminb/Payara"><em>payara</em></a><em> repositories that were forked by me.</em></p><p>Another workflow is almost the same as this but we only will remove the ‘<em>Build with Maven’</em> step and replace it with below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b69a32b1bc83d9c430d27b6611c0572e/href">https://medium.com/media/b69a32b1bc83d9c430d27b6611c0572e/href</a></iframe><p>After creating workflows it’s time to monitor them, we will use<a href="http://start.thundra.io/"> Foresight</a> for this. Foresight is a tool developed by Thundra and you can monitor and optimize your CI/CD pipelines with this tool. For more information, you can check the docs from <a href="https://foresight.docs.thundra.io/">here</a>.</p><h4><strong>Instrumenting Thundra Foresight</strong></h4><p>You can easily sign-up and login to <a href="https://start.thundra.io/">Thundra</a>, after signing in choose Foresight on the application screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FD_T-UwCaTbJ_l-N" /></figure><p><strong>Monitoring your Workflows</strong></p><p>You will be redirected to the repositories page. Click connect repositories on this page, then create a foresight project and connect with easy set up one of the repositories that we forked.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/0*PHoEoBe0Y0jYZCdt" /><figcaption><em>Connect Repository screen</em></figcaption></figure><p>After a short time, our workflow info will appear in our project. We can inspect the projects’ workflow success and average duration day by day. Each point in these graphs is the average duration and success rate for only one day. If your workflows have only been working for one day, you will see only one point on graphs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tE1XVLXdmDCaEAhpYeAeQg.png" /></figure><blockquote><strong>White Line</strong>: Test runs only</blockquote><blockquote><strong>Blue Line</strong>: Build project without tests</blockquote><blockquote><strong>Yellow Line:</strong> Thundra Foresight Instrumentation</blockquote><p>There are 5 different points in these graphs so I have been running them for 5 days. Each point is the average of that day.</p><p>From this graph, we can conclude test runs take almost the build time long, as you can see in this graph.</p><p><strong>Observing multiple projects:</strong></p><p>It is possible to connect multiple repositories in a single Foresight repository, you can choose the same project after clicking connect repository.</p><p>Completed example at below, you can see the 2 repositories connected to the one Foresight project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*i8FZROMyw2g6mswKAuCaNQ.png" /><figcaption>Multiple repositories connected to the single Foresight project</figcaption></figure><p><strong>Monitoring Test Runs</strong></p><p>Another thing that we can monitor here is test runs on our projects. We need to make some configurations. To do this, go to connect repository screen again and choose <strong>Test Monitoring </strong>this time, under the GitHub section we will use Java and Maven.</p><p>There are 2 variables; THUNDRA_APIKEY and THUNDRA_PROJECT_ID. These are needed for sending test run data to the correct project (your foresight project).</p><p>Now we will update our workflow as shown as, I highly recommend using these variables as a GitHub secret. But If you only making a demo, you can use hard coded as shown in the integration screen on Thundra Foresight.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ad6005a7d6cce80e39542b3d049bf04a/href">https://medium.com/media/ad6005a7d6cce80e39542b3d049bf04a/href</a></iframe><p>Updating the <strong>test </strong>workflow is enough in our case because it is running test only. After a little while running the updated workflow, you can see the test runs in your project.</p><p>As the picture below, multiple repositories connected in a single Foresight project; dcm4che also integrated for test runs, Payara has failed workflow runs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/0*JTf942U14LUcNC-s" /><figcaption>Multiple repositories that observed for test runs</figcaption></figure><h4>Conclusion:</h4><p>Monitoring automated tests is a pretty painful job, there might be some flaky tests that exist. When you schedule workflows to run with Foresight, it is so easy to detect unwanted activities in your tests. On the screen below, we can examine the latest test runs in our dcm4che project. As you can see, there are no flaky tests. All tests are passing in all test runs, there are no changes in failed or skipped test counts:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rJYvqz-MJJCFaGDD" /></figure><figure><a href="https://faun.to/bP1m5"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BCiLLad3dvZLwBa-B5cAVQ.png" /></a></figure><p>Join FAUN: <a href="https://faun.to/i9Pt9"><strong>Website</strong></a><strong> </strong>💻<strong>|</strong><a href="https://faun.dev/podcast"><strong>Podcast</strong></a><strong> </strong>🎙️<strong>|</strong><a href="https://twitter.com/joinfaun"><strong>Twitter</strong></a><strong> </strong>🐦<strong>|</strong><a href="https://www.facebook.com/faun.dev/"><strong>Facebook</strong></a><strong> </strong>👥<strong>|</strong><a href="https://instagram.com/fauncommunity/"><strong>Instagram</strong></a><strong> </strong>📷|<a href="https://www.facebook.com/groups/364904580892967/"><strong>Facebook Group</strong></a><strong> </strong>🗣️<strong>|</strong><a href="https://www.linkedin.com/company/faundev"><strong>Linkedin Group</strong></a><strong> </strong>💬<strong>|</strong> <a href="https://faun.dev/chat"><strong>Slack</strong></a> 📱<strong>|</strong><a href="https://thechief.io/"><strong>Cloud Native</strong> <strong>News</strong></a><strong> </strong>📰<strong>|</strong><a href="https://linktr.ee/faun.dev/"><strong>More</strong></a><strong>.</strong></p><p><strong>If this post was helpful, please click the clap 👏 button below a few times to show your support for the author 👇</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1fbf78f6b91c" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/monitoring-ci-cd-workflows-1fbf78f6b91c">Monitoring CI/CD Workflows</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Performance Comparison between Selenium-3 and Selenium-4]]></title>
            <link>https://medium.com/@emin_bilgic/performance-comparison-between-selenium-3-and-selenium-4-fc2fbbd7d94?source=rss-2b8f547aa00c------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc2fbbd7d94</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[selenium]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Emin Bilgic]]></dc:creator>
            <pubDate>Fri, 24 Dec 2021 06:50:34 GMT</pubDate>
            <atom:updated>2022-08-02T07:36:54.576Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WKrhm26PyzCq4fl1" /></figure><p>Summary</p><p><em>Selenium-4 was officially released On October 13, 2021, and brought lots of upgrades with this release. The most prominent change in this release is the deprecation of JSON wire Protocol. It changed Selenium architecture in a significant way. Besides that, there are also lots of standardizations and stabilizations about the Selenium domain. In this article, we are going to compare coding practices between Selenium-3 and Selenium-4, and we will make a performance comparison between them.</em></p><h3>Architectural upgrade</h3><p>The most prominent change in this release is the deprecation of JSON Wire Protocol. Actually, this can be considered as the main reason for the Selenium-4 upgrade and Selenium-4 does not include JSON Wire Protocol anymore.</p><p>Selenium used to use this protocol for communicating with the web browser. But Selenium-4 has direct communication between the client and server using the W3C (World Wide Web Consortium) protocol, offering lots of advantages compared to the Web Driver used in the versions before Selenium-4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/0*UAON7hUAO8VrJO_w" /><figcaption><em>Architecture of Selenium-3</em></figcaption></figure><blockquote>Native support has been removed for the Opera Driver, and the Opera Driver and browser are no longer active. Users can use Chrome as the Opera browser which is based on Chromium.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/0*LuWx3DV36ZiHagpN" /><figcaption><em>Architecture of Selenium-4</em></figcaption></figure><p>After W3C Protocol is replaced with JSON Wire Protocol, you do not need to encode and decode the requests. This direct communication brings more stability and consistency.</p><h3>The Deprecates from Selenium-3</h3><h4>Find Element methods:</h4><p>The utility methods to find element(s) in the ‘FindBy’ interface have been removed as they have been used internally only. Instead of this, the ‘By’ class is annotated to increase stability.</p><p><strong>Old</strong>:</p><pre>driver.findElementByClassName(“className”);<strong> </strong></pre><p><strong>New:</strong></p><pre>driver.findElement(By.className(“className”)); </pre><h4>Desired Capabilities:</h4><p>Desired capabilities were used to define test environments primarily in Selenium Grid. These are replaced with Options in Selenium-4, so you are able to define specific options for drivers.</p><p><strong>Old:</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c152335ecfb7a69d251a6dd17e214759/href">https://medium.com/media/c152335ecfb7a69d251a6dd17e214759/href</a></iframe><p><strong>New:</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ef5bf38f464974b0a2bcb20d4552822e/href">https://medium.com/media/ef5bf38f464974b0a2bcb20d4552822e/href</a></iframe><h3>Actions:</h3><p>Actions class is for simulating user gestures like a double click, click and hold, etc. There are newly added methods in this class and they are replaced with the old ones.</p><p><strong>Old:</strong></p><pre><em>moveToElement(toElement).click()</em></pre><p><strong>New:</strong></p><pre><em>click(webElement) </em></pre><p>These are the significant changes from Selenium 3 and there are lots of deprecated methods that came with Selenium-4. Some of the classes and methods that include them are:</p><ul><li>Timeout Parameters</li><li>Merging Capabilities</li><li>Wait parameters</li><li>Browser Interface</li><li>Firefox Legacy</li><li>Browser type</li></ul><h3>What is new in Selenium-4</h3><p>There comes lots of remarkable innovations that will make testing easier for you with Selenium-4. For instance, getting screenshots of elements, opening a new tab or window used to be painful. With Selenium-4, these operations are standardized with selenium libraries.</p><h4>Screenshot of an Element:</h4><p>This was a very painful event in older Selenium versions. You had to take a screenshot of the screen and then you had to crop it using desired element’s coordinates. With Selenium-4, it can be accomplished with a few lines of code:</p><p><strong>Old</strong>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e3ff3c15f1a6e8b9378a836972a81387/href">https://medium.com/media/e3ff3c15f1a6e8b9378a836972a81387/href</a></iframe><p><strong>New:</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2d3f3571b48f5d9be6c871cb6ed0060e/href">https://medium.com/media/2d3f3571b48f5d9be6c871cb6ed0060e/href</a></iframe><p>This brings us a significant performance improvement on taking screenshots because there were lots of operations like crop and save in the old version.</p><p>In my example; I ran a test method 3 times which uses the old version of taking screenshots of an element. Then I updated this function with using the new technique and ran it 3 times again.</p><p>You can notice a significant reduction in the execution times of the tests in the latter 3 runs than in the first 3 runs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jCRg47mqOvJA_bLP" /><figcaption><em>Reducing execute times of taking a photo of an element in migrating from Selenium-3 to Selenium-4</em></figcaption></figure><h4>Multiple Tabs</h4><p>When you wanted to open a new tab or a new window for your tests, you had to send which shortcut key sequences should be pressed on your screen or you had to run some javascript commands with javascript executed.</p><p>With Selenium-4, you can simply tell the driver to switch new tab now.</p><p><strong><em>Old:</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1a0559c57dacd25f1f70dd5b8cfb53c0/href">https://medium.com/media/1a0559c57dacd25f1f70dd5b8cfb53c0/href</a></iframe><p><strong><em>New:</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f2154939c827c23c40b8c4985945ec55/href">https://medium.com/media/f2154939c827c23c40b8c4985945ec55/href</a></iframe><h4>Relative Locators</h4><p>Locating elements might be painful even if you have a wide acquaintance with UI testing. With relative locators, you don’t need to reach each element with the ‘findElement’ methods. You can locate an element from any element you already located.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d7a96731de91730ee6bb814b5b231c9d/href">https://medium.com/media/d7a96731de91730ee6bb814b5b231c9d/href</a></iframe><p>This code block finds the search bar in google and sends ‘Relative Locator’ keys to it. Then it checks if there are any elements with a ‘input’ tag below in the located search bar.</p><h4>Connection Conditions</h4><p>You can set some connection features for your tests with Selenium-4 like latency, going offline, and setting download or upload throughput.</p><pre><em>new ChromiumNetworkConditions().setOffline(true)</em></pre><h4>Full page screenshot on firefox</h4><p>Taking a full-page screenshot in Selenium-4 doesn’t mean the same thing as taking a screenshot in an older version of Selenium. In older versions, you can only take a screenshot of the current view, not the whole page. With Selenium-4 you can take a screenshot of the infinite scrolled page.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f28bc08694fa4b417ee91250213c9426/href">https://medium.com/media/f28bc08694fa4b417ee91250213c9426/href</a></iframe><h3>Performance comparison</h3><p>Since W3C was replaced with JSON Wire Protocol, our tests can directly communicate with the web browser. It may sound like Selenium is more efficient and fast now, but it actually does not make much difference in the speed of the tests. As the Selenium web driver and web browsers use the same protocol, tests will execute only more consistently. So flakiness of Selenium tests will be reduced substantially.</p><p>We already talked about stability and consistency improvements in Selenium-4. Now we are going to compare if there is any performance improvement in this release.</p><p>To do this, I have created a <a href="https://github.com/meminb/Selenium4-Comparison">repository</a> that contains 2 projects which are use Selenium-4 and Selenium-3 jars from maven and they contain the same test method with annotation <strong>@RepeatedTest(15)</strong>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4b0ab57af3932bceeac9b0c3e3716bc7/href">https://medium.com/media/4b0ab57af3932bceeac9b0c3e3716bc7/href</a></iframe><p>I created 2 different GitHub workflows for running them separately and scheduled them to run 6 times a day.</p><p>Now it is time to monitor these tests.</p><p>To be able to monitor my workflows, I connected my repository to <a href="https://foresight.thundra.io/">Thundra Foresight</a><strong> </strong>while my workflows generate data.</p><p>After nearly a week I got this graph from Thundra which means there is no significant performance difference between Selenium-3 and Selenium-4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/0*Ytn4jCq1agkeJNn1" /><figcaption><em>Workflow run times of Selenium-3 and Selenium-4</em></figcaption></figure><p>In my performance comparison test, I’ve only used 15 tests that process a simple google search on a single driver. This may not be a very healthy comparison but we can tell that our tests are more consistent and stable with Selenium-4.</p><p>If you want to monitor your GitHub workflows altogether in a single dashboard, go ahead and <a href="https://foresight.thundra.io/signup">signup for Foresight</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc2fbbd7d94" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying Java Applications to AWS Elastic Beanstalk]]></title>
            <link>https://awstip.com/deploying-java-applications-to-aws-elastic-beanstalk-22b3a0c44bb2?source=rss-2b8f547aa00c------2</link>
            <guid isPermaLink="false">https://medium.com/p/22b3a0c44bb2</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[elastic-beanstalk]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[spring-boot]]></category>
            <dc:creator><![CDATA[Emin Bilgic]]></dc:creator>
            <pubDate>Sat, 30 Oct 2021 19:20:55 GMT</pubDate>
            <atom:updated>2021-12-01T08:10:43.246Z</atom:updated>
            <content:encoded><![CDATA[<p>I have been studying Amazon web services and I realized deploying Java applications on Amazon Elastic Beanstalk (<strong>EB</strong>) is a little different from deploying apps that do not require compile to run. So this took a lot of my time and I decided to share a simple example of <strong>deploying a Java application to Elastic Beanstalk by using Amazon CDK. </strong>We can also do this in lots of different ways such as using EB CLI but I am gonna talk about deploying by using CDK CLI.</p><p>Before starting, you can check the repository that includes completed <a href="https://github.com/meminb/Deploying-SpringBoot-App-on-AWS-EB/tree/SpringApp">SpringBoot</a> and <a href="https://github.com/meminb/Deploying-SpringBoot-App-on-AWS-EB/tree/CDK-Deployment">CDK</a> projects on GitHub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*biqAKRcckPHK3i3INQPiyA.png" /></figure><p>First, we need to create a simple Spring boot app, you should add the Spring Web package while you are creating this. You can initialize a spring boot project from <a href="https://start.spring.io/">here</a> if you do not have IntelliJ Idea Ultimate. After initializing the project you should build your application to a jar:</p><pre><strong>$ mvn clean install</strong></pre><p>When you follow these steps correctly, the target folder of your spring boot app will look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*NZro4ljzhS5LzktnrqgYqQ.png" /><figcaption>‘Target’ file after you run the command</figcaption></figure><p>To deploy our Spring Boot application, we will use AWS Cloud Development Kit (CDK) with typescript, you can use any language instead. First, we need to create an example CDK app project in an empty directory. Run this command in an empty directory which you want:</p><pre><strong>$ CDK init app –language typescript</strong></pre><p>Your CDK folder will look like this after running this command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*paTwHQVRztMYGS3_kSF-4Q.png" /><figcaption>CDK folder after initiliziation</figcaption></figure><p>Time to code now, we are gonna make changes on the <strong>lib/cdk-deployment-stack.ts </strong>file.<strong> </strong>First, we’ll create an S3 bucket asset to store our application and then an Elastic Beanstalk environment that runs our application.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/08e6e47906c5fafc6e12ae2676fb0d21/href">https://medium.com/media/08e6e47906c5fafc6e12ae2676fb0d21/href</a></iframe><p>There are 2 constructs; the S3 asset that consists of our Spring application and the EB application version resource that is an iteration of our deployable code.</p><p>Elastic Beanstalk can perform some actions on environment resources automatically but you need to define some permissions using AWS Identity and Access Management (IAM) services. We will add managed policies to our EB role for these permissions:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5761ad47f1a398bd61318be450061ea7/href">https://medium.com/media/5761ad47f1a398bd61318be450061ea7/href</a></iframe><p>These policies and roles will be configured by OptionSettingProperty of our environment instance. After assigning all of this, our environment settings will look like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/14406aef8baffe3756ec461f334b20a9/href">https://medium.com/media/14406aef8baffe3756ec461f334b20a9/href</a></iframe><p>Now we can create our EB environment:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/42aeafc8015443a04712dc00f1d23d50/href">https://medium.com/media/42aeafc8015443a04712dc00f1d23d50/href</a></iframe><p>We are setting ‘<strong>opptionSettings</strong>’ we just created for configurations. Also, we defined VersionLabel to let EB know where our application zip is. SolutionStackName is another important property, you can freely pick your infrastructure but you must choose your JDK version appropriate for your Spring boot project JDK version. To see available solution stack names, run this command on any terminal:</p><pre><strong>$ aws elasticbeanstalk list-available-solution-stacks</strong></pre><h4>Deploying Application</h4><p>At this point, your application will be uploaded to the S3 bucket but it is not deployed yet. You can see your Elastic Beanstalk environment and application on the AWS console but the URL of the application will not work. You need to use the <strong>‘Upload and Deploy’</strong> button on the <strong>‘Elastic Beanstalk &gt; Environments &gt; EBS-Demo-Env’ </strong>page and choose your uploaded application from the versions tab. Doing this on every deployment does not sound very useful at all does it? So we will automate it now…</p><p>There is only one configuration to run the Spring application correctly. We need to tell Elastic Beanstalk how to run our application that exists in S3. We are gonna do this in 3 steps:</p><ol><li>Create Procfile that runs desired commands to run uploaded application. You can create it root directory of your Spring Boot application but recommend you move this to a folder named <strong>‘conf’</strong> to make your project tree cleaner. <strong>Procfile</strong> may consist of only one command to run jar:</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1f0ed1971430ff834e64a879057e264d/href">https://medium.com/media/1f0ed1971430ff834e64a879057e264d/href</a></iframe><p><strong>2.</strong> Create <strong>‘bin.xml’</strong> under<strong> ‘src/main/resources/assembly’</strong> directory. This configures our Procfile.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/19d7eb3e6d1e4a940b46b3f7a36ca68b/href">https://medium.com/media/19d7eb3e6d1e4a940b46b3f7a36ca68b/href</a></iframe><blockquote>We also changed the output of the build format to zip. So we can insert agents or additional packages for our application to use.</blockquote><p><strong>3.</strong> Insert assembly plugin to your pom.xml:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0a2dfed6ea395cd4d5e4b460dc4be8b4/href">https://medium.com/media/0a2dfed6ea395cd4d5e4b460dc4be8b4/href</a></iframe><p>Also, we need to make one more configuration for running the spring application correctly. The default port used by Elastic Beanstalk is 5000 on ‘64bit Amazon Linux 2 v3.2.5 running Corretto 8’ that I used but it is 8080 for spring boot. So if we deploy our application directly, <strong>EB</strong> will not be able to run this. We can change the port of our application by adding this line to <strong><em>application.properties </em></strong><em>file</em>:</p><pre><strong>server.port=5000</strong></pre><blockquote>Additionally, we can also change the default port of Elastic Beanstalk from ‘<strong>OptionSettingProperty</strong>’ instead of changing the spring app’s port.</blockquote><p><strong>All configurations are done!</strong> Now run the build command by using the assembly plugin in the directory of your spring app again.</p><pre><strong>$ mvn clean install -P build</strong></pre><p>Check if the zip file exists under the target file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/316/1*baUzck7wk8iomEFyBL6RwA.png" /><figcaption>‘Target’ file after running the command</figcaption></figure><p>As you can remember we did not fill the application path when we created the S3 asset. Update your the code is as below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9edb3c01a21217909e2ed673a11281ed/href">https://medium.com/media/9edb3c01a21217909e2ed673a11281ed/href</a></iframe><p>Finally, run the deploy command in your CDK directory, and it is over.</p><pre><strong>$ cdk deploy</strong></pre><p>We can see our application running on <strong>EB</strong>, check it from the AWS console:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9WmsHoagwUIB_NY6nTA44g.png" /></figure><p>Go to your URL address…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*hHwbbAJOud0GEhg8zJQfsA.png" /></figure><p><strong>Congratulations! Your app is running on the cloud. Do not forget to destroy your app to prevent unwanted invoices:</strong></p><pre><strong>$ cdk destroy</strong></pre><h4>Bonus</h4><p>I talked about briefly why we configured our ‘bin.xml’ to build our application inside a zip file. Now we will use an agent with our Spring Application, this will help us to monitor our application that running on Elastic Beanstalk. By doing this, we will be able to monitor hits on endpoints, their success rates, latency information, etc. This is a product named Application Performance Monitoring (APM) from Thundra.</p><p>It is pretty easy to add an APM agent to your application. You can follow</p><p><a href="https://apm.docs.thundra.io/getting-started/quick-start-guide">docs</a> also but I will briefly explain how to do it.</p><ol><li>After signing up <a href="https://www.thundra.io/">Thunra</a>, log in and pick APM. From the left bottom choose <strong>Profile&gt;projects</strong> and copy <strong>API Key</strong> from here. Do not share this ApiKey and protect it as your honor :)</li></ol><p><strong>2.</strong> Download <a href="https://repo.thundra.io/service/local/artifact/maven/redirect?r=thundra-%20releases&amp;g=io.thundra.agent&amp;a=thundra-agent-bootstrap&amp;v=LATEST">APM Agent</a> and move it to the root directory of your Spring Application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/296/1*E7ULPX4xKT5uenkU8CK-Pw.png" /></figure><p>3. Update the <strong>procfile</strong> to run our application with the APM agent.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cb48b4f08d9ee9f0cce6485b62a8f6a3/href">https://medium.com/media/cb48b4f08d9ee9f0cce6485b62a8f6a3/href</a></iframe><p><strong>That is all!</strong> When you build your application with ‘mvn clean install -P build’ again and you will see our zip file includes the APM agent. Finally, you can redeploy resources and update the application.</p><pre><strong>$ cdk deploy</strong></pre><p>After hitting any endpoint, your data will appear on the Thunda APM console:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*31aOT-GrvHlTOCGvBRjkgw.png" /><figcaption>Your applications that deployed with a Thundra agent</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Sab65uLVOMzAC3-sjNpKA.png" /><figcaption>Details of your application</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22b3a0c44bb2" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/deploying-java-applications-to-aws-elastic-beanstalk-22b3a0c44bb2">Deploying Java Applications to AWS Elastic Beanstalk</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>