<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Site-Server v@build.version@ (http://www.squarespace.com) on Wed, 15 Apr 2026 16:28:44 GMT
--><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://www.rssboard.org/media-rss" version="2.0"><channel><title>Articles and Guides - Top Developer Academy</title><link>https://topdeveloperacademy.com/articles/</link><lastBuildDate>Mon, 11 Aug 2025 20:35:47 +0000</lastBuildDate><language>en-US</language><generator>Site-Server v@build.version@ (http://www.squarespace.com)</generator><description><![CDATA[<p>Pro Developer Academy articles about advanced Java topics, Concurrency and Software Architecture.</p>]]></description><item><title>How to Become a Software Architect - The Complete Guide</title><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Mon, 11 Aug 2025 19:41:23 +0000</pubDate><link>https://topdeveloperacademy.com/articles/how-to-become-a-software-architect-a-complete-guide-for-developers</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:6887e2a19fd36c5e424658ac</guid><description><![CDATA[If you’re an experienced software developer and want to take your career to 
the next level, becoming a software architect is a natural and rewarding 
next step.
Becoming a software architect and technical lead not only helps you grow 
your career and increase your impact, but also future-proofs your career 
against the threat of AI.

In this guide, I’ll walk you through the skills, mindset, and steps needed 
to transition into a software architect role.]]></description><content:encoded><![CDATA[<p class="">If you’re an experienced software developer and want to take your career to the next level, becoming a <strong>software architect</strong> is a natural and rewarding next step.<br>Becoming a software architect and technical lead not only helps you grow your career and increase your impact, but also future-proofs your career against the threat of AI. <br>However, becoming a technical lead and software architect requires more than just years of coding experience.</p><p class="">In this guide, I’ll walk you through the skills, mindset, and steps needed to transition into a software architect role. </p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1754940717952-5R7FQ9ZWX8ADB70KAMH1/Software+Engineer+becoming+a+software+architect" data-image-dimensions="2500x1875" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1754940717952-5R7FQ9ZWX8ADB70KAMH1/Software+Engineer+becoming+a+software+architect?format=1000w" width="2500" height="1875" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1754940717952-5R7FQ9ZWX8ADB70KAMH1/Software+Engineer+becoming+a+software+architect?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1754940717952-5R7FQ9ZWX8ADB70KAMH1/Software+Engineer+becoming+a+software+architect?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1754940717952-5R7FQ9ZWX8ADB70KAMH1/Software+Engineer+becoming+a+software+architect?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1754940717952-5R7FQ9ZWX8ADB70KAMH1/Software+Engineer+becoming+a+software+architect?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1754940717952-5R7FQ9ZWX8ADB70KAMH1/Software+Engineer+becoming+a+software+architect?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1754940717952-5R7FQ9ZWX8ADB70KAMH1/Software+Engineer+becoming+a+software+architect?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1754940717952-5R7FQ9ZWX8ADB70KAMH1/Software+Engineer+becoming+a+software+architect?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  


&nbsp;
  
  <h2>What Is a Software Architect?</h2><p class="">A <strong>software architect</strong> is responsible for high-level technical decisions and the overall structure of software systems. The software architect acts as a bridge between business stakeholders, like product managers, and technical stakeholders, like software developers, QA, and DevOps.<br>Software architects’ role is to ensure the software product is scalable, maintainable, and aligned with user needs, while at the same time, it is delivered within the allocated time and budget. </p><p class="">Additionally, the software architect needs to ensure that the system can continue evolving over time without accumulating technical debt.</p><h2>Why Become a Software Architect?</h2><p class="">Besides the obvious prestige in being a key decision maker at your company, there are many other reasons software developers would want to grow their careers in software architecture:</p><ul data-rte-list="default"><li><p class=""><strong>Broader Impact</strong> – Software Architects influence system-wide decisions, not just individual, isolated features</p></li><li><p class=""><strong>Higher Salaries</strong> – On average, software architects earn <strong>20–40%</strong> more than senior software engineers. In certain countries, it’s 100% higher.</p></li><li><p class=""><strong>Career Advancement</strong>&nbsp;- You can continue growing as an individual contributor/software engineer without needing to transition into people management.</p></li><li><p class=""><strong>Job Security</strong> - The entire company depends on the software architect’s vision, knowledge, and guidance, making them virtually irreplaceable</p></li><li><p class=""><strong>Work Satisfaction</strong> - The role of a software architect is one of the most rewarding and exciting in the industry, with a broad spectrum of responsibilities</p></li></ul><p class="">So now that we understand the role of a software architect and why it’s such a lucrative career path, let’s learn the best way to become a software architect. </p><h2>Why Becoming a Software Architect is Challenging</h2>


  


  




  
  <p class="">Transition from software engineer to software architect is much more challenging than advancing from junior to mid-level or from mid-level to senior software engineer. <br>The reason for this challenge is that it requires:</p><ul data-rte-list="default"><li><h4><strong>Implementation vs High-Level Design</strong></h4><p class="">While engineers focus on building features and writing code, software architects design entire systems, balance trade-offs,  and have to align with business goals, which even the most senior software engineer is largely not even aware of.</p></li><li><h4><strong>Communication and Soft Skills</strong></h4><p class="">A typical software engineer can get away with mediocre verbal and writing skills. However, a software architect needs to be very proficient at talking not only to technical stakeholders but also to non-technical stakeholders. <br>Software architects also need to be able to communicate and document ideas across teams, using software architecture diagrams, database diagrams, etc.</p></li><li><p class=""><strong>Technical Skills</strong> <br>A typical software engineer is encouraged throughout their career to specialize in one area, such as backend, front-end, security, blockchain, or AI. They are also encouraged to specialize even further, like getting deep into one programming language or framework.</p><p class="">In contrast, software architects need to have a broad (as opposed to deep) knowledge of <strong>everything</strong>.</p></li></ul>


  


  














































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9491d48c-a52f-4983-a31b-82d15398c46c/Becoming+a+software+architect+skills+gap" data-image-dimensions="1194x1580" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9491d48c-a52f-4983-a31b-82d15398c46c/Becoming+a+software+architect+skills+gap?format=1000w" width="1194" height="1580" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9491d48c-a52f-4983-a31b-82d15398c46c/Becoming+a+software+architect+skills+gap?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9491d48c-a52f-4983-a31b-82d15398c46c/Becoming+a+software+architect+skills+gap?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9491d48c-a52f-4983-a31b-82d15398c46c/Becoming+a+software+architect+skills+gap?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9491d48c-a52f-4983-a31b-82d15398c46c/Becoming+a+software+architect+skills+gap?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9491d48c-a52f-4983-a31b-82d15398c46c/Becoming+a+software+architect+skills+gap?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9491d48c-a52f-4983-a31b-82d15398c46c/Becoming+a+software+architect+skills+gap?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9491d48c-a52f-4983-a31b-82d15398c46c/Becoming+a+software+architect+skills+gap?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <p class="">So, essentially, what makes an excellent software engineer is actually far from what is required from a software architect.<br>This is why most software engineers get stuck and can’t jump over that skill gap, and become a software architect.</p><p class="">So, how can YOU overcome this skill gap? By proactively following the steps below:</p><h2>How to Become a Software Architect: 7 Essential Steps</h2><h3>1. Think Big Picture Beyond Code</h3><p class="">One of the biggest mindset shifts from software engineer to software architect is moving beyond the “feature”, or even short-term 1-3 months project level, to think in terms of entire systems as well as months and years ahead. <br>Instead of asking, <em>“How do I build this?”</em>, start asking:</p><ul data-rte-list="default"><li><p class="">What components do you need? Should you implement it yourself or get an off-the-shelf component?</p></li><li><p class="">How will different components of the system interact with each other?</p></li><li><p class="">What trade-offs do I need to make between scalability, security, performance, maintainability, cost, and delivery speed?</p></li><li><p class="">How will this system evolve over time?</p></li><li><p class="">What stakeholders are impacted by your work besides your manager and fellow teammates?</p></li></ul><p class="">You can practice this mind-shift even in your current role. The next time you’re assigned a feature, look at its dependencies, data flow, and long-term impact. This habit will make you a natural candidate for a role as a software architect.</p><h3>2. Improve Your Communication and Documentation Skills</h3><p class="">Great architects are not just technical experts. They’re excellent communicators.</p><p class="">Even if your design is great, if you can’t communicate it to other engineers or business executives, it will not be implemented.<br>You’ll need to explain architectural decisions to non-technical stakeholders in plain language, collaborate with developers using precise technical documentation, and create software architecture diagrams that convey complex systems and concepts.</p><h4><strong>Practical ways to improve:</strong></h4><ul data-rte-list="default"><li><p class="">Start writing short technical documentation for your team</p></li><li><p class="">Familiarize yourself with creating architecture diagrams (e.g., <a href="https://topdeveloperacademy.com/articles/top-tools-software-architecture-diagrams-software-architects-toolbox">C4 model</a>, <a href="https://topdeveloperacademy.com/articles/top-tools-software-architecture-diagrams-software-architects-toolbox">UML diagrams</a>, etc)</p></li><li><p class="">Present small design proposals to colleagues to get comfortable in front of an audience</p></li></ul><p class="">This skill is so important that it’s a core part of my <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f"><strong>Certified Professional for Software Architecture - Foundation Level (CPSA-F)</strong></a> training, which covers:</p><ul data-rte-list="default"><li><p class="">Types of documentation for communicating <strong>design decisions</strong>, <strong>interfaces</strong>, and <strong>cross-cutting concerns</strong>.</p></li><li><p class="">Software architecture diagrams include&nbsp;<strong>UML sequence diagrams</strong>,&nbsp;<strong>class diagrams</strong>, and&nbsp;<strong>component diagrams</strong>.</p></li><li><p class="">Different <strong>software architecture views</strong> and levels of abstraction to document deployment topologies, static and dynamic views, etc.</p></li><li><p class=""><strong>Best practices</strong> for communication and documentation of software architecture for technical and non-technical stakeholders.</p></li><li><p class="">Standard <strong>industry-proven templates</strong> for documentation that you can follow.</p></li></ul><h3>3. Follow Professional Software Architecture Blogs</h3><p class="">Staying updated on the latest practices, trends, and case studies shared by <strong>software architects</strong> (not YouTube or LinkedIn influencers) will keep your knowledge sharp and relevant.<br>Some excellent resources include:</p><ul data-rte-list="default"><li><p class=""><a href="https://www.infoq.com/" target="_blank">InfoQ Architecture &amp; Design</a></p></li><li><p class=""><a href="https://www.thoughtworks.com/en-us/radar" target="_blank">ThoughtWorks Technology Radar</a></p></li><li><p class="">Engineering blogs by <a href="https://netflixtechblog.com/" target="_blank">Netflix</a>, <a href="https://engineering.fb.com/" target="_blank">Meta</a>, <a href="https://www.linkedin.com/blog/engineering" target="_blank">LinkedIn</a>, <a href="https://www.uber.com/blog/los-angeles/engineering/" target="_blank">Uber</a>, <a href="https://aws.amazon.com/blogs/architecture/" target="_blank">AWS</a>, etc</p></li></ul><p class="">Regularly reading from real and experienced software architects will help you develop your architectural thinking and vocabulary. </p><p class="">It may feel a bit daunting at first, but over time it will become easy and fun to follow those blogs. </p><p class="">More importantly, you will realize that the depth and quality of those blogs will directly impact the quality of your work and credibility, since other engineers will continue only learning and talking about new tools and technologies, which make little impact on your journey towards the role of a software architect.</p><h3>4. Read Professional Software Architecture Books</h3><p class="">Books require a big time investment. However, they allow you to go deeper into many topics that just can’t fit into a blog article or even a conference talk.<br>Some recommended starting points:</p><ul data-rte-list="default"><li><p class=""><a href="https://www.amazon.com/Fundamentals-Software-Architecture-Engineering-Approach/dp/B0F6ZNZDG1/ref=sr_1_1?crid=3SE7BXTAUPHLY&amp;dib=eyJ2IjoiMSJ9.AjjJ724ro-V2bGONJSPbhmXpj6bwzkp_EA33zZX_ETLGjHj071QN20LucGBJIEps.PC19etjG8ibajk-qwUagBXlqtsufxb1fpN3H83Uk1yg&amp;dib_tag=se&amp;keywords=Fundamentals+of+Software+Architecture+by+Mark+Richards+%26+Neal+Ford&amp;qid=1754935670&amp;sprefix=fundamentals+of+software+architecture+by+mark+richards+%26+neal+ford%2Caps%2C243&amp;sr=8-1" target="_blank"><em>Fundamentals of Software Architecture</em> </a>by Mark Richards &amp; Neal Ford</p></li><li><p class=""><a href="https://www.amazon.com/Software-Architecture-Practice-SEI-Engineering/dp/0136886094/ref=sr_1_1?crid=2588I1VDRG3C0&amp;dib=eyJ2IjoiMSJ9.xOTEHHrxLi59jDYBnekVNXlrcF_VI8N7YP3_l-Cxs_f-n3Ab40c8KNpmT22mGanKATz_VNP2pmtEXIsK-yNQ8K3Pew1T4laTHxuvQskEqvk.CI-CI6-aRsy5iiMjbHvtlsaRvggqq7ktvpgxqUlaYlE&amp;dib_tag=se&amp;keywords=Software+Architecture+in+Practice+by+Len+Bass%2C+Paul+Clements+%26+Rick+Kazman&amp;qid=1754935697&amp;sprefix=software+architecture+in+practice+by+len+bass%2C+paul+clements+%26+rick+kazman%2Caps%2C184&amp;sr=8-1" target="_blank"><em>Software Architecture in Practice</em> </a>by Len Bass, Paul Clements &amp; Rick Kazman</p></li><li><p class=""><a href="https://www.amazon.com/Designing-Data-Intensive-Applications-Reliable-Maintainable/dp/B08VL1BLHB/ref=sr_1_1?crid=2HSSDJ8XMVG1Y&amp;dib=eyJ2IjoiMSJ9.qRSpaa2ChJugfxrIlOV1rf5j0PVbcWH_os0A_B_0SKLxrmaoTxQnrxQ7yf6wopwVrNQEwWIozK3X_oCxkFiWyI06C6a_pPGL5HXHPSpoUl_vwWwvIBdcDchAYrwbCmESLNluzosxmm1jM91tbqzvrchty4pvtZ5JMuvuern2mNXwhNoM0s4ooj6KVwdEB7S8-uK2_C4FRM4Dfsf92fov5Rm4Cf1-90AzqkL-JJQ9xEA.q38KMaGM8DZOF4O9w2I_c8GZ_PJ6uLMMfBQ-L4OLws8&amp;dib_tag=se&amp;keywords=data+intensive+applications&amp;qid=1754935714&amp;sprefix=data+intens%2Caps%2C277&amp;sr=8-1" target="_blank">Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems</a> by Martin Kleppmann</p></li></ul><p class="">While reading, focus on understanding <strong>why</strong> certain architectural decisions are made, not just <strong>how</strong> they’re implemented. These insights will help you in making trade-offs and design decisions at your work.</p><h3>5. Go to Software Architecture Conferences</h3><p class="">Conferences are a goldmine for not only learning software architecture but also networking with like-minded individuals. You’ll gain exposure to new technologies, software architecture trends, and hear stories from architects working in the field, solving real problems.</p><p class="">Some great conferences to consider:</p><ul data-rte-list="default"><li><p class=""><a href="https://QCon Software Conferences" target="_blank"><strong>QCon Conferences</strong></a> Software Architecture Track - Typically taking place in San Francisco, London, Munich,  and New York </p></li><li><p class=""><a href="https://www.isaqb.org/news-events/community-conference-sag/" target="_blank"><strong>iSAQB Software Architecture Gathering</strong></a> - An annual event happening in November, Berlin, Germany, organized by <a href="https://isaqb.org/" target="_blank">iSAQB</a></p></li><li><p class=""><a href="https://blog.gotocon.com/all-upcoming-events/https://blog.gotocon.com/all-upcoming-events/" target="_blank"><strong>Goto</strong> <strong>Conferences</strong></a> -  Gathers the brightest minds in the software community to help developers tackle projects today, plan for tomorrow, and create a better future.</p></li></ul><p class="">If you can’t attend in person, look for virtual options or recorded sessions on their websites or on YouTube.</p><p class="">Conferences are a great resource, but just like books, they can be quite time-consuming. But if you have the time and resources to attend them, they are totally worth it.</p><h3>6.  Get a Software Architect Certificate</h3><p class="">Obtaining a software architecture certification can be an effective way to close the skills gap, boost your credibility, and stand out in a competitive job market.</p><p class="">While certifications are not a strict requirement for most software architects’ roles, the right certification program can give you a clear framework for thinking about architectural decisions and a credential that signals your expertise to employers.</p><p class="">There are several well-known software architecture certification programs, each focusing on a different area:</p><ul data-rte-list="default"><li><h4><a href="https://www.opengroup.org/togaf" target="_blank"><strong>TOGAF</strong></a></h4><p class="">One of the most recognized certifications in architecture, but it is primarily aimed at <em>Enterprise Architects</em>, dealing with organizational processes and enterprise-level strategy. It’s valuable if you want to work at the intersection of business and IT strategy, but it’s <strong>not</strong> focused on the day-to-day skills of a <em>software</em> architect.</p></li><li><h4><strong>Cloud Certifications</strong> (<a href="https://aws.amazon.com/certification/certified-solutions-architect-associate/" target="_blank">AWS</a>, <a href="https://learn.microsoft.com/en-us/credentials/certifications/azure-solutions-architect/" target="_blank">Azure</a>, <a href="https://cloud.google.com/learn/certification/cloud-architect" target="_blank">GCP</a>)</h4><p class="">These are great for <em>solutions architects</em> or engineers who need to specialize in a specific vendor’s ecosystem, either for regulatory reasons or because their company heavily depends on a specific cloud vendor. While those certifications cover cloud vendor-specific services in depth, they do not teach the foundational principles of software architecture.</p></li><li><h4><a href="https://www.sei.cmu.edu/credentials/sei-software-architecture-professional-certificate/" target="_blank"><strong>SEI Software Architecture Professional Certificate</strong></a></h4><p class="">Offered by the Software Engineering Institute at Carnegie Mellon University, this certificate has strong academic credibility. However, it is highly theoretical and less focused on practical, real-world applications, which are required in the industry.</p></li><li><h4><a href="https://www.isaqb.org/certifications/cpsa-certifications/cpsa-foundation-level/" target="_blank"><strong>iSAQB® CPSA-F (Certified Professional for Software Architecture – Foundation Level)</strong> </a></h4><p class="">The CPSA-F software architecture certification is designed by experienced software architects in the industry. This certification is vendor-neutral and is highly practical. It covers fundamental principles, architectural styles, quality attributes, trade-offs, and documentation techniques that apply to any company regardless of the technology stack. </p></li></ul><h3>7. Take a Professional Software Architecture Training</h3><p class="">If you’re a busy professional and reading articles, books, or going to conferences isn’t possible, consider a structured and time-effective professional training like the <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f">Certified Professional for Software Architecture - Foundation Level (CPSA-F)</a> by Top Developer Academy.<br>This training <strong>distils</strong> all the knowledge from the best resources on software architecture and presents it in a very easy-to-follow online video course.</p><p class="">Participants of this training learn to:</p><ul data-rte-list="default"><li><p class=""><strong>Design an effective software architecture</strong> for your system</p></li><li><p class="">Ensure the fulfillment of <strong>complex project requirements</strong></p></li><li><p class=""><strong>Apply&nbsp;industry-proven</strong>&nbsp;<strong>design principles,</strong>&nbsp;patterns, and&nbsp;best practices</p></li><li><p class="">Evaluate and assess the <strong>quality of the software architecture</strong></p></li><li><p class=""><strong>Document and communicate design decisions</strong>, interfaces, and cross-cutting concerns</p></li></ul><p class="">The <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f">CPSA-F</a> training by Top Developer Academy is taught by <a href="https://www.linkedin.com/in/michaelpog/" target="_blank">Michael Pogrebinsky</a>, an experienced software engineer and software architect who’s worked for some of the top tech companies like Google, Intel, Magnite, and others.<br>He’s also an experienced software architecture instructor with more than&nbsp;<a href="https://www.udemy.com/user/michael-pogrebinsky/?kw=Michael+Pogrebinsky&amp;src=sac" target="_blank">200,000 learners on Udemy</a>&nbsp;and is an accredited CPSA-F trainer by iSAQB.</p><p class="">Michael Pogrebinsky’s teaching style emphasises practical examples and real-life scenarios rather than just learning theory, with no fluff or fillers, which is perfect for highly focused micro learning.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          <a class="
                sqs-block-image-link
                
          
        
              " href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f"
              
          >
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/CPSA-F+Course+Image+%281%29.jpg" data-image-dimensions="2048x1152" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/CPSA-F+Course+Image+%281%29.jpg?format=1000w" width="2048" height="1152" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/CPSA-F+Course+Image+%281%29.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/CPSA-F+Course+Image+%281%29.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/CPSA-F+Course+Image+%281%29.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/CPSA-F+Course+Image+%281%29.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/CPSA-F+Course+Image+%281%29.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/CPSA-F+Course+Image+%281%29.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/CPSA-F+Course+Image+%281%29.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          </a>
        

        
      
        </figure>
      

    
  


  



  
  <p class=""><a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f"><strong>Certified Professional for Software Architecture - Foundation Level (CPSA-F) Training</strong></a></p>


  


  



&nbsp;
  
  <p class="">In addition to being highly effective at preparing learners for taking on the role of a software architect, this CPSA-F training is also accredited by the <a href="https://isaqb.org/" target="_blank">International Software Architecture Qualification Board</a>, a global standard in training and certification of Software Architects.</p><p class="">By the end of the <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f">course</a>, students are fully prepared to pass the CPSA-F exam and earn the iSAQB® CPSA-F certification - A valuable and tangible asset that signals potential employers or managers that you have the necessary skills to step into the role of a software architect.</p>


  


  



<hr />
  
  <h3><strong>More Articles</strong></h3>]]></content:encoded><media:content type="image/jpeg" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1754941325521-E1UN8V7LJN5H8KPRP947/unsplash-image-wD1LRb9OeEo.jpg?format=1500w" medium="image" isDefault="true" width="1500" height="1125"><media:title type="plain">How to Become a Software Architect - The Complete Guide</media:title></media:content></item><item><title>Step-by-Step Guide on How to Pass the iSAQB CPSA-F Certification</title><category>software architecture</category><category>technical education</category><category>education for software engineers</category><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Fri, 25 Jul 2025 17:39:18 +0000</pubDate><link>https://topdeveloperacademy.com/articles/step-by-step-guide-on-how-to-pass-the-isaqb-cpsa-f-certification</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:6882b4dbdc77840d2189bad7</guid><description><![CDATA[f you're a software engineer looking to transition into a software 
architect role, the Certified Professional for Software Architecture – 
Foundation Level (CPSA-F) certification by iSAQB is an excellent way to 
acquire the relevant skills and also earn an internationally recognized 
certification.

But how exactly do you pass the iSAQB CPSA-F exam, and what should you 
expect from the process?

In this guide, I'll walk you through each step to get CPSA-F certified.]]></description><content:encoded><![CDATA[<p class="">If you're a software engineer looking to transition into a software architect role, the&nbsp;<strong>Certified Professional for Software Architecture – Foundation Level (CPSA-F)</strong>&nbsp;certification by&nbsp;<a href="https://isaqb.org/" target="_blank"><strong>iSAQB</strong></a>&nbsp;is an excellent way to acquire the relevant skills&nbsp;<strong>and</strong>&nbsp;also earn an internationally recognized certification.</p><p class="">But how exactly do you pass the iSAQB CPSA-F exam, and what should you expect from the process?</p><p class="">In this guide, I'll walk you through each step to get CPSA-F certified, from understanding how to prepare for the CPSA-F exam, how much the exam costs, how to register for the exam, and so on.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1753462521136-OKXBO0TS8S5LHRH5M6X9/Step-by-Step+Guide+on+How+to+Pass+the+iSAQB+CPSA-F+Certification" data-image-dimensions="2500x1875" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1753462521136-OKXBO0TS8S5LHRH5M6X9/Step-by-Step+Guide+on+How+to+Pass+the+iSAQB+CPSA-F+Certification?format=1000w" width="2500" height="1875" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1753462521136-OKXBO0TS8S5LHRH5M6X9/Step-by-Step+Guide+on+How+to+Pass+the+iSAQB+CPSA-F+Certification?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1753462521136-OKXBO0TS8S5LHRH5M6X9/Step-by-Step+Guide+on+How+to+Pass+the+iSAQB+CPSA-F+Certification?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1753462521136-OKXBO0TS8S5LHRH5M6X9/Step-by-Step+Guide+on+How+to+Pass+the+iSAQB+CPSA-F+Certification?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1753462521136-OKXBO0TS8S5LHRH5M6X9/Step-by-Step+Guide+on+How+to+Pass+the+iSAQB+CPSA-F+Certification?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1753462521136-OKXBO0TS8S5LHRH5M6X9/Step-by-Step+Guide+on+How+to+Pass+the+iSAQB+CPSA-F+Certification?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1753462521136-OKXBO0TS8S5LHRH5M6X9/Step-by-Step+Guide+on+How+to+Pass+the+iSAQB+CPSA-F+Certification?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1753462521136-OKXBO0TS8S5LHRH5M6X9/Step-by-Step+Guide+on+How+to+Pass+the+iSAQB+CPSA-F+Certification?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  


&nbsp;
  
  <h2>What is the iSAQB CPSA-F Certification?</h2><p class="">Before jumping into study materials, it’s important to know what the CPSA-F certification is all about so you can decide if it’s right for you.<br>The&nbsp;<strong>CPSA-F (Certified Professional for Software Architecture – Foundation Level)</strong>&nbsp;is an internationally recognized certification program that validates and certifies your understanding of fundamental software architecture.<br>Unlike college programs, this is a very practical certification relevant to the daily work of a software architect.<br><br>The CPSA-F certification is designed by <a href="https://isaqb.org/" target="_blank">iSAQB</a> - The&nbsp;<strong>International Software Architecture Qualification Board (iSAQB)</strong>, which is a non-profit organization made up of independent software architecture experts from industry and academia. <br><a href="https://isaqb.org/" target="_blank">iSAQB</a> was established in 2008 to address the lack of standardization in the training and certification of software architects. <br>Since its inspection, iSAQB has facilitated the training and certification of over 40,000 software engineers and software architects worldwide.</p><p class="">However, iSAQB <strong>does not conduct</strong> training for this certification. <br>Instead, it works with an independent network of accredited training providers and accredited trainers to teach software architecture and prepare software engineers for the CPSA-F exam. <br>iSAQB ensures that accredited trainers are qualified and that the accredited training provider adheres to strict quality standards. </p><h3>Step 1: Understand CPSA-F Curriculum and Prerequisites</h3><p class="">The <strong>Certified Professional for Software Architecture - Foundation Level (CPSA-F)</strong> certification is primarily intended for:</p><ul data-rte-list="default"><li><p class="">Mid-to senior-level software developers (with at least 18 months of experience)</p></li><li><p class="">Technical leads and software architects</p></li><li><p class="">Engineering managers</p></li></ul><p class="">The <a href="https://public.isaqb.org/curriculum-foundation/curriculum-foundation-en.pdf" target="_blank">curriculum</a> encompasses many topics that every software architect needs to know to perform their daily work. <br>Some of the topics include:</p><ul data-rte-list="default"><li><p class="">The <strong>understanding</strong> of the Software Architect’s roles, responsibilities, and terminology</p></li><li><p class=""><strong>Designing</strong> software systems based on complex requirements and making correct tradeoffs</p></li><li><p class=""><strong>Applying</strong> Industry-proven principles, design patterns, architecture styles, and best practices</p></li><li><p class="">Effectively <strong>documenting and communicating</strong> the software architecture to stakeholders</p></li><li><p class="">Systematically <strong>evaluating and improving</strong> the software architecture</p></li></ul><h3>Step 2: Prepare for the CPSA-F Certification Exam</h3><p class="">The CPSA-F exam is a multiple-choice, timed test that can be taken either online or in person at a testing center. Most candidates choose the flexibility of taking it from home with an online proctor.</p><p class=""><strong>The cost</strong> of the CPSA-F exam varies among the exam providers, but generally falls between <strong>$200 and $350 USD</strong>. Since the exam is not cheap, it’s highly recommended to prepare for it thoroughly before scheduling.</p><p class="">You <em>can</em> prepare for the CPSA-F certification through self-study by using publicly available materials, such as the <a href="https://public.isaqb.org/curriculum-foundation/curriculum-foundation-en.pdf" target="_blank">official curriculum</a> and official <strong>mock exam</strong> (<a href="https://public.isaqb.org/examination-foundation/mock_exam/mock-exam-questions-en.pdf" target="_blank">questions</a> and <a href="https://public.isaqb.org/examination-foundation/mock_exam/mock-exam-answers-en.pdf" target="_blank">answers</a>).</p><p class="">The CPSA-F exam is <strong>challenging</strong>, covering many architectural principles, design patterns, cross-cutting concerns, quality attributes, documentation approaches, evaluation techniques, and more. <br>Additionally, the exam doesn’t require any memorization. Instead, it expects the candidate to have a deep understanding of the software architecture concepts. In fact, the scoring system in the exam <strong>punishes (incorrect) guessing by deducting points</strong>.  <br><br>So, without proper guidance from an accredited CPSA-F trainer, it’s easy to miss critical concepts, misunderstand the exam’s expectations, and fail the exam, even if you have years of experience.  <br>Therefore, <strong>self-studying is</strong> <strong>not the recommended route for most candidates</strong>.<br>It’s also important to reinforce the learning with practical examples of real software architectures, demonstrated by an experienced software architect and software architecture trainer.</p><p class="">That’s why many professionals choose to enroll in an <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f"><strong>accredited training program</strong></a> led by a qualified, <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f#about-cpsa-f-accredited-trainer">accredited CPSA-F trainer</a>.</p><h3>Step 3: Enroll in an Accredited CPSA-F Training Course</h3><p class="">If you're serious about passing the CPSA-F exam on your first attempt and want to truly gain the practical skills of a software architect, then enrolling in an <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f" target=""><strong>accredited CPSA-F training course</strong></a> is the best decision you can make.</p><p class="">At <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f" target=""><strong>Top Developer Academy</strong></a>, you can get trained by <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f#about-cpsa-f-accredited-trainer"><strong>Michael Pogrebinsky</strong></a>, an officially <strong>iSAQB-accredited CPSA-F trainer</strong> with decades of experience in software architecture, backend development, distributed systems, and training software engineers.</p><p class=""><strong>Top Developer Academy</strong> is the only<strong> </strong><a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f#about-cpsa-f-accredited-trainer"><strong>accredited training provider</strong></a> offering a fully <strong>self-paced, on-demand CPSA-F training course</strong>, allowing you to study anytime, anywhere, without disrupting your work or project deadlines. This makes it ideal for working professionals who want flexibility <em>without compromising on quality</em>.</p><p class="">This training is designed to:</p><ul data-rte-list="default"><li><p class="">Give you <strong>a deep understanding</strong> of all CPSA-F curriculum topics</p></li><li><p class="">Provide <strong>quizzes, mock exams</strong>, and practical examples to reinforce learning</p></li><li><p class="">Help you pass your iSAQB CPSA-F certification exam with ease on the first try</p></li></ul><p class="">More importantly, by the end of the training, you will be able to </p><ul data-rte-list="default"><li><p class=""><strong>Apply architecture principles</strong> to real-world systems and projects</p></li><li><p class="">Get <strong>promoted</strong>, or <strong>hired</strong> as a technical lead or software architect </p></li><li><p class="">Prepare you for a <strong>successful career </strong>with solid skills in software architecture</p></li></ul><h3>Step 4: Register and Take the CPSA-F Exam</h3><p class="">Once you feel confident in your knowledge, whether from self-study or (ideally) an <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f" target="_blank">accredited training course</a>, you can register for the exam through an <a href="https://www.isaqb.org/certifications/certifying-bodies/" target="_blank"><strong>iSAQB-accredited certification provider</strong></a> such as <a href="https://www.certible.com/iSAQB/CPSA/F-Foundation-Level/" target="_blank">Certible</a>, <a href="https://isqi.org/iSAQB-Software-Architecture-Foundation-Level-CPSA-F/CPSA-FL.984" target="_blank">ISQI</a>, or <a href="https://www.brightest.org/en/certifications/iSAQB-Certified-Professional-for-Software-Architecture-Foundation-Level/" target="_blank">Bightest</a>.</p><p class="">The exam typically consists of:</p><ul data-rte-list="default"><li><p class=""><strong>Multiple-choice and multiple-answer questions</strong></p></li><li><p class=""><strong>75 minutes</strong> to complete the exam</p></li><li><p class=""><strong>Approximately 60 questions</strong>, with a passing score of <strong>60% or higher</strong></p></li></ul><h3>Step 5: Receive your CPSA-F Certification Diploma</h3><p class="">After you pass your CPSA-F exam, you will receive the results from the exam provider, typically immediately after the exam. <br>Most exam providers will issue you a digital (and sometimes physical) certification diploma shortly after.<br>The digital certificate can be displayed on your LinkedIn profile. This way, potential employers and recruiters can search for engineers with this certificate on LinkedIn. <br>The CPSA-F certificate does not need to be renewed, and just like a university degree, it stays with you throughout your career.</p><h3>Is the CPSA-F Certification Worth It?</h3><p class=""><strong>Yes.</strong> The CPSA-F certification is designed to teach practical, industry-relevant software architecture skills and is increasingly recognized worldwide as a foundational credential for software architects. It demonstrates that you not only understand architectural concepts and patterns but can also apply them to real-world projects in a professional setting.</p><p class="">Regardless of the state of the IT job market, companies are always looking for software engineers who can step up and take ownership of system design, communication with stakeholders, and technical leadership beyond coding. The CPSA-F certification proves you’re ready for this role.</p><p class="">Many engineers who have completed the training report:</p><ul data-rte-list="default"><li><p class=""><strong>Improved confidence</strong> in architectural decision-making</p></li><li><p class=""><strong>Better communication</strong> with cross-functional teams</p></li><li><p class=""><strong>Increased job opportunities</strong> and salary growth</p></li><li><p class="">A <strong>clearer path</strong> toward senior engineering or architecture leadership roles</p></li><li><p class=""><strong>Increased salaries</strong> as a result of being hired or promoted to a technical leader’s role</p></li></ul><p class="">Freelancers and consultants also find it easier to secure clients with a world-class credential like the CPSA-F certificate. </p><h3>Final Thoughts</h3><p class="">If you're ready to level up your career and transition into a software architect role, the <strong>iSAQB CPSA-F certification</strong> is one of the most practical and valuable investments you can make.</p><p class="">And while self-study is an option,&nbsp;<a href="" target="_blank">most professionals</a>&nbsp;find that it’s much more effective to&nbsp;<a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f#enroll-now"><strong>enroll in an accredited course</strong></a>&nbsp;led by an expert.</p><p class="">That’s why <strong>Top Developer Academy</strong> offers a <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f"><strong>comprehensive, self-paced CPSA-F training program</strong></a>, designed and taught by <a href="https://www.linkedin.com/in/michaelpog/" target="_blank"><strong>Michael Pogrebinsky</strong></a>, an accredited trainer who has helped thousands of engineers gain deep architecture skills and pass their exams.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          <a class="
                sqs-block-image-link
                
          
        
              " href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f"
              
          >
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/CPSA-F+Course+Image+%281%29.jpg" data-image-dimensions="2048x1152" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/CPSA-F+Course+Image+%281%29.jpg?format=1000w" width="2048" height="1152" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/CPSA-F+Course+Image+%281%29.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/CPSA-F+Course+Image+%281%29.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/CPSA-F+Course+Image+%281%29.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/CPSA-F+Course+Image+%281%29.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/CPSA-F+Course+Image+%281%29.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/CPSA-F+Course+Image+%281%29.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/CPSA-F+Course+Image+%281%29.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          </a>
        

        
      
        </figure>
      

    
  


  



  
  <p class=""><a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f"><strong>Certified Professional for Software Architecture - Foundation Level (CPSA-F) Training</strong></a></p>


  


  



&nbsp;]]></content:encoded><media:content type="image/jpeg" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1753465174831-CGM1FEJBHPCH2F9G4Y4N/unsplash-image-FHnnjk1Yj7Y.jpg?format=1500w" medium="image" isDefault="true" width="1500" height="1125"><media:title type="plain">Step-by-Step Guide on How to Pass the iSAQB CPSA-F Certification</media:title></media:content></item><item><title>What Exactly Does a Software Architect Do?</title><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Mon, 14 Jul 2025 20:58:41 +0000</pubDate><link>https://topdeveloperacademy.com/articles/what-exactly-does-a-software-architect-do</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:68756b8d8e514579bd761015</guid><description><![CDATA[If you're a mid-level or senior software engineer wondering about the next 
step in your career, you've probably considered the role of a Software 
Architect. But what exactly does this role entail, and how can you master 
software architecture?]]></description><content:encoded><![CDATA[<p class="">If you're a mid-level or senior software engineer wondering about the next step in your career, you've probably considered the role of a <strong>Software Architect</strong>. But what exactly does a Software Architect do, and how does their role differ from being a senior developer?</p><p class="">Transitioning from writing code to architecting systems presents one of the most significant career shifts for software engineers. While both the roles of a software engineer and a software architect require deep technical expertise, the architect's focus expands far beyond individual features. The scope of work of a software architect includes entire systems.</p><p class="">Software architects work with many stakeholders within and outside the company, and their work has a direct impact on the entire business's success.</p><p class="">In this article, I'll break down the core responsibilities of a software architect and also provide an effective pathway to becoming a software architect.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1752526613135-B9KSXRAUC6W88VU0Z4O2/What+Exactly+Does+a+Software+Architect+Do%3F" data-image-dimensions="2500x1669" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1752526613135-B9KSXRAUC6W88VU0Z4O2/What+Exactly+Does+a+Software+Architect+Do%3F?format=1000w" width="2500" height="1669" sizes="(max-width: 640px) 100vw, (max-width: 767px) 58.333333333333336vw, 58.333333333333336vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1752526613135-B9KSXRAUC6W88VU0Z4O2/What+Exactly+Does+a+Software+Architect+Do%3F?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1752526613135-B9KSXRAUC6W88VU0Z4O2/What+Exactly+Does+a+Software+Architect+Do%3F?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1752526613135-B9KSXRAUC6W88VU0Z4O2/What+Exactly+Does+a+Software+Architect+Do%3F?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1752526613135-B9KSXRAUC6W88VU0Z4O2/What+Exactly+Does+a+Software+Architect+Do%3F?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1752526613135-B9KSXRAUC6W88VU0Z4O2/What+Exactly+Does+a+Software+Architect+Do%3F?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1752526613135-B9KSXRAUC6W88VU0Z4O2/What+Exactly+Does+a+Software+Architect+Do%3F?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1752526613135-B9KSXRAUC6W88VU0Z4O2/What+Exactly+Does+a+Software+Architect+Do%3F?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  


&nbsp;
  
  <h2>Software Architect is Not Just a Senior Engineer</h2><p class="">A common misconception is that a software architect is simply the most experienced developer on the team. In reality, software architects serve a different purpose that goes <span>far</span> beyond advanced coding skills or specific domain expertise. </p><p class="">It’s also important to note that the software architect does not have to be a 10x developer. </p><p class="">It's not uncommon for a team to have a senior engineer who's a subject or domain expert, but does not do the work of a software architect. The key difference between the roles lies in <strong>scope and responsibility</strong>:</p><ul data-rte-list="default"><li><p class=""><strong>Senior Engineers</strong> excel at implementing complex features and mentoring junior developers within their immediate domain. </p></li><li><p class=""><strong>Software Architects</strong> design and oversee the high-level structure and strategy of entire projects and systems.</p></li></ul><h2>The Core Responsibilities of a Software Architect</h2><h3>1. Defining System Architecture and Technical Vision</h3><p class="">Software architects create the blueprint for complex software systems, much like how building architects design structural plans before construction begins.</p><p class=""><strong>Their key activities include:</strong></p><ul data-rte-list="default"><li><p class=""><strong>System design</strong>: Creating components, defining interfaces/APIs,  planning integrations with third-party services, etc. </p></li><li><p class=""><strong>Selecting technology stack and tools</strong>: Choosing frameworks, databases, cloud services, and 3rd party tools that align with project requirements and the team’s skillset. While many software engineers gravitate towards new tools and shiny programming languages, a great architect doesn't just pick trendy technologies. They select the most appropriate tools and patterns to ensure system scalability, maintainability, robustness, and longevity.</p></li><li><p class=""><strong>Applying architectural patterns</strong>: Applying and guiding teams on patterns and best practices like microservices, event-driven architecture, or domain-driven design. It’s also the role of a software architect to address security, logging, monitoring, caching, and error handling across the entire system.</p></li></ul><h3>2. Aligning Technical Decisions with Business Goals</h3><p class="">One of the most important roles of a software architect is to bridge the gap between technology and business. Technical teams and business teams often use completely different language and terminology, and sometimes their <span>objectives don’t fully align</span>.<br>Ensuring that every technical decision serves the organization's strategic objectives is a challenging and crucial responsibility of a software architect. This responsibility often distinguishes architects from purely technical roles.</p><p class=""><strong>This involves:</strong></p><ul data-rte-list="default"><li><p class=""><strong>Stakeholder collaboration</strong>: Participating in meetings with product managers, business analysts, QA, DevOps and executives to understand requirements and constraints</p></li><li><p class=""><strong>Requirements translation</strong>: Converting business needs into technical solutions and architectural decisions</p></li><li><p class=""><strong>Future-proofing</strong>: Ensuring the software architecture can adapt to anticipated business growth and changing requirements</p></li><li><p class=""><strong>Communication and analysis</strong>: Creating software architecture diagrams and documentation to help all stakeholders understand the system and do their part.</p></li></ul><h3>3. Mentoring and Guiding Development Teams</h3><p class="">A software architect serves as both a technology leader and mentor, elevating the entire team's capabilities while ensuring consistent implementation of architectural decisions.</p><p class=""><strong>Guidance areas include:</strong></p><ul data-rte-list="default"><li><p class=""><strong>Architectural patterns</strong>: Teaching teams when and how to apply specific design patterns that scale across the organization</p></li><li><p class=""><strong>Code quality standards</strong>: Establishing and enforcing coding standards that support the overall architecture</p></li><li><p class=""><strong>Technical debt management</strong>: Balancing feature development with refactoring and system improvements</p></li></ul><p class="">Great software architects elevate the performance of their entire team, making everyone better software engineers through knowledge sharing and mentorship.</p><p class=""><strong>Additionally</strong>, architects act as representatives of the development team when interacting with other stakeholders, ensuring requirements can be translated into realistic design and implementation plans with achievable timelines.</p><h2>How Do You Become a Software Architect?</h2><p class="">Making the transition from a senior developer to a software architect requires more than just years of experience. It requires a completely different skillset.</p><p class="">Some of the key skills a software architect requires include:</p><ul data-rte-list="default"><li><p class=""><strong>Systems thinking</strong>: The ability to see the "big picture."</p></li><li><p class=""><strong>Communication skills</strong>: Clearly articulating and documenting technical concepts to both developers and non-technical stakeholders.</p></li><li><p class=""><strong>Strategic mindset</strong>: Balancing immediate engineering trade-offs against long-term goals.</p></li></ul><p class="">One of the most effective ways to transition to the role of a software architect is by following a structured approach designed by the leading software architecture experts in the industry. <br><a href="https://isaqb.org/" target="_blank"><strong>The International Software Architecture Qualification Board (iSAQB)</strong> </a>is the leading certification body that sets the quality standards for training and certification of software architects. Attending an accredited training and earning the <strong><em>Certified Professional for Software Architecture (CPSA-F)</em></strong> certificate is the surest way to make a career leap to technical leadership and become a software architect.</p><p class=""><strong>Top Developer Academy</strong> offers the most popular iSAQB-accredited&nbsp;<a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f" target=""><strong>Certified Professional for Software Architecture - Foundation Level (CPSA-F)</strong></a><strong>&nbsp;</strong>training<strong>. </strong>You can take this on-demand, video training <strong>at your own pace</strong> and <strong>on your schedule</strong>, from the comfort of your home. <br>Led by an experienced software architect and trainer, <a href="https://www.linkedin.com/in/michaelpog/" target="_blank"><strong>Michael Pogrebinsky</strong></a>, the&nbsp;<a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f"><strong>CPSA-F training </strong></a>can provide the framework and confidence to step into the software architect role successfully. </p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          <a class="
                sqs-block-image-link
                
          
        
              " href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f"
              
          >
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/Certified+Professional+for+Software+Architecture+-+Foundation+Level+%28CPSA-F%29+Training" data-image-dimensions="2048x1152" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/Certified+Professional+for+Software+Architecture+-+Foundation+Level+%28CPSA-F%29+Training?format=1000w" width="2048" height="1152" sizes="(max-width: 640px) 100vw, (max-width: 767px) 58.333333333333336vw, 58.333333333333336vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/Certified+Professional+for+Software+Architecture+-+Foundation+Level+%28CPSA-F%29+Training?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/Certified+Professional+for+Software+Architecture+-+Foundation+Level+%28CPSA-F%29+Training?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/Certified+Professional+for+Software+Architecture+-+Foundation+Level+%28CPSA-F%29+Training?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/Certified+Professional+for+Software+Architecture+-+Foundation+Level+%28CPSA-F%29+Training?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/Certified+Professional+for+Software+Architecture+-+Foundation+Level+%28CPSA-F%29+Training?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/Certified+Professional+for+Software+Architecture+-+Foundation+Level+%28CPSA-F%29+Training?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/342ccf7c-f36f-49f8-9fbb-82bbae871af7/Certified+Professional+for+Software+Architecture+-+Foundation+Level+%28CPSA-F%29+Training?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          </a>
        

        
      
        </figure>
      

    
  


  



  
  <p class=""><a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f"><strong>Certified Professional for Software Architecture Foundation (CPSA-F)</strong></a></p>


  


  



&nbsp;
  
  <h3>Completing the CPSA-F Training Offers</h3><ul data-rte-list="default"><li><p class=""><strong>Hands-on Software Architecture Skills</strong> you can immediately apply to improve system design, technical decision-making, and your team's engineering practices. This is the main reason why many companies encourage and pay for their engineers to attend this training.</p></li><li><p class=""><strong>An internationally recognized CPSA-F certification</strong>. This certification never expires and can validate your deep knowledge of software architecture. This credential can help you get promoted within your company as well as set you apart from other candidates in a competitive job market.</p></li></ul><p class="">Becoming a software architect is a rewarding career choice, but it requires more than just strong coding skills. Understanding these core responsibilities and taking the right steps to acquire skills to fulfill those responsibilities helps you make a significant leap in your career.</p>


  


  



<hr />
  
  <h3>More Articles</h3>]]></content:encoded><media:content type="image/jpeg" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1752526805394-E8R7991I8COGC2HT4JSQ/unsplash-image-4T-02pK0jUg.jpg?format=1500w" medium="image" isDefault="true" width="1500" height="1001"><media:title type="plain">What Exactly Does a Software Architect Do?</media:title></media:content></item><item><title>How to Create Software Architecture Diagrams with Code - The Software Architects’ Toolbox</title><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Wed, 01 Jan 2025 20:50:06 +0000</pubDate><link>https://topdeveloperacademy.com/articles/top-tools-software-architecture-diagrams-software-architects-toolbox</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:6758e208e485fe0938710258</guid><description><![CDATA[Software architecture diagrams are essential for visualizing systems and 
communicating the software architecture to stakeholders.
The "diagrams-as-code" approach allows software architects to describe 
software architecture components and their relationships through code. By 
using code to describe software architecture diagrams, you enable tracking 
changes with version control and seamless integration into development 
workflows.]]></description><content:encoded><![CDATA[<p class="">Software architecture diagrams are essential for visualizing systems and communicating the software architecture to stakeholders. Traditionally, software architecture diagrams were created manually, which was tedious and time-consuming. Updating those diagrams was also very hard, making them go out of date quickly and reducing their usefulness.</p><p class="">The "diagrams-as-code" approach transforms this process by allowing software architects to describe software architecture components and their relationships through code. Using code to describe software architecture diagrams enables tracking changes with version control and seamless integration into development workflows. Also, making and reviewing changes is very easy, so software architecture diagrams are always up-to-date and reflect the system's current state. </p><h2>Top Tools for Software Architecture Diagrams with Code</h2><p class="">There is a variety of tools available for creating software architecture diagrams with code, each offering unique features and benefits. Here are some of the most popular options that I’ve used myself as a software architect for creating software architecture diagrams. Those tools have minimal overlap, and you will likely use all 3 at one point or another as a professional software architect. </p><ol data-rte-list="default"><li><h3><strong>PlantUML</strong></h3></li></ol><p class=""><a href="https://plantuml.com/" target="_blank">PlantUML</a> is a versatile tool that supports the most common <a href="https://www.uml.org/" target="_blank">UML</a> (Unified Modelling Langauge) diagrams, such as <a href="https://plantuml.com/sequence-diagram" target="_blank">Sequence diagram</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/sequence-diagram" target="_blank">s</a>, <a href="https://plantuml.com/use-case-diagram" target="_blank">Use case diagram</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/use-case-diagram" target="_blank">s</a>, <a href="https://plantuml.com/class-diagram" target="">Class diagram</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/class-diagram" target="_blank">s</a>, <a href="https://plantuml.com/object-diagram" target="_blank">Object diagram</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/object-diagram" target="_blank">s</a>, <a href="https://plantuml.com/activity-diagram-beta" target="">Activity diagram</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/activity-diagram-beta" target="_blank">s</a>, <a href="https://plantuml.com/component-diagram" target="">Component diagram</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/component-diagram" target="_blank">s</a>, <a href="https://plantuml.com/deployment-diagram" target="_blank">Deployment diagrams</a>, <a href="https://plantuml.com/state-diagram">State </a><a href="https://plantuml.com/state-diagram" target="">diagram</a><a href="https://plantuml.com/state-diagram" target="_blank">s</a>, and <a href="https://plantuml.com/timing-diagram">Timing&nbsp;</a><a href="https://plantuml.com/timing-diagram" target="_blank">diagrams</a>.</p><p class="">In addition, it supports Non-UML diagrams to describe:</p><ul data-rte-list="default"><li><p class="">Complex data types like&nbsp;<a href="https://plantuml.com/json" target="_blank">JSON</a> and&nbsp;<a href="https://plantuml.com/yaml" target="_blank">YAML</a>.</p></li><li><p class=""><a href="https://topdeveloperacademy.com/articles/togaf-vs-cpsa-f-isaqb-which-software-architecture-certification-is-right-for-you">Enterprise Architecture</a> communication channels between stakeholders using <a href="https://www.opengroup.org/archimate-forum/archimate-overview" target="_blank">ArchiMate</a> diagrams</p></li><li><p class=""><a href="https://plantuml.com/er-diagram" target="_blank">Entity relationship</a> diagrams are used to model data for databases, etc.</p></li></ul><p class="">And so on.</p><h4>Example 1: Creating a UML Class Diagram with PlantUML</h4><p class="">Here is a simple example of a UML <span>class diagram</span> defined in PlantUML, and the visual architecture diagram is automatically created from this code.</p>


  


  




  
    <pre><span>@startuml</span>
<span>class</span> <span>Product</span> {
  <span>-</span> <span>id</span>: <span>int</span>
  <span>-</span> name: String
  <span>-</span> price: double
  <span>+</span> getDetails(): String
}

<span>class</span> <span>Customer</span> {
  <span>-</span> <span>id</span>: <span>int</span>
  <span>-</span> name: String
  <span>-</span> email: String
  <span>+</span> addToCart(product: Product): void
}

<span>class</span> <span>ShoppingCart</span> {
  <span>-</span> <span>id</span>: <span>int</span>
  <span>-</span> items: List<span>&lt;</span>Product<span>&gt;</span>
  <span>+</span> addItem(product: Product): void
  <span>+</span> removeItem(product: Product): void
  <span>+</span> calculateTotal(): double
}

Customer <span>&quot;1&quot;</span> <span>*--</span> <span>&quot;1&quot;</span> ShoppingCart : owns
ShoppingCart <span>&quot;1&quot;</span> <span>*--</span> <span>&quot;*&quot;</span> Product : contains
<span>@enduml</span>
</pre>

  

&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/e7ae3882-c4ac-459d-ab43-b381bbf0d0e4/class-diagram.png" data-image-dimensions="291x522" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/e7ae3882-c4ac-459d-ab43-b381bbf0d0e4/class-diagram.png?format=1000w" width="291" height="522" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/e7ae3882-c4ac-459d-ab43-b381bbf0d0e4/class-diagram.png?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/e7ae3882-c4ac-459d-ab43-b381bbf0d0e4/class-diagram.png?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/e7ae3882-c4ac-459d-ab43-b381bbf0d0e4/class-diagram.png?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/e7ae3882-c4ac-459d-ab43-b381bbf0d0e4/class-diagram.png?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/e7ae3882-c4ac-459d-ab43-b381bbf0d0e4/class-diagram.png?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/e7ae3882-c4ac-459d-ab43-b381bbf0d0e4/class-diagram.png?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/e7ae3882-c4ac-459d-ab43-b381bbf0d0e4/class-diagram.png?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <p class="">As you can see in the code above, all the classes are intuitively described using the <em>class</em> keyword. In each class, all the attributes and methods of the class are declared using a -/+ indicating their access control (private/public).  <br>At the bottom of the code snippet, we describe the relationship between the classes or their instances. The relationships PlantUML supports are association, inheritance, implementation, dependency, aggregation, and composition. </p><p class="">For example:</p>


  


  




  
    <pre>
Customer <span>&quot;1&quot;</span> <span>*--</span> <span>&quot;1&quot;</span> ShoppingCart : owns
</pre>

  


  
  <p class="">creates a composition relationship where each customer has only one shopping cart, and each shopping cart can belong to only one customer.</p><h4>Example 2: Creating a UML Sequence Diagram With PlantUML</h4>


  


  




  
    <pre><span>@startuml</span>
actor Customer
participant <span>&quot;ShoppingCart&quot;</span> <span>as</span> Cart
participant <span>&quot;ProductCatalog&quot;</span> <span>as</span> Catalog
participant <span>&quot;PaymentGateway&quot;</span> <span>as</span> Payment

Customer <span>-&gt;</span> Catalog: Search <span>for</span> products
Catalog <span>--&gt;</span> Customer: List of products

Customer <span>-&gt;</span> Cart: Add product to cart
Cart <span>-&gt;</span> Catalog: Get product details
Catalog <span>--&gt;</span> Cart: Product details

Customer <span>-&gt;</span> Cart: Add another product
Cart <span>-&gt;</span> Catalog: Get product details
Catalog <span>--&gt;</span> Cart: Product details

Customer <span>-&gt;</span> Cart: View cart
Cart <span>--&gt;</span> Customer: Cart details

Customer <span>-&gt;</span> Cart: Proceed to checkout
Cart <span>-&gt;</span> Payment: Initiate payment
Payment <span>--&gt;</span> Cart: Payment confirmed

Cart <span>--&gt;</span> Customer: Purchase completed
<span>@enduml</span>
</pre>

  












































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/4547d619-4859-4b26-bedc-ab4e09f85623/sequence-diagram.png" data-image-dimensions="563x588" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/4547d619-4859-4b26-bedc-ab4e09f85623/sequence-diagram.png?format=1000w" width="563" height="588" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/4547d619-4859-4b26-bedc-ab4e09f85623/sequence-diagram.png?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/4547d619-4859-4b26-bedc-ab4e09f85623/sequence-diagram.png?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/4547d619-4859-4b26-bedc-ab4e09f85623/sequence-diagram.png?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/4547d619-4859-4b26-bedc-ab4e09f85623/sequence-diagram.png?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/4547d619-4859-4b26-bedc-ab4e09f85623/sequence-diagram.png?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/4547d619-4859-4b26-bedc-ab4e09f85623/sequence-diagram.png?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/4547d619-4859-4b26-bedc-ab4e09f85623/sequence-diagram.png?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <p class="">Since a sequence diagram is a behavioral diagram, we describe only the relationships between the actors/objects in the system, which can either be humans or system components like objects, applications, etc. The interactions are described using arrows “—&gt;” from one actor to another actor, with a description of the action after the colon symbol.</p><h4><strong>Pros</strong> of PlantUML</h4><p class="">PlantUML supports many software architecture diagraming notations, including UML — the standard modeling language for structural and behavioral diagrams in software design. It’s easy to use and has a fairly low learning curve. You can also customize the visual aspect of your diagrams using per-components styles and global <a href="https://plantuml.com/theme" target="_blank">themes</a>.</p><h4><strong>Cons of PlantUML</strong></h4><p class="">While it's fairly easy to customize with color themes, its layout is a bit harder to control. It is also mainly a diagramming tool and not a modeling tool. In other words, if you want to describe the same system components but use multiple diagrams, any change will have to be done in each diagram separately to keep all the diagrams consistent.<br>Another big drawback is that it is unsuitable for creating software architecture diagrams for large-scale systems or cloud architecture diagrams. </p><h3>2. Diagrams as Code (Python Library)</h3><p class=""><a href="https://diagrams.mingrammer.com/" target="_blank"><strong>Diagrams</strong></a> or <a href="https://diagrams.mingrammer.com/" target="_blank"><strong>Diagrams as Code</strong></a> lets you create <strong>cloud system diagrams</strong> using standard <a href="https://www.python.org/" target="_blank"><strong>Python</strong></a> code. It is a perfect tool to prototype new cloud-based systems or document existing software architectures in your company. It is also possible (though not supported out-of-the-box) to integrate it with “Infrastructure as a Code” tools to both control actual cloud infrastructure or reflect existing cloud infrastructure.</p><p class="">This software architecture diagraming tool supports many standard symbols from cloud vendors out-of-the-box, such as <a href="https://aws.amazon.com/" target="_blank">AWS</a>, <a href="https://azure.microsoft.com/en-us/" target="_blank">Azure</a>, <a href="https://cloud.google.com/?hl=en" target="_blank">GCP</a>, <a href="https://www.alibabacloud.com/en?_p_lc=5" target="_blank">Alibaba Cloud</a>, <a href="https://www.oracle.com/cloud/" target="_blank">Oracle Cloud</a>, <a href="https://www.ibm.com/cloud" target="_blank">IBM</a>, On-Premise, etc.</p><p class="">It also supports many:</p><ul data-rte-list="default"><li><p class=""><strong>Open-source</strong> and <strong>SaaS</strong> solutions like <a href="https://kubernetes.io/" target="_blank">Kubernetes</a>, <a href="https://www.docker.com/" target="_blank">Docker</a>, <a href="https://kafka.apache.org/" target="_blank">Kafka</a>, etc.</p></li><li><p class=""><a href="https://diagrams.mingrammer.com/docs/nodes/onprem#onpremmonitoring" target="_blank"><strong>Monitoring tools</strong></a> like <a href="https://www.datadoghq.com/" target="_blank">Datadog</a>, <a href="https://newrelic.com/" target="_blank">New Relic</a>,  <a href="https://www.pagerduty.com/" target="_blank">PagerDuty</a>, etc</p></li><li><p class=""><a href="https://diagrams.mingrammer.com/docs/nodes/onprem#onpremdatabase" target="_blank"><strong>Databases</strong></a> like <a href="https://www.postgresql.org/" target="_blank">PostgreSQL</a>, <a href="https://www.mysql.com/" target="_blank">MySQL</a>,  <a href="https://www.mongodb.com/" target="_blank">MongoDB</a>, etc.</p></li><li><p class=""><a href="https://diagrams.mingrammer.com/docs/nodes/programming#programmingframework" target="_blank"><strong>Frameworks</strong></a> like <a href="https://angular.dev/" target="_blank">Angular</a>, <a href="https://flutter.dev/" target="_blank">Flutter</a>, <a href="https://nextjs.org/" target="_blank">NextJS</a>, <a href="https://spring.io/projects/spring-boot" target="_blank">Spring Boot</a>, <a href="https://vuejs.org/" target="_blank">Vue.js</a>, etc.</p></li><li><p class=""><a href="https://diagrams.mingrammer.com/docs/nodes/programming" target="_blank"><strong>Programming languages</strong></a> like Java, C++, Javascript, Python, etc.</p></li></ul><p class="">And much, much more.</p><h4>Example: Software Architecture Diagram of Fictious E-Commerce System on AWS</h4>


  


  




  
    <pre><span>from</span> <span>diagrams</span> <span>import</span> Diagram, Cluster
<span>from</span> <span>diagrams.aws.compute</span> <span>import</span> EC2, Lambda
<span>from</span> <span>diagrams.aws.database</span> <span>import</span> RDS, Dynamodb
<span>from</span> <span>diagrams.aws.network</span> <span>import</span> ELB, Route53
<span>from</span> <span>diagrams.aws.storage</span> <span>import</span> S3
<span>from</span> <span>diagrams.onprem.queue</span> <span>import</span> Kafka
<span>from</span> <span>diagrams.onprem.analytics</span> <span>import</span> Spark
<span>from</span> <span>diagrams.aws.integration</span> <span>import</span> SNS

<span>with</span> Diagram(<span>&quot;E-Commerce Scalable System&quot;</span>, show<span>=</span><span>False</span>):
    <span># Route53 and Load Balancer</span>
    dns <span>=</span> Route53(<span>&quot;DNS&quot;</span>)
    lb <span>=</span> ELB(<span>&quot;Load Balancer&quot;</span>)

    dns <span>&gt;&gt;</span> lb

    <span># Application Cluster</span>
    <span>with</span> Cluster(<span>&quot;Application Layer&quot;</span>):
        app_servers <span>=</span> [EC2(<span>&quot;App Server 1&quot;</span>), EC2(<span>&quot;App Server 2&quot;</span>), EC2(<span>&quot;App Server N&quot;</span>)]
        lb <span>&gt;&gt;</span> app_servers

    <span># Storage and Database</span>
    <span>with</span> Cluster(<span>&quot;Storage and Databases&quot;</span>):
        db <span>=</span> RDS(<span>&quot;Primary Database&quot;</span>)
        db_replica <span>=</span> RDS(<span>&quot;Read Replica&quot;</span>)
        db <span>&gt;&gt;</span> db_replica
        cache <span>=</span> Dynamodb(<span>&quot;Session Store&quot;</span>)
        static_assets <span>=</span> S3(<span>&quot;Static Assets&quot;</span>)

    app_servers <span>&gt;&gt;</span> db
    app_servers <span>&gt;&gt;</span> cache
    app_servers <span>&gt;&gt;</span> static_assets

    <span># Purchase Processing</span>
    <span>with</span> Cluster(<span>&quot;Purchase Pipeline&quot;</span>):
        purchase_lambda <span>=</span> Lambda(<span>&quot;Process Purchases&quot;</span>)
        kafka_topic <span>=</span> Kafka(<span>&quot;Purchase Topic&quot;</span>)
        purchase_lambda <span>&gt;&gt;</span> kafka_topic

    app_servers <span>&gt;&gt;</span> purchase_lambda

    <span># Recommendations System</span>
    <span>with</span> Cluster(<span>&quot;Recommendations Service&quot;</span>):
        recommender <span>=</span> Spark()
        recommender_db <span>=</span> Dynamodb(<span>&quot;Recommendations DB&quot;</span>)
        kafka_topic <span>&gt;&gt;</span> recommender <span>&gt;&gt;</span> recommender_db
</pre>

  


  
  <p class="">This example includes <a href="https://aws.amazon.com/" target="_blank">AWS</a> services like <a href="https://aws.amazon.com/route53/" target="_blank">Route 53</a>, <a href="https://aws.amazon.com/elasticloadbalancing/" target="_blank">ELB</a>, <a href="https://aws.amazon.com/ec2/" target="_blank">EC2</a>, <a href="https://aws.amazon.com/s3/" target="_blank">S3</a>, <a href="https://aws.amazon.com/rds/" target="_blank">RDS</a>, <a href="https://aws.amazon.com/dynamodb/" target="_blank">DynamoDB</a>, and <a href="https://aws.amazon.com/lambda/" target="_blank">Lambda</a>, as well as open-source technologies like <a href="https://spark.apache.org/" target="_blank">Apache Spark</a> and <a href="https://kafka.apache.org/" target="_blank">Kafka</a>. The code is also very intuitive and easy to understand since it uses Python, a very popular programming and scripting language. All you need to do is import the relevant classes from the <em>diagrams</em> module. The generated diagram uses an automatic layout and modern colors without any special code.</p>


  


  














































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/7d7ba5d7-5468-49b6-87b3-9ce0a71c6f48/e-commerce_scalable_system.png" data-image-dimensions="1778x1389" data-image-focal-point="0.6157380254154448,0.8721090136267033" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/7d7ba5d7-5468-49b6-87b3-9ce0a71c6f48/e-commerce_scalable_system.png?format=1000w" width="1778" height="1389" sizes="(max-width: 640px) 100vw, (max-width: 767px) 100vw, 100vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/7d7ba5d7-5468-49b6-87b3-9ce0a71c6f48/e-commerce_scalable_system.png?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/7d7ba5d7-5468-49b6-87b3-9ce0a71c6f48/e-commerce_scalable_system.png?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/7d7ba5d7-5468-49b6-87b3-9ce0a71c6f48/e-commerce_scalable_system.png?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/7d7ba5d7-5468-49b6-87b3-9ce0a71c6f48/e-commerce_scalable_system.png?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/7d7ba5d7-5468-49b6-87b3-9ce0a71c6f48/e-commerce_scalable_system.png?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/7d7ba5d7-5468-49b6-87b3-9ce0a71c6f48/e-commerce_scalable_system.png?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/7d7ba5d7-5468-49b6-87b3-9ce0a71c6f48/e-commerce_scalable_system.png?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <h4><strong>Pros</strong> of Diagram as Code with Python</h4><p class="">This tool uses standard Python, so learning a new diagramming language is unnecessary if you already know Python. You can easily spot errors through an IDE like PyCharm or get compilation errors while running the tool. The library is also very intuitive, and the generated diagrams appear in a visually pleasing, professional, and easy-to-read format. This software architecture diagraming library can also be easily extended with custom symbols if required, even though it’s rarely necessary since all major systems are supported out of the box.</p><h4><strong>Cons</strong> of Diagram as Code with Python</h4><p class="">Compared to PlantUML, there’s no support for UML or any other software architecture diagraming notations besides cloud infrastructure. Though it does have support for C4 Modeling, the support is very minimal. There’s also very little customization available in terms of the visual aspects of the diagram, such as styles, colors, and layout. Creating animations to visualize data flow between different components is also impossible.</p>


  


  



<hr />
  
  <h3><em>Want to Become a Software Architect?</em></h3>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg" data-image-dimensions="1428x2000" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=1000w" width="1428" height="2000" sizes="(max-width: 640px) 100vw, (max-width: 767px) 33.33333333333333vw, 33.33333333333333vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <p class="">Becoming a <strong>software architect </strong>and <strong>technology leader</strong> is the ultimate goal for every software engineer. But you don’t need to wait for it to happen sometime in the far future! </p><p class="">In this guide, I share with you <strong>the 5 proven steps</strong> to becoming a software architect and technology leader today.</p><p class="">Use this free PDF guide to pave your path to success. Your biggest career breakthrough as an engineer is closer than you think.</p><p class=""><strong>Get Your Free E-Book Now!</strong></p>


  


  




  
    
  

&nbsp;<hr />
  
  <h3>3. Structurizr</h3><p class="">Unlike PlantUML and Diagrams, which are diagramming tools,&nbsp;<a href="https://structurizr.com/" target="_blank">Structurizr</a>&nbsp;is a modeling tool specifically designed for the C4 model for visualizing software architecture. <a href="https://c4model.com/" target="_blank">C4</a>, created by Simon Brown, is a standardized model to visualize software architecture using 4 views: </p><ul data-rte-list="default"><li><p class=""><em>Context View</em></p></li><li><p class=""><em>Container View</em></p></li><li><p class=""><em>Component View</em></p></li><li><p class=""><em>Code View</em>. </p></li></ul><p class="">Those 4 views allow us to represent the system on 4 different levels of abstraction or granularity.</p><p class="">Other diagramming tools are not suitable for creating software architecture diagrams for the C4 model because changes in diagrams in one view are not reflected automatically in other views where the same element/component is described. <br><a href="https://structurizr.com/" target="_blank">Structurizr</a> is the only tool that is aware of that connection between elements on different views, which keeps all the software architecture diagrams in sync with each other at all times.</p><h4>Example: C4 Model of a Rideshare System</h4>


  


  




  
    <pre><span>workspace</span> {
    <span>model</span> {
        <span>user</span> <span>=</span> <span>person</span> <span>&quot;Rider&quot;</span> <span>&quot;A user who requests rides using the app.&quot;</span>
        <span>driver</span> <span>=</span> <span>person</span> <span>&quot;Driver&quot;</span> <span>&quot;A driver who provides rides to riders.&quot;</span>

        <span>rideshareSystem</span> <span>=</span> <span>softwareSystem</span> <span>&quot;Rideshare System&quot;</span> <span>&quot;Allows riders to book rides and drivers to fulfill those requests.&quot;</span> {
            <span>webAppFrontend</span> <span>=</span> <span>container</span> <span>&quot;Web Frontend&quot;</span> <span>&quot;Allows riders to browse, book rides, and track them.&quot;</span> <span>&quot;React&quot;</span>
            <span>webAppService</span> <span>=</span> <span>container</span> <span>&quot;Web Application Backend&quot;</span> <span>&quot;Handles webpage requests and user logins&quot;</span> <span>&quot;Java SpringBoot&quot;</span>
            <span>mobileApp</span> <span>=</span> <span>container</span> <span>&quot;Mobile Application&quot;</span> <span>&quot;Allows drivers to accept and manage ride requests.&quot;</span> <span>&quot;Flutter&quot;</span>
            <span>apiGateway</span> <span>=</span> <span>container</span> <span>&quot;API&quot;</span> <span>&quot;Handles requests from the web and mobile applications.&quot;</span> <span>&quot;AWS API Gateway&quot;</span>
            <span>database</span> <span>=</span> <span>container</span> <span>&quot;Database&quot;</span> <span>&quot;Stores user, driver, and ride information.&quot;</span> <span>&quot;PostgreSQL&quot;</span> {
                <span>tags</span> <span>&quot;Database&quot;</span>
            }
            <span>paymentService</span> <span>=</span> <span>container</span> <span>&quot;Payment Service&quot;</span> <span>&quot;Processes ride payments.&quot;</span> <span>&quot;Stripe&quot;</span>
            <span>recommendationEngine</span> <span>=</span> <span>container</span> <span>&quot;Recommendation Engine&quot;</span> <span>&quot;Suggests ride matches and optimizes routes.&quot;</span> <span>&quot;Python&quot;</span>

            <span>webAppFrontend</span> <span>-&gt;</span> <span>apiGateway</span> <span>&quot;Makes API calls to&quot;</span>
            <span>apiGateway</span> <span>-&gt;</span> <span>webAppService</span> <span>&quot;Routes API calls to&quot;</span>
            <span>mobileApp</span> <span>-&gt;</span> <span>apiGateway</span> <span>&quot;Makes API calls to&quot;</span>
            <span>webAppService</span> <span>-&gt;</span> <span>database</span> <span>&quot;Reads from and writes to&quot;</span>
            <span>apiGateway</span> <span>-&gt;</span> <span>paymentService</span> <span>&quot;Processes payments via&quot;</span>
            <span>apiGateway</span> <span>-&gt;</span> <span>recommendationEngine</span> <span>&quot;Fetches recommendations from&quot;</span>
        }
        
        <span>user</span> <span>-&gt;</span> <span>webAppFrontend</span> <span>&quot;Requests rides using&quot;</span>
        <span>driver</span> <span>-&gt;</span> <span>webAppFrontend</span> <span>&quot;Receives ride requests from&quot;</span>
        <span>user</span> <span>-&gt;</span> <span>mobileApp</span> <span>&quot;Requests rides using&quot;</span>
        <span>driver</span> <span>-&gt;</span> <span>mobileApp</span> <span>&quot;Receives ride requests from&quot;</span>
    }

    <span>views</span> {
        <span>systemContext</span> <span>rideshareSystem</span> {
            <span>include</span> <span>*</span>
            <span>autolayout</span> <span>lr</span>
        }

        <span>container</span> <span>rideshareSystem</span> {
            <span>include</span> <span>*</span>
            <span>autolayout</span> <span>lr</span>
        }

        <span>styles</span> {
            <span>element</span> <span>&quot;Container&quot;</span> {
                <span>background</span><span> #438dd5</span>
                <span>color</span><span> #ffffff</span>
            }

            <span>element</span> <span>&quot;Person&quot;</span> {
                <span>shape</span> <span>person</span>
                <span>background</span><span> #08427b</span>
                <span>color</span><span> #ffffff</span>
            }

            <span>element</span> <span>&quot;Software System&quot;</span> {
                <span>background</span><span> #1168bd</span>
                <span>color</span><span> #ffffff</span>
            }
            <span>element</span> <span>&quot;Database&quot;</span> {
                <span>background</span> <span>orange</span>
                <span>color</span> <span>black</span> 
                <span>shape</span> <span>cylinder</span>
            }
        }
    }
}
</pre>

  


  
  <p class="">At first glance, it may seem a bit more complex than any of the diagrammatic tools we have seen so far. However, notice that we don’t just show one diagram here. We describe a <strong>model</strong> of our entire system, with 2 views (Context View and a Container View).<br>Looking at the <em>Context View</em>, the diagram generated by Structurizr will look like this:</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/97a25db8-fe86-44e3-8f64-8404ff6a319a/Screenshot+2024-12-24+at+2.30.38%E2%80%AFPM.png" data-image-dimensions="783x742" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/97a25db8-fe86-44e3-8f64-8404ff6a319a/Screenshot+2024-12-24+at+2.30.38%E2%80%AFPM.png?format=1000w" width="783" height="742" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/97a25db8-fe86-44e3-8f64-8404ff6a319a/Screenshot+2024-12-24+at+2.30.38%E2%80%AFPM.png?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/97a25db8-fe86-44e3-8f64-8404ff6a319a/Screenshot+2024-12-24+at+2.30.38%E2%80%AFPM.png?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/97a25db8-fe86-44e3-8f64-8404ff6a319a/Screenshot+2024-12-24+at+2.30.38%E2%80%AFPM.png?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/97a25db8-fe86-44e3-8f64-8404ff6a319a/Screenshot+2024-12-24+at+2.30.38%E2%80%AFPM.png?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/97a25db8-fe86-44e3-8f64-8404ff6a319a/Screenshot+2024-12-24+at+2.30.38%E2%80%AFPM.png?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/97a25db8-fe86-44e3-8f64-8404ff6a319a/Screenshot+2024-12-24+at+2.30.38%E2%80%AFPM.png?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/97a25db8-fe86-44e3-8f64-8404ff6a319a/Screenshot+2024-12-24+at+2.30.38%E2%80%AFPM.png?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  


&nbsp;
  
  <p class="">However, if we click on the Rideshare System (the system we are designing), we will “zoom in” to the <em>Container View</em>, which shows us all the containers (applications and databases) of our system.</p>


  


  














































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/b86b35f3-3673-4dfd-b2e2-1a826567a259/container+view.png" data-image-dimensions="1676x499" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/b86b35f3-3673-4dfd-b2e2-1a826567a259/container+view.png?format=1000w" width="1676" height="499" sizes="(max-width: 640px) 100vw, (max-width: 767px) 100vw, 100vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/b86b35f3-3673-4dfd-b2e2-1a826567a259/container+view.png?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/b86b35f3-3673-4dfd-b2e2-1a826567a259/container+view.png?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/b86b35f3-3673-4dfd-b2e2-1a826567a259/container+view.png?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/b86b35f3-3673-4dfd-b2e2-1a826567a259/container+view.png?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/b86b35f3-3673-4dfd-b2e2-1a826567a259/container+view.png?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/b86b35f3-3673-4dfd-b2e2-1a826567a259/container+view.png?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/b86b35f3-3673-4dfd-b2e2-1a826567a259/container+view.png?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <p class="">Now, if we want to show the components of one of the containers, such as the Web Application Backend, we can take this a step further and add a <em>Component View</em> for this container.</p><p class="">To do that, we replace the component definition of the Web Application Service:</p>


  


  




  
    <pre><span>webAppService</span> <span>=</span> <span>container</span> <span>&quot;Web Application Backend&quot;</span> <span>&quot;Handles webpage requests and user logins&quot;</span> <span>&quot;Java SpringBoot&quot;</span>
</pre>

  


  
  <p class="">with the definition that describes its internal components and their relationships:</p>


  


  




  
    <pre><span>webAppService</span> <span>=</span> <span>container</span> <span>&quot;Web Application Backend&quot;</span> <span>&quot;Handles webpage requests and user logins&quot;</span> <span>&quot;Java SpringBoot&quot;</span> {
    <span>restController</span> <span>=</span> <span>component</span> <span>&quot;REST Controller&quot;</span> <span>&quot;Handles HTTP requests from the frontend&quot;</span>
    <span>usersService</span> <span>=</span> <span>component</span> <span>&quot;Users Controller&quot;</span> <span>&quot;Handles Business Logic for Riders and Drivers&quot;</span>
    <span>usersRepository</span> <span>=</span> <span>component</span> <span>&quot;ORM&quot;</span> <span>&quot;Translates operations on Business Entities to Database Operations&quot;</span>
    
    <span>restController</span> <span>-&gt;</span> <span>usersService</span> <span>&quot;Parses Request to passes to the service for processing&quot;</span>
    <span>usersService</span> <span>-&gt;</span> <span>usersRepository</span> <span>&quot;Applies business logic and passes to the ORM for communication with the database&quot;</span>
}
</pre>

  


  
  <p class="">Now that we have defined the internal structure of the Web Application, we need to add the relationship between the external API Gateway container to the REST Controller component inside the Web Application Backend and the relationship between the internal UsersRepository component of the Web Application Backend to the external Database container: </p>


  


  




  
    <pre><span>apiGateway</span> <span>-&gt;</span> <span>restController</span>
<span>usersRepository</span> <span>-&gt;</span> <span>database</span>
</pre>

  


  
  <p class="">Finally, inside the <em>views</em> block, we need to define the component view for the web application container:</p>


  


  




  
    <pre><span>component</span> <span>webAppService</span> {
    <span>include</span> <span>*</span>
    <span>include</span> <span>mobileApp</span> <span>webAppFrontend</span>
    <span>autolayout</span> <span>lr</span>
}
</pre>

  


  
  <p class="">And that’s it!<br>Now, the Web Application Container has a “zoom-in” icon which allows us to view its internal components:</p>


  


  














































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/b425d5dd-dec7-4d36-9fd4-d2bc8766db46/Screenshot+2024-12-26+at+12.25.17%E2%80%AFPM.png" data-image-dimensions="1410x692" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/b425d5dd-dec7-4d36-9fd4-d2bc8766db46/Screenshot+2024-12-26+at+12.25.17%E2%80%AFPM.png?format=1000w" width="1410" height="692" sizes="(max-width: 640px) 100vw, (max-width: 767px) 100vw, 100vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/b425d5dd-dec7-4d36-9fd4-d2bc8766db46/Screenshot+2024-12-26+at+12.25.17%E2%80%AFPM.png?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/b425d5dd-dec7-4d36-9fd4-d2bc8766db46/Screenshot+2024-12-26+at+12.25.17%E2%80%AFPM.png?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/b425d5dd-dec7-4d36-9fd4-d2bc8766db46/Screenshot+2024-12-26+at+12.25.17%E2%80%AFPM.png?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/b425d5dd-dec7-4d36-9fd4-d2bc8766db46/Screenshot+2024-12-26+at+12.25.17%E2%80%AFPM.png?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/b425d5dd-dec7-4d36-9fd4-d2bc8766db46/Screenshot+2024-12-26+at+12.25.17%E2%80%AFPM.png?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/b425d5dd-dec7-4d36-9fd4-d2bc8766db46/Screenshot+2024-12-26+at+12.25.17%E2%80%AFPM.png?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/b425d5dd-dec7-4d36-9fd4-d2bc8766db46/Screenshot+2024-12-26+at+12.25.17%E2%80%AFPM.png?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <p class="">If we want to zoom in and explore the internal structure of the Web Application Backend container, we can click on it and observe its Component View:</p>


  


  














































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/91abf208-d376-4717-8257-bc7426903c4e/Screenshot+2024-12-26+at+12.27.00%E2%80%AFPM.png" data-image-dimensions="1852x442" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/91abf208-d376-4717-8257-bc7426903c4e/Screenshot+2024-12-26+at+12.27.00%E2%80%AFPM.png?format=1000w" width="1852" height="442" sizes="(max-width: 640px) 100vw, (max-width: 767px) 100vw, 100vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/91abf208-d376-4717-8257-bc7426903c4e/Screenshot+2024-12-26+at+12.27.00%E2%80%AFPM.png?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/91abf208-d376-4717-8257-bc7426903c4e/Screenshot+2024-12-26+at+12.27.00%E2%80%AFPM.png?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/91abf208-d376-4717-8257-bc7426903c4e/Screenshot+2024-12-26+at+12.27.00%E2%80%AFPM.png?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/91abf208-d376-4717-8257-bc7426903c4e/Screenshot+2024-12-26+at+12.27.00%E2%80%AFPM.png?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/91abf208-d376-4717-8257-bc7426903c4e/Screenshot+2024-12-26+at+12.27.00%E2%80%AFPM.png?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/91abf208-d376-4717-8257-bc7426903c4e/Screenshot+2024-12-26+at+12.27.00%E2%80%AFPM.png?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/91abf208-d376-4717-8257-bc7426903c4e/Screenshot+2024-12-26+at+12.27.00%E2%80%AFPM.png?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <p class="">So, as we can see, using the C4 Model and the&nbsp;<a href="https://docs.structurizr.com/dsl" target="_blank">Structurizr DSL,</a>&nbsp;we can create multiple diagrams for the same system, which all stay in sync if we make any changes.</p><h3><strong>Become a Software Architect: Take the Next Step in Your Career</strong></h3><p class="">Creating software architecture diagrams is just one part of what it takes to become a software architect. If you’re excited about designing systems, leading teams, and shaping the technical direction of projects, you’re already on the path to this rewarding career.</p><p class="">But how do you get there?</p><p class="">I’ve put together a free guide: <strong>“The 5 Proven Steps to Becoming a Software Architect and Technology Leader,”</strong> to help software engineers like you take the next step. Inside, you’ll find actionable tips on building the skills, experience, and mindset you need to transition into this high-impact role of a software architect.</p><h3><strong>Get your Free Guide to Becoming a Software Architect</strong></h3>


  


  














































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg" data-image-dimensions="1428x2000" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=1000w" width="1428" height="2000" sizes="(max-width: 640px) 100vw, (max-width: 767px) 33.33333333333333vw, 33.33333333333333vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <p class="">Becoming a <strong>software architect </strong>and <strong>technology leader</strong> is the ultimate goal for every software engineer. But you don’t need to wait for it to happen sometime in the far future! </p><p class="">In this guide, I share with you <strong>the 5 proven steps</strong> to becoming a software architect and technology leader today.</p><p class="">Use this free PDF guide to pave your path to success. Your biggest career breakthrough as an engineer is closer than you think.</p>


  


  




  
    
  

&nbsp;<hr />
  
  <h3>More Articles</h3>]]></content:encoded><media:content type="image/png" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1735255694877-GKRPDH5JESTGXM0LM0ZO/e-commerce_scalable_system.png?format=1500w" medium="image" isDefault="true" width="1500" height="1172"><media:title type="plain">How to Create Software Architecture Diagrams with Code - The Software Architects’ Toolbox</media:title></media:content></item><item><title>How to Become a Solutions Architect: Skills, Certifications, and Career Path</title><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Thu, 21 Nov 2024 23:35:10 +0000</pubDate><link>https://topdeveloperacademy.com/articles/how-to-become-a-solutions-architect-skills-certifications-and-career-path</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:673f6a18ebb5377485e20a6e</guid><description><![CDATA[Solutions Architect is one of the most critical roles in today’s 
technology-driven world. As a solutions architect, you enable businesses to 
solve complex challenges, such as integrating different technologies while 
ensuring the final product is secure, performant, and scalable. This 
article will guide you through the essential skills, certifications, and 
steps needed to excel in this exciting career.]]></description><content:encoded><![CDATA[<p class=""><strong>Solutions Architect</strong> is one of the most critical roles in today’s technology-driven world. As a Solutions Architect, you are the mastermind behind designing and implementing systems that can impact millions of customers. You enable businesses to solve complex challenges, such as integrating different technologies while ensuring the final product is secure, performant, and scalable.</p><p class="">Becoming a Solutions Architect is a rewarding career path, offering high salaries, opportunities to work on innovative projects, and exposure to cutting-edge technologies. However, success in this role requires a combination of technical expertise, strategic thinking, and the right certifications to stand out from the competition. Whether you're an aspiring Solutions Architect or a seasoned developer looking to advance, this article will guide you through the essential skills, certifications, and steps needed to excel in this exciting career.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/08162399-f6ef-43a6-8290-d5972f3dbbbd/pexels-divinetechygirl-1181534.jpg" data-image-dimensions="1280x855" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/08162399-f6ef-43a6-8290-d5972f3dbbbd/pexels-divinetechygirl-1181534.jpg?format=1000w" width="1280" height="855" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/08162399-f6ef-43a6-8290-d5972f3dbbbd/pexels-divinetechygirl-1181534.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/08162399-f6ef-43a6-8290-d5972f3dbbbd/pexels-divinetechygirl-1181534.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/08162399-f6ef-43a6-8290-d5972f3dbbbd/pexels-divinetechygirl-1181534.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/08162399-f6ef-43a6-8290-d5972f3dbbbd/pexels-divinetechygirl-1181534.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/08162399-f6ef-43a6-8290-d5972f3dbbbd/pexels-divinetechygirl-1181534.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/08162399-f6ef-43a6-8290-d5972f3dbbbd/pexels-divinetechygirl-1181534.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/08162399-f6ef-43a6-8290-d5972f3dbbbd/pexels-divinetechygirl-1181534.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  


&nbsp;
  
  <h3><strong>Key Responsibilities of a Solutions Architect</strong></h3><p class="">To become a successful Solutions Architect, a strong foundation in technical skills is critical. These skills enable you to design effective systems, integrate complex technologies, and ensure alignment with business goals.</p><p class="">Solutions Architects frequently work directly with customers, handling tasks such as:</p><ul data-rte-list="default"><li><p class=""><strong>Integrating products into customers’ ecosystems</strong> to ensure seamless functionality.</p></li><li><p class=""><strong>Educating customers on best practices</strong> to maximize efficiency with the product.</p></li><li><p class=""><strong>Understanding customer requirements and pain points</strong> and translating them into technical requirements for the development team.</p></li><li><p class=""><strong>Collaborating with executives</strong> (e.g., CEOs, CTOs) and business teams to provide technical expertise.</p></li><li><p class=""><strong>Designing custom solutions</strong> using existing technologies, products, or company expertise.</p></li></ul><p class="">Depending on the company, Solutions Architects may also take on more hands-on responsibilities, including:</p><ul data-rte-list="default"><li><p class=""><strong>Translating customer needs</strong> into internal technical requirements for developers.</p></li><li><p class=""><strong>Creating proofs of concept and prototypes</strong> to demonstrate innovative solutions.</p></li><li><p class=""><strong>Guiding implementation</strong> to ensure solutions are built as designed and meet quality standards.</p></li><li><p class=""><strong>Working with DevOps, SREs, and Operations</strong> to support the successful deployment and integration of products.</p></li><li><p class=""><strong>Driving technical decisions</strong> by leveraging expertise in cloud platforms, databases, and open-source technologies.</p></li></ul><p class="">Solutions Architects operate across diverse industries, including fintech, ad-tech, ed-tech, healthcare, retail, e-commerce, and CRM systems. They frequently work with cloud infrastructure platforms like AWS, GCP, or Azure, adapting solutions to meet the specific needs of these sectors.</p><h3><strong>Solutions Architect vs. Software Architect</strong></h3><p class="">With so many “Architect” roles, there’s a common confusion between the role of a Solutions Architect and that of a Software Architect.<br>That confusion is not only among people trying to choose the right career path. It’s not uncommon for employers to mislabel a position description as “Solutions Architect” while actually listing a Software Architect's skills and vice versa.<br>However, it’s important to understand that while both roles focus on architecture, <strong>Solutions Architects</strong> focus on integrating multiple systems to solve business challenges, while <strong>Software Architects</strong> concentrate on designing the internal structure of individual software systems.</p><ul data-rte-list="default"><li><p class=""><strong>Solutions Architects</strong> are often customer-facing, understanding client pain points and translating them into actionable technical solutions. They guide teams to create scalable, secure, and reliable solutions by leveraging existing technologies or designing new ones.</p></li><li><p class=""><strong>Software Architects</strong>, on the other hand, focus on the internal design and technical structure of individual software systems. They are less likely to engage with customers directly and instead concentrate on creating frameworks and technical standards for development teams.</p></li></ul><h3><strong>Solutions Architect vs. Enterprise Architect</strong></h3><p class="">Another common source of confusion is the distinction between a <strong>Solutions Architect</strong> and an <strong>Enterprise Architect,</strong> which lies in their scope and focus.</p><ul data-rte-list="default"><li><p class=""><strong>Solutions Architects</strong> work closer to customers on specific projects, creating detailed blueprints for technical solutions that address immediate business or customer requirements. Their role is hands-on and closer to implementation, involving tools, cloud technologies, and open-source solutions.</p></li><li><p class=""><strong>Enterprise Architects</strong> focus on the broad organization-wide technology landscape. They align IT strategy with business goals, ensuring that the organization’s overall architecture supports long-term objectives. They are less involved in implementation details and more focused on high-level planning.</p></li></ul><p class="">For instance, an Enterprise Architect might define the company’s policy to move to the cloud, while a Solutions Architect designs and implements the specific cloud solution for a given project.</p><h3><strong>Key Technical Skills for Solutions Architects</strong></h3><p class="">So now that we understand the role and responsibilities of a Solutions Architect, let’s now understand what technical skills you need to become a Solutions Architect.<br>Since Solutions Architects rely on technical expertise to design complex software solutions, their most critical skills include:</p><ul data-rte-list="default"><li><p class=""><strong>System Design:</strong>&nbsp;Designing scalable, secure, and efficient architectures using principles and patterns like microservices and event-driven architecture.</p></li><li><p class=""><strong>Cloud Platforms:</strong> Expertise in AWS, Azure, or GCP, including core services like compute, storage, networking, and security.</p></li><li><p class=""><strong>Integration:</strong>&nbsp;Strong skills in integrating diverse technologies using APIs, middleware, and microservices through common software architecture building blocks like CDNs, API gateway, serverless, etc.</p></li><li><p class=""><strong>Automation:</strong> Familiarity with DevOps practices, CI/CD pipelines, and tools like Docker and Kubernetes</p></li><li><p class=""><strong>Security:</strong> Ability to incorporate security best practices, such as encryption, identity management, and secure data flows, that conform to regulations like GDPR, CPRA, COPPA, HIPAA, etc.</p></li></ul><p class="">These technical skills form the backbone of a Solutions Architect’s ability to create impactful, future-ready solutions tailored to business goals.</p><h3><strong>Steps to Become a Solutions Architect</strong></h3><p class="">Becoming a Solutions Architect can be broken into 5 steps:</p><ul data-rte-list="default"><li><p class=""><strong>Step 1: Gain foundational experience in software engineering or IT.</strong></p><ul data-rte-list="default"><li><p class="">Start by building hands-on experience as a developer, system administrator, or similar IT role to understand the basics of software and system functionality.</p></li></ul></li><li><p class=""><strong>Step 2: Build expertise in system design and software architecture</strong></p><ul data-rte-list="default"><li><p class="">Learn the principles of scalable and secure architecture, focusing on patterns like microservices, event-driven systems, and integration strategies.</p></li></ul></li><li><p class=""><strong>Step 3: Develop domain-specific knowledge in areas like cloud computing or enterprise systems.</strong></p><ul data-rte-list="default"><li><p class="">Familiarize yourself with industry tools and technologies, such as AWS, Azure, Kubernetes, and containerization.</p></li></ul></li><li><p class=""><strong>Step 4: Gain credibility to be recognized as a qualified candidate</strong></p><ul data-rte-list="default"><li><p class="">Employers need clear evidence of your skills and their relevance to fulfilling the company’s needs for the Software Architect’s role.</p></li></ul></li><li><p class=""><strong>Step 5: Apply for Solutions Architect or related roles to gain practical experience.</strong></p><ul data-rte-list="default"><li><p class="">Start with junior architect roles, consulting positions, or customer-facing technical roles to gradually take on full Solutions Architect responsibilities.</p></li></ul></li></ul><p class="">One way to accomplish the first 4 steps is to learn and acquire a relevant certification that both teaches you the necessary skills and offers an industry-recognized certification.</p><h2><strong>Best Certifications for Solutions Architects</strong></h2><p class="">Certifications can help Solutions Architects acquire technical skills faster while also building credibility among employers. Certifications serve as tangible proof of your skills, setting you apart in a competitive job market and opening doors to high-growth opportunities. They also help in moving between companies since professional certifications and their quality standards are recognized by all employers.  </p><h3>Top Cloud Certifications for Solutions Architects:</h3><p class=""><strong>1. AWS Certified Solutions Architect –&nbsp;</strong><a href="https://aws.amazon.com/certification/certified-solutions-architect-associate/" target="_blank"><strong>Associate</strong></a><strong>/</strong><a href="https://aws.amazon.com/certification/certified-solutions-architect-professional/" target="_blank"><strong>Professional</strong></a><strong>&nbsp;</strong>-<strong>&nbsp;</strong>AWS has the biggest market share among all cloud vendors; this is one of the most popular certifications for cloud-focused solutions architects, opening doors to companies using AWS services.</p><p class=""><strong>2. </strong><a href="https://learn.microsoft.com/en-us/credentials/certifications/azure-solutions-architect/" target="_blank"><strong>Microsoft Certified: Azure Solutions Architect Expert</strong> </a>- Perfect for architects working on Microsoft Azure and Microsoft ecosystem - Very common for governments and contracting agencies that work for the government </p><p class=""><strong>3. </strong><a href="https://cloud.google.com/learn/certification/cloud-architect" target="_blank"><strong>Google Professional Cloud Architect</strong></a><strong> - </strong>Designed for professionals using Google Cloud Platform (GCP) and is particularly strong for companies working in Big Data, Machine Learning, and AI.</p><h3>Limitations of Cloud Certifications</h3><p class="">While cloud certifications are great for getting a foothold at companies that use cloud services, which are the majority of companies nowadays, there are trade-offs to consider:</p><ul data-rte-list="default"><li><p class=""><strong>Vendor Specific</strong> - A cloud certification’s value is limited when applying to companies that use a different cloud provider. For example, AWS certification won't translate directly to Azure or GCP roles. Cloud certifications focus heavily on vendor-specific tools, making the knowledge less transferable across platforms.</p></li><li><p class=""><strong>Expiration</strong> - Cloud certifications expire, typically within 3 years, which require you to retake the certification exam and pay the applicable fees. Renewing cloud certifications requires time and effort to prepare for exams, which can be challenging if you hold multiple certifications from various cloud providers.</p></li></ul><h3>An Alternative to Cloud Certification for Solutions Architects</h3><p class="">While cloud certifications have their value, they often fall short in addressing the broader needs of a Solutions Architect. This is where a certification like the <a href="https://www.isaqb.org/certifications/cpsa-certifications/cpsa-foundation-level/" target="_blank"><strong>CPSA®</strong></a><a href="https://ce" target="_blank"><strong>-F</strong></a> by <a href="https://www.isaqb.org/" target="_blank"><strong>iSAQB®</strong></a> (<em>International Software Architecture Qualification Board</em>) can offer a more long-term and broader skillset for Solutions Architects. </p><p class="">The <a href="https://www.isaqb.org/certifications/cpsa-certifications/cpsa-foundation-level/" target="_blank"><strong>Certified Professional for Software Architecture – Foundation Level (CPSA-F)</strong></a> is a strong complement to cloud certifications, equipping Solutions Architects with vendor-neutral skills that make them adaptable across any technology stack or cloud environment.</p><p class="">The CPSA-F® certification program equips Solutions Architects with essential technical skills such as:</p><ul data-rte-list="default"><li><p class=""><strong>Architectural Thinking:</strong></p><ul data-rte-list="default"><li><p class="">CPSA-F teaches core software architecture principles, focusing on designing systems that balance quality attributes like scalability, performance, and maintainability. This foundational knowledge is applicable to Solutions Architects, who often design systems that integrate multiple technologies.</p></li></ul></li><li><p class=""><strong>Communication with Technical Teams:</strong></p><ul data-rte-list="default"><li><p class="">Solutions Architects act as a bridge between business needs and technical implementation. CPSA-F certification training equips them with the technical language and frameworks to communicate effectively with software architects and developers.</p></li></ul></li><li><p class=""><strong>System Design Skills Beyond Cloud:</strong></p><ul data-rte-list="default"><li><p class="">While cloud certifications (AWS, Azure, GCP) focus on platform-specific solutions, CPSA-F provides a vendor-neutral foundation for system design. This is particularly useful for Solutions Architects working with hybrid or on-premise systems in addition to the cloud.</p></li></ul></li><li><p class=""><strong>System Integration Knowledge:</strong></p><ul data-rte-list="default"><li><p class="">The CPSA-F certification curriculum covers architectural strategies for integrating components and technologies, which is essential for Solutions Architects, who are responsible for ensuring seamless interoperability between systems.</p></li></ul></li></ul><p class="">As an added benefit, unlike cloud and many other IT certifications, the <strong>CPSA-F certificate never expires</strong>. This means you can focus on applying your skills rather than renewing certifications, saving time and money.</p><h3>Preparing for CPSA-F Certification</h3><p class="">To earn the prestigious and internationally recognized <strong><em>Certified Professional for Software Architecture - Foundation Level (CPSA-F)</em></strong> certificate, you need to take an exam by one of iSAQB’s accredited certification bodies. The exam itself is <span>pretty challenging</span> as it tests the candidate’s proficiency in a wide range of topics, critical for the role of a Software/Solutions Architect.</p><p class="">Therefore, the best way to prepare for the CPSA-F exam is to enroll in an accredited <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f"><strong>CPSA-F training</strong></a>. After completing such a training, you will have the skills to succeed in your job, as well as pass the CPSA-F certification exam.</p>


  


  



&nbsp;
  
  <p class="sqsrte-small"><a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f">Certified Professional for Software Architecture - Foundation Level (CPSA-F) Training</a></p>


  


  



&nbsp;
  
  <p class="">In the <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f"><strong>CPSA-F training</strong></a>, you will learn how to:</p><ul data-rte-list="default"><li><p class=""><strong>Design the most suitable software architecture</strong> for your system</p></li><li><p class="">Ensure the fulfillment of <strong>complex project requirements</strong></p></li><li><p class=""><strong>Apply&nbsp;industry-proven</strong>&nbsp;<strong>design principles,</strong>&nbsp;patterns, and&nbsp;best practices</p></li><li><p class="">Evaluate and assess the <strong>quality of the software architecture</strong></p></li><li><p class=""><strong>Document and communicate design decisions</strong>, interfaces, cross-cutting concerns, and more</p></li></ul><p class="">By the end of the training, you will be fully prepared to take the certification exam and earn the CPSA-F certificate.</p><p class="">As an <strong>accredited</strong> iSAQB training provider, <a href="https://topdeveloperacademy.com/about" target="_blank"><strong>Top Developer Academy</strong></a> offers the only <strong>on-demand</strong>, <strong>self-paced</strong> <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f" target=""><strong>online training</strong></a> that fits your busy schedule. This training is led by an accredited iSAQB training provider with years of practical, real-world, and teaching experience. To read reviews and testimonials of engineers and solutions architects who already completed this training, click <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f/#reviews"><strong>here</strong></a>.</p><p class="">Don’t wait to accelerate your career. Enroll today in Top Developer Academy’s <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f"><strong>CPSA-F training</strong></a> and gain the skills to become a world-class Solutions Architect.</p>


  


  



<hr />
  
  <h3>More Article</h3>]]></content:encoded><media:content type="image/jpeg" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1732231223791-7JFCPR7BKYVE4TED4HHD/pexels-divinetechygirl-1181534.jpg?format=1500w" medium="image" isDefault="true" width="1280" height="855"><media:title type="plain">How to Become a Solutions Architect: Skills, Certifications, and Career Path</media:title></media:content></item><item><title>TOGAF vs. CPSA-F: Which Software Architecture Certification is Right for You?</title><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Wed, 06 Nov 2024 19:44:57 +0000</pubDate><link>https://topdeveloperacademy.com/articles/togaf-vs-cpsa-f-isaqb-which-software-architecture-certification-is-right-for-you</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:672a94128639573277e507a7</guid><description><![CDATA[Choosing the right software architecture certification can be a 
game-changer for your career. Two of the most widely recognized 
certifications in the architecture field are TOGAF (The Open Group 
Architecture Framework) and CPSA-F (Certified Professional for Software 
Architecture - Foundation Level) by iSAQB. Each opens doors to distinct 
roles and career paths.

In this article, we’ll explore the unique advantages of TOGAF and CPSA-F 
and guide you toward the one that can make the biggest impact on your 
future as a software engineer, developer, or IT professional.]]></description><content:encoded><![CDATA[<p class="">Choosing the right software architecture certification can be a game-changer for your career. Two of the most widely recognized certifications in the architecture field are <strong><em>TOGAF</em></strong> (The Open Group Architecture Framework) and <strong><em>CPSA-F</em></strong> (Certified Professional for Software Architecture - Foundation Level) by iSAQB. Each opens doors to distinct roles and career paths.</p><p class="">In this article, we’ll explore the unique advantages of TOGAF and CPSA-F and guide you toward the one that can make the biggest impact on your future as a software engineer, developer, or IT professional.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1730919515683-80ZEBH7NNSTBPAE3ACIO/unsplash-image-wawEfYdpkag.jpg" data-image-dimensions="2500x1875" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1730919515683-80ZEBH7NNSTBPAE3ACIO/unsplash-image-wawEfYdpkag.jpg?format=1000w" width="2500" height="1875" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1730919515683-80ZEBH7NNSTBPAE3ACIO/unsplash-image-wawEfYdpkag.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1730919515683-80ZEBH7NNSTBPAE3ACIO/unsplash-image-wawEfYdpkag.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1730919515683-80ZEBH7NNSTBPAE3ACIO/unsplash-image-wawEfYdpkag.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1730919515683-80ZEBH7NNSTBPAE3ACIO/unsplash-image-wawEfYdpkag.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1730919515683-80ZEBH7NNSTBPAE3ACIO/unsplash-image-wawEfYdpkag.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1730919515683-80ZEBH7NNSTBPAE3ACIO/unsplash-image-wawEfYdpkag.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1730919515683-80ZEBH7NNSTBPAE3ACIO/unsplash-image-wawEfYdpkag.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  


&nbsp;
  
  <h3>Enterprise Architect vs Software Architect</h3><p class="">Before diving into the TOGAF and CPSA-F certifications, it’s essential to understand the difference between the roles they support. An <strong>enterprise architect</strong> (supported by the TOGAF certification) focuses on high-level strategy, aligning IT infrastructure with broader business goals. An enterprise architect oversees an organization’s technology landscape, ensuring systems are cohesive, scalable, and supportive of long-term objectives. Enterprise architects often engage in planning, governance, and aligning technology with business strategy. </p><p class="">It’s important to understand that while enterprise architects focus on broad organizational goals in IT organizations, they don’t handle many of the technical, hands-on responsibilities that software architects do. Enterprise architects typically don’t work on code-level design, detailed component structures, or hands-on development. They also don’t engage in the specifics of application performance tuning, database optimization, or choosing software frameworks for individual projects.</p><p class="">On the other hand, a <strong>software architect</strong> (supported by the CPSA-F certificate) is much more hands-on with system design. They dive into the nitty-gritty of creating efficient, reliable software solutions while working closely with software developers. A typical software architect develops technical designs through specialized diagrams like UML, makes technology choices, and ensures code quality within the development team while being more hands-on with code. A software architect is expected to have substantial software development experience while having a wide range of other soft skills and problem-solving skills to take complex requirements towards a production-ready software solution.</p><h3>How to Choose Between TOGAF and CPSA-F®<a href="https://www.isaqb.org/" target="_blank"> </a></h3><p class="">Both enterprise and software architects hold valuable roles, yet they differ significantly in their day-to-day activities. </p><p class=""><strong>Enterprise architects</strong> benefit from a bird’s-eye view of how IT aligns with business goals. They often work closely with senior leadership, influencing major decisions and setting strategic technology direction. Enterprise architecture can be fulfilling for those who enjoy strategic and business planning.</p><p class=""><strong>Software architects</strong>, however, often find satisfaction in shaping the technical foundation of products and applications. They work closely with software developers, project managers, testers, DevOps, and other stakeholders to create software that meets specific user requirements. This path can be especially rewarding if you’re passionate about solving complex&nbsp;<strong>technical</strong>&nbsp;challenges, choosing the right design patterns, frameworks, and programming languages, working closely with development teams, and being much more hands-on with code and technologies.</p><p class="">Essentially, if enterprise architects are the architects of a city’s layout, software architects design each individual building.</p><p class="">So, if you want to be more involved in the <strong>business strategy</strong> and <strong>organizational level</strong>, becoming an enterprise architect and pursuing the <a href="https://www.opengroup.org/togaf" target="_blank"><strong>TOGAF</strong></a> certification is the right path for you. </p><p class="">On the other hand, if you enjoy architecting software systems, designing APIs, and working on more technical problems in your daily work, becoming a software architect and pursuing the <a href="https://www.isaqb.org/certifications/cpsa-certifications/cpsa-foundation-level/" target="_blank"><strong>CPSA-F®</strong></a> certificate by <a href="https://www.isaqb.org/" target="_blank"><strong>iSAQB®</strong> </a>- the International Software Architecture Qualification Boards is the best choice for you.</p><h3>Who is the CPSA-F Software Architecture Certificate for? </h3><p class="">The&nbsp;<strong>Certified Professional for Software Architecture – Foundation Level (</strong><a href="https://www.isaqb.org/certifications/cpsa-certifications/cpsa-foundation-level/" target="_blank"><strong>CPSA-F</strong></a><strong>)</strong>&nbsp;by&nbsp;<a href="https://isaqb.org/" target="_blank"><strong>iSAQB</strong></a>&nbsp;- the International Software Architecture Qualification Board is a leading software architecture certification for anyone with at&nbsp;<strong>least 18</strong>&nbsp;<strong>months</strong>&nbsp;of software development experience who wants to master software architecture and to work towards the role of a technical lead or software architect.</p><p class="">This includes:</p><ul data-rte-list="default"><li><p class="">Software developers</p></li><li><p class="">Software analysts</p></li><li><p class="">Engineering managers</p></li></ul><p class="">This certification is also commonly sought after by already-established:</p><ul data-rte-list="default"><li><p class="">Software architects</p></li><li><p class="">Technical leads</p></li><li><p class="">Engineering managers</p></li><li><p class="">Software architecture consultants</p></li></ul><p class=""> Who want to close any skill gaps and have an independent, globally recognized certificate that can show to current or future employers or clients.</p><p class="">The CPSA-F certification curriculum focuses on the essential principles, practices, and patterns every software architect needs, focusing on practical skills from architectural decision-making to understanding software patterns, documentation, communication, and evaluation of software architecture.</p><h3>How do you Study for the CPSA-F Certificate Exam? </h3><p class="">CPSA-F curriculum is very comprehensive and covers many complex areas. The <a href="https://www.isaqb.org/certifications/cpsa-foundation-level-examinations/" target="_blank">CPSA-F exam</a> conducted by independent certification bodies is also considered quite difficult, even for experienced software architects, so preparing for the <a href="https://www.isaqb.org/certifications/cpsa-certifications/cpsa-foundation-level/" target="_blank">CPSA-F certification</a> without guided instruction can be quite challenging.</p><p class="">While the International Software Architecture Qualification Board (iSAQB®) sets the Certified Professional for Software Architecture certification curriculum, it doesn’t conduct trainings on its own.</p><p class="">Instead, iSAQB® delegates the training to independent&nbsp;<strong>accredited</strong>&nbsp;<strong>training providers</strong> and&nbsp;<strong>accredited trainers</strong>&nbsp;who demonstrate substantial industry and teaching experience in the field of software architecture. Those training providers and their trainers are held to high-quality standards to ensure the students pursuing the CPSA-F certification get proper, practical knowledge and are well prepared to pass the CPSA-F certification exam.</p><h3>Learn with Top Developer Academy</h3><p class="">As North America's&nbsp;<strong>first</strong>&nbsp;iSAQB CPSA-F®&nbsp;<strong>accredited training provider</strong>,&nbsp;<a href="https://topdeveloperacademy.com/about" target="_blank"><strong><em>Top Developer Academy</em></strong></a>&nbsp;offers one of the most popular and comprehensive training for the CPSA-F certification while also being the first to offer fully&nbsp;<a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f"><strong>self-paced training</strong></a> tailored for busy professionals.</p><p class="">Top Developer Academy’s <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f"><strong>CPSA-F training</strong></a> not only covers the entire exam curriculum but ensures you gain <strong>practical</strong>, real-world architecture skills, with lots of examples of software architecture, and application of the principles taught in class. </p><p class="">Some of the topics you’ll learn include how to:</p><ul data-rte-list="default"><li><p class=""><strong>Design </strong>the most<strong> </strong>effective<strong> software architecture</strong> for your system</p></li><li><p class=""><strong>Ensure</strong> your architecture meets complex <strong>project requirements</strong></p></li><li><p class=""><strong>Apply</strong> industry-proven design <strong>principles</strong>, <strong>patterns</strong>, and best practices</p></li><li><p class=""><strong>Evaluate</strong> and <strong>assess</strong> the <strong>quality</strong> of your software architecture</p></li><li><p class=""><strong>Document and communicate</strong> design decisions, interfaces, cross-cutting concerns, </p></li></ul><p class="">and more</p>


  


  



&nbsp;
  
  <p class=""><a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f"><strong>Certified Professional for Software Architecture - Foundation Level (CPSA-F) Training</strong></a></p>


  


  



&nbsp;
  
  <p class="">By the end of the ​<a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f"><strong>training</strong></a><a href="https://automatehero.io/api/hero/VFJ5VW85RGVRUT09/{{ subscriber.email_address }}">​</a>, you will be ready to take the official <strong>CPSA-F® certification exam </strong>and <strong>apply</strong> this knowledge in your daily work.</p><p class="">One of the great parts about the CPSA-F<strong>®</strong> certificate is that <strong>it never expires</strong>.</p><p class="">If you’ve ever earned a cloud certification like AWS, GCP, or Azure, you already know that those certificates need to be renewed every few years, which costs money. </p><p class="">However, since the software architecture skills you learn by taking the <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f"><strong>CPSA-F training</strong></a> will last you for your entire career and aren’t ephemeral like cloud technologies, this certificate is yours for life. <br>So, with a lifetime certification, you can build a career on timeless software architecture skills rather than worrying about renewals and changing technology trends.</p><p class=""><a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f" target="_blank"><strong>Join Top Developer Academy’s CPSA-F course</strong></a>&nbsp;today and take your next big step toward mastering software architecture while gaining the skills, confidence, and certification to stand out as a top software architect in your field.</p>


  


  



<hr />
  
  <h2>More Articles</h2>]]></content:encoded><media:content type="image/jpeg" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1730921951849-EAUM2FSZLPRSQ8XI3LTV/austin-distel-wawEfYdpkag-unsplash.jpg?format=1500w" medium="image" isDefault="true" width="640" height="480"><media:title type="plain">TOGAF vs. CPSA-F: Which Software Architecture Certification is Right for You?</media:title></media:content></item><item><title>Become a Certified Software Architect: The Benefits of CPSA-F Certification</title><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Sat, 28 Sep 2024 00:00:32 +0000</pubDate><link>https://topdeveloperacademy.com/articles/become-a-certified-software-architect-the-benefits-of-cpsa-f-certification</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:66eb36d9a0447517cf4978e3</guid><description><![CDATA[Discover the value of Software Architecture training and certification, 
such as the Certified Professional for Software Architecture - Foundation 
Level (CPSA-F)

Learn how it can help you advance your career, become a software architect, 
and stand out in today's competitive job market with our accredited, 
self-paced training.]]></description><content:encoded><![CDATA[<p class="">In today’s fast-paced tech industry and competitive job market, continuous education is essential for software engineers looking to grow their careers. As software systems become more complex, the role of a software architect has become critical for any tech company. If you want to become a software architect or technical leader and stand out in a competitive job market, gaining a deep understanding of software architecture is absolutely essential. One way to solidify your expertise is through a globally acclaimed software architecture certification program, such as the <em>Certified Professional for Software Architecture – Foundation Level (CPSA-F)</em> by <a href="https://www.isaqb.org/" target="_blank">iSAQB</a>.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/0d8095f0-edeb-482c-be0f-4c8a3add35a7/iStock-1272800325.jpg" data-image-dimensions="5472x3648" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/0d8095f0-edeb-482c-be0f-4c8a3add35a7/iStock-1272800325.jpg?format=1000w" width="5472" height="3648" sizes="(max-width: 640px) 100vw, (max-width: 767px) 33.33333333333333vw, 33.33333333333333vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/0d8095f0-edeb-482c-be0f-4c8a3add35a7/iStock-1272800325.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/0d8095f0-edeb-482c-be0f-4c8a3add35a7/iStock-1272800325.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/0d8095f0-edeb-482c-be0f-4c8a3add35a7/iStock-1272800325.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/0d8095f0-edeb-482c-be0f-4c8a3add35a7/iStock-1272800325.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/0d8095f0-edeb-482c-be0f-4c8a3add35a7/iStock-1272800325.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/0d8095f0-edeb-482c-be0f-4c8a3add35a7/iStock-1272800325.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/0d8095f0-edeb-482c-be0f-4c8a3add35a7/iStock-1272800325.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  


&nbsp;
  
  <h3><strong>Why Software Architecture Matters</strong></h3><p class="">Software architecture is more than designing systems and drawing diagrams. It’s about creating scalable, maintainable, and efficient solutions that align with business goals. By mastering software architecture, you can make critical decisions about how systems should be structured, ensuring they meet current needs and allow the system to evolve easily to address future needs. As a software architecture expert, you become a strategic thinker, elevating other engineers around you and the entire organization.</p><h3><strong>Who is iSAQB?</strong></h3><p class="">The <a href="https://www.isaqb.org/" target="_blank"><em>International Software Architecture Qualification Board</em></a><em> (</em><a href="https://www.isaqb.org/" target="_blank"><em>iSAQB</em>®</a><em>)</em> is an internationally recognized non-profit organization that defines and controls the education standards for the training of software architects. Its CPSA® (Certified Professional for Software Architecture) certification programs ensure that professionals have the skills, knowledge, and best practices needed to design robust software systems. </p><p class="">iSAQB® relies on volunteer software architecture experts from the industry, as well as consulting, training, and academia. </p><p class="">iSAQB® works with accredited training providers worldwide to offer software architecture training courses that prepare software professionals for the CPSA certification exams, which are conducted by independent certification bodies. </p><p class="">In addition to quality control of the <a href="https://www.isaqb.org/certifications/cpsa-certifications/cpsa-foundation-level/" target="_blank">CPSA-F®</a> curriculum, <a href="https://www.isaqb.org/" target="_blank">iSAQB®</a> also validates the qualification of software architecture trainers through a rigorous accreditation process.</p><h3><strong>What is the Certified Professional for Software Architecture - Foundation Level (CPSA-F) Certification?</strong></h3><p class="">The <a href="https://www.isaqb.org/certifications/cpsa-certifications/cpsa-foundation-level/" target="_blank">CPSA-F®</a> is a foundational certification program designed for software engineers, analysts, and technical professionals who want to develop their expertise in software architecture. It covers essential practical topics like:</p><ul data-rte-list="default"><li><p class=""><strong>Applying</strong> <strong>software architecture design principles</strong>, patterns, and best practices</p></li><li><p class=""><strong>Working</strong> <strong>with complex requirements</strong> in small, medium, and large organizations</p></li><li><p class=""><strong>Documenting</strong> <strong>and communicating</strong> architecture decisions</p></li><li><p class=""><strong>Making design decisions</strong> and trade-offs</p></li><li><p class=""><strong>Analyzing and evaluating</strong> software architecture</p></li></ul><p class="">This certification provides a well-rounded foundation in architecture, equipping current and aspiring software architects with essential skills to lead architecture-focused initiatives and design high-quality, long-lasting products.</p><h3><strong>How the CPSA-F Training Can Help You Grow</strong></h3><p class=""><a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f" target="_blank">CPSA-F® training</a> delivers hands-on, practical knowledge of software architecture principles that you can apply directly to your projects. By completing an accredited <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f" target="_blank">CPSA-F training</a>, you will develop a clear understanding of essential software architecture concepts and terminology, as well as skills to tackle real problems and communicate design ideas effectively to stakeholders.</p><p class="">For engineers looking to advance in their careers, the <a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f" target="_blank">CPSA-F training</a> provides:</p><ul data-rte-list="default"><li><p class="">The ability to design systems that are both functional and future-proof</p></li><li><p class="">The skills to transition into technical leadership roles</p></li><li><p class="">Opportunities to stand out in hiring processes by acquiring an internationally recognized certificate</p></li></ul><h3><strong>The Value of Earning a CPSA-F Certificate</strong></h3><p class="">Obtaining the CPSA-F certification demonstrates to employers that you possess the knowledge and skills necessary to contribute to or lead architecture decisions. It’s a signal that you are prepared to take on more responsibilities, whether it’s becoming a software architect, a technical lead, or excelling as a senior engineer. </p><p class="">Additionally, unlike many other IT certifications that expire in a few years and require you to retake and pay exam fees, the CPSA-F certificate is yours for life. The reasoning is simple — Technologies may change, but fundamental software architecture stays relevant for your entire career. This makes the investment into professional software architecture training a worthwhile investment.</p><h3><strong>Join Our Accredited Online CPSA-F Training</strong></h3><p class="">At Top Developer Academy, we are proud to be an <em>iSAQB-accredited training provider</em> for the CPSA-F certification. Our self-paced online course is designed specifically for busy professionals, allowing you to master the concepts of software architecture at your own pace and on your own schedule. Whether you want to level up your career or transition into a software architect role, this training equips you with everything you need to succeed.</p><p class="">With flexible access to course materials, such as:</p><ul data-rte-list="default"><li><p class="">HD video lessons covering all CPSA-F topics</p></li><li><p class="">Interactive quizzes to test your knowledge</p></li><li><p class="">Practical examples of real-life architectures</p></li><li><p class="">An iSAQB-approved CPSA-F mock exam</p></li><li><p class="">And many additional resources</p></li></ul><p class="">you will be fully prepared to pass the CPSA-F exam and apply your new skills in the real world.</p>


  


  



&nbsp;
  
  <p class=""><a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f" target="_blank"><strong>Certified Professional for Software Architecture - Foundation Level (CPSA-F) Training</strong></a></p>


  


  



&nbsp;
  
  <p class="">If you’re ready to take the next step in your career, the CPSA-F program is an excellent way to do so. Not only will you deepen your knowledge of software architecture, but you will also position yourself for future leadership roles and stand out in today’s competitive job market.</p><p class="">Join our iSAQB-accredited CPSA-F software architecture<a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f"> <strong>certification training</strong></a> and take your career to the next level!</p><p class="">Don't miss the chance to invest in your future and gain skills that will last a lifetime.<a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f" target="_blank"> </a></p><p class=""><a href="https://topdeveloperacademy.com/certified-professional-for-software-architecture-foundational-level-training-cpsa-f" target="_blank"><strong>Enroll today!</strong></a></p>


  


  



<hr />
  
  <h2>More Articles</h2>]]></content:encoded><media:content type="image/jpeg" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1727481668848-20QLDOS9TXH3THH3USAM/iStock-1272800325.jpg?format=1500w" medium="image" isDefault="true" width="1500" height="1000"><media:title type="plain">Become a Certified Software Architect: The Benefits of CPSA-F Certification</media:title></media:content></item><item><title>Demystifying Microservices Architecture - Benefits and Challenges</title><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Thu, 02 Nov 2023 00:24:07 +0000</pubDate><link>https://topdeveloperacademy.com/articles/demystifying-microservices-architecture-benefits-and-challenges</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:64d18156b3b9d407b83333ce</guid><description><![CDATA[Did you know that over 80% of companies are modernizing their applications 
and adapting microservice architecture?

If you are a current or aspiring software architect wondering why 
Microservices Architecture keeps gaining popularity, you have come to the 
right place.

In this article, we will cover the benefits and challenges of Microservices 
Architecture and why the top tech companies are rapidly adapting it.]]></description><content:encoded><![CDATA[<p class="">Did you know that over <a href="https://www.solo.io/resources/report/2022-service-mesh-adoption-survey/"><span>80% of companies</span></a> are modernizing their applications and adapting microservice architecture?&nbsp;</p><p class="">According to a report by Statista, <a href="https://www.statista.com/statistics/1374570/microservices-importance-organizations/#:~:text=Global%20microservices%20importance%20to%20organizations%202022&amp;text=In%202022%2C%2040%20percent%20of,important%20in%20the%20same%20year."><span>54%</span></a> of developers are considering microservices architecture for their system, and the global microservices architecture market is likely to hit <a href="https://www.researchandmarkets.com/reports/5615167/microservices-architecture-market-global?gclid=CjwKCAjw5_GmBhBIEiwA5QSMxBT28c1WnkfKmlbcpnHYbiOiPfnr-cAWCGVTeLAdS3jjh7FiJVvEExoCc_oQAvD_BwE"><span>US$ 6.84 billion</span></a> by 2027.</p><p class="">If you are a current or aspiring software architect wondering why Microservices Architecture keeps gaining popularity, you have come to the right place.</p><p class="">In this article, we will cover the benefits and challenges of Microservices Architecture and why the top tech companies are rapidly adapting it.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/7eb34aac-1b4c-4b31-a5c2-94c70c732fd7/Microservices+Architecture" data-image-dimensions="1920x1080" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/7eb34aac-1b4c-4b31-a5c2-94c70c732fd7/Microservices+Architecture?format=1000w" width="1920" height="1080" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/7eb34aac-1b4c-4b31-a5c2-94c70c732fd7/Microservices+Architecture?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/7eb34aac-1b4c-4b31-a5c2-94c70c732fd7/Microservices+Architecture?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/7eb34aac-1b4c-4b31-a5c2-94c70c732fd7/Microservices+Architecture?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/7eb34aac-1b4c-4b31-a5c2-94c70c732fd7/Microservices+Architecture?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/7eb34aac-1b4c-4b31-a5c2-94c70c732fd7/Microservices+Architecture?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/7eb34aac-1b4c-4b31-a5c2-94c70c732fd7/Microservices+Architecture?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/7eb34aac-1b4c-4b31-a5c2-94c70c732fd7/Microservices+Architecture?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  


&nbsp;
  
  <h3>Why We Need Microservices Architecture</h3><p class="">Before Microservices Architecture, most systems were designed as monolithic applications, built as single units with all components, modules, and functions coupled into a single codebase. This entire codebase was also <em>deployed</em> as a single unit at runtime.</p><p class="">While this style was simple and worked very well for small development teams, developers and software architects realized the need for a more scalable architecture style that allowed them to grow their organization while maintaining high development velocity and cost efficiency.</p><p class="">After the failure of SOA and other architectural styles, Microservices Architecture gained immense popularity, helping many companies we now take for granted grow from small startups to global giants.</p><h3>Principles and Benefits of Microservices Architecture</h3><p class="">Unlike in a monolithic architecture, in a Microservices Architecture, the system is divided into small, loosely coupled, and independently deployed microservices.</p><p class="">Each microservice has a specific purpose and is developed and managed by a separate team.&nbsp;The different microservices communicate with each other through standard network protocols and well-defined APIs to achieve a common goal.</p><p class="">A few of the benefits that come with Microservices Architecture include:</p><ul data-rte-list="default"><li><p class=""><strong><em>Scalability</em></strong> (technical and organizational)</p></li><li><p class=""><strong>High Availability</strong> and <strong>Fault Tolerance</strong></p></li><li><p class=""><strong>Flexibility</strong> and <strong>agility</strong> in adopting new technologies</p></li><li><p class="">High <strong>development velocity</strong></p></li><li><p class=""><strong>Cost efficiency</strong></p></li><li><p class="">And more</p></li></ul><h3>Microservices Architecture at Top Tech Companies</h3><p class="">Many companies with complex, large-scale systems, like <strong><em>Google</em></strong>, <strong><em>Amazon</em></strong>, <strong><em>Uber</em></strong>, <strong><em>Lyft</em></strong>, <strong><em>Netflix</em></strong>, <strong><em>Airbnb</em></strong>, and <strong><em>Spotify</em></strong>, have adapted microservices architecture.</p><p class="">The actual list of companies is very long, and it’s growing every year as more companies are gradually migrating to microservices.</p><p class="">In many ways, those companies owe their success to Microservices Architecture because, without it, they wouldn’t be able to scale to their current size due to high operational and organizational overhead.</p><h3>Challenges of Microservices Architecture</h3><p class="">With all the great benefits of Microservices Architecture, this style also comes with many challenges.</p><p class="">Taking a centralized monolithic application and breaking it into a highly distributed system brings a new set of problems and potential bottlenecks.</p><p class="">Some of those problems include:</p><ul data-rte-list="default"><li><p class=""><strong>Data management</strong> across different databases</p></li><li><p class="">Increased <strong>network traffic</strong> between different microservices</p></li><li><p class=""><strong>Management of APIs</strong> and their changes across teams</p></li><li><p class=""><strong>Deployment</strong>, <strong>Monitoring</strong>, and <strong>Troubleshooting</strong> of thousands of microservices in production</p></li><li><p class="">And more</p></li></ul><p class="">Many of those challenges can be mitigated through industry-proven patterns and best practices, which are thoroughly covered in <a href="https://topdeveloperacademy.com/course-coupon/the-complete-microservices-event-driven-architecture"><strong>The Complete Microservices &amp; Event-Driven Architecture</strong></a> course.</p><p class="">But it’s also important to acknowledge that not all of those challenges can be eliminated, which is why it’s important to make a careful assessment of whether your system is going to benefit from the migration to Microservices or not.</p><p class="">Most startup companies and companies with small development teams will likely not benefit from this migration. But in other cases, the shift to Microservices Architecture can have a huge positive impact on the business and its customers.</p><p class="">If you’re a <strong>Senior Engineer</strong>, a <strong>Tech Lead</strong>, or a <strong>Software Architect</strong> looking to gain full experience in Microservice Architecture, <a href="https://topdeveloperacademy.com/course-coupon/the-complete-microservices-event-driven-architecture"><strong>The Complete Microservices &amp; Event-Driven Architecture</strong></a> course is the best online resource to gain that knowledge.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          <a class="
                sqs-block-image-link
                
          
        
              " href="https://topdeveloperacademy.com/course-coupon/the-complete-microservices-event-driven-architecture"
              
          >
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/8fcfa90d-230a-461f-b44d-6b1158e7bf5c/The+Complete+Microservices+%26+Event-Driven+Architecture+course" data-image-dimensions="750x422" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/8fcfa90d-230a-461f-b44d-6b1158e7bf5c/The+Complete+Microservices+%26+Event-Driven+Architecture+course?format=1000w" width="750" height="422" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/8fcfa90d-230a-461f-b44d-6b1158e7bf5c/The+Complete+Microservices+%26+Event-Driven+Architecture+course?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/8fcfa90d-230a-461f-b44d-6b1158e7bf5c/The+Complete+Microservices+%26+Event-Driven+Architecture+course?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/8fcfa90d-230a-461f-b44d-6b1158e7bf5c/The+Complete+Microservices+%26+Event-Driven+Architecture+course?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/8fcfa90d-230a-461f-b44d-6b1158e7bf5c/The+Complete+Microservices+%26+Event-Driven+Architecture+course?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/8fcfa90d-230a-461f-b44d-6b1158e7bf5c/The+Complete+Microservices+%26+Event-Driven+Architecture+course?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/8fcfa90d-230a-461f-b44d-6b1158e7bf5c/The+Complete+Microservices+%26+Event-Driven+Architecture+course?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/8fcfa90d-230a-461f-b44d-6b1158e7bf5c/The+Complete+Microservices+%26+Event-Driven+Architecture+course?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          </a>
        

        
          
          <figcaption class="image-caption-wrapper">
            <p class=""><a href="https://topdeveloperacademy.com/course-coupon/the-complete-microservices-event-driven-architecture"><strong>The Complete Microservices &amp; Event-Driven Architecture</strong></a></p>
          </figcaption>
        
      
        </figure>
      

    
  


  


&nbsp;
  
  <p class=""><strong>In this course, you will learn:</strong></p><ul data-rte-list="default"><li><p class="">To <strong>assess</strong> whether your system is going to benefit from Microservice</p></li><li><p class="">An industry-proven <strong>step-by-step process</strong> to <strong>migrate</strong> a legacy monolithic application to Microservices Architecture</p></li><li><p class=""><strong>Test</strong>, <strong>Deploy</strong>, and <strong>Troubleshoot</strong> Microservices in <strong>Production</strong></p></li></ul><p class="">You will also learn many powerful <strong>design patterns</strong> and <strong>best practices</strong> to get the most benefit from both Microservice and Event-Driven Architecture.</p>


  


  



<hr />
  
  <h2>More Articles</h2>]]></content:encoded><media:content type="image/jpeg" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1698884674478-V8J4KCWEL74ZSV6VTO55/growtika-Am6pBe2FpJw-unsplash.jpg?format=1500w" medium="image" isDefault="true" width="1500" height="844"><media:title type="plain">Demystifying Microservices Architecture - Benefits and Challenges</media:title></media:content></item><item><title>Best Distributed Caching Technologies for Architecting High-Performance Systems</title><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Mon, 07 Aug 2023 05:18:24 +0000</pubDate><link>https://topdeveloperacademy.com/articles/architecting-high-performance-systems-a-deep-dive-into-caching</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:64d04dae7035c145f32cc723</guid><description><![CDATA[One of the biggest difficulties in modern large-scale systems is the 
ever-growing volume of data and user interactions.

Companies are expected to grow but maintain the same high performance and 
responsiveness while keeping infrastructure costs within budget.

Caching is a powerful solution for optimizing the performance of 
large-scale systems.

In this article, you’re going to learn about the top distributed caching 
technologies for architecting high-performance, large-scale systems.]]></description><content:encoded><![CDATA[<p class="">One of the biggest difficulties in modern large-scale systems is the ever-growing volume of data and user interactions.<br>Companies are expected to grow but maintain the same high performance and responsiveness while keeping infrastructure costs within budget.<br>This makes the job of software architects and developers more challenging every day as they need to develop clever ways to reduce latency and optimize their code.<br>One of the main performance bottlenecks for any system remains its data layer, aka its database. No matter how fast your code or runtime is, a slow database query can easily diminish all your effects.<br><strong>Caching</strong> is a powerful solution for optimizing the performance of large-scale systems.<br>In this article, you’re going to learn about the top distributed caching technologies for architecting high-performance, large-scale systems. </p><p class="">If you are a software architect or a developer working on highly scalable, data-intensive applications, this article is for you.</p><p class="">Distributed caching is also a common topic in System Design interviews, so make sure you’re at least familiar with the following technologies.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/0d056d51-6207-4f32-b7e4-b0edee55190e/monitor-g5e39cd279_1280.jpg" data-image-dimensions="1280x903" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/0d056d51-6207-4f32-b7e4-b0edee55190e/monitor-g5e39cd279_1280.jpg?format=1000w" width="1280" height="903" sizes="(max-width: 640px) 100vw, (max-width: 767px) 66.66666666666666vw, 66.66666666666666vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/0d056d51-6207-4f32-b7e4-b0edee55190e/monitor-g5e39cd279_1280.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/0d056d51-6207-4f32-b7e4-b0edee55190e/monitor-g5e39cd279_1280.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/0d056d51-6207-4f32-b7e4-b0edee55190e/monitor-g5e39cd279_1280.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/0d056d51-6207-4f32-b7e4-b0edee55190e/monitor-g5e39cd279_1280.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/0d056d51-6207-4f32-b7e4-b0edee55190e/monitor-g5e39cd279_1280.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/0d056d51-6207-4f32-b7e4-b0edee55190e/monitor-g5e39cd279_1280.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/0d056d51-6207-4f32-b7e4-b0edee55190e/monitor-g5e39cd279_1280.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  


&nbsp;
  
  <h2><a href="https://aws.amazon.com/elasticloadbalancing/">​1. </a><a href="https://redis.io"><span class="sqsrte-text-color--accent">Redis</span></a></h2><p class="">By far, the most popular and used caching technology is <a href="https://redis.io">Redis</a>. </p><p class="">Redis is open-source, which makes it an attractive solution for any budget.  It is written in C/C++, which provides very high and consistent performance. </p><p class="">It also offers a very easy-to-use Cli, which is perfect for prototyping before writing any code.</p><p class="">Integrating Redis into your application couldn’t be easier since there are dozens of client libraries (official and non-official) in almost <a href="https://redis.io/resources/clients/">every programming language</a>. <br>Redis is much more than an in-memory key/value store.<br>It supports many data types and structures like <strong><em>Strings, Lists, Sets, Hashes, Sorted sets, Streams, Geospatial indexes, Bitmaps, Bitfields</em></strong><em>, and more.</em></p><p class="">When deployed as a cluster, Redis also supports sharding and re-partitioning for maximum horizontal <strong>scalability</strong> and replication for <strong>high availability</strong>.</p><p class="">It is the perfect technology for use cases like:</p><ul data-rte-list="default"><li><p class=""><strong>Real-time</strong> applications that require <strong>low latency</strong> and <strong>high-throughput</strong></p></li><li><p class="">Storing session information to <strong>reduce database queries</strong></p></li><li><p class="">Eliminating <strong>expensive computations</strong> and network calls in a Microservices Architecture.</p></li></ul><p class="">Redis is also available as a cloud-managed solution by the top cloud vendors:</p><ul data-rte-list="default"><li><p class=""><a href="https://aws.amazon.com/elasticache/redis/"><strong><em>Amazon ElastiCache for Redis</em></strong></a></p></li><li><p class=""><a href="https://azure.microsoft.com/en-us/products/cache"><strong><em>Azure Cache for Redis</em></strong></a></p></li><li><p class=""><a href="https://cloud.google.com/memorystore"><strong><em>GCP Memstore</em></strong></a></p></li></ul>


  


  



<hr />&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1611784563672-X37STKTAVEJZE2XESHGM/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg" data-image-dimensions="1428x2000" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1611784563672-X37STKTAVEJZE2XESHGM/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=1000w" width="1428" height="2000" sizes="(max-width: 640px) 100vw, (max-width: 767px) 33.33333333333333vw, 33.33333333333333vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1611784563672-X37STKTAVEJZE2XESHGM/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1611784563672-X37STKTAVEJZE2XESHGM/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1611784563672-X37STKTAVEJZE2XESHGM/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1611784563672-X37STKTAVEJZE2XESHGM/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1611784563672-X37STKTAVEJZE2XESHGM/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1611784563672-X37STKTAVEJZE2XESHGM/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1611784563672-X37STKTAVEJZE2XESHGM/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <p class="">Becoming a <strong>software architect </strong>and <strong>technology leader</strong> is the ultimate goal for every software engineer. But you don’t need to wait for it to happen sometime in the far future! </p><p class="">In this guide, I share with you <strong>the 5 proven steps</strong> to becoming a software architect and technology leader today.</p><p class="">Use this free PDF guide to pave your path to success. Your biggest career breakthrough as an engineer is closer than you think.</p>


  


  




  
    
  


  
  <h2><span class="sqsrte-text-color--accent">2. Memcached</span></h2><p class=""><a href="https://memcached.org">Memcached</a> is a free, open-source, high-performance distributed object caching system. While Memcached is generic in nature, its primary use case is to accelerate dynamic websites by caching objects in RAM.</p><p class="">Just like Redis, it comes with a very powerful command line Cli which makes it super easy to query and store for rapid prototyping.</p><p class="">However, Memcached doesn’t support any advanced data structures, and it’s primarily a key/value store for getting and putting simple data. </p><p class="">This limitation also makes its API very simple and easy to use, and more importantly, provides blazingly fast performance where each operation is of <strong>O(1)</strong> time complexity, typically well under <strong>1ms</strong>.</p><p class=""> Memcached is made up of 3 components:</p><ul data-rte-list="default"><li><p class="">Client software that maintains the list of Memcached services.</p></li><li><p class="">A client-based hashing algorithm that decides which key goes to which service</p></li><li><p class="">A server, running Memcached and stores the keys and their values</p></li></ul><p class="">Memcached is using the <strong><em>LRU</em></strong> (Least-Recently Used) cache invalidation strategy by default, where items can also expire after a set amount of time.</p><p class="">Just like Redis, Memcached is offered as a cloud-managed solution by the top cloud vendors:</p><ul data-rte-list="default"><li><p class=""><a href="Memcached"><strong><em>AWS Memcached</em></strong></a></p></li><li><p class=""><a href="https://cloud.google.com/memorystore"><strong><em>GCP Memstore</em></strong></a></p></li><li><p class=""><a href="https://www.alibabacloud.com/product/apsaradb-for-memcache"><strong><em>Alibaba Cloud ApsaraDB for Memcache</em></strong></a></p></li></ul><h2><a href="https://developer.aerospike.com"><span class="sqsrte-text-color--accent"><strong><em>3. Aerospike</em></strong></span></a></h2><p class=""><a href="https://developer.aerospike.com">Aerospike</a> is a distributed, open-source, <strong>NoSQL</strong> database written in <strong>C++</strong>, architected with 3 key objectives:</p><ul data-rte-list="default"><li><p class="">Creating a <strong>high-performance</strong>, scalable solution that meets the requirements of today’s web-scale applications</p></li><li><p class="">Providing <strong>robustness</strong> and <strong>reliability</strong> like <strong>ACID</strong> guarantees.</p></li><li><p class="">Offering operational <strong>efficiency</strong> with minimal manual involvement - A key feature for DevOps, SREs, and software developers alike</p></li></ul><p class="">Aerospike supports a variety of client libraries for many programming languages like <strong><em>Java, C#, C, Go, Node.js, Ruby</em>, and <em>Python</em></strong>, as well as many other community-supported clients for <strong><em>Rust, PHP</em></strong>, and others.</p><p class="">Aerospike also provides a <strong>RESTful API</strong> is a great feature for today’s web-based applications.</p><p class="">What really sets Aerospike apart is it provides <strong>automatic sharding</strong> and <strong>strong consistency</strong> while still offering <strong>low latency</strong> and <strong>high throughput</strong>. </p><p class="">This makes it a perfect choice for real-time analytics and caching data that requires strong consistency like distributed “counters.”</p><h2><a href="https://hazelcast.com/open-source-projects/"><strong><em>4. Hazelcast</em></strong></a></h2><p class=""><a href="https://hazelcast.com/open-source-projects/">Hazelcast</a> is another in-memory distributed caching solution. </p><p class="">Just like Redis, it supports a variety of data structures like <strong><em>Map, Set, List, MultiMap, RingBuffer, </em></strong>and<strong><em> HyperLogLog</em></strong>.</p><p class="">Hazecast also supports many programming languages like <a href="https://hazelcast.com/clients/"><strong><em>Java, .NET, C++, Node.js, Python</em></strong></a> <em>and</em> <a href="https://hazelcast.com/clients/"><strong><em>Go</em></strong></a>.</p><p class="">However, unlike the previous options is typically used as a data grid.</p><p class="">That means you can use Hazelcast as a Distributed Map, where one application instance can make a complex computation, store it within Hazecast, and Hazecast will automatically replicate that data across the entire cluster.</p><p class="">All the data is stored in memory, which makes requests to that data super fast. </p><p class="">In terms of the Cap theorem, Hazelcast can be configured as an AP (Available, Partition tolerant) system as well as a CP (Consistent, Partition Tolerant) system, which makes it super robust for a variety to use cases.</p><p class="">The main benefit of using Hazelcast over all the previously mentioned solutions is its caching pattern is a lot simpler and cleaner.</p><p class="">With all the previously mentioned solutions, if you have a cache miss, it is the developer’s responsibility to implement a call to the source database to get the data and then <strong>update</strong> the cache. </p><p class="">Similarly, when the data in the source database is updated, it is the developer’s responsibility to write code to <strong>propagate</strong> that update to the cache.</p><p class="">When using Hazecast, the developer doesn’t need to worry about keeping the source database and the cache in sync. It is done automatically.</p><p class="">Another benefit is Hazecast offers the ability to query data in a SQL-like language, which is intuitive for applications that use a SQL database as a main storage engine.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          <a class="
                sqs-block-image-link
                
          
        
              " href="https://topdeveloperacademy.com/course-coupon/software-architecture-design-of-modern-large-scale-systems"
              
          >
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/software-architecture-with-me-image.jpg" data-image-dimensions="750x422" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/software-architecture-with-me-image.jpg?format=1000w" width="750" height="422" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/software-architecture-with-me-image.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/software-architecture-with-me-image.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/software-architecture-with-me-image.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/software-architecture-with-me-image.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/software-architecture-with-me-image.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/software-architecture-with-me-image.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/software-architecture-with-me-image.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          </a>
        

        
      
        </figure>
      

    
  


  



  
  <p class=""><a href="https://topdeveloperacademy.com/course-coupon/software-architecture-design-of-modern-large-scale-systems"><strong>Software Architecture &amp; Design of Modern Large Scale Systems</strong></a></p>


  


  



&nbsp;
  
  <h2>So which solution should I use?</h2><p class="">As with everything in software architecture and system design, it’s always a trade-off.</p><p class="">The best solution always depends on the context and requirements of your system. However, to make the right tradeoffs, you need to have solid software architecture foundations and follow a consistent step-by-step system design process. Without this process, you might make costly mistakes that require a major refactor down the line.</p><p class="">If you are an existing or aspiring software architect looking to solidify your software architecture skills, <strong><em>Top Developer Academy</em></strong> has you covered.</p><p class="">Explore the <strong>highest-rated</strong> and most comprehensive <a href="https://topdeveloperacademy.com/courses"><span class="sqsrte-text-color--black"><strong><em>Software Architecture</em> and <em>System Design</em>&nbsp;courses</strong></span></a> that give you the career boost you’ve been looking for.</p><p class=""><strong>Not ready for a course?</strong> Download the <a href="https://topdeveloperacademy.com/the-5-proven-steps-to-becoming-a-software-architect-technology-leader"><span><span class="sqsrte-text-color--black"><strong>free</strong></span></span></a> Ebook on <a href="https://topdeveloperacademy.com/the-5-proven-steps-to-becoming-a-software-architect-technology-leader"><span class="sqsrte-text-color--black"><strong><em>The 5 Proven Steps to Becoming a Software Architect and technology leader</em></strong></span></a><strong><em>.</em></strong></p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          <a class="
                sqs-block-image-link
                
          
        
              " href="https://topdeveloperacademy.com/the-5-proven-steps-to-becoming-a-software-architect-technology-leader"
              
          >
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg" data-image-dimensions="1428x2000" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=1000w" width="1428" height="2000" sizes="(max-width: 640px) 100vw, (max-width: 767px) 33.33333333333333vw, 33.33333333333333vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          </a>
        

        
      
        </figure>
      

    
  


  



  
  <p class="">Becoming a <strong>software architect </strong>and <strong>technology leader</strong> is the ultimate goal for every software engineer. But you don’t need to wait for it to happen sometime in the far future! </p><p class="">In this guide, I share with you <strong>the 5 proven steps</strong> to becoming a software architect and technology leader today.</p><p class="">Use this free PDF guide to pave your path to success. Your biggest career breakthrough as an engineer is closer than you think.</p>


  


  




  
    
  

<hr />
  
  <h2>More Articles</h2>]]></content:encoded><media:content type="image/jpeg" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1691385374972-PUGTAII9RBCL0AHEDS0U/monitor-g5e39cd279_1280.jpg?format=1500w" medium="image" isDefault="true" width="1280" height="903"><media:title type="plain">Best Distributed Caching Technologies for Architecting High-Performance Systems</media:title></media:content></item><item><title>Top 5 AWS Services for High Scalability Every Software Architect Must Know</title><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Mon, 26 Jun 2023 15:51:11 +0000</pubDate><link>https://topdeveloperacademy.com/articles/top-5-aws-services-for-high-scalability-every-software-architect-must-known</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:64973bdb6e22033fdce9e0a1</guid><description><![CDATA[With the ever-increasing demand from users and the need to handle 
unpredictable traffic spikes, scalability has become the biggest.

AWS has been offering services that simplify architecting and deploying 
highly scalable systems, allowing Software Architects to focus on 
innovative designs and building a profitable business.

In this article, we will cover the 5 most important AWS services any 
software architect needs to know to build highly scalable systems on AWS.]]></description><content:encoded><![CDATA[<p class="">With the ever-increasing demand from users and the need to handle unpredictable traffic spikes, scalability has become the biggest challenge for any Software Architect. In particular those working for a digital business catering to a global audience.</p><p class="">Luckily, Amazon Web Services has long evolved beyond just being an infrastructure rental company. </p><p class="">For many years AWS has been offering services that make architecting and deploying highly scalable systems very easy, allowing Software Architects to focus on innovative designs and building a profitable business.</p><p class="">So in this article, we will cover the 5 most important AWS services any software architect needs to know to build highly scalable systems on AWS.</p><p class="">Those 5 services are available for any company running their system on AWS.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/dbdc47ad-fadc-4a0e-94cb-0e2ff60dc08e/pexels-serpstat-572056.jpg" data-image-dimensions="1280x854" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/dbdc47ad-fadc-4a0e-94cb-0e2ff60dc08e/pexels-serpstat-572056.jpg?format=1000w" width="1280" height="854" sizes="(max-width: 640px) 100vw, (max-width: 767px) 66.66666666666666vw, 66.66666666666666vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/dbdc47ad-fadc-4a0e-94cb-0e2ff60dc08e/pexels-serpstat-572056.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/dbdc47ad-fadc-4a0e-94cb-0e2ff60dc08e/pexels-serpstat-572056.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/dbdc47ad-fadc-4a0e-94cb-0e2ff60dc08e/pexels-serpstat-572056.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/dbdc47ad-fadc-4a0e-94cb-0e2ff60dc08e/pexels-serpstat-572056.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/dbdc47ad-fadc-4a0e-94cb-0e2ff60dc08e/pexels-serpstat-572056.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/dbdc47ad-fadc-4a0e-94cb-0e2ff60dc08e/pexels-serpstat-572056.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/dbdc47ad-fadc-4a0e-94cb-0e2ff60dc08e/pexels-serpstat-572056.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  


&nbsp;
  
  <h2><a href="https://aws.amazon.com/elasticloadbalancing/">​1. <strong>Amazon ELB - Elastic Load Balancer</strong>​</a></h2><p class="">Amazon ELB is a fully managed load-balancing service. </p><p class="">It automatically distributes incoming traffic to multiple application instances.</p><p class="">This allows Software Architects and engineering teams to deploy any application as multiple identical copies running on different computers and route user requests to those computers using different load-balancing strategies.</p><p class=""><strong>Amazon ELB can operate in 3 modes:</strong></p><ul data-rte-list="default"><li><p class="">Application Load Balancer - Layer 7 HTTP load balancing</p></li><li><p class="">Network Load Balancer - Layer 4 TCP/UDP load balancing</p></li><li><p class="">Gateway Load Balancer - Solution for routing traffic, managing and scaling 3rd party virtual appliances.</p></li></ul><p class="">Using ELB, we can run 1000s of application instances transparently to the users, creating the illusion that they all communicate with one massive supercomputer.</p><p class="">Using Amazon ELB, Software Architects or engineers on-call can also monitor their application's health and performance, as all the requests and responses.</p><h2><a href="https://aws.amazon.com/autoscaling/">​<strong>2. AWS Auto Scaling </strong>​</a></h2><p class="">Amazon Auto Scaling service agents run on instances of any of the following AWS services:</p><ul data-rte-list="default"><li><p class=""><em>EC2</em> instances</p></li><li><p class=""><em>DynamoDB</em></p></li><li><p class=""><em>Amazon Aurora </em>replicas</p></li></ul><p class="">Those agents monitor and automatically adjust the capability of those services depending on policies we set ahead of time.</p><p class="">This allows us to increase the number of instances for a service when the load on our system is high and reduce the number of instances when the load on our system is low, which in turn reduces our costs.</p><p class=""><strong>Some of the metrics for Auto Scaling include:</strong></p><ul data-rte-list="default"><li><p class="">The Average CPU utilization of a group of instances.</p></li><li><p class="">The average number of bytes received by a single instance in a group</p></li><li><p class="">The average number of bytes sent out from a single instance in a group</p></li><li><p class="">Average Application Load Balancer requests per target application.</p></li></ul><h2><a href="https://aws.amazon.com/route53/">​<strong>3. AWS Route 53</strong>​</a></h2><p class="">AWS Route53 provides cross-region DNS-based load balancing and failure.</p><p class="">It is a global load-balancing service that helps reach users in any part of the world with consistent performance.</p><p class=""><strong>AWS Route 53 supports routing requests on a variety of strategies, such as:</strong></p><ul data-rte-list="default"><li><p class=""><strong>Latency</strong> - Helps reduce latency between the user and our system</p></li><li><p class=""><strong>Geo DNS</strong> - Helps route traffic based on geographical locations/countries</p></li><li><p class=""><strong>Geo Proximity</strong> - Helps connect the users to servers that are physical closeby</p></li><li><p class=""><strong>Weighted Round Robin</strong> - Distributes traffic to different regions by sending a request to another region every turn.</p></li></ul><p class="">For the complete list of policies, see this <a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html">​link.​</a> </p><p class="">Amazon Route 53 is a perfect solution for systems that offer their services to users in multiple countries/continents.</p>


  


  



<hr />&nbsp;










































  

    

      <figure data-test="image-block-v2-outer-wrapper" class="
            sqs-block-image-figure
            image-block-outer-wrapper
            image-block-v2
            design-layout-stack
            combination-animation-site-default
            individual-animation-site-default
            individual-text-animation-site-default
            image-position-right
            
          " data-scrolled
      >

        
          
            
            
              
              
              
              
              
              
              
              <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg" data-image-dimensions="1428x2000" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=1000w" width="1428" height="2000" sizes="(max-width: 640px) 100vw, (max-width: 767px) 33.33333333333333vw, 33.33333333333333vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

              
            
          
            
          

        

        

      </figure>

    

  



  
  <p class="">Becoming a <strong>software architect </strong>and <strong>technology leader</strong> is the ultimate goal for every software engineer. But you don’t need to wait for it to happen sometime in the far future! </p><p class="">In this guide, I share <strong>the 5 proven steps</strong> to becoming a <strong><em>Software Architect </em></strong>and <strong><em>Technology Leader</em></strong> today.</p><p class="">Use this free PDF guide to pave your path to success. Your biggest career breakthrough as an engineer is closer than you think.</p>


  


  



&nbsp;
  
    
  

&nbsp;<hr />
  
  <h2><a href="https://aws.amazon.com/lambda/">​<strong>4. Amazon Lambda</strong>​</a></h2><p class="">Amazon Lambda is a Serverless offering that allows us to provide a function written in the programming language of our choice, and AWS will run its code in response to predefined events.</p><p class="">Amazon Lambda automatically manages computer resources on our behalf, so we don't need to worry about the following:</p><ul data-rte-list="default"><li><p class="">OS maintenance</p></li><li><p class="">Capacity provisioning</p></li><li><p class="">Automatic scaling</p></li><li><p class="">Security patching</p></li><li><p class="">Monitoring and logging</p></li></ul><p class="">Using Amazon Lambda, we free ourselves from managing server deployments, hiring DevOps, writing and maintaining boilerplate code or scripts, etc.</p><p class="">This is the most cost-effective option if we have seasonal or relatively low traffic or want to avoid managing a fully-fledged service's complexities.</p><h2><a href="https://aws.amazon.com/kinesis/">​<strong>5. Amazon Kinesis</strong>​</a></h2><p class="">Amazon Kinesis is a fully managed message broker and streaming solution allowing real-time ingesting, buffering, and streaming data.</p><p class="">It supports <a href="https://docs.aws.amazon.com/streams/latest/dev/how-do-i-size-a-stream.html">​2 modes​</a> of managing its capacity:</p><ul data-rte-list="default"><li><p class=""><strong>Provisioned - </strong>You must specify the number of shards for the data stream. The total capacity of a data stream is the sum of the capacities of its shards.</p></li><li><p class=""><strong>On-demand (My favorite) </strong>- Require no capacity planning and automatically scale to handle gigabytes of write and read throughput per minute</p></li></ul><p class="">Amazon Kinesis includes the following services for different purposes:</p><ul data-rte-list="default"><li><p class=""><a href="https://aws.amazon.com/kinesis/video-streams/">​<em>Kinesis Video Streams </em>​</a>- Video ingestion</p></li><li><p class=""><a href="https://aws.amazon.com/kinesis/data-streams/">​<em>Kinesis Data Streams</em>​</a> - Data ingestion</p></li><li><p class=""><a href="https://aws.amazon.com/kinesis/data-firehose/">​<em>Kinesis Firehose</em>​</a><em> </em>- Loading data to data lakes and warehouses</p></li><li><p class=""><a href="https://aws.amazon.com/kinesis/data-analytics/">​<em>Kinesis Data Analytics</em>​</a> - Data processing and analysis </p></li></ul><p data-rte-preserve-empty="true" class=""></p><p class="">If you are entirely new to the above-mentioned scalability concepts and Software Architecture building blocks, or you’d like to deepen your knowledge of <strong><em>Software Architecture</em></strong>, <strong><em>System Design</em></strong>, or <strong><em>Cloud Computing,</em></strong> check out our <a href="https://topdeveloperacademy.com/courses"><strong>Software Architecture courses</strong></a>. </p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          <a class="
                sqs-block-image-link
                
          
        
              " href="https://www.udemy.com/course/software-architecture-design-of-modern-large-scale-systems/?referralCode=DE4EE6D86D9185FB85A0"
              
          >
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/Software+Architecture+%26+Design+of+Large+Scale+Systems" data-image-dimensions="750x422" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/Software+Architecture+%26+Design+of+Large+Scale+Systems?format=1000w" width="750" height="422" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/Software+Architecture+%26+Design+of+Large+Scale+Systems?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/Software+Architecture+%26+Design+of+Large+Scale+Systems?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/Software+Architecture+%26+Design+of+Large+Scale+Systems?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/Software+Architecture+%26+Design+of+Large+Scale+Systems?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/Software+Architecture+%26+Design+of+Large+Scale+Systems?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/Software+Architecture+%26+Design+of+Large+Scale+Systems?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/Software+Architecture+%26+Design+of+Large+Scale+Systems?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          </a>
        

        
          
          <figcaption class="image-caption-wrapper">
            <h4><a href="https://www.udemy.com/course/software-architecture-design-of-modern-large-scale-systems/?referralCode=DE4EE6D86D9185FB85A0"><strong>Software Architecture &amp; Design of Large Scale Systems</strong></a></h4>
          </figcaption>
        
      
        </figure>
      

    
  


  


&nbsp;
  
  <p class="">These self-paced online courses are perfect for busy engineers who want to grow their careers and become subject matter experts in Software Architecture. Check out the following <a href="https://topdeveloperacademy.com/courses"><strong>link</strong></a> for the complete list of <strong><em>Top Developer Academy</em></strong>’s online courses.</p><p class=""><strong>Not ready for a course?</strong> Download the <a href="https://topdeveloperacademy.com/the-5-proven-steps-to-becoming-a-software-architect-technology-leader"><span><span class="sqsrte-text-color--black"><strong>free</strong></span></span></a> Ebook on <a href="https://topdeveloperacademy.com/the-5-proven-steps-to-becoming-a-software-architect-technology-leader"><span class="sqsrte-text-color--accent"><strong><em>The 5 Proven Steps to Becoming a Software Architect and technology leader</em></strong></span></a><span class="sqsrte-text-color--accent"><strong><em>.</em></strong></span></p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg" data-image-dimensions="1428x2000" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=1000w" width="1428" height="2000" sizes="(max-width: 640px) 100vw, (max-width: 767px) 33.33333333333333vw, 33.33333333333333vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1632264623250-12GJW5F2GMYU981WM8NA/The+5+Proven+Steps+to+Becoming+a+Software+Architect+and+Technology+Leader.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <p class="">Becoming a <strong>software architect </strong>and <strong>technology leader</strong> is the ultimate goal for every software engineer. But you don’t need to wait for it to happen sometime in the far future! </p><p class="">In this guide, I share <strong>the 5 proven steps</strong> to becoming a <strong><em>Software Architect </em></strong>and <strong><em>Technology Leader</em></strong> today.</p><p class="">Use this free PDF guide to pave your path to success. Your biggest career breakthrough as an engineer is closer than you think.</p>


  


  




  
    
  

&nbsp;<hr />
  
  <h2>More Articles</h2>]]></content:encoded><media:content type="image/jpeg" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1687795342940-KC0MEO8GCWY3GXR5HYO4/pexels-serpstat-572056.jpg?format=1500w" medium="image" isDefault="true" width="1280" height="854"><media:title type="plain">Top 5 AWS Services for High Scalability Every Software Architect Must Know</media:title></media:content></item><item><title>The 5 Reasons Why System Design Interview Questions are Hard and What to Do About It</title><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Sun, 15 Jan 2023 00:43:58 +0000</pubDate><link>https://topdeveloperacademy.com/articles/the-5-reasons-why-system-design-interview-questions-are-hard-and-what-to-do-about-it</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:63c2e98eef8ba13566049fdd</guid><description><![CDATA[System Design Interviews are an integral part of the hiring process for 
almost all tech companies.

However, most software engineers struggle with System Design Interviews. In 
the article, we will understand why System Design Interviews are so hard 
for even the most experienced software developers and, most importantly, 
what to do about it.]]></description><content:encoded><![CDATA[<p class="">In recent years, System Design Interviews have become an integral part of the hiring process for almost all tech companies. They are particularly popular and notoriously difficult at top tech companies like <em>Google, Amazon, Microsoft, Facebook</em>, and <em>Netflix</em>, and for a good reason. </p><p class="">Those companies operate some of the world's most complex and successful software systems. They are constantly pushing the boundaries of fields like <em>Distributed Systems, Cloud Computing</em> infrastructure, and <em>Software Architecture</em> to improve the end user’s experience while keeping operating costs to the minimum. Those companies want to ensure that the engineers they hire can continue making solid design and architecture decisions to keep their competitive edge, which is what System Design interviews are all about. </p><p class="">However, most software engineers struggle with System Design Interviews, which remains a big obstacle in their career progression and the ability to land their dream job. So in the article, we will understand why System Design Interviews are so hard for even the most experienced software developers and, most importantly, what to do about it.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/15869343-c8f5-4b01-8ef4-43304177629a/pexels-startup-stock-photos-7367.jpg" data-image-dimensions="1280x853" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/15869343-c8f5-4b01-8ef4-43304177629a/pexels-startup-stock-photos-7367.jpg?format=1000w" width="1280" height="853" sizes="(max-width: 640px) 100vw, (max-width: 767px) 66.66666666666666vw, 66.66666666666666vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/15869343-c8f5-4b01-8ef4-43304177629a/pexels-startup-stock-photos-7367.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/15869343-c8f5-4b01-8ef4-43304177629a/pexels-startup-stock-photos-7367.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/15869343-c8f5-4b01-8ef4-43304177629a/pexels-startup-stock-photos-7367.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/15869343-c8f5-4b01-8ef4-43304177629a/pexels-startup-stock-photos-7367.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/15869343-c8f5-4b01-8ef4-43304177629a/pexels-startup-stock-photos-7367.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/15869343-c8f5-4b01-8ef4-43304177629a/pexels-startup-stock-photos-7367.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/15869343-c8f5-4b01-8ef4-43304177629a/pexels-startup-stock-photos-7367.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  


&nbsp;
  
  <ol data-rte-list="default"><li><h2>Scope</h2></li></ol><p class="">A typical task for a junior, mid-level, or even senior engineer generally has a very narrow and well-defined scope. </p><p class="">Examples include:</p><ul data-rte-list="default"><li><p class="">Adding a feature that does X</p></li><li><p class="">Fixing a bug to produce X result instead of Y</p></li><li><p class="">Implementing a method, class, or API that produces an expected, easily testable result or outcome</p></li></ul><p class="">However, the scope of a <strong>typical</strong> System Design interview question ranges from one of a Principle Software Engineer to a CTO/ Software Architect of a company.</p><p class="">And while 1-2 engineers can easily implement most tasks we generally work on, the scope of a System Design interview question requires 10-1000 engineers to implement across multiple months or even years. </p><p class=""><strong>So how do you handle tasks in a scope that you’ve never handled before and doesn’t even fit in your head?</strong></p><p class="">The answer to this is “<strong>abstraction</strong>”.</p><p class="">An experienced Software Architect doesn’t deal with implementation details, methods, classes, or even modules. And it’s not because they are not technical or don’t like coding. They developed the muscle to think and reason about system design problems on a much higher level of abstraction, where code, libraries, or even programming languages are too insignificant and even distracting. </p><p class="">So to be successful at a System Design Interview, you need to start thinking of big problems on a much higher level of abstraction.</p><h2>2. Ambiguity</h2><p class="">In a typical daily task of a software developer, ambiguity is minimal. Sometimes we are not sure how to use a method of a library or how to implement an algorithm optimally. But we can always find the answer on <a href="https://stackoverflow.com">StackOverflow</a> or in the documentation of that library. And when we don’t find the answer, we can simply prototype and discover the answer ourselves. </p><p class="">However, when we move to a <strong>higher level of abstraction</strong> and design a large system that potentially may not have been designed by anyone before, we don’t have that luxury. No documentation comes with designing the next <em>Uber</em> or <em>TikTok.</em> And no <a href="https://stackoverflow.com">StackOverflow</a> thread exists for solving a system design problem that has never been solved before. </p><p class="">Additionally, the scope of architecting a large-scale system doesn’t allow us to mindlessly prototype and see what works best because even prototyping is a large endeavor. </p><p class="">To make things even more challenging, in some cases, the client or product managers initiating a system design don’t have all the answers upfront, so the Software Architect's job is to ask those questions and reduce the ambiguity. </p><p class="">That is why System Design Interview questions are sometimes deliberately ambiguous, to test if a candidate can handle and find their way through the unknowns. Since most software engineers are not used to this level of ambiguity, they often find themselves lost and disoriented during such interviews.</p><p class=""><strong>So what to do about it?</strong></p><ul data-rte-list="default"><li><p class=""><strong>Acknowledge</strong> the inherent ambiguity of a System Design question.</p></li><li><p class=""><strong>Ask</strong> intelligent questions that reduce ambiguity to the minimum.</p></li><li><p class="">Make common sense <strong>assumptions</strong> about what ambiguity is left after narrowing down the scope of the problem.</p></li><li><p class=""><strong>Architect</strong> the system in a way that leaves room to back away from those assumptions with minimal changes to the Software Architecture of the system.</p></li></ul><p class="">Following those principles will lead you to a successful outcome of a System Design Interview because, by the end of an interview, the interviewer will be confident that you will make good design choices in architecting a real-life system, despite its ambiguity. </p><p class="">Needless to say, you should also follow those principles when you design a real system.</p><h2>3. There is No One Right Answer</h2><p class="">As software developers, we are always looking for <strong>the right answer</strong>. That is how we were wired in school when we learned algorithms and data structures, for instance, we always look for the best and most optimal solution. When using a library in our application, there’s usually only one right method that we need to call for each task. Otherwise, the API is considered bad and confusing.</p><p class="">System Design is all about Trade-offs.</p><p class="">Trade-offs in system design can be hard because they often involve balancing multiple competing factors. For example, a system may need to be designed to be both cost-effective and performant. These two factors may conflict, as increasing performance often comes at a higher cost. Additionally, the trade-offs can be hard to evaluate, as it may be hard to predict future use cases and scalability requirements. </p><p class="">An inexperienced engineer may panic and think, “oh, there are two possible options; I don’t know which one is correct. I must be wrong”. </p><p class="">But that’s actually OK. You are not expected to develop an optimal solution at a System Design Interview! </p><p class="">Instead, you must demonstrate that you can identify where such trade-offs need to be made. Weigh in the pros and cons for each. And use your judgment, based on assumptions or data the interview gives you, to make that trade-off and move on.</p><h2>4. Communication</h2><p class="">Let’s face it. Software Engineering attracts a disproportionally high number of introverts. Even extroverts like myself sometimes find it liberating to spend the entire day coding. However, System Design Interviews require a high level of communication skills. </p><p class="">The entire interview is actually one long discussion. The ability to discuss the problem with your interviewer, gather the requirements, explain your solution, and the thought process is sometimes even more important than the solution itself.</p><p class="">However, if you ask too many questions, then that is a red flag that may indicate you are incompetent.</p><p class="">If you talk too much and don’t ask any questions. That is also a red flag because that indicates that if you were given a real project to design, you would just run and implement it without clarifying that you are doing the right thing.</p><p class="">So the key is to find a balance. </p><p class="">Make it a two-way conversation that you drive most of the time, but allow your interviewer to take the reins when necessary.</p><h2>5. Lack of Experience &amp; Software Architecture Skills</h2><p class="">In computer science programs at most colleges and universities, there is a big focus on what many refer to as low-level design and core computer science/programming fundamentals. </p><ul data-rte-list="default"><li><p class=""><em>Data structures &amp; algorithms</em></p></li><li><p class=""><em>Programming languages</em></p></li><li><p class=""><em>Object Oriented Design</em></p></li><li><p class=""><em>Networking and Computer Architecture</em> </p></li></ul><p class="">Those are all important skills, rightfully emphasized by the education system and entry-level interviews. </p><p class="">However, the longer you work as a software engineer, the more you’re expected to naturally become proficient in “high-level design” and Software Architecture. So when you come to a System Design Interview or even just a typical job interview for a senior-level position, you are <span>expected</span> to demonstrate such skills.</p><p class="">But the reality is most developers don’t get to design such systems in their daily jobs. And even if you’re lucky to work at a company that runs large-scale, globally distributed systems, learning how they work on your own is not easy. </p><p class="">So you may have a <em>resume</em> working on a large-scale system, but in practice, you cannot design one on your own.</p><p class="">If this resonates with you, <strong>you’re not alone</strong>. </p><p class="">Most software developers don’t get to design the next Google or Facebook at their work. And it may take years before your manager assigns you a task that scratches the surface of that kind of scope.</p><p class=""><strong>So what to do about it? Be proactive.</strong></p><p class="">If you are determined to <strong>accelerate</strong> your career growth, you must fill in your knowledge/skillset gaps <strong>without</strong> relying on your company/manager to hand it to you. And learning how to design such systems in practice, not only for an upcoming System Design Interview but for your own professional career progression, is super important.</p><p class="">That is why I created the <a href="https://www.udemy.com/course/software-architecture-design-of-modern-large-scale-systems/?referralCode=DE4EE6D86D9185FB85A0"><strong>Software Architecture &amp; Design of Large Scale Systems</strong></a> course.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          <a class="
                sqs-block-image-link
                
          
        
              " href="https://www.udemy.com/course/software-architecture-design-of-modern-large-scale-systems/learn/?referralCode=DE4EE6D86D9185FB85A0"
              
          >
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/Software+Architecture+%26+Design+of+Large+Scale+Systems" data-image-dimensions="750x422" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/Software+Architecture+%26+Design+of+Large+Scale+Systems?format=1000w" width="750" height="422" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/Software+Architecture+%26+Design+of+Large+Scale+Systems?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/Software+Architecture+%26+Design+of+Large+Scale+Systems?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/Software+Architecture+%26+Design+of+Large+Scale+Systems?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/Software+Architecture+%26+Design+of+Large+Scale+Systems?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/Software+Architecture+%26+Design+of+Large+Scale+Systems?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/Software+Architecture+%26+Design+of+Large+Scale+Systems?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1b195b97-6d03-4988-9d98-b8240eaa9028/Software+Architecture+%26+Design+of+Large+Scale+Systems?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          </a>
        

        
          
          <figcaption class="image-caption-wrapper">
            <p class=""><a href="https://www.udemy.com/course/software-architecture-design-of-modern-large-scale-systems/?referralCode=DE4EE6D86D9185FB85A0"><strong>Software Architecture &amp; Design of Large Scale Systems</strong></a></p>
          </figcaption>
        
      
        </figure>
      

    
  


  


&nbsp;
  
  <p class="">In this self-paced and easy-to-follow online course, you will learn the fundamentals of designing and architecting large-scale systems, which are critical for any System Design Interview.</p><p class="">Unlike many other System Design resources, this course is not focused on teaching you buzzwords to throw at your interviewer or memorizing names of technologies that will become irrelevant in 1-2 years. </p><p class="">Instead, this course will teach the fundamental skills of:</p><ul data-rte-list="default"><li><p class="">Designing a large-scale, real-life system.</p></li><li><p class="">Making correct system design choices and tradeoffs, and.</p></li><li><p class="">Following industry-proven best practices. </p></li></ul><p class="">By the end of the course, you will have the skills and confidence to handle any System Design Interview question and real, practical software architecture skills you can use in your next project. </p>


  


  



<hr />
  
  <h2>More Articles</h2>]]></content:encoded><media:content type="image/jpeg" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1673742807734-C3KU7SKALJXYFNTLJHEE/pexels-startup-stock-photos-7367.jpg?format=1500w" medium="image" isDefault="true" width="1280" height="853"><media:title type="plain">The 5 Reasons Why System Design Interview Questions are Hard and What to Do About It</media:title></media:content></item><item><title>Top 5 Books for Software Engineers and Software Architects</title><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Sat, 11 Jun 2022 20:39:44 +0000</pubDate><link>https://topdeveloperacademy.com/articles/top-5-books-for-software-engineers-and-software-architects</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:62a4fd90dfa40246cb59a4bc</guid><description><![CDATA[Software engineers need to keep learning, continuously to be successful at 
their job.

In this article I will share with you the 5 top books for learning and 
improving your software architecture and software development skills.]]></description><content:encoded><![CDATA[<p class="sqsrte-large">Unlike many other professions, software engineers need to keep learning, continuously to be successful at their job. However, there is only so much you can learn on the job so your approach to learning needs to be proactive and strategic.</p><p class="sqsrte-large">In this article I will share with you the 5 top books for learning and improving your <strong><em>software architecture</em></strong> and <strong><em>software development </em></strong><em>skills.</em></p><p class="sqsrte-large">I consider those books a <strong>must-read</strong> for any software engineer who’s serious about their career progression, especially for those who aspire to become <strong>software architects</strong> or <strong>technical leads. </strong></p><p class="sqsrte-large">It’s also never too late or too early to read them. So whether you just landed your first full-time job, or have been in the industry for many years, you are guaranteed to learn something new and valuable from those books.</p>


  


  














































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/5dbba48d-23ff-46c4-9ce2-d7b9c4386ce0/Software+Engineering+and+Software+Architecture+Books" data-image-dimensions="2400x1602" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/5dbba48d-23ff-46c4-9ce2-d7b9c4386ce0/Software+Engineering+and+Software+Architecture+Books?format=1000w" width="2400" height="1602" sizes="(max-width: 640px) 100vw, (max-width: 767px) 100vw, 100vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/5dbba48d-23ff-46c4-9ce2-d7b9c4386ce0/Software+Engineering+and+Software+Architecture+Books?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/5dbba48d-23ff-46c4-9ce2-d7b9c4386ce0/Software+Engineering+and+Software+Architecture+Books?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/5dbba48d-23ff-46c4-9ce2-d7b9c4386ce0/Software+Engineering+and+Software+Architecture+Books?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/5dbba48d-23ff-46c4-9ce2-d7b9c4386ce0/Software+Engineering+and+Software+Architecture+Books?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/5dbba48d-23ff-46c4-9ce2-d7b9c4386ce0/Software+Engineering+and+Software+Architecture+Books?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/5dbba48d-23ff-46c4-9ce2-d7b9c4386ce0/Software+Engineering+and+Software+Architecture+Books?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/5dbba48d-23ff-46c4-9ce2-d7b9c4386ce0/Software+Engineering+and+Software+Architecture+Books?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <h2>Why Those Books?</h2><p class="sqsrte-large">The 3 criteria for choosing this list of top 5 software engineering &amp; software architecture books are:</p><ul data-rte-list="default"><li><p class="sqsrte-large">The <strong>credibility</strong> and experience of the author(s)</p></li><li><p class="sqsrte-large">The <strong>impact</strong> those books have made on the community since they were published</p></li><li><p class="sqsrte-large">The <strong>practicality</strong> and <strong>relevance</strong> of its content to our job as software developers or software architects</p></li></ul><p class="sqsrte-large">By reading those books, you will get the biggest return on your investment and learn from some of the best thought leaders in the industry. </p><p class="sqsrte-large">And if you want to support the tremendous effort these authors took to shared their knowledge with all of use, you will find links to where you can purchase their book, in each section.</p><p class="sqsrte-large">So without further ado, here is the list of top books any software engineer and software architect needs to read:</p><ol data-rte-list="default"><li><h2><a href="https://amzn.to/3OtmNkp"><span class="sqsrte-text-color--black">Software Engineering at Google: Lessons Learned from Programming Over Time</span></a></h2></li></ol>


  


  




  
    <a href="https://www.amazon.com/Software-Engineering-Google-Lessons-Programming/dp/B08VKLTB9X?crid=OHHA7L1NIVVA&amp;keywords=Software+Engineering+at+Google%3A+Lessons+Learned+from+Programming+Over+Time&amp;qid=1655688130&amp;sprefix=software+engineering+at+google+lessons+learned+from+programming+over+time%2Caps%2C131&amp;sr=8-1-fkmr0&amp;linkCode=li3&amp;tag=topdevelopera-20&amp;linkId=a5949132e2b4194c29f706e486357c2f&amp;language=en_US&amp;ref_=as_li_ss_il" target="_blank"><img border="0" src="//ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B08VKLTB9X&amp;Format=_SL250_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=topdevelopera-20&amp;language=en_US" ></a><img src="https://ir-na.amazon-adsystem.com/e/ir?t=topdevelopera-20&amp;language=en_US&amp;l=li3&amp;o=1&amp;a=B08VKLTB9X" width="1" height="1" border="0" alt="" />
  


  
  <p class="sqsrte-large"><strong>Authors:</strong> Titus Winters (Senior Staff Software Engineer at Google) and Hyrum Wright (Staff Software Engineer at Google) </p><p class="sqsrte-large"><strong>Description:</strong>&nbsp;&nbsp;<a href="https://amzn.to/3xz2uey" target="_blank">This book</a>&nbsp;is one of for most comprehensive guides to software engineering. By drawing a distinct line between&nbsp;<em>programming</em>&nbsp;and&nbsp;<em>software engineering</em>,&nbsp;<a href="https://amzn.to/3xz2uey" target="_blank">this book</a>&nbsp;illustrates the challenges of managing a living and constantly evolving codebase. In addition, the others also share a lot of their experience, architecting and developing software on a Google scale.</p><p class="sqsrte-large">Some of the topics covered in this book include technical topics like&nbsp;<em>Code Review, Continuous Integration / Continuous Delivery, Build Systems, and Testing</em>&nbsp;</p><p class="sqsrte-large">As well as Software Architecture and leadership skills such as&nbsp;<em>Leading Teams at Scale, Managing Development Productivity and Effective Knowledge sharing. </em></p>


  


  








   
    <a href="https://amzn.to/3xz2uey" class="sqs-block-button-element--medium sqs-button-element--primary sqs-block-button-element" data-sqsp-button
      
    >
      Get the Book
    </a>
    

  


  




<hr />
  
  <h2><span class="sqsrte-text-color--darkAccent">2. </span><a href="https://amzn.to/39EB4fq"><span class="sqsrte-text-color--darkAccent">Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems</span></a></h2>


  


  




  
    <a href="https://www.amazon.com/Designing-Data-Intensive-Applications-Reliable-Maintainable/dp/1449373321?crid=2Z3ZQCRVULNB5&amp;keywords=Designing+Data-Intensive+Applications%3A+The+Big+Ideas+Behind+Reliable%2C+Scalable%2C+and+Maintainable+Systems&amp;qid=1655688953&amp;s=audible&amp;sprefix=designing+data-intensive+applications+the+big+ideas+behind+reliable%2C+scalable%2C+and+maintainable+systems%2Caudible%2C78&amp;sr=1-1-catcorr&amp;linkCode=li3&amp;tag=topdevelopera-20&amp;linkId=5fa34a502fcc216bf0fed0da11c26cc2&amp;language=en_US&amp;ref_=as_li_ss_il" target="_blank"><img border="0" src="//ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=1449373321&amp;Format=_SL250_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=topdevelopera-20&amp;language=en_US" ></a><img src="https://ir-na.amazon-adsystem.com/e/ir?t=topdevelopera-20&amp;language=en_US&amp;l=li3&amp;o=1&amp;a=1449373321" width="1" height="1" border="0" alt="" />
  


  
  <p class="sqsrte-large"><strong>Author:</strong> Martin Kleppmann - Senior Research Associate and Affiliated Lecturer at the <a href="http://www.cst.cam.ac.uk/"><span>University of Cambridge Department of Computer Science and Technology</span></a><span>, </span> co-founded <a href="https://www.crunchbase.com/organization/rapportive">Rapportive</a> (<a href="http://allthingsd.com/20120207/linkedin-is-acquiring-contacts-start-up-rapportive/">acquired</a> by <a href="https://www.linkedin.com/">LinkedIn</a> in 2012) and <a href="https://www.crunchbase.com/organization/go-test-it">Go Test It</a> (<a href="https://thenextweb.com/uk/2009/12/02/red-gate-software-acquire-gotestit-testing-environment-start-ups/">acquired</a> by <a href="https://www.red-gate.com/">Red Gate Software</a> in 2009).</p><p class="sqsrte-large"><strong>Description:&nbsp;</strong><a href="https://amzn.to/39EB4fq" target="_blank">In this</a>&nbsp;practical and comprehensive guide, Martin Kleppmann helps software engineers and software architects navigate through a wide landscape of tools and technologies for building highly scalable data-intensive applications.</p><p class="sqsrte-large">This book will help you make informed decisions and trade-offs around consistency, scalability, fault tolerance, and complexity.</p><p class="sqsrte-large">Some of the topics covered in the book include&nbsp;<em>Designing Reliable, Scalable, and Maintainable Applications, Data Models and Query Languages, Data Storage, Distribution, Encoding, and Processing. </em></p>


  


  








   
    <a href="https://amzn.to/39EB4fq" class="sqs-block-button-element--medium sqs-button-element--primary sqs-block-button-element" data-sqsp-button
      
    >
      Get the Book
    </a>
    

  


  




<hr />
  
  <h2><span class="sqsrte-text-color--darkAccent">3. </span><a href="https://amzn.to/3y2kFdY"><span class="sqsrte-text-color--darkAccent">Refactoring: Improving the Design of Existing Code</span></a></h2><p class="sqsrte-large"><strong>Author: </strong>Martin Fowler - Software Developer, Author and public Speaker</p>


  


  




  
    <a href="https://www.amazon.com/Refactoring-Improving-Existing-Addison-Wesley-Signature/dp/0134757599?crid=2A2OBFR1FRNY3&amp;keywords=Refactoring%3A+Improving+the+Design+of+Existing+Code&amp;qid=1655688837&amp;s=audible&amp;sprefix=refactoring+improving+the+design+of+existing+code%2Caudible%2C136&amp;sr=1-1-catcorr&amp;linkCode=li3&amp;tag=topdevelopera-20&amp;linkId=cd14f5103e0a9a5caa4b545812a7a51f&amp;language=en_US&amp;ref_=as_li_ss_il" target="_blank"><img border="0" src="//ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=0134757599&amp;Format=_SL250_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=topdevelopera-20&amp;language=en_US" ></a><img src="https://ir-na.amazon-adsystem.com/e/ir?t=topdevelopera-20&amp;language=en_US&amp;l=li3&amp;o=1&amp;a=0134757599" width="1" height="1" border="0" alt="" />
  


  
  <p class="sqsrte-large"><strong>Description:&nbsp;</strong><em>“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”&nbsp;</em></p><p class="sqsrte-large">When we talk about  “good code” we often think of efficient algorithms or optimal data structures. However, since the majority of developers’ time is spent&nbsp;<strong>reading code</strong>&nbsp;and not writing it, there’s another equally important aspect to programming, and that is&nbsp;<strong>code readability</strong>.&nbsp;</p><p class="sqsrte-large"><a href="https://amzn.to/3y2kFdY" target="_blank">This book</a>&nbsp;focuses on this human aspect of software development and talks about the important topics of refactoring, detecting code smells, and testing. </p>


  


  








   
    <a href="https://amzn.to/39EB4fq" class="sqs-block-button-element--medium sqs-button-element--primary sqs-block-button-element" data-sqsp-button
      
    >
      Get the Book
    </a>
    

  


  




<hr />
  
  <h2>4. <a href="https://amzn.to/3OvTnCn"><span class="sqsrte-text-color--darkAccent">Practical Cloud Security: A Guide for Secure Design and Deployment</span></a></h2>


  


  




  
    <a href="https://www.amazon.com/Practical-Cloud-Security-Secure-Deployment/dp/1492037516?crid=3NMZQ8WLLYKOP&amp;keywords=Practical+Cloud+Security%3A+A+Guide+for+Secure+Design+and+Deployment&amp;qid=1655689040&amp;s=audible&amp;sprefix=practical+cloud+security+a+guide+for+secure+design+and+deployment%2Caudible%2C181&amp;sr=1-1&amp;linkCode=li3&amp;tag=topdevelopera-20&amp;linkId=374344db18d27cd99da32e25be0fd815&amp;language=en_US&amp;ref_=as_li_ss_il" target="_blank"><img border="0" src="//ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=1492037516&amp;Format=_SL250_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=topdevelopera-20&amp;language=en_US" ></a><img src="https://ir-na.amazon-adsystem.com/e/ir?t=topdevelopera-20&amp;language=en_US&amp;l=li3&amp;o=1&amp;a=1492037516" width="1" height="1" border="0" alt="" />
  


  
  <p class="sqsrte-large"><strong>Author:</strong> Chris Dotson -  IBM Distinguished Engineer and an executive security architect for IBM Cloud</p><p class="sqsrte-large"><strong>Description</strong>: Security is a top priority for any company, and cloud-based public-facing systems are particularly vulnerable.&nbsp;</p><p class="sqsrte-large"><a href="https://amzn.to/39yGusp" target="_blank">This book</a>&nbsp;is the most comprehensive, hands-on cloud security resource for any software developer, software architect, or security professional working on&nbsp;<a href="https://aws.amazon.com" target="_blank">AWS</a>,&nbsp;<a href="https://azure.microsoft.com" target="_blank">Microsoft Azure</a>, and&nbsp;<a href="https://www.ibm.com/cloud" target="_blank">IBM Cloud</a>.&nbsp;&nbsp;</p><p class="sqsrte-large">Some of the topics covered by this book include&nbsp;<em>Data Management and Protection, Identity Management and Protection, Network Security,  Detecting and Responding to Security Incidents, and Recovering from Security Incidents.</em></p>


  


  








   
    <a href="https://amzn.to/39EB4fq" class="sqs-block-button-element--medium sqs-button-element--primary sqs-block-button-element" data-sqsp-button
      
    >
      Get the Book
    </a>
    

  


  




<hr />
  
  <h2><span class="sqsrte-text-color--darkAccent">5. </span><a href="https://amzn.to/3HDjBkb"><span class="sqsrte-text-color--darkAccent">Design Patterns: Elements of Reusable Object-Oriented Software</span></a></h2><p class="sqsrte-large"><strong>Authors</strong>: <a href="https://en.wikipedia.org/wiki/Gang_of_Four"><em>“The Gang of Four”</em></a>:</p>


  


  




  
    <a href="https://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional-ebook/dp/B000SEIBB8?crid=2JMDQMSAO8GBF&amp;keywords=design+patterns+elements+of+reusable+object-oriented+software&amp;qid=1655684302&amp;s=digital-text&amp;sprefix=design+pa%2Cdigital-text%2C71&amp;sr=1-1&amp;linkCode=li3&amp;tag=topdevelopera-20&amp;linkId=a6f723c154dc820f42e1ee547b1ddd17&amp;language=en_US&amp;ref_=as_li_ss_il" target="_blank"><img border="0" src="//ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B000SEIBB8&amp;Format=_SL250_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=topdevelopera-20&amp;language=en_US" ></a><img src="https://ir-na.amazon-adsystem.com/e/ir?t=topdevelopera-20&amp;language=en_US&amp;l=li3&amp;o=1&amp;a=B000SEIBB8" width="1" height="1" border="0" alt="" />
  


  
  <ul data-rte-list="default"><li><p class="sqsrte-large">Erich Gamma - Swiss Computer Scientist and co-creator of <a href="https://en.wikipedia.org/wiki/JUnit" title="JUnit">JUnit</a></p></li></ul><ul data-rte-list="default"><li><p class="sqsrte-large">Richard Helm - Former IBM Research Staff member</p></li><li><p class="sqsrte-large">Ralph Johnson - Research Associate Professor in the Department of Computer Science at the <a href="https://en.wikipedia.org/wiki/University_of_Illinois_at_Urbana-Champaign" title="University of Illinois at Urbana-Champaign">University of Illinois at Urbana-Champaign</a> </p></li><li><p class="sqsrte-large">John Vlissides - Former researcher at IBM's T.J. Watson Research Center</p></li></ul><p class="sqsrte-large"><strong>Description:</strong>&nbsp;If you develop and architect software in an Objected Oriented Programming language, such as Java, C#, C++, or Python,&nbsp;<a href="https://amzn.to/3HDjBkb" target="_blank">this book</a>&nbsp;is an absolute must-read.&nbsp;</p><p class="sqsrte-large">It contains a catalog of 23 simple and succinct solutions to commonly occurring design problems that any software developer or software architect needs to know.&nbsp;&nbsp;</p><p class="sqsrte-large">The patterns are split into 3 categories:&nbsp;</p><ul data-rte-list="default"><li><p class="sqsrte-large">Creational Patterns</p></li><li><p class="sqsrte-large">Structural Patterns</p></li><li><p class="sqsrte-large">Behavioral Patterns</p></li></ul><p class="sqsrte-large">Each pattern describes the unique circumstances where the pattern is applicable as well as the consequences and trade-offs of using the pattern within a larger design.</p><p class="sqsrte-large">Since the publication of this book, these&nbsp;<em>design patterns</em>&nbsp;became the #1 skill expected from any experienced software engineer and architect, and very often come up in job interviews.</p>


  


  








   
    <a href="https://amzn.to/3HDjBkb" class="sqs-block-button-element--medium sqs-button-element--primary sqs-block-button-element" data-sqsp-button
      
    >
      Get the Book
    </a>
    

  


  




<hr />
  
  <h2>Want to Learn More?</h2><p class="sqsrte-large">If you are a highly motivated software engineer and want to learn more advanced topics like:</p><ul data-rte-list="default"><li><p class="sqsrte-large"><a href="https://www.udemy.com/course/software-architecture-design-of-modern-large-scale-systems/?referralCode=DE4EE6D86D9185FB85A0"><strong><em>Software Architecture</em></strong></a></p></li><li><p class="sqsrte-large"><a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C"><strong><em>High Performance</em></strong></a></p></li><li><p class="sqsrte-large"><a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C"><strong><em>Multithreading and Concurrency</em></strong></a></p></li><li><p class="sqsrte-large"><a href="https://www.udemy.com/course/distributed-systems-cloud-computing-with-java/?referralCode=F724C3469E1CA3C3BAD8"><strong><em>Distributed Systems</em></strong></a></p></li><li><p class="sqsrte-large"><a href="https://www.udemy.com/course/distributed-systems-cloud-computing-with-java/?referralCode=F724C3469E1CA3C3BAD8"><strong><em>Cloud Computing</em></strong></a></p></li><li><p class="sqsrte-large"><a href="https://topdeveloperacademy.com/courses"><strong><em>And More</em></strong></a></p></li></ul><p class="sqsrte-large">Make sure to check out these&nbsp;<strong>top-rated</strong>&nbsp;and&nbsp;<strong>best-selling</strong>&nbsp;<a href="https://topdeveloperacademy.com/courses" target="_blank"><strong>hands-on online courses</strong></a>, designed specifically for busy professionals who want to take their careers to the next level.</p><p class="sqsrte-large">No time is wasted. All the topics are hand-crafted to bring you the most value.</p><p class="sqsrte-large">No fillers., no lengthy introductions, and no-holding back!</p>


  


  



<hr />
  
  <h2>More Articles</h2>]]></content:encoded><media:content type="image/jpeg" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1655739265135-6TCNJY7FVM2AQOXXYGUN/christina-wocintechchat-com-jEGi-CghvjE-unsplash.jpg?format=1500w" medium="image" isDefault="true" width="1500" height="1001"><media:title type="plain">Top 5 Books for Software Engineers and Software Architects</media:title></media:content></item><item><title>Python Multithreading vs. Java Multithreading - Important Considerations for High Performance Programming</title><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Wed, 16 Mar 2022 17:58:13 +0000</pubDate><link>https://topdeveloperacademy.com/articles/python-multithreading-vs-java-multithreading-important-considerations-for-high-performance-programming</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:62320cf1b7afb65513062730</guid><description><![CDATA[Multithreading is critical for production applications because it unlocks 
features and capabilities that are otherwise out of reach.

In this article, we will look at concurrency using multithreaded 
programming in two of the most popular languages, Python and Java.]]></description><content:encoded><![CDATA[<p class="sqsrte-large">Multithreading is critical for production applications because it unlocks features and capabilities that are otherwise out of reach. Most programming languages have support for multithreading, but it can be hard to decide which language is the best for writing your application.</p><p class="sqsrte-large">In this article, we will look at concurrency using multithreaded programming in two of the most popular languages,&nbsp;<strong>Python</strong>&nbsp;and&nbsp;<strong>Java</strong>. By comparing the APIs and capabilities available with each language, and looking at code examples, you will be able to make the best choice based on your end-goal and performance requirements.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          <a class="
                sqs-block-image-link
                
          
        
              " href="Python Multithreading vs. Java Multithreading - Important Considerations for High Performance Programming"
              
          >
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1647454759309-1VMB1XM5C962LZM1EKAY/pexels-chris-peeters-12838.jpg" data-image-dimensions="1280x797" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1647454759309-1VMB1XM5C962LZM1EKAY/pexels-chris-peeters-12838.jpg?format=1000w" width="1280" height="797" sizes="(max-width: 640px) 100vw, (max-width: 767px) 83.33333333333334vw, 83.33333333333334vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1647454759309-1VMB1XM5C962LZM1EKAY/pexels-chris-peeters-12838.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1647454759309-1VMB1XM5C962LZM1EKAY/pexels-chris-peeters-12838.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1647454759309-1VMB1XM5C962LZM1EKAY/pexels-chris-peeters-12838.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1647454759309-1VMB1XM5C962LZM1EKAY/pexels-chris-peeters-12838.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1647454759309-1VMB1XM5C962LZM1EKAY/pexels-chris-peeters-12838.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1647454759309-1VMB1XM5C962LZM1EKAY/pexels-chris-peeters-12838.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1647454759309-1VMB1XM5C962LZM1EKAY/pexels-chris-peeters-12838.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          </a>
        

        
      
        </figure>
      

    
  


  


&nbsp;
  
  <h2><strong>Introduction to Concurrency and Multithreading</strong></h2><p class="sqsrte-large"><a href="https://en.wikipedia.org/wiki/Concurrent_computing" target="_blank">Concurrency</a>&nbsp;allows different parts of your application to be executed independently at the same time. This is typically implemented using&nbsp;<a href="https://en.wikipedia.org/wiki/Thread_(computing)" target="_blank">multithreading</a>, which uses the&nbsp;<em>multi-tasking</em>&nbsp;functionality of the operating system to execute multiple tasks, either on the same CPU core or on separate cores. Each unit of execution is known as a&nbsp;<em>thread (or a Thread of Execution)</em>.&nbsp;</p><p class="sqsrte-large">It’s important to note, that when we say&nbsp;<em>multitasking,&nbsp;</em>what we mean is that each task is making progress towards its completion. However, there’s no guarantee that at any moment, both of those tasks are being worked on at the same time.</p>


  


  














































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1a2fa549-2b35-476f-96ae-13cfd8a9f655/diagram1_large.png" data-image-dimensions="899x426" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1a2fa549-2b35-476f-96ae-13cfd8a9f655/diagram1_large.png?format=1000w" width="899" height="426" sizes="(max-width: 640px) 100vw, (max-width: 767px) 100vw, 100vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1a2fa549-2b35-476f-96ae-13cfd8a9f655/diagram1_large.png?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1a2fa549-2b35-476f-96ae-13cfd8a9f655/diagram1_large.png?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1a2fa549-2b35-476f-96ae-13cfd8a9f655/diagram1_large.png?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1a2fa549-2b35-476f-96ae-13cfd8a9f655/diagram1_large.png?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1a2fa549-2b35-476f-96ae-13cfd8a9f655/diagram1_large.png?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1a2fa549-2b35-476f-96ae-13cfd8a9f655/diagram1_large.png?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1a2fa549-2b35-476f-96ae-13cfd8a9f655/diagram1_large.png?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <p class="sqsrte-large">In the diagram shown above, the program’s main thread starts two child threads, which take varying amounts of time to complete. In addition, the program continues being executed in the main thread. But after some time, the program waits for the threads to “join”, meaning that execution of the main thread is halted until the child threads complete execution.&nbsp;</p><h1><strong>Multithreading in Python</strong></h1><p class="sqsrte-large">Multithreaded programs in Python are typically implemented using the built-in&nbsp;<a href="https://docs.python.org/3/library/threading.html" target="_blank">threading module</a>. This module provides an easy-to-use API for creating and managing threads.&nbsp;</p><p class="sqsrte-large">For example, here is a Python script implementing a simple multithreaded program, as shown the in the introduction diagram:</p><h3>Example Multithreading with Python:</h3>


  


  




  
    <pre><span>import</span> <span>threading</span>
<span>import</span> <span>time</span>

<span>def</span> <span>delayed_print</span>(delay):
    time<span>.</span>sleep(delay)
    <span>print</span>(f<span>&quot;Hello after {delay} seconds!&quot;</span>)

thread_one <span>=</span> threading<span>.</span>Thread(target<span>=</span>delayed_print, args<span>=</span>(<span>5</span>,))
thread_two <span>=</span> threading<span>.</span>Thread(target<span>=</span>delayed_print, args<span>=</span>(<span>3</span>,))

thread_one<span>.</span>start()
thread_two<span>.</span>start()

thread_one<span>.</span>join()
thread_two<span>.</span>join()
</pre>

  


  
  <h3>Output</h3>


  


  




  
    <pre>Hello after 3 seconds!
Hello after 5 seconds!
</pre>

  


  
  <p class="sqsrte-large">This program demonstrates how multiple threads are executed simultaneously because even though&nbsp;<em>thread_one</em>&nbsp;(the 3-second delay) is started&nbsp;<strong>after</strong>&nbsp;<em>thread_two</em>&nbsp;(the 5-second delay),&nbsp;<em>thread_one</em>&nbsp;finishes first.</p><h2><strong>Python’s Multithreading Limitation - Global Interpreter Lock</strong></h2><p class="sqsrte-large">For high-performance workloads, the program should process as much data as possible. Unfortunately, in&nbsp;<a href="https://github.com/python/cpython" target="_blank">CPython</a>, the standard interpreter of the Python language, a mechanism known as the&nbsp;<a href="https://wiki.python.org/moin/GlobalInterpreterLock" target="_blank">Global Interpreter Lock (GIL)</a>&nbsp;obstructs Python code from running in multiple threads at the same time.</p><p class="sqsrte-large">In other words, even if our computer has 64 CPU cores which allow multiple tasks to be run in parallel, at the same time, a Multithreaded application written in Python, will NOT be able to take any advantage of them and will run as fast (or slow) as if it ran on a single-core computer.</p><p class="sqsrte-large">There is still a benefit for using multithreading with Python, but it is limited for workloads that involve simple multitasking, such as waiting for external resources (like network requests) or sleeping.</p><p class="sqsrte-large"><strong>Multiprocessing in Python for High Performance</strong></p><p class="sqsrte-large">For Python programs where high throughput using true parallelism is desired, the best option may be another built-in module, called&nbsp;<a href="https://docs.python.org/3/library/multiprocessing.html" target="_blank">multiprocessing</a>. This module allows you to spawn additional instances of the entire Python interpreter as separate processes, to sidestep the limitations imposed by the GIL.&nbsp;</p><p class="sqsrte-large">For example:</p>


  


  




  
    <pre><span>import</span> <span>multiprocessing</span>
<span>import</span> <span>time</span>

<span>def</span> <span>delayed_print</span>(delay):
    cpu_intensive_work()
    <span>print</span>(f<span>&quot;Hello after {delay} seconds!&quot;</span>)

<span>if</span> __name__ <span>==</span> <span>&#39;__main__&#39;</span>:
    process_one <span>=</span> multiprocessing<span>.</span>Process(target<span>=</span>delayed_print, args<span>=</span>(<span>5</span>,))
    process_two <span>=</span> multiprocessing<span>.</span>Process(target<span>=</span>delayed_print, args<span>=</span>(<span>3</span>,))

    process_one<span>.</span>start()
    process_two<span>.</span>start()

    process_one<span>.</span>join()
    process_two<span>.</span>join()
</pre>

  


  
  <p class="sqsrte-large">In the above example, the work done in the <em>cpu_intensive_work()</em> method within <strong>process_one</strong> will have a high chance to run in <strong>parallel</strong> to the work performed by <em>process_two</em>.</p><p class="sqsrte-large">Unfortunately, while this solution allows for higher performance through true parallelism, it imposes a critical limitation of its own. Sharing data among separate processes is extremely limited. For example, if you try to access a shared object from different processes, an error such as this may happen:</p><h3>Sharing an Object Among Multiple Processes in Python - Error</h3>


  


  




  
    <pre><span># This does not work!</span>

<span>import</span> <span>multiprocessing</span>
<span>import</span> <span>time</span>

shared_list <span>=</span> []

<span>def</span> <span>access_list</span>():
    <span>print</span>(shared_list[<span>0</span>]) <span># Print first element in list</span>

<span>if</span> __name__ <span>==</span> <span>&#39;__main__&#39;</span>:
    shared_list<span>.</span>append(<span>&quot;abc&quot;</span>) <span># Append &quot;abc&quot; to the list</span>

    process <span>=</span> multiprocessing<span>.</span>Process(target<span>=</span>access_list)
    process<span>.</span>start()
    process<span>.</span>join()
</pre>

  


  
  <h3>Output</h3>


  


  




  
    <pre>Output:
Traceback (most recent call <span>last</span>):
  File <span>&quot;...&quot;</span>, line <span>315</span>, in _bootstrap
     self<span>.</span>run()
  File <span>&quot;...&quot;</span>, line <span>108</span>, in run
     self<span>.</span>_target(<span>*</span>self<span>.</span>_args, <span>**</span>self<span>.</span>_kwargs)
  File <span>&quot;...&quot;</span>, line <span>7</span>, in access_list
     <span>print</span>(shared_list[<span>0</span>]) <span># Print first element in list</span>
IndexError: list <span>index</span> out of range
</pre>

  


  
  <p class="sqsrte-large">While the&nbsp;<a href="https://docs.python.org/3/library/multiprocessing.html" target="_blank">multiprocessing</a>&nbsp;module includes a few mechanisms for sharing data between processes, as shown it is nonetheless limiting and introduces unnecessary overhead. Additionally, multiprocessing on its own has an inherent overhead in execution time and memory usage.&nbsp;</p><h2><strong>Multithreading and High-Performance with Java</strong></h2><p class="sqsrte-large">Similar to Python, the Java programming language includes&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html" target="_blank">an easy-to-use multithreading API</a>.&nbsp;</p><p class="sqsrte-large"><strong>Unlike</strong>&nbsp;Python, though, the JVM is not limited by the&nbsp;<em>Global Interpreter Lock (GIL).</em>&nbsp;All mainstream implementations of the Java Virtual Machine, and Oracle’s Hotspot in particular support full parallel execution of multiple threads out-of-the-box, using a simple and easy-to-use API.&nbsp;</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          <a class="
                sqs-block-image-link
                
          
        
              " href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C"
              
          >
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization" data-image-dimensions="750x422" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=1000w" width="750" height="422" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          </a>
        

        
          
          <figcaption class="image-caption-wrapper">
            <p class=""><a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C" target=""><strong>Java Multithreading, Concurrency &amp; Performance Optimization</strong></a></p>
          </figcaption>
        
      
        </figure>
      

    
  


  


&nbsp;
  
  <p class="sqsrte-large">If you want to get started with Java Multithreading and learn how to achieve the&nbsp;<strong>highest</strong>&nbsp;performance your computer can offer, then follow this link and check out the&nbsp;<a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C" target="_blank">Java Multithreading, Concurrency &amp; Performance Optimization</a>.</p><p class="sqsrte-large">In this course, you will learn how to write real-world, production-grade multithreaded Java applications, algorithms, and libraries.&nbsp;</p><p class="sqsrte-large">Throughout the course, you will follow industry best practices and patterns for high-performance programming in Java, and avoid all the common pitfalls and challenges which come with concurrent programming.&nbsp;</p><h2>More Articles</h2>]]></content:encoded><media:content type="image/jpeg" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1647454759309-1VMB1XM5C962LZM1EKAY/pexels-chris-peeters-12838.jpg?format=1500w" medium="image" isDefault="true" width="1280" height="797"><media:title type="plain">Python Multithreading vs. Java Multithreading - Important Considerations for High Performance Programming</media:title></media:content></item><item><title>Java PriorityBlockingQueue - Thread-Safe and Memory Efficient Concurrent Heap</title><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Fri, 08 Oct 2021 18:46:17 +0000</pubDate><link>https://topdeveloperacademy.com/articles/java-priorityblockingqueue-thread-safe-and-memory-efficient-concurrent-heap</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:615f7751d794ed74cf5190c9</guid><description><![CDATA[In this article, we are going to learn about a very important thread-safe 
and memory-efficient data structure implementation, the 
PriorityBlockingQueue. We will first start by comparing it to the 
traditional heap-based PriorityQueue implementation, and later we will see 
what concurrency and performance-related features and guarantees the 
PriorityBlockingQueue provides to us.

Finally, we will write some Java code to see how a PriorityBlockingQueue is 
used in a practical real-life example.]]></description><content:encoded><![CDATA[<p class="sqsrte-large">In this article, we are going to learn about a very important thread-safe and memory-efficient data structure implementation, the <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/PriorityBlockingQueue.html" target="">PriorityBlockingQueue</a>. We will first start by comparing it to the traditional heap-based <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/PriorityQueue.html" target="">PriorityQueue</a> implementation, and later we will see what concurrency and performance-related features and guarantees the <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/PriorityBlockingQueue.html" target="">PriorityBlockingQueue</a> provides to us.</p><p class="sqsrte-large">Finally, we will write some Java code to see how a <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/PriorityBlockingQueue.html" target="">PriorityBlockingQueue</a> is used in a practical real-life example.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633718507903-AST94JTPWSR8D0HEEWF2/Java+PriorityBlockingQueue" data-image-dimensions="1280x960" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633718507903-AST94JTPWSR8D0HEEWF2/Java+PriorityBlockingQueue?format=1000w" width="1280" height="960" sizes="(max-width: 640px) 100vw, (max-width: 767px) 83.33333333333334vw, 83.33333333333334vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633718507903-AST94JTPWSR8D0HEEWF2/Java+PriorityBlockingQueue?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633718507903-AST94JTPWSR8D0HEEWF2/Java+PriorityBlockingQueue?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633718507903-AST94JTPWSR8D0HEEWF2/Java+PriorityBlockingQueue?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633718507903-AST94JTPWSR8D0HEEWF2/Java+PriorityBlockingQueue?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633718507903-AST94JTPWSR8D0HEEWF2/Java+PriorityBlockingQueue?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633718507903-AST94JTPWSR8D0HEEWF2/Java+PriorityBlockingQueue?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633718507903-AST94JTPWSR8D0HEEWF2/Java+PriorityBlockingQueue?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  


&nbsp;
  
  <h2><strong>What is PriorityQueue</strong></h2><p class="sqsrte-large">To illustrate the advantages we get from PriorityBlockingQueue,  let’s compare it to the traditional <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/PriorityQueue.html" target="">PriorityQueue</a> first.</p><p class="sqsrte-large">A <em>PriorityQueue</em> in Java is a special type of queue which is used when the elements are required to be processed based on their priority. It is used when we don’t want our queue to follow the traditional F.I.F.O (first-in-first-out) ordering but instead gives preference to the higher priority elements. The PriorityQueue is based on the&nbsp;<strong>Binary Heap</strong>&nbsp;data structure. We will see the properties of Binary Heap later in this article.</p><h2><strong>PriorityQueue Use-Cases</strong></h2><p class="sqsrte-large">A real-life example of a <em>PriorityQueue</em> is the hospital queue where all the patients are treated/admitted based on the criticality of the condition, patients with emergencies would be given priority over patients who came for regular health check-ups.&nbsp;</p><p class="sqsrte-large">Another notable example is the Operating System’s CPU scheduling which uses the <em>PriorityQueue</em> internally and assigns CPU-Cycles based on the priority of the threads.</p><h2>PriorityQueue Ordering and Implementation</h2><p class="sqsrte-large">The elements of the <em>PriorityQueue</em> are ordered as per the natural ordering. In case a custom order is required then we can pass a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html" target=""><em>Comparator</em></a><em> </em>at construction time.</p><p class="sqsrte-large">The head of the <em>PriorityQueue</em> will always have the smallest element based on natural ordering or comparator, the rear of the <em>PriorityQueue</em> will have the greatest element based on natural ordering or comparator.&nbsp;</p>


  


  




  
    <pre>PriorityQueue<span>&lt;</span>Integer<span>&gt;</span> pQueue <span>=</span> <span>new</span> PriorityQueue<span>&lt;</span>Integer<span>&gt;();</span>
</pre>

  


  
  <p class="sqsrte-large">However, we can reverse this ordering using the <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#reverseOrder()" target=""><strong>Collection.reverseOrder()</strong></a> method.</p>


  


  




  
    <pre>PriorityQueue<span>&lt;</span>Integer<span>&gt;</span> pQueue <span>=</span> <span>new</span> PriorityQueue<span>&lt;</span>Integer<span>&gt;(</span>Collections<span>.</span><span>reverseOrder</span><span>());</span>
</pre>

  












































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633650854758-XIFRV3E32LJFV43KIO8H/PriorityQueue" data-image-dimensions="676x233" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633650854758-XIFRV3E32LJFV43KIO8H/PriorityQueue?format=1000w" width="676" height="233" sizes="(max-width: 640px) 100vw, (max-width: 767px) 100vw, 100vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633650854758-XIFRV3E32LJFV43KIO8H/PriorityQueue?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633650854758-XIFRV3E32LJFV43KIO8H/PriorityQueue?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633650854758-XIFRV3E32LJFV43KIO8H/PriorityQueue?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633650854758-XIFRV3E32LJFV43KIO8H/PriorityQueue?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633650854758-XIFRV3E32LJFV43KIO8H/PriorityQueue?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633650854758-XIFRV3E32LJFV43KIO8H/PriorityQueue?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633650854758-XIFRV3E32LJFV43KIO8H/PriorityQueue?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <p class="sqsrte-large">As mentioned earlier, the underlining data structure that implements the PriorityQueue is a <a href="https://en.wikipedia.org/wiki/Binary_heap#:~:text=A%20binary%20heap%20is%20a,way%20of%20implementing%20priority%20queues.&amp;text=Heap%20property%3A%20the%20key%20stored,according%20to%20some%20total%20order." target="">binary heap</a>.</p><h2>Binary Heap</h2><p class="sqsrte-large">A binary heap is a complete <a href="https://en.wikipedia.org/wiki/Binary_tree" target="">binary tree</a> that satisfies the heap ordering property.</p><p class="sqsrte-large">There are two types of heaps:</p><ol data-rte-list="default"><li><p class="sqsrte-large"><strong>Min-Heap: </strong>Each node of the binary tree is greater or equal to its parent and the lowest element would be at the root<strong>. </strong>When we simply say heap, we refer to the <strong>Min-Heap.</strong></p></li><li><p class="sqsrte-large"><strong>Max-Heap: </strong>Each node of the binary tree is less or equal to its parent and the highest element would be at the root.</p></li></ol>


  


  














































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633651326889-VBLWD69V7UQWHF3SZWF7/heap+data+structure" data-image-dimensions="811x362" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633651326889-VBLWD69V7UQWHF3SZWF7/heap+data+structure?format=1000w" width="811" height="362" sizes="(max-width: 640px) 100vw, (max-width: 767px) 100vw, 100vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633651326889-VBLWD69V7UQWHF3SZWF7/heap+data+structure?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633651326889-VBLWD69V7UQWHF3SZWF7/heap+data+structure?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633651326889-VBLWD69V7UQWHF3SZWF7/heap+data+structure?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633651326889-VBLWD69V7UQWHF3SZWF7/heap+data+structure?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633651326889-VBLWD69V7UQWHF3SZWF7/heap+data+structure?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633651326889-VBLWD69V7UQWHF3SZWF7/heap+data+structure?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633651326889-VBLWD69V7UQWHF3SZWF7/heap+data+structure?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <h3>Concurrency and Thread Safety Issues</h3><p class="sqsrte-large">When we have multiple producer threads, concurrently adding items to the PriorityQueue and/or multiple consumer threads concurrently consuming items from the PriorityQueue we can have race conditions that will leave the underlining heap data structure corrupt. Because of this issue, PriorityQueue cannot support multiple producers or consumers.</p><p class="sqsrte-large">If you’re not yet familiar with <strong>Java Multithreading</strong>, its performance benefits, and challenges associated with parle programming, make sure to check out the&nbsp;<a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C" target="_blank"><strong><em>Java Concurrency, Multithreading &amp;  Performance Optimization</em></strong></a>&nbsp;course.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          <a class="
                sqs-block-image-link
                
          
        
              " href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C"
              
          >
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization" data-image-dimensions="750x422" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=1000w" width="750" height="422" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          </a>
        

        
          
          <figcaption class="image-caption-wrapper">
            <p class=""><a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C" target=""><strong>Java Multithreading, Concurrency &amp; Performance Optimization</strong></a></p>
          </figcaption>
        
      
        </figure>
      

    
  


  


&nbsp;
  
  <h3>Memory Issues with a PriorityQueue</h3><p class="sqsrte-large">The <em>PriorityQueue</em> is a dynamic data structure that has no limitation on the number of elements it can accept from producers. If the number of elements exceeds the memory allocated for the JVM process, our application will crash due to an <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/OutOfMemoryError.html" target=""><em>OutOfMemoryError</em></a> exception.</p><h2><strong>Introducing PriorityBlockingQueue</strong></h2><ol data-rte-list="default"><li><h3><strong>PriorityBlockingQueue - Concurrency</strong></h3></li></ol><p class="sqsrte-large">Unlike the <em>PriorityQueue</em>,&nbsp;the<strong> <em>PriorityBlockingQueue</em> is thread-safe.</strong></p><p class="sqsrte-large">All of the <em>PriorityBlockingQueue’s</em> operations are guaranteed to be side-effect-free when it comes to race conditions or other concurrency issues. This makes the <em>PriorityBlockingQueue</em> the <strong>perfect data structure</strong> for production, <strong>Multithreaded Java application</strong>.</p><h3><strong>  2. PriorityBlockingQueue - Unbound Capacity and Blocking</strong></h3><p class="sqsrte-large">The <em>PriorityBlockingQueue</em> class is an implementation of the <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/BlockingQueue.html" target=""><em>BlockingQueue</em></a> interface in Java.&nbsp;</p><p class="sqsrte-large">In a typical producer-consumer problem in a multithreaded environment, the <em>PriorityBlockingQueue</em> will block the producer from adding more elements to it if the queue is full.  However, since the <em>PriorityBlockingQueue</em> is an&nbsp;<strong>unbound queue</strong>, meaning that it does <strong>not</strong> have a maximum capacity, the producers will never be blocked from adding more elements to the queue.&nbsp;</p><p class="sqsrte-large">On the other hand, when the <em>PriorityBlockingQueue</em> becomes empty, consumer threads will be blocked until additional items are added to the queue.</p><h3><strong>  3. PriorityBlockingQueue - Memory Efficiency and Performance</strong></h3><p class="sqsrte-large">The <em>PriorityBlockingQueue</em> is backed by an&nbsp;<strong>array-based</strong>&nbsp;binary tree heap - which is extremely memory efficient. This provides our application with high performance and reduces the memory overhead associated with reference-based data structures.</p><p class="sqsrte-large">However despite its array-based implementation, as we mentioned earlier, the <em>PriorityBlockingQueue</em> is an unbounded collection and it will grow dynamically as the elements get added to it.</p><p class="sqsrte-large">The default initial capacity for <em>PriorityBlockingQueue</em> is 11, but it can easily be changed by using the appropriate constructor.</p><h3><strong>  4. PriorityBlockingQueue - Ordering Of Elements</strong></h3><p class="sqsrte-large">By default, the PriorityBlockingQueue is following the standard min-heap properties which mean<strong>&nbsp;</strong>the <em>head</em> of the <em>PriorityBlockingQueue</em> will have the smallest element based on natural ordering.</p><p class="sqsrte-large">Objects in the <em>PriorityBlockingQueue</em> must be comparable for natural ordering, or the  <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/ClassCastException.html" target=""><em>ClassCastException</em></a> will be thrown.</p><p class="sqsrte-large">For additional flexibility when it comes to the ordering of elements,  a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html" target="">Comparator</a> can be used.&nbsp;</p><h2><strong>PriorityBlockingQueue in Action</strong></h2><p class="sqsrte-large">Now that we got familiar with the <em>PriorityBlockingQueue</em> structure and all the advantages it provides to us, let’s see this data structure in action in a practical example.&nbsp;</p><p class="sqsrte-large">In this example, we’ll have a multithreaded application where a&nbsp;<strong>fast</strong>&nbsp;producer adds items to the <em>PriorityBlockingQueue</em> from one thread, and a <strong>slower</strong> consumer takes items from the <em>PriorityBlockingQueue</em> on a different thread.</p><p class="sqsrte-large">This will demonstrate the ability:</p><ul data-rte-list="default"><li><p class="sqsrte-large">To modify and access the <em>PriorityBlockingQueue</em> from multiple threads safely</p></li><li><p class="sqsrte-large">For the <em>PriorityBlockingQueue</em> to grow dynamically as more elements are added to it</p></li><li><p class="sqsrte-large">Order the elements based on their custom priority</p></li><li><p class="sqsrte-large">When the <em>PriorityBlockingQueue</em> becomes empty, the consumer thread will block indefinitely until additional elements are added to the PriorityBlockingQueue</p></li></ul><p class="sqsrte-large">We will start with creating an <strong>Employee</strong> class:</p>


  


  




  
    <pre><span>public</span> <span>class</span> <span>Employee</span> <span>implements</span> Comparable<span>&lt;</span>Employee<span>&gt;</span> <span>{</span>
    <span>private</span> <span>int</span> employeeId<span>;</span>
    <span>private</span> <span>int</span> age<span>;</span> <span>// Older Employees Will Have a Higher Priority.</span>

    <span>public</span> <span>Employee</span><span>(</span><span>int</span> employeeId<span>,</span> <span>int</span> age<span>)</span> <span>{</span>
        <span>this</span><span>.</span><span>employeeId</span> <span>=</span> employeeId<span>;</span>
        <span>this</span><span>.</span><span>age</span> <span>=</span> age<span>;</span>
    <span>}</span>

    <span>@Override</span>
    <span>public</span> <span>int</span> <span>compareTo</span><span>(</span>Employee o<span>)</span> <span>{</span>
        <span>if</span> <span>(</span><span>this</span><span>.</span><span>age</span> <span>&gt;</span> o<span>.</span><span>age</span><span>)</span> <span>{</span>
            <span>return</span> <span>1</span><span>;</span>
        <span>}</span> <span>else</span> <span>if</span> <span>(</span><span>this</span><span>.</span><span>age</span> <span>&lt;</span> o<span>.</span><span>age</span><span>)</span> <span>{</span>
            <span>return</span> <span>-</span><span>1</span><span>;</span>
        <span>}</span>
        <span>return</span> <span>0</span><span>;</span>
    <span>}</span>

    <span>@Override</span>
    <span>public</span> String <span>toString</span><span>()</span> <span>{</span>
        <span>return</span> <span>&quot;Employee{&quot;</span> <span>+</span>
                <span>&quot;employeeId=&quot;</span> <span>+</span> employeeId <span>+</span>
                <span>&quot;, age=&quot;</span> <span>+</span> age <span>+</span>
                <span>&#39;}&#39;</span><span>;</span>
    <span>}</span>
<span>}</span>
</pre>

  


  
  <p class="sqsrte-large">Notice that we will use the <strong>age</strong> of the employee as the priority inside the <em>PriorityBlockingQueue</em>.</p><p class="sqsrte-large">And since we want to provide higher priority for <strong>older</strong> employees will need to create a&nbsp;<strong>max-heap</strong>.</p><p class="sqsrte-large">So in the following piece of code, we’re going to create a <em>PriorityBlockingQueue</em> with an initial capacity of 5 elements, and use a custom Comparator to order the elements in a reverse order which will create a <strong>max-heap</strong>.</p><p class="sqsrte-large">Additionally, we’re creating a producer thread that adds elements to the <em>PriorityBlockingQueue</em>, and a consumer thread that consumes elements from the <em>PriorityBlockingQueue</em> based on their priority, concurrently to the producer thread.</p>


  


  




  
    <pre><span>import</span> <span>java.util.Collections</span><span>;</span>
<span>import</span> <span>java.util.concurrent.PriorityBlockingQueue</span><span>;</span>

<span>public</span> <span>class</span> <span>PriorityBlockingQueueExample</span> <span>{</span>
    <span>public</span> <span>static</span> <span>void</span> <span>main</span><span>(</span>String<span>[]</span> args<span>)</span> <span>{</span>
        PriorityBlockingQueue<span>&lt;</span>Employee<span>&gt;</span> priorityBlockingQueue <span>=</span> <span>new</span> PriorityBlockingQueue<span>&lt;&gt;(</span><span>5</span><span>,</span> Collections<span>.</span><span>reverseOrder</span><span>());</span>

        ConcurrentProducer producer <span>=</span> <span>new</span> ConcurrentProducer<span>(</span>priorityBlockingQueue<span>);</span>
        producer<span>.</span><span>start</span><span>();</span>

        ConcurrentConsumer consumer <span>=</span> <span>new</span> ConcurrentConsumer<span>(</span>priorityBlockingQueue<span>);</span>
        consumer<span>.</span><span>start</span><span>();</span>
    <span>}</span>
<span>}</span>
</pre>

  


  
  <p class="sqsrte-large">Finally here is the code for the <strong>producer</strong> thread, that adds employees to the <em>PriorityBlockingQueue</em> with random ids and ages.</p>


  


  




  
    <pre><span>import</span> <span>java.util.Random</span><span>;</span>
<span>import</span> <span>java.util.UUID</span><span>;</span>
<span>import</span> <span>java.util.concurrent.PriorityBlockingQueue</span><span>;</span>

<span>public</span> <span>class</span> <span>ConcurrentProducer</span> <span>extends</span> Thread <span>{</span>

    <span>protected</span> PriorityBlockingQueue<span>&lt;</span>Employee<span>&gt;</span> priorityBlockingQueue<span>;</span>
    Random random <span>=</span> <span>new</span> Random<span>();</span>
    <span>public</span> <span>ConcurrentProducer</span><span>(</span>PriorityBlockingQueue<span>&lt;</span>Employee<span>&gt;</span> queue<span>)</span> <span>{</span>
        <span>this</span><span>.</span><span>priorityBlockingQueue</span> <span>=</span> queue<span>;</span>
    <span>}</span>

    <span>@Override</span>
    <span>public</span> <span>void</span> <span>run</span><span>()</span> <span>{</span>
        <span>for</span> <span>(</span><span>int</span> i <span>=</span> <span>0</span><span>;</span> i <span>&lt;</span> <span>10</span><span>;</span> i<span>++)</span>  <span>{</span>
            <span>try</span> <span>{</span>
                <span>int</span> randomId <span>=</span> random<span>.</span><span>nextInt</span><span>(</span><span>10000</span><span>)+</span><span>1</span><span>;</span>
                <span>int</span> randomAge <span>=</span> random<span>.</span><span>nextInt</span><span>(</span><span>60</span><span>)</span> <span>+</span> <span>25</span><span>;</span>
                Employee employee <span>=</span> <span>new</span> Employee<span>(</span>randomId<span>,</span> randomAge<span>);</span>
                System<span>.</span><span>out</span><span>.</span><span>println</span><span>(</span><span>&quot;Producer adding employee: &quot;</span> <span>+</span> employee<span>);</span>
                priorityBlockingQueue<span>.</span><span>put</span><span>(</span>employee<span>);</span>
                Thread<span>.</span><span>sleep</span><span>(</span><span>1000</span><span>);</span>
            <span>}</span> <span>catch</span> <span>(</span>Exception e<span>){</span> <span>//(InterruptedException e) {</span>
                e<span>.</span><span>printStackTrace</span><span>();</span>
            <span>}</span>
        <span>}</span>
    <span>}</span>

<span>}</span>
</pre>

  


  
  <p class="sqsrte-large">And this is the code for the <strong>consumer</strong> thread that removes elements from the <em>PriorityBlockingQueue</em> based on the employee’s age as the priority.</p>


  


  




  
    <pre><span>import</span> <span>java.util.concurrent.PriorityBlockingQueue</span><span>;</span>

<span>public</span> <span>class</span> <span>ConcurrentConsumer</span> <span>extends</span> Thread <span>{</span>

    <span>protected</span> PriorityBlockingQueue<span>&lt;</span>Employee<span>&gt;</span> priorityBlockingQueue<span>;</span>

    <span>public</span> <span>ConcurrentConsumer</span><span>(</span>PriorityBlockingQueue<span>&lt;</span>Employee<span>&gt;</span> queue<span>)</span> <span>{</span>
        <span>this</span><span>.</span><span>priorityBlockingQueue</span> <span>=</span> queue<span>;</span>
    <span>}</span>

    <span>@Override</span>
    <span>public</span> <span>void</span> <span>run</span><span>()</span> <span>{</span>
        <span>while</span> <span>(</span><span>true</span><span>)</span> <span>{</span>
            <span>try</span> <span>{</span>
                Employee employee <span>=</span> priorityBlockingQueue<span>.</span><span>take</span><span>();</span>
                System<span>.</span><span>out</span><span>.</span><span>println</span><span>(</span><span>&quot;Consumer taking the element as per priority: &quot;</span> <span>+</span> employee<span>);</span>
                Thread<span>.</span><span>sleep</span><span>(</span><span>5000</span><span>);</span>
            <span>}</span> <span>catch</span> <span>(</span>InterruptedException e<span>)</span> <span>{</span>
                e<span>.</span><span>printStackTrace</span><span>();</span>
            <span>}</span>
        <span>}</span>
    <span>}</span>
<span>}</span>
</pre>

  


  
  <h2>Output</h2>


  


  




  
    <pre><span>Producer</span> <span>adding</span> <span>employee</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>8078</span>, <span>age</span><span>=</span><span>71</span>}
<span>Consumer</span> <span>taking</span> <span>the</span> <span>element</span> <span>as</span> <span>per</span> <span>priority</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>8078</span>, <span>age</span><span>=</span><span>71</span>}
<span>Producer</span> <span>adding</span> <span>employee</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>8506</span>, <span>age</span><span>=</span><span>66</span>}
<span>Producer</span> <span>adding</span> <span>employee</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>32</span>, <span>age</span><span>=</span><span>34</span>}
<span>Producer</span> <span>adding</span> <span>employee</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>6121</span>, <span>age</span><span>=</span><span>71</span>}
<span>Producer</span> <span>adding</span> <span>employee</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>3063</span>, <span>age</span><span>=</span><span>59</span>}
<span>Consumer</span> <span>taking</span> <span>the</span> <span>element</span> <span>as</span> <span>per</span> <span>priority</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>6121</span>, <span>age</span><span>=</span><span>71</span>}
<span>Producer</span> <span>adding</span> <span>employee</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>7950</span>, <span>age</span><span>=</span><span>60</span>}
<span>Producer</span> <span>adding</span> <span>employee</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>3518</span>, <span>age</span><span>=</span><span>51</span>}
<span>Producer</span> <span>adding</span> <span>employee</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>422</span>, <span>age</span><span>=</span><span>80</span>}
<span>Producer</span> <span>adding</span> <span>employee</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>3820</span>, <span>age</span><span>=</span><span>51</span>}
<span>Producer</span> <span>adding</span> <span>employee</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>5601</span>, <span>age</span><span>=</span><span>78</span>}
<span>Consumer</span> <span>taking</span> <span>the</span> <span>element</span> <span>as</span> <span>per</span> <span>priority</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>422</span>, <span>age</span><span>=</span><span>80</span>}
<span>Consumer</span> <span>taking</span> <span>the</span> <span>element</span> <span>as</span> <span>per</span> <span>priority</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>5601</span>, <span>age</span><span>=</span><span>78</span>}
<span>Consumer</span> <span>taking</span> <span>the</span> <span>element</span> <span>as</span> <span>per</span> <span>priority</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>8506</span>, <span>age</span><span>=</span><span>66</span>}
<span>Consumer</span> <span>taking</span> <span>the</span> <span>element</span> <span>as</span> <span>per</span> <span>priority</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>7950</span>, <span>age</span><span>=</span><span>60</span>}
<span>Consumer</span> <span>taking</span> <span>the</span> <span>element</span> <span>as</span> <span>per</span> <span>priority</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>3063</span>, <span>age</span><span>=</span><span>59</span>}
<span>Consumer</span> <span>taking</span> <span>the</span> <span>element</span> <span>as</span> <span>per</span> <span>priority</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>3518</span>, <span>age</span><span>=</span><span>51</span>}
<span>Consumer</span> <span>taking</span> <span>the</span> <span>element</span> <span>as</span> <span>per</span> <span>priority</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>3820</span>, <span>age</span><span>=</span><span>51</span>}
<span>Consumer</span> <span>taking</span> <span>the</span> <span>element</span> <span>as</span> <span>per</span> <span>priority</span>: <span>Employee</span>{<span>employeeId</span><span>=</span><span>32</span>, <span>age</span><span>=</span><span>34</span>}
</pre>

  


  
  <p class="sqsrte-large">Notice that at any given moment the consumer prefers the employee with the highest age and gets to the employees with the lower ages towards the end of the program. </p><p class="sqsrte-large">Also notice that while both the producer and the consumer are adding and removing items to the same data structure concurrently there are no multithreading race conditions or any other concurrency issues.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          <a class="
                sqs-block-image-link
                
          
        
              " href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C"
              
          >
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization" data-image-dimensions="750x422" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=1000w" width="750" height="422" sizes="(max-width: 640px) 100vw, (max-width: 767px) 41.66666666666667vw, 41.66666666666667vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          </a>
        

        
          
          <figcaption class="image-caption-wrapper">
            <p class="sqsrte-large"><a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C" target=""><strong>Java Multithreading, Concurrency &amp; Performance Optimization</strong></a></p>
          </figcaption>
        
      
        </figure>
      

    
  


  


&nbsp;
  
  <p class="sqsrte-large">If you want to become and expert in Multithreading and learn how to build high-performance Multithreaded applications as well as implement similar data structures for your own needs,  join the best-selling course on <a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C" target=""><strong>Java Multithreading, Concurrency &amp; Performance Optimization</strong></a>. In this course you will learn all the basics of Multithreading in Java, and how to utilize multiple threads to build highly responsive and blazingly fast algorithms and programs.</p><h2>More Articles</h2>]]></content:encoded><media:content type="image/jpeg" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1633718650624-QLYZ2Z3PJPZ5XBCRTFPU/right-of-way-809137_1280.jpg?format=1500w" medium="image" isDefault="true" width="1280" height="960"><media:title type="plain">Java PriorityBlockingQueue - Thread-Safe and Memory Efficient Concurrent Heap</media:title></media:content></item><item><title>Java ArrayBlockingQueue - A High Performance Data Structure for a Multithreaded Application</title><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Sun, 05 Sep 2021 19:25:53 +0000</pubDate><link>https://topdeveloperacademy.com/articles/java-arrayblockingqueue-a-thread-safe-bound-size-queue</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:612ea4cbcb95b607df735e3b</guid><description><![CDATA[The queue data structure is the best choice for storing and retrieving 
elements in a First In First Out (FIFO) order.

In this article we’re going to explore the ArrayBlockingQueue class, which 
provides superior properties and guarantees for high performance, 
multithreaded, Java production applications.]]></description><content:encoded><![CDATA[<p class="sqsrte-large">The&nbsp;<a href="https://en.wikipedia.org/wiki/Queue_(abstract_data_type)" target="_blank">queue</a>&nbsp;data structure is the best choice for storing and retrieving elements in a First In First Out (FIFO) order.</p><p class="sqsrte-large">The Java programming language represents this data structure with the&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Queue.html" target="_blank">Queue</a>&nbsp;interface. Java Development Kit contains many implementations for this data structure that present different performance properties and safety guarantees. In this article we’re going to explore one particular <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Queue.html" target="_blank">Queue</a> implementation, the <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ArrayBlockingQueue.html">ArrayBlockingQueue</a>, which provides superior properties and guarantees for high performance, multithreaded, Java production applications.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1630869390042-IU5516XA8LYK8CSA0KER/Java+ArrayBlockingQueue+-+A+High+Performance+Data+Structure+for+a+Multithreaded+Application" data-image-dimensions="1280x853" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1630869390042-IU5516XA8LYK8CSA0KER/Java+ArrayBlockingQueue+-+A+High+Performance+Data+Structure+for+a+Multithreaded+Application?format=1000w" width="1280" height="853" sizes="(max-width: 640px) 100vw, (max-width: 767px) 66.66666666666666vw, 66.66666666666666vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1630869390042-IU5516XA8LYK8CSA0KER/Java+ArrayBlockingQueue+-+A+High+Performance+Data+Structure+for+a+Multithreaded+Application?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1630869390042-IU5516XA8LYK8CSA0KER/Java+ArrayBlockingQueue+-+A+High+Performance+Data+Structure+for+a+Multithreaded+Application?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1630869390042-IU5516XA8LYK8CSA0KER/Java+ArrayBlockingQueue+-+A+High+Performance+Data+Structure+for+a+Multithreaded+Application?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1630869390042-IU5516XA8LYK8CSA0KER/Java+ArrayBlockingQueue+-+A+High+Performance+Data+Structure+for+a+Multithreaded+Application?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1630869390042-IU5516XA8LYK8CSA0KER/Java+ArrayBlockingQueue+-+A+High+Performance+Data+Structure+for+a+Multithreaded+Application?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1630869390042-IU5516XA8LYK8CSA0KER/Java+ArrayBlockingQueue+-+A+High+Performance+Data+Structure+for+a+Multithreaded+Application?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1630869390042-IU5516XA8LYK8CSA0KER/Java+ArrayBlockingQueue+-+A+High+Performance+Data+Structure+for+a+Multithreaded+Application?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  


&nbsp;
  
  <p class="sqsrte-large">Before we talk about Java Multithreading and the specific ArrayBlockingQueue implementation, let’s define a few terms that are commonly used to describe operations and actors in the context of a&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Queue.html" target="_blank">Queue</a>.</p><h2><strong>Queue Terminology</strong></h2><p class="sqsrte-large">When it comes to operations we can perform on the data structure, the two most important ones are:</p><ol data-rte-list="default"><li><p class="sqsrte-large"><strong><em>Enqueue</em></strong> - add an element to the <strong>end</strong> of the queue. In the Java <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Queue.html" target="_blank">Queue</a> interface this operation is represented by the <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/BlockingQueue.html#add-E-" target="_blank">add()</a>, and <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/BlockingQueue.html#add-E-" target="_blank">offer()</a> methods.</p></li><li><p class="sqsrte-large"><strong><em>Dequeue</em></strong> - remove an element from the <strong>front</strong> of the queue. In the Java <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Queue.html" target="_blank">Queue</a> interface, this operation is represented by the <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/BlockingQueue.html#remove-java.lang.Object-" target="_blank">remove()</a>, and <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/BlockingQueue.html#poll-long-java.util.concurrent.TimeUnit-" target="_blank">poll(</a>) methods.</p></li></ol><p class="sqsrte-large">In the context of multithreaded Java applications there are 2 types of actors performing operations on a queue:</p><ol data-rte-list="default"><li><p class="sqsrte-large"><strong><em>Producer</em></strong> - The thread that adds elements to the queue by calling the <em>enqueue</em> operation.</p></li><li><p class="sqsrte-large"><strong><em>Consumer</em></strong> - The thread that removes elements from the queue by calling the <em>dequeue</em> operation.</p></li></ol><p class="sqsrte-large">Depending on the use case there may be multiple producer threads and or multiple consumer threads.</p><h2><strong>Queue in a Multithreaded Java Application</strong></h2><p class="sqsrte-large">In a Java multithreaded production application environment, two concerns need to be taken into account when choosing a concrete implementation for the queue data structure.</p><ol data-rte-list="default"><li><h3><strong>Thread Safety</strong></h3></li></ol><p class="sqsrte-large">When working with a data structure that isn’t inherently thread-safe, many undesired side effects may happen when the data structure is accessed and modified by multiple threads. A few of those side effects include race conditions, data races and others. By trying to solve these Java Multithreading problems, developers who aren’t proficient in Java Multithreading and Concurrency may cause even more problems in a form of deadlocks or performance bottlenecks due to inefficient and excessive locking.</p><p class="sqsrte-large">If you want to learn how to efficiently solve such challenges while providing your Java application with&nbsp;<strong>high performance</strong>&nbsp;make sure to check out <a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C"><strong>Java&nbsp;</strong></a><a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C" target="_blank"><strong>Multithreading, Concurrency, and Performance Optimization</strong></a>&nbsp;online course.</p><h3><strong>&nbsp;&nbsp;2. Bounded Size</strong></h3><p class="sqsrte-large">When the number of elements in our queue grows uncontrollably to the point that we exceed the JVM’s heap size, our application may crash due to an&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/OutOfMemoryError.html" target="_blank">OutOfMemoryError</a>&nbsp;exception, which is generally unrecoverable. To prevent this from happening we need to set an upper bound for the number of elements we can store in our queue at any given moment. Additionally, we need to prevent any thread that attempts to add more elements to the queue from succeeding, which can be achieved by blocking that thread.</p><h2>ArrayBlockingQueue</h2><p class="sqsrte-large">One implementation of the queue data structure that solves&nbsp;<strong>both</strong>&nbsp;of those concerns out-of-the-box is&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ArrayBlockingQueue.html" target="_blank">ArrayBlockingQueue</a>, which is part of the <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/package-summary.html">java.util.concurrent</a> package. The&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ArrayBlockingQueue.html" target="_blank">ArrayBlockingQueue</a>&nbsp;uses a bounded&nbsp;<a href="https://en.wikipedia.org/wiki/Circular_buffer" target="_blank">cyclic buffer</a>&nbsp;backed by a&nbsp;<strong>fixed-size array</strong>&nbsp;to store its elements.</p><h3><strong>ArrayBlockingQueue - Thread Safety</strong></h3><p class="sqsrte-large">To prevent any concurrency issues and side effects due to multithreading, all of the ArrayBlockingQueue methods are protecting its operations with a thread lock.</p><p class="sqsrte-large">Here are a few examples:</p>


  


  




  
    

<pre><span>public</span> <span>boolean</span> <span>offer</span><span>(</span>E e<span>)</span> <span>{</span>
   Objects<span>.</span><span>requireNonNull</span><span>(</span>e<span>);</span>

   <span>final</span> ReentrantLock lock <span>=</span> <span>this</span><span>.</span><span>lock</span><span>;</span>
   <strong>lock<span>.</span><span>lock</span><span>(); // Start protected block</span></strong>

   <span>try</span> <span>{</span>
       <span>if</span> <span>(</span>count <span>==</span> items<span>.</span><span>length</span><span>)</span>
           <span>return</span> <span>false</span><span>;</span>
       <span>else</span> <span>{</span>
           enqueue<span>(</span>e<span>);</span>
           <span>return</span> <span>true</span><span>;</span>
       <span>}</span>
   <span>}</span> <span>finally</span> <span>{</span>
       <strong>lock<span>.</span><span>unlock</span><span>(); // End protected block</span></strong>
   <span>}</span>
<span>}</span>
</pre>

  


  
    

<pre><span>public</span> E <span>poll</span><span>()</span> <span>{</span>
   <span>final</span> ReentrantLock lock <span>=</span> <span>this</span><span>.</span><span>lock</span><span>;</span>

   <strong>lock<span>.</span><span>lock</span><span>(); // Start protected block</span></strong>

   <span>try</span> <span>{</span>
       <span>return</span> <span>(</span>count <span>==</span> <span>0</span><span>)</span> <span>?</span> <span>null</span> <span>:</span> dequeue<span>();</span>
   <span>}</span> <span>finally</span> <span>{</span>
       <strong>lock<span>.</span><span>unlock</span><span>(); // End protected block</span></strong>
   <span>}</span>
<span>}</span>
</pre>

  


  
  <p class="sqsrte-large">As we can see in the above two examples each operation starts with locking a reentrant lock, and each operation finishes with unlocking that lock.</p><h2><strong>ArrayBlockingQueue - Bounded Size</strong></h2><p class="sqsrte-large">ArrayBlockingQueue is backed by an array, which is the perfect data structure for limiting the number of elements that can be stored inside the queue. </p><p class="sqsrte-large">Additionally, to provide a clear contract for the ArrayBlockingQueue users which explicitly blocks a producer thread when the queue is already full, the ArrayBlockingQueue class implements the&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/BlockingQueue.html" target="_blank">BlockingQueue</a>&nbsp;interface instead of the&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Queue.html" target="_blank">Queue</a>&nbsp;interface directly. </p><p class="sqsrte-large">The&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/BlockingQueue.html" target="_blank">BlockingQueue</a>&nbsp;interface extends the&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Queue.html" target="_blank">Queue</a>&nbsp;interface which means&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/BlockingQueue.html" target="_blank">BlockingQueue</a>&nbsp;contains all of&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Queue.html" target="_blank">Queue</a>&nbsp;methods declarations but additionally it contains 2 more methods:</p><ol data-rte-list="default"><li><p class="sqsrte-large"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/BlockingQueue.html#put-E-" target="_blank"><strong><em>put(element)</em></strong></a> - Inserts an element into this queue, <strong>blocks</strong> the thread if the queue is already full.</p></li><li><p class="sqsrte-large"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/BlockingQueue.html#take--" target="_blank"><strong><em>take()</em></strong></a><strong><em> </em></strong>- Retrieves and removes the head of this queue, <strong>blocks</strong> the thread if the queue is empty.</p></li></ol><p class="sqsrte-large">Let’s examine the implementations of the following methods:</p>


  


  




  
    

<pre><span>public</span> <span>void</span> <span>put</span><span>(</span>E e<span>)</span> <span>throws</span> InterruptedException <span>{</span>
   Objects<span>.</span><span>requireNonNull</span><span>(</span>e<span>);</span>
   <span>final</span> ReentrantLock lock <span>=</span> <span>this</span><span>.</span><span>lock</span><span>;</span>
   lock<span>.</span><span>lockInterruptibly</span><span>();</span>
   <span>try</span> <span>{</span>
       <strong><span>while</span> <span>(</span>count <span>==</span> items<span>.</span><span>length</span><span>)</span>
           notFull<span>.</span><span>await</span><span>(); // Block the thread until the queue has space for additional elements</span></strong>
       enqueue<span>(</span>e<span>);</span>
   <span>}</span> <span>finally</span> <span>{</span>
       lock<span>.</span><span>unlock</span><span>();</span>
   <span>}</span>
<span>}</span>
</pre>

  


  
  <p class="sqsrte-large">We can see that if the queue is already full the thread calling the&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/BlockingQueue.html#put-E-" target="_blank"><strong><em>put()</em></strong></a><strong><em>&nbsp;</em></strong>method goes into a blocking state. By using the&nbsp;<em>notFull</em>&nbsp;condition variable’s&nbsp;<em>await()</em>&nbsp;method, the calling thread will remain dormant until it is explicitly woken up after the consumer thread removes an item from the queue.</p><p class="sqsrte-large">Similarly, if we look at the&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/BlockingQueue.html#take--" target="_blank">take()&nbsp;</a>method:</p>


  


  




  
    

<pre><span>public</span> E <span>take</span><span>()</span> <span>throws</span> InterruptedException <span>{</span>
   <span>final</span> ReentrantLock lock <span>=</span> <span>this</span><span>.</span><span>lock</span><span>;</span>
   lock<span>.</span><span>lockInterruptibly</span><span>();</span>
   <span>try</span> <span>{</span>
       <strong><span>while</span> <span>(</span>count <span>==</span> <span>0</span><span>)</span>
           notEmpty<span>.</span><span>await</span><span>(); // Block the current thread until there are elements in the queue</span></strong>
       <span>return</span> <span>dequeue</span><span>();</span>
   <span>}</span> <span>finally</span> <span>{</span>
       lock<span>.</span><span>unlock</span><span>();</span>
   <span>}</span>
<span>}</span>
</pre>

  


  
  <p class="sqsrte-large">We can see if the&nbsp;<em>count</em>&nbsp;of elements in the queue is zero then the calling thread will be blocked through the&nbsp;<em>notEmpty</em>&nbsp;condition variable’s&nbsp;<em>await();</em>&nbsp;method. And the calling thread will remain inactive until the producer thread adds an item to the queue which the consumer can consume.</p><p class="sqsrte-large">If you want to gain deep knowledge of Java Multithreading and learn how to incorporate all the above-mentioned techniques into your own Java application, check out the <a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C">Java Multithreading, Concurrency &amp; Performance Optimization</a> course.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          <a class="
                sqs-block-image-link
                
          
        
              " href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C"
              
          >
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization" data-image-dimensions="750x422" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=1000w" width="750" height="422" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/Java+Multithreading%2C+Concurrency+%26+Performance+Optimization?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          </a>
        

        
          
          <figcaption class="image-caption-wrapper">
            <p class=""><a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C"><strong>Java Multithreading, Concurrency &amp; Performance Optimization</strong></a></p>
          </figcaption>
        
      
        </figure>
      

    
  


  


&nbsp;
  
  <p class="sqsrte-large">In this top-rated, online course you will master Java Concurrency from the very beginning to expert level. This course is perfect for busy software engineers who want to up-level their skills and gain practical knowledge that they can apply to their projects right away.</p><h2>More Articles</h2>]]></content:encoded><media:content type="image/jpeg" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1630869741391-5W87EYFA6VKEFZUDP9ZD/pexels-karol-d-409701+%281%29.jpg?format=1500w" medium="image" isDefault="true" width="640" height="426"><media:title type="plain">Java ArrayBlockingQueue - A High Performance Data Structure for a Multithreaded Application</media:title></media:content></item><item><title>What makes JUnit the most popular Java Framework</title><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Fri, 25 Jun 2021 08:37:48 +0000</pubDate><link>https://topdeveloperacademy.com/articles/what-makes-junit-the-most-popular-java-framework</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:60134b715f73c83994405044</guid><description><![CDATA[JUnit is the most popular and widely used framework for unit testing in 
Java. Recent surveys show that it is also the most commonly included 
external library in Java projects.

In this article, we are going to explore the 2 features formula that makes 
any Java library a hit among Java developers.]]></description><content:encoded><![CDATA[<p class="sqsrte-large"><a href="https://junit.org/junit5/" target="_blank">JUnit</a>&nbsp;is the most popular and widely used framework for unit testing in <a href="https://www.java.com/en/">Java</a>. Recent surveys show that it is also the most commonly included external library in Java projects.</p><p class="sqsrte-large">But what made <a href="https://junit.org/junit5/" target="_blank">JUnit</a> so easy to use and hence so popular among developers? And is there any common feature between all Java frameworks that became de facto standards in their space, like <a href="https://spring.io">Spring</a> for dependency injection, <a href="https://hibernate.org/orm/">Hibernate</a> for ORM, and others?</p><p class="sqsrte-large">In this article, we are going to explore the&nbsp;<strong>2 features</strong> formula that makes any Java library a hit among Java developers.</p>


  


  














































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1624609363420-E7840XAITWMSO6WANVXY/Java+Code+Reflection+in+Computer+Screen" data-image-dimensions="1280x854" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1624609363420-E7840XAITWMSO6WANVXY/Java+Code+Reflection+in+Computer+Screen?format=1000w" width="1280" height="854" sizes="(max-width: 640px) 100vw, (max-width: 767px) 100vw, 100vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1624609363420-E7840XAITWMSO6WANVXY/Java+Code+Reflection+in+Computer+Screen?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1624609363420-E7840XAITWMSO6WANVXY/Java+Code+Reflection+in+Computer+Screen?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1624609363420-E7840XAITWMSO6WANVXY/Java+Code+Reflection+in+Computer+Screen?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1624609363420-E7840XAITWMSO6WANVXY/Java+Code+Reflection+in+Computer+Screen?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1624609363420-E7840XAITWMSO6WANVXY/Java+Code+Reflection+in+Computer+Screen?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1624609363420-E7840XAITWMSO6WANVXY/Java+Code+Reflection+in+Computer+Screen?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1624609363420-E7840XAITWMSO6WANVXY/Java+Code+Reflection+in+Computer+Screen?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <h2>Java Annotations</h2><p class="sqsrte-large">The first feature that makes a library or framework easy to use, manage and configure is&nbsp;<a href="https://en.wikipedia.org/wiki/Java_annotation"><strong>Annotations</strong></a>.&nbsp;</p><p class="sqsrte-large">In addition to all the typical programming language constructs that <em>express the program’s flow</em> (like variable declarations, conditions, loops, expressions, etc), and the <em>organizational building blocks</em> that force our programs to be structured in an <a href="https://en.wikipedia.org/wiki/Object-oriented_programming">Object-Oriented</a> style (like classes, interfaces, etc), Java also allows “<em>marking</em>” many such constructs with&nbsp;<strong>Annotations</strong>.&nbsp;</p><p class="sqsrte-large">Examples:</p>


  


  




  
    <pre><span>@Bean</span>

<span>@Scheduled</span><span>(</span><span>5</span><span>)</span>

<span>@Test</span><span>(</span>timeout <span>=</span> <span>500</span><span>)</span>
</pre>


  


  
  <p class="sqsrte-large">These odd,&nbsp;<strong>behavior-less</strong>&nbsp;markings are one of the most powerful features in Java and don’t exist in many other languages.&nbsp;</p><p class="sqsrte-large">Since they don’t&nbsp;<strong>have any behavior</strong>&nbsp;by default, what gives them the behavior and enriches our codebase is the logic that looks for those&nbsp;<strong>Annotations</strong>&nbsp;and makes decisions based on:</p><ul data-rte-list="default"><li><p class="sqsrte-large">The presence or absence of an <strong>Annotation</strong></p></li><li><p class="sqsrte-large">The <strong>Annotation</strong> type</p></li><li><p class="sqsrte-large">Values assigned inside the <strong>Annotation</strong> parentheses</p></li></ul><p class="sqsrte-large">For example, JUnit looks for methods annotated with <em>@Test</em> and if it encounters a method annotated with </p>


  


  




  
    <pre><span>@Test</span><span>(</span>timeout <span>=</span> <span>500</span><span>)</span>
</pre>

  


  
  <p class="sqsrte-large">JUnit knows that a test that runs longer than 500ms is considered a failure, all based on the value of 500 assigned to timeout attribute of the @Test annotation.<br></p><p class="sqsrte-large">To discover <strong>Annotations</strong> throughout the codebase and assign behavior to the annotated constructs (such as methods, classes and fields) we need the second feature in our success formula:&nbsp;<strong>Java Reflection.</strong>&nbsp;</p><h2>Java Reflection</h2><p class="sqsrte-large">As we just mentioned,&nbsp;<strong>Annotations</strong>&nbsp;on their own don’t have any behavior or functionality. The mechanism that brings&nbsp;<strong>Annotations</strong>&nbsp;to life at Runtime is called&nbsp;<strong>Java Reflection</strong>. </p><p class="sqsrte-large"><strong>Reflection API&nbsp;</strong>which is our way to use that feature using Java code, allows a program to inspect a class at runtime, and among others allows our a library like JUnit to look for and discover <strong>Annotations</strong> that are specifically marked for discovery at Runtime. Once an <strong>Annotation</strong> is discovered, certain behavior can be performed, which we can express in simple Java code.</p><p class="sqsrte-large">For example, we provide JUnit with the following code that expresses a test suite:</p>


  


  




  
    <pre>   <span>public</span> <span>class</span> <span>TestOnlineStore</span> <span>{</span>

        <span>@BeforeClass</span>
        <span>public</span> <span>static</span> <span>void</span> <span>initFakeDatabase</span><span>()</span> <span>{</span>
            <span>....</span>
        <span>}</span>

        <span>@Before</span>
        <span>public</span> <span>void</span> <span>prepareTest</span><span>()</span> <span>{</span>
            <span>....</span>
        <span>}</span>

        <span>@Test</span>
        <span>public</span> <span>void</span> <span>testTransaction</span><span>()</span> <span>{</span>
            <span>...</span>
        <span>}</span>

        <span>@Test</span>
        <span>public</span> <span>void</span> <span>testRefund</span><span>()</span> <span>{</span>
            <span>...</span>
        <span>}</span>
    <span>}</span>
</pre>

  


  
  <p class="sqsrte-large">When we run JUnit, it will inspect the&nbsp;<strong><em>TestOnlineStore</em></strong>&nbsp;class and look for the&nbsp;<strong>@BeforeClass</strong>&nbsp;annotation to find which method JUnit should run as a one-time preparation for the test suite. Once the annotation is discovered, the <strong>initFakeDataBase() </strong>method will be executed. Notice that the name of the method is not significant and JUnit will run a method with any name as long as it is annotated with @BeforeClass and has the appropriate signature. The method execution is also done using Reflection. Similarly, JUnit will proceed to find all the methods annotated with the&nbsp;<strong>@Before</strong>&nbsp;annotation and dynamically call them before every test. And finally, JUnit will find all the methods annotated with&nbsp;<strong>@Test</strong>&nbsp;annotation, and call those methods using Reflection as well.&nbsp;</p><h2>The Formula</h2><p class="sqsrte-large">To summarize,&nbsp;<strong>Annotations</strong>&nbsp;allow us to declaratively assign roles to arbitrary code, and&nbsp;<strong>Java Reflection</strong>&nbsp;assigns that behavior to each&nbsp;<strong>Annotation.&nbsp;</strong>When we run JUnit, the library uses those two features together to find, execute and analyze our tests and provide us the result.</p><p class="sqsrte-large">Using&nbsp;<strong>Annotations</strong>&nbsp;and <strong>Java Reflection</strong> we can create a framework that empowers developers without forcing them to write any complicated code, removing unnecessary barriers and boilerplate. All developers need to do is express their logic and intent through simple and non-obtrusive&nbsp;<strong>Annotations</strong>&nbsp;in the right places, and that’s it, the library <strong>Reflection</strong> based code, will do the rest.</p><h2>Benefits of Mastering Java Reflection</h2><p class="sqsrte-large">If you want to be a true Senior Software Developer, <a href="https://www.udemy.com/course/java-reflection-master-class/?referralCode=2ACE0A2C5279B55798CB"><strong>Java Reflection</strong></a> is the most important topic you need to master. A true Senior Java Developer doesn’t just use off-the-shelf libraries but understands how they work to make the best use of them. </p><p class="sqsrte-large">More importantly, a Senior Java Developer can write Java code which can be reused by many other engineers in their team or organization, and <a href="https://www.udemy.com/course/java-reflection-master-class/?referralCode=2ACE0A2C5279B55798CB"><strong>Java Reflection</strong></a> is the most important tool that allows creating generic algorithms and libraries.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          <a class="
                sqs-block-image-link
                
          
        
              " href="https://www.udemy.com/course/java-reflection-master-class/?referralCode=2ACE0A2C5279B55798CB"
              
          >
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/d231b975-064b-44d1-8db0-8830a916eec5/Advanced+Java+Topics%3A+Java+Reflection+-+Master+Class" data-image-dimensions="750x422" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/d231b975-064b-44d1-8db0-8830a916eec5/Advanced+Java+Topics%3A+Java+Reflection+-+Master+Class?format=1000w" width="750" height="422" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/d231b975-064b-44d1-8db0-8830a916eec5/Advanced+Java+Topics%3A+Java+Reflection+-+Master+Class?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/d231b975-064b-44d1-8db0-8830a916eec5/Advanced+Java+Topics%3A+Java+Reflection+-+Master+Class?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/d231b975-064b-44d1-8db0-8830a916eec5/Advanced+Java+Topics%3A+Java+Reflection+-+Master+Class?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/d231b975-064b-44d1-8db0-8830a916eec5/Advanced+Java+Topics%3A+Java+Reflection+-+Master+Class?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/d231b975-064b-44d1-8db0-8830a916eec5/Advanced+Java+Topics%3A+Java+Reflection+-+Master+Class?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/d231b975-064b-44d1-8db0-8830a916eec5/Advanced+Java+Topics%3A+Java+Reflection+-+Master+Class?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/d231b975-064b-44d1-8db0-8830a916eec5/Advanced+Java+Topics%3A+Java+Reflection+-+Master+Class?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          </a>
        

        
          
          <figcaption class="image-caption-wrapper">
            <p class=""><a href="https://www.udemy.com/course/java-reflection-master-class/?referralCode=2ACE0A2C5279B55798CB">Advanced Java Topics: Java Reflection - Master Class</a></p>
          </figcaption>
        
      
        </figure>
      

    
  


  


&nbsp;
  
  <p class="sqsrte-large">If you want to step up your game and learn how to build your own <strong>Reflection</strong> based algorithms and libraries, the&nbsp;<a href="https://www.udemy.com/course/java-reflection-master-class/?referralCode=2ACE0A2C5279B55798CB" target="_blank">Advanced Java Topics: Java Reflection - Master Class</a>&nbsp;is the best online resource to master those skills.</p><p class="sqsrte-large">In this course, you will learn all the essential <strong>Reflection API</strong>s through real-life examples. More importantly, you will learn <strong>Reflection</strong> best practices and rules of thumb on how to use <strong>Reflection</strong> safely and correctly to get the most benefit and performance for your application.</p><p class="sqsrte-large">Follow this&nbsp;<a href="https://www.udemy.com/course/java-reflection-master-class/?referralCode=2ACE0A2C5279B55798CB" target="_blank">link</a>&nbsp;and join thousands of Java Developers to&nbsp;<a href="https://www.udemy.com/course/java-reflection-master-class/?referralCode=2ACE0A2C5279B55798CB" target="_blank">Java Reflection</a>&nbsp;mastery.</p><h2>More Articles</h2>]]></content:encoded><media:content type="image/jpeg" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1624610364540-ME8QSH6V0A8FGLKWSEVV/pexels-christina-morillo-1181271+%281%29.jpg?format=1500w" medium="image" isDefault="true" width="1280" height="854"><media:title type="plain">What makes JUnit the most popular Java Framework</media:title></media:content></item><item><title>Top 3 Tips to Improve your Java Application’s Performance</title><category>Advanced Java</category><category>Java Concurrency</category><category>Java Multithreading</category><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Mon, 22 Feb 2021 23:16:18 +0000</pubDate><link>https://topdeveloperacademy.com/articles/top-3-tips-to-improve-your-java-applications-performance</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:60331463dcfeba0d4e96ef5c</guid><description><![CDATA[For many years Java had a bad reputation for being slow….throughout the 
years, there have been many advancements made in the JVM itself, that more 
than compensate for all those inefficiencies. And in recent years we see 
more and more companies use Java to develop low latency, high-performance 
applications for high-speed trading, scientific simulations, real-time 
bidding, mobile games, and more.]]></description><content:encoded><![CDATA[&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1614033206569-9RD8ONY4CGBOMQEO6NU8/iStock-918508394.jpg" data-image-dimensions="2500x1574" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1614033206569-9RD8ONY4CGBOMQEO6NU8/iStock-918508394.jpg?format=1000w" width="2500" height="1574" sizes="(max-width: 640px) 100vw, (max-width: 767px) 66.66666666666666vw, 66.66666666666666vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1614033206569-9RD8ONY4CGBOMQEO6NU8/iStock-918508394.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1614033206569-9RD8ONY4CGBOMQEO6NU8/iStock-918508394.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1614033206569-9RD8ONY4CGBOMQEO6NU8/iStock-918508394.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1614033206569-9RD8ONY4CGBOMQEO6NU8/iStock-918508394.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1614033206569-9RD8ONY4CGBOMQEO6NU8/iStock-918508394.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1614033206569-9RD8ONY4CGBOMQEO6NU8/iStock-918508394.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1614033206569-9RD8ONY4CGBOMQEO6NU8/iStock-918508394.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  


&nbsp;
  
  <p class="sqsrte-large">For many years Java had a bad reputation for being slow. C, C++, and other languages that statically compile directly to machine code were the standard for writing applications that required low latency, stable execution with minimal jitter, and high performance as a whole.&nbsp;</p><p class="sqsrte-large">As far as performance is concerned, Java originally came with a disadvantage since it is a managed and interpreted language. The result of the static compilation of a Java program is a byte code that is interpreted and executed instruction by instruction by the Java Virtual Machine.</p><p class="sqsrte-large">Since the memory of a Java application is managed by the JVM as well, there’s a level of overhead in the form of Garbage Collection that the JVM performs to clean up the unused objects. The JVM heap memory layout is also less efficient for objects, and arrays when compared to languages like C and C++.</p><p class="sqsrte-large">However, throughout the years, there have been many advancements made in the JVM itself, that more than compensate for all those inefficiencies. And in recent years we see more and more companies use Java to develop<strong> low latency</strong>, <strong>high-performance</strong> applications for high-speed trading, scientific simulations, real-time bidding, mobile games, and more.</p><p class="sqsrte-large">So in this article, I’m going to share with you 3 tips that you can apply to your Java application today to significantly improve its performance.&nbsp;</p><ol data-rte-list="default"><li><h3>Reduce Garbage Collection</h3></li></ol><p class="sqsrte-large">One of the main benefits of a managed language like Java is developers don’t need to worry about freeing and managing memory. The JVM maintains internal data structures that keep track of all allocated objects. Once certain (configurable) thresholds are met, the JVM performs a multi-step garbage collection. How GC works is outside the scope of this article, but the important fact is GC time and overhead is far from negligible. Except for&nbsp;<a href="https://www.azul.com/products/zing/whatisit/" target="_blank">Azule Zing JVM</a>, all JVM GC algorithms have a Stop-The-World (STW) phase which freezes your entire application. During GC, the JVM deallocates objects that are not used by the program anymore. Also depending on the GC algorithms, objects are moved within the heap memory space to perform compaction and avoid <a href="https://en.wikipedia.org/wiki/Fragmentation_(computing)">fragmentation</a>. Furthermore, the GC overhead is proportional to the size of heap memory we allocate for our Java program.&nbsp;</p><p class="sqsrte-large">So as developers we have a lot of control over our application’s performance by controlling the object allocation in our program. The biggest mistake I hear from Java developers is<em> “memory allocation is fast nowadays so we shouldn’t care about it”</em>.&nbsp;<strong>Yes, allocations are cheap, but Garbage Collection is NOT</strong>.</p><p class="sqsrte-large">Avoiding object allocations if possible is one way to go about it. But another very effective technique is called&nbsp;<strong>object pooling.</strong></p><p class="sqsrte-large">Basically, if you find yourself allocating an immutable object with the same data over and over again, you can simply allocate it once and cache it for subsequent usages.</p><p class="sqsrte-large">Some common examples and candidates for object pooling are:</p><ol data-rte-list="default"><li><p class="sqsrte-large">Memory buffers</p></li><li><p class="sqsrte-large">Thread pools</p></li><li><p class="sqsrte-large">Connection pools</p></li><li><p class="sqsrte-large">Dynamically constructed Strings</p></li></ol><p class="sqsrte-large">The logic here is simple.&nbsp;<strong>The fewer objects you allocate, the less frequent GC cycles are, and the shorter they are.&nbsp;</strong></p><h3>2. Keep Class Methods Short</h3><p class="sqsrte-large">If you were not convinced by now that keeping your methods short and readable is a good idea, here is another incentive for you. <strong>Keeping methods short will make your Java application faster</strong>.</p><p class="sqsrte-large">As mentioned at the beginning of the article, Java is an interpreted language by default. Once the program is launched, the JVM is keeping stats for every method execution. Once certain thresholds are met, the JVM compiles those methods into machine code and stores them in memory. This is called <a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/jjdev/Oracle-JVM-JIT.html#GUID-23D5BA60-A2B3-45F9-93DF-81A3D971CA50">Just In Time</a> <a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/jjdev/Oracle-JVM-JIT.html#GUID-23D5BA60-A2B3-45F9-93DF-81A3D971CA50">(JIT) Compilation</a>. The more isolated your methods are, the more likely you are to reuse them in your application, and the faster it is for the JVM to detect that the method is worth compiling. When a method is complied into native code it goes through <strong>many optimizations</strong> that are determined by the JIT compiler based on the previous executions of the method in the interpreter mode. <strong>This results in a huge speedup and a much more efficient code.</strong></p><p class="sqsrte-large">Very large methods (the values depend on the JVM) will never be JIT compiled by the JVM and will forever remain interpreted.</p><p class="sqsrte-large">But that is not all. Calling a method has its own overhead. Storing the local variables and jumping to another method, then restoring the local variables and retrieving the result is not cheap. For that the JVM has another optimization call <a href="https://wiki.openjdk.java.net/display/HotSpot/Inlining">inlining</a>.&nbsp;</p><p class="sqsrte-large"><a href="https://wiki.openjdk.java.net/display/HotSpot/Inlining">Inlining</a> is when the code within a method is simply copy-pasted into every place where the method is called. This way the overhead of calling a method is entirely eliminated.</p><p class="sqsrte-large">Small methods are excellent candidates for <a href="https://wiki.openjdk.java.net/display/HotSpot/Inlining">inlining</a> by the JVM. Longer methods are less likely to be considered for inlining and method above certain thresholds (depending on the JVM) will not be considered at all.</p><p class="sqsrte-large"><strong>So follow programming best practices and keep your methods short.</strong></p><h3>3. Multithreading and Concurrency</h3><p class="sqsrte-large">By default, each Java application has only one thread of execution. In other words, our application is executed sequentially, instruction by instruction. But when we have independent parts in our application that can be executed in parallel, we can improve our application's performance by a factor of x2, x4, x8, x16 and even more depending on the hardware our application is running on.</p><p class="sqsrte-large">Java and the JVM support Multithreading both as part of the JDK and internally, so by allocating pieces of our code to run on different threads we can achieve great speed up.</p><p class="sqsrte-large">There are many benefits to multithreading, including a&nbsp;<a href="https://topdeveloperacademy.com/https:/www.prodeveloperacademy.com/articles/the-hidden-benefits-of-java-multithreading" target="_blank">hidden</a>&nbsp;one that I talk about in this&nbsp;<a href="https://www.prodeveloperacademy.com/articles/the-hidden-benefits-of-java-multithreading" target="_blank">article</a>.</p><p class="sqsrte-large">The drawback of multithreading and concurrency is the complexity involved in writing correct, performant, and maintainable concurrent code.</p><p class="sqsrte-large">The appeal of multithreading is undeniable. Doubling or quadrupling your performance and saving huge operational costs to your company should drive any good developer to take advantage of it. And rightfully so.</p><p class="sqsrte-large">But what often happens is multithreading brings unintuitive bugs and issues like deadlocks, live-locks, race conditions, and data races into our program.&nbsp;</p><p class="sqsrte-large">Defensive programmers often tend to overuse locking and synchronization as well as incorrectly use other concurrency primitives in the effort to avoid such issues. That often erases any speed up you were hoping to achieve through multithreading, making the application overly complex and sometimes even slower.</p><p class="sqsrte-large"><strong>So my advice with multithreading is either use it wisely or don’t use it at all.</strong></p><p class="sqsrte-large">If you take the effort to learn it you can achieve tremendous performance and responsiveness so going the extra mile to master it really pays off.</p><p class="sqsrte-large"><a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C" target="_blank">Java Multithreading, Concurrency &amp; Performance Optimization</a>&nbsp;is a course where you can learn all of that, and it takes no more than about 4 hours to complete.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          <a class="
                sqs-block-image-link
                
          
        
              " href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C"
              
          >
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg" data-image-dimensions="750x422" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=1000w" width="750" height="422" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          </a>
        

        
          
          <figcaption class="image-caption-wrapper">
            <p class=""><a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C">Java Multithreading, Concurrency &amp; Performance Optimization</a></p>
          </figcaption>
        
      
        </figure>
      

    
  


  


&nbsp;
  
  <p class="sqsrte-large">In this <a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C">course</a>, you will learn how to systematically optimize your Java application’s performance using multithreading, eliminating any guessing or uncertainty. It takes you through topics like Operating Systems fundamentals, memory organization, as well as covers advanced topics like lock-free algorithms, optimizing for latency and throughput, and much more. Check out the <a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C" target="_blank">course</a> to learn more.</p><h2>More Articles</h2>]]></content:encoded><media:content type="image/jpeg" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1614034890312-6COFGOM2Q62ZF3YL70D2/financial-and-technical-data-analysis-graph-showing-search-findings-picture-id918508394-course-image-size.jpg?format=1500w" medium="image" isDefault="true" width="960" height="540"><media:title type="plain">Top 3 Tips to Improve your Java Application’s Performance</media:title></media:content></item><item><title>The Hidden Benefits of Java Multithreading</title><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Thu, 02 Jul 2020 02:39:00 +0000</pubDate><link>https://topdeveloperacademy.com/articles/the-hidden-benefits-of-java-multithreading</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:5fc45eaf3485235c865224dc</guid><description><![CDATA[When we think of the benefits of multithreading in Java, the following two 
often come to mind: high performance through parallel execution, and 
multitasking achieved through concurrency. However, there is a third 
benefit to multithreading that is often overlooked.]]></description><content:encoded><![CDATA[<p class="sqsrte-large">Multithreading has been a first-class feature of the JVM and the Java programming language right from the start.</p><p class="sqsrte-large">When we think of the benefits of multithreading in Java, the following two often come to mind:&nbsp;</p><ol data-rte-list="default"><li><p class="sqsrte-large">High performance through parallel execution.</p></li><li><p class="sqsrte-large">Multitasking achieved through concurrency.</p></li></ol>


  


  














































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1606706633705-JCBVK9865JJJIXSHOFY9/hidden_benefits_of_multithreading.jpg" data-image-dimensions="700x525" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1606706633705-JCBVK9865JJJIXSHOFY9/hidden_benefits_of_multithreading.jpg?format=1000w" width="700" height="525" sizes="(max-width: 640px) 100vw, (max-width: 767px) 100vw, 100vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1606706633705-JCBVK9865JJJIXSHOFY9/hidden_benefits_of_multithreading.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1606706633705-JCBVK9865JJJIXSHOFY9/hidden_benefits_of_multithreading.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1606706633705-JCBVK9865JJJIXSHOFY9/hidden_benefits_of_multithreading.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1606706633705-JCBVK9865JJJIXSHOFY9/hidden_benefits_of_multithreading.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1606706633705-JCBVK9865JJJIXSHOFY9/hidden_benefits_of_multithreading.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1606706633705-JCBVK9865JJJIXSHOFY9/hidden_benefits_of_multithreading.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1606706633705-JCBVK9865JJJIXSHOFY9/hidden_benefits_of_multithreading.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <p class="sqsrte-large">The benefit of high performance translates directly into money, since fast and efficient applications consume fewer resources and therefore require less expensive hardware or fewer cloud instances.</p><p class="sqsrte-large">Multitasking achieved through multithreading allows us to execute multiple tasks within an application instance, which results in high responsiveness of user-interfacing applications.</p><p class="sqsrte-large">If you want to learn how to create threads and achieve high performance with Java, <a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C">click here</a>.</p><p class="sqsrte-large"><strong>﻿</strong>However, there is a third benefit to multithreading that is often overlooked. That is task <span><strong>isolation</strong></span>. Each thread execution in the JVM is isolated from the other threads within the same process.</p><p class="sqsrte-large">Although threads within the same process share many resources, a thread has very limited ability to interfere with other threads within the process. This is beneficial because aside from a few specific exceptions, a crashed or a misbehaving thread will not bring down the entire application, let alone other threads.</p><p class="sqsrte-large">For example, if a thread dies due to an I/O exception or even a <em>NullPointerException</em>, other threads remain unaffected.</p><p class="sqsrte-large">To illustrate the power of thread isolation, let's consider the architecture of a video streaming application:</p>


  


  














































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1606705818217-LP8JRDDM6CNW6BG13R9N/hidden_benefits_of_multithreading_diagram.jpg" data-image-dimensions="2222x1096" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1606705818217-LP8JRDDM6CNW6BG13R9N/hidden_benefits_of_multithreading_diagram.jpg?format=1000w" width="2222" height="1096" sizes="(max-width: 640px) 100vw, (max-width: 767px) 100vw, 100vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1606705818217-LP8JRDDM6CNW6BG13R9N/hidden_benefits_of_multithreading_diagram.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1606705818217-LP8JRDDM6CNW6BG13R9N/hidden_benefits_of_multithreading_diagram.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1606705818217-LP8JRDDM6CNW6BG13R9N/hidden_benefits_of_multithreading_diagram.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1606705818217-LP8JRDDM6CNW6BG13R9N/hidden_benefits_of_multithreading_diagram.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1606705818217-LP8JRDDM6CNW6BG13R9N/hidden_benefits_of_multithreading_diagram.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1606705818217-LP8JRDDM6CNW6BG13R9N/hidden_benefits_of_multithreading_diagram.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1606705818217-LP8JRDDM6CNW6BG13R9N/hidden_benefits_of_multithreading_diagram.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
          
          <figcaption class="image-caption-wrapper">
            <p class="">Multithreaded video streaming application architecture diagram</p>
          </figcaption>
        
      
        </figure>
      

    
  


  



  
  <p class="sqsrte-large">In this application, data is received from the network by the data capturing thread. Audio is captured from the microphone using the audio capturing thread. And video is captured from an external camera by the video capturing thread. The three data streams are synchronized based on their timestamps by the synchronization thread and later are independently streamed to a live audience as well as saved to a file which can be watched at a later time.</p><p class="sqsrte-large">Since each task is isolated in a separate thread, if we lose one of the sources like the data or the audio for example, the rest of the media will continue being broadcasted and saved to the file.</p><p class="sqsrte-large">Similarly if the streaming thread crashes, the file saving thread will continue saving the unified media into the file.</p><p class="sqsrte-large">The exceptions to the threads isolation rule are:</p><ol data-rte-list="default"><li><p class="sqsrte-large">When other threads depend on the misbehaving thread to continue their own work or to finish their calculation.</p></li><li><p class="sqsrte-large">When the error that brought down the thread affects shared resources or the entire process, like in the case of an <em>OutOfMemoryException</em>.</p></li></ol><p class="sqsrte-large">If you want to learn how to create threads and achieve high performance with Java, <a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C">click here</a>.</p><p class="sqsrte-large">When either of those happen, the application is rarely recoverable and often requires a restart.</p><p class="sqsrte-large">In the example above, the isolation breaks if the synchronization thread crashes, since the streaming and file saving threads depend on it.</p><p class="sqsrte-large">Those problems can be mitigated by a few multithreading architectural tricks. For example, a watchdog thread can monitor the synchronization thread’s health and in an emergency situation may either:</p><ol data-rte-list="default"><li><p class="sqsrte-large">Launch another synchronization thread to take its place.</p></li><li><p class="sqsrte-large">Start dumping the input data video and audio to the disk as independent backup files so they can be recovered in the future.</p></li></ol><p class="sqsrte-large">Another vulnerability in this type of architecture is the shared queues that feed the data, video and audio from their capturing threads into the synchronization thread. If those queues grow to a point where our process runs out of memory and we get an <em>OutOfMemoryException</em>, our application can get into a corrupted state.</p><p class="sqsrte-large">However, if we implement this multithreaded “multi-producer, multi-consumer” architecture with the right coordination and back pressure techniques, all of which are covered in depth in the <a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C">Java Multithreading, Concurrency and Performance Optimization course</a>, all these problems can be avoided.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          <a class="
                sqs-block-image-link
                
          
        
              " href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C"
              
          >
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg" data-image-dimensions="750x422" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=1000w" width="750" height="422" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          </a>
        

        
          
          <figcaption class="image-caption-wrapper">
            <p class=""><a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C">Java Multithreading, Concurrency and Performance Optimization</a></p>
          </figcaption>
        
      
        </figure>
      

    
  


  


&nbsp;
  
  <p class="sqsrte-large">Java multithreading is one of the most powerful tools in any Java developer and software architect's toolkit. It can save us a lot of money on infrastructure, bring superb user experience to our clients, and as we learned in this article allows us to build fault-tolerant applications using thread isolation.</p><p class="sqsrte-large">If you want to learn how to build your own highly performant multithreaded applications, take our <a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C">Java Multithreading, Concurrency and Performance Optimization course</a>.</p><h2>More Articles</h2>]]></content:encoded><media:content type="image/jpeg" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1606707725010-F6O044MMBO6TJOSE627Q/hidden_benefits_of_multithreading.jpg?format=1500w" medium="image" isDefault="true" width="700" height="525"><media:title type="plain">The Hidden Benefits of Java Multithreading</media:title></media:content></item><item><title>Apache Kafka for Modern Distributed Systems</title><category>Apache Kafka</category><category>Distributed Systems</category><category>Advanced Java</category><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Wed, 06 May 2020 19:00:00 +0000</pubDate><link>https://topdeveloperacademy.com/articles/apache-kafka-for-modern-distributed-systems</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:602ec7454c66fe5275fa754a</guid><description><![CDATA[With the growing popularity of digital services, many companies have to 
handle millions and even billions of requests per day. Depending on the 
digital product, those requests can come from third-party services that 
call their APIs or from real human users that use their online services. 
This large scale of operation forces software companies to abandon the 
traditional centralized software approach and migrate to distributed 
systems instead.]]></description><content:encoded><![CDATA[<p class="sqsrte-large">With the growing popularity of digital services, many companies have to handle millions and even billions of requests per day. Depending on the digital product, those requests can come from third-party services that call their APIs or from real human users that use their online services. This large scale of operation forces software companies to abandon the traditional centralized software approach and migrate to distributed systems instead.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="true" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613703980015-B7TYM4QO6TSR4BADAQ67/iStock-1212102699-l.jpg" data-image-dimensions="2121x1414" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613703980015-B7TYM4QO6TSR4BADAQ67/iStock-1212102699-l.jpg?format=1000w" width="2121" height="1414" sizes="(max-width: 640px) 100vw, (max-width: 767px) 83.33333333333334vw, 83.33333333333334vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613703980015-B7TYM4QO6TSR4BADAQ67/iStock-1212102699-l.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613703980015-B7TYM4QO6TSR4BADAQ67/iStock-1212102699-l.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613703980015-B7TYM4QO6TSR4BADAQ67/iStock-1212102699-l.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613703980015-B7TYM4QO6TSR4BADAQ67/iStock-1212102699-l.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613703980015-B7TYM4QO6TSR4BADAQ67/iStock-1212102699-l.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613703980015-B7TYM4QO6TSR4BADAQ67/iStock-1212102699-l.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613703980015-B7TYM4QO6TSR4BADAQ67/iStock-1212102699-l.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  


&nbsp;
  
  <h3>Challenges of Distributed Systems</h3><p class="sqsrte-large">Distributed Systems pose many challenges. They involve many instances of different applications or services, running on different machines and communicating with each other through the network. </p><p class="sqsrte-large">Network failures and network partitions are only part of the problem.</p><p class="sqsrte-large">In a typical modern distributed system we can have multiple services calling each other to complete a task. This creates a very dangerous synchronous dependency between a chain of services, while each one can go down at any moment.</p>


  


  














































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613686892944-T3W68ALIX1CJYEUH898A/services%2Bchain%2B%25281%2529.jpg" data-image-dimensions="960x202" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613686892944-T3W68ALIX1CJYEUH898A/services%2Bchain%2B%25281%2529.jpg?format=1000w" width="960" height="202" sizes="(max-width: 640px) 100vw, (max-width: 767px) 100vw, 100vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613686892944-T3W68ALIX1CJYEUH898A/services%2Bchain%2B%25281%2529.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613686892944-T3W68ALIX1CJYEUH898A/services%2Bchain%2B%25281%2529.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613686892944-T3W68ALIX1CJYEUH898A/services%2Bchain%2B%25281%2529.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613686892944-T3W68ALIX1CJYEUH898A/services%2Bchain%2B%25281%2529.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613686892944-T3W68ALIX1CJYEUH898A/services%2Bchain%2B%25281%2529.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613686892944-T3W68ALIX1CJYEUH898A/services%2Bchain%2B%25281%2529.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613686892944-T3W68ALIX1CJYEUH898A/services%2Bchain%2B%25281%2529.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <p class="sqsrte-large">There are many reasons while an application may go down in a distributed system.</p><p class="sqsrte-large">One of the reasons is pure probability. Even the most reliable hardware breaks, and the more computers we have the higher the probability is that some component will break any moment. Software failures due to exceptions or bugs are even more common. But even aside from failures, some downtime is necessary to roll out a new release or upgrade the operating system. This is where <a href="https://kafka.apache.org/">Apache Kafka</a> comes in.</p><h3>Introduction to Apache Kafka</h3><p class="sqsrte-large"><a href="https://kafka.apache.org/">Apache Kafka</a> is a distributed <a href="https://en.wikipedia.org/wiki/Message_broker">message broker</a> that allows services to exchange messages without the need for both services to be online and available at the moment of the exchange.  <a href="https://kafka.apache.org/">Apache Kafka</a> can sit in between services and act as a virtual buffer. You can think of it as a distributed message queue on steroids.</p>


  


  














































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687328122-SD5T7AEUC2RWNWRMMUQW/services%2Bchain.jpg" data-image-dimensions="960x287" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687328122-SD5T7AEUC2RWNWRMMUQW/services%2Bchain.jpg?format=1000w" width="960" height="287" sizes="(max-width: 640px) 100vw, (max-width: 767px) 100vw, 100vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687328122-SD5T7AEUC2RWNWRMMUQW/services%2Bchain.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687328122-SD5T7AEUC2RWNWRMMUQW/services%2Bchain.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687328122-SD5T7AEUC2RWNWRMMUQW/services%2Bchain.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687328122-SD5T7AEUC2RWNWRMMUQW/services%2Bchain.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687328122-SD5T7AEUC2RWNWRMMUQW/services%2Bchain.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687328122-SD5T7AEUC2RWNWRMMUQW/services%2Bchain.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687328122-SD5T7AEUC2RWNWRMMUQW/services%2Bchain.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <p class="sqsrte-large">An abstraction that Kafka uses for publishing messages is called a<strong> Kafka Topic</strong>. Services can publish messages to a Kafka topic and consume messages from a Kafka topic. </p>


  


  














































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687572193-VUXLRD56MZL8NOD1YLOB/services%2Bchain%2B%25281%2529.jpg" data-image-dimensions="915x377" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687572193-VUXLRD56MZL8NOD1YLOB/services%2Bchain%2B%25281%2529.jpg?format=1000w" width="915" height="377" sizes="(max-width: 640px) 100vw, (max-width: 767px) 100vw, 100vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687572193-VUXLRD56MZL8NOD1YLOB/services%2Bchain%2B%25281%2529.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687572193-VUXLRD56MZL8NOD1YLOB/services%2Bchain%2B%25281%2529.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687572193-VUXLRD56MZL8NOD1YLOB/services%2Bchain%2B%25281%2529.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687572193-VUXLRD56MZL8NOD1YLOB/services%2Bchain%2B%25281%2529.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687572193-VUXLRD56MZL8NOD1YLOB/services%2Bchain%2B%25281%2529.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687572193-VUXLRD56MZL8NOD1YLOB/services%2Bchain%2B%25281%2529.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687572193-VUXLRD56MZL8NOD1YLOB/services%2Bchain%2B%25281%2529.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <p class="sqsrte-large">Each topic can be further broken down into <strong>partitions</strong>. Messages within the same topic’s partition are ordered but there’s no global order of messages within a Kafka topic as a whole.</p>


  


  














































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687936211-0TGBO7HXTO1RI93HW8XC/services%2Bchain%2B%25282%2529.jpg" data-image-dimensions="960x428" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687936211-0TGBO7HXTO1RI93HW8XC/services%2Bchain%2B%25282%2529.jpg?format=1000w" width="960" height="428" sizes="(max-width: 640px) 100vw, (max-width: 767px) 100vw, 100vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687936211-0TGBO7HXTO1RI93HW8XC/services%2Bchain%2B%25282%2529.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687936211-0TGBO7HXTO1RI93HW8XC/services%2Bchain%2B%25282%2529.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687936211-0TGBO7HXTO1RI93HW8XC/services%2Bchain%2B%25282%2529.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687936211-0TGBO7HXTO1RI93HW8XC/services%2Bchain%2B%25282%2529.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687936211-0TGBO7HXTO1RI93HW8XC/services%2Bchain%2B%25282%2529.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687936211-0TGBO7HXTO1RI93HW8XC/services%2Bchain%2B%25282%2529.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613687936211-0TGBO7HXTO1RI93HW8XC/services%2Bchain%2B%25282%2529.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  



  
  <p class="sqsrte-large">Also, unlike direct <a href="https://www.w3.org/Protocols/rfc2616/rfc2616.html">HTTP</a> requests that have a single sender and a single receiver, messages to Kafka can be broadcasted to multiple consumers, which follows the common <a href="https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern">pub/sub pattern</a>.</p><h3>Benefits of Apache Kafka for Distributed Systems</h3><p class="sqsrte-large">To ensure reliable delivery, high availability and scalability, Apache Kafka is designed as a distributed system on its own from the ground up. </p><p class="sqsrte-large">It uses all the state-of-the-art modern techniques for building fault-tolerant and high-performance applications and distributed databases that power the top e-commerce, search, video on demand, and ride-sharing companies as well as cloud services.&nbsp;</p><h3>Reliability </h3><p class="sqsrte-large">The reliability of Apache Kafka is very configurable. It can be used to deliver mission critical financial events like money transactions with strong guarantees on its delivery semantics. But it can also be used for delivery of logs and metrics that require a lot less reliability and can save on operational overhead</p><h3>Scalability and Performance</h3><p class="sqsrte-large">Apache Kafka can scale to&nbsp;<a href="https://www.confluent.io/blog/scaling-kafka-to-10-gb-per-second-in-confluent-cloud/" target="_blank">10 GBps of throughout</a>&nbsp;with&nbsp;<a href="https://www.confluent.io/blog/kafka-fastest-messaging-system/" target="_blank">under 10ms of latency</a> which is one of the reasons <strong>80% of fortune 100 companies use Apache Kafka</strong> in production. And thanks to the partitioning of each Kafka Topic, Kafka supports high concurrency both for producers and consumers.</p><h3>Integration with Client Code Base</h3><p class="sqsrte-large">Apache Kafka also supports client libraries in languages like Java, C/C++, .NET, Python, Go and many <a href="https://docs.confluent.io/platform/current/clients/index.html">others</a>. This allows software teams to develop services the language of their choice and allow easy integration with Kafka, both for publishing messages to Kafka and consuming messages from Kafka.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          <a class="
                sqs-block-image-link
                
          
        
              " href="https://www.udemy.com/course/distributed-systems-cloud-computing-with-java/?referralCode=F724C3469E1CA3C3BAD8"
              
          >
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/f496d6ba-e749-4d0d-a3ca-2a3599b640a2/course-image-with-me.jpg" data-image-dimensions="750x422" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/f496d6ba-e749-4d0d-a3ca-2a3599b640a2/course-image-with-me.jpg?format=1000w" width="750" height="422" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/f496d6ba-e749-4d0d-a3ca-2a3599b640a2/course-image-with-me.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/f496d6ba-e749-4d0d-a3ca-2a3599b640a2/course-image-with-me.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/f496d6ba-e749-4d0d-a3ca-2a3599b640a2/course-image-with-me.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/f496d6ba-e749-4d0d-a3ca-2a3599b640a2/course-image-with-me.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/f496d6ba-e749-4d0d-a3ca-2a3599b640a2/course-image-with-me.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/f496d6ba-e749-4d0d-a3ca-2a3599b640a2/course-image-with-me.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/f496d6ba-e749-4d0d-a3ca-2a3599b640a2/course-image-with-me.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          </a>
        

        
          
          <figcaption class="image-caption-wrapper">
            <p class=""><a href="https://www.udemy.com/course/distributed-systems-cloud-computing-with-java/?referralCode=F724C3469E1CA3C3BAD8"><strong>Distributed Systems &amp; Cloud Computing with Java</strong></a></p>
          </figcaption>
        
      
        </figure>
      

    
  


  


&nbsp;
  
  <p class="sqsrte-large">If you want to learn how Kafka achieves its high availability and scalability so you can apply the same techniques for your system, check out&nbsp;<a href="https://www.udemy.com/course/distributed-systems-cloud-computing-with-java/?referralCode=F724C3469E1CA3C3BAD8" target="_blank">Distributed Systems &amp; Cloud Computing with Java</a>. In this course you will learn all the fundamentals of modern Distributed Systems and Cloud Computing as well as the practical application of Apache Kafka for your business. The course is targeted towards Java developers and covers a variety of open source technologies like Apache Zookeeper, Distributed MongoDB, HAProxy and many others. </p><h2>More Articles</h2>]]></content:encoded><media:content type="image/jpeg" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1613703678359-5PLTR5LTZAH6NNCV0QWD/iStock-1212102699-l.jpg?format=1500w" medium="image" isDefault="true" width="1500" height="1000"><media:title type="plain">Apache Kafka for Modern Distributed Systems</media:title></media:content></item><item><title>Top 3 Projects for Java Concurrency</title><dc:creator>Michael Pogrebinsky</dc:creator><pubDate>Fri, 23 Nov 2018 16:12:00 +0000</pubDate><link>https://topdeveloperacademy.com/articles/top-three-projects-for-java-concurrency</link><guid isPermaLink="false">5f8b6a11dab43d715aaa254a:5f9258ca2e77485809d52e44:5f9258ca2e77485809d52e47</guid><description><![CDATA[The threading model is important for achieving high performance and 
responsiveness for your application, but getting it right is a challenge. 
In this article we’ll explore my top 3 picks for toolkits and frameworks 
for concurrency and multithreading.]]></description><content:encoded><![CDATA[<p class="sqsrte-large">The threading model is important for achieving high performance and responsiveness for your application, but getting it right is a challenge. In this article we’ll explore my top 3 picks for toolkits and frameworks for concurrency and multithreading.</p>


  


  














































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1603490504322-PW265NKRU4QU2HGM16MD/top_3_projects_for_java_concurrency" data-image-dimensions="770x359" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1603490504322-PW265NKRU4QU2HGM16MD/top_3_projects_for_java_concurrency?format=1000w" width="770" height="359" sizes="(max-width: 640px) 100vw, (max-width: 767px) 100vw, 100vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1603490504322-PW265NKRU4QU2HGM16MD/top_3_projects_for_java_concurrency?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1603490504322-PW265NKRU4QU2HGM16MD/top_3_projects_for_java_concurrency?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1603490504322-PW265NKRU4QU2HGM16MD/top_3_projects_for_java_concurrency?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1603490504322-PW265NKRU4QU2HGM16MD/top_3_projects_for_java_concurrency?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1603490504322-PW265NKRU4QU2HGM16MD/top_3_projects_for_java_concurrency?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1603490504322-PW265NKRU4QU2HGM16MD/top_3_projects_for_java_concurrency?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1603490504322-PW265NKRU4QU2HGM16MD/top_3_projects_for_java_concurrency?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          
        

        
      
        </figure>
      

    
  


  


<hr />
  
  <p class="sqsrte-large">Multithreading helps us write software that can interact efficiently with the user and the IO devices such as the network, the disk, keyboard, mouse and others. Most computers today have multiple cores. Multithreading allows us to utilize the full performance capabilities of our computer by running tasks completely in parallel on multiple cores in the same time.<br>A correct multithreading model for your particular application can improve performance by an order of magnitude, and make it much easier to scale your code and keep it maintainable.</p><p class="sqsrte-large">Building the multithreading boiler plate code, for every single application is tedious and error prone, and keeping it reusable for future projects is a full time job. That is why some people made it their full time job, and created some amazing, reusable projects so YOU can use your multithreading knowledge to pick the right technology and decide how to use it, rather than writing your own solution every single time.<br>Let’s look at the top 3 innovative projects that made software concurrency easy for all of us.</p><h2><a href="https://vertx.io/"><strong>1. Vert.x</strong></a></h2><p class="sqsrte-large">Based on&nbsp;<a href="https://netty.io/">Netty</a>, Vert.x is one of the most versatile toolkits for writing high performance multithreaded code. It is both easy to use and completely non-opinionated.<br>It doesn’t put your code into a frame (therefore it is not a framework), but rather provides you with many easy, non intrusive ways to write your multithreaded code.</p><p class="sqsrte-large">Vert.x comes with separate modules for anything you need, and is based and relies on the&nbsp;<a href="https://vertx.io/docs/vertx-core/java/">core module</a>&nbsp;for everything.</p><p class="sqsrte-large">A few examples are</p><ul data-rte-list="default"><li><p class="sqsrte-large"><a href="https://vertx.io/docs/vertx-web/java/">Vert.x Web</a>&nbsp;and&nbsp;<a href="https://vertx.io/docs/vertx-web-client/java/">Vert.x Web Client</a>&nbsp;modules for HTTP server and client application development.<br><a href="https://vertx.io/docs/vertx-mongo-client/java/">MongoDB client</a>&nbsp;and&nbsp;<a href="https://vertx.io/docs/vertx-redis-client/java/">Redis Client</a>&nbsp;for data access.</p></li><li><p class="sqsrte-large"><a href="https://vertx.io/docs/vertx-reactive-streams/java/">Reactive Streams</a>&nbsp;for back pressure and working with streams of data.</p></li><li><p class="sqsrte-large"><a href="https://vertx.io/docs/vertx-service-discovery/java/">Vert.x Service Discovery</a>&nbsp;and&nbsp;<a href="https://vertx.io/docs/vertx-circuit-breaker/java/">Vert.x Circuit Breaker</a>&nbsp;for managing communication between microservices</p></li><li><p class="sqsrte-large">And many other</p></li></ul><p class="sqsrte-large">The main concept of Vert.x is the&nbsp;<em>Verticle</em>&nbsp;which is essentially an event loop running on a single thread. An event loop is an infinite loop that</p><ol data-rte-list="default"><li><p class="sqsrte-large">Checks for IO events coming from the OS (in most operating systems it’s done in constant time)</p></li><li><p class="sqsrte-large">Checks for our own scheduled events’ completion (such as timers),</p></li><li><p class="sqsrte-large">Runs all the callback functions registered for incoming events.</p></li><li><p class="sqsrte-large">And goes to the next iteration</p></li></ol><p class="sqsrte-large">For those familiar with NodeJS, this is exactly the same concept. This is called the&nbsp;<em>Reactor Model.</em></p><p class="sqsrte-large">The second main concept Vert.x is advocating for is completely&nbsp;<em>asynchronous</em>,&nbsp;<em>non blocking</em>&nbsp;programming.</p><p class="sqsrte-large">Essentially every time you catch yourself writing blocking code like&nbsp;<code>Thread.sleep(1000)</code>&nbsp;or&nbsp;<code>networkDataStream.readLine()</code>&nbsp;you are doing it wrong. (With respect to Vert.x)<br>In general the problem with writing blocking code is the thread becomes blocked and unusable until that method unblocks. If you still have data coming in from somewhere, you will end up creating more threads to handle that data, and then block those threads again. The more threads you create, the more management work your OS is doing, and less CPU left for us. (Thrashing)<br>Vert.x provides us with all the tools to write non blocking code and avoid such a situation. So you will need to create only a <strong>handful</strong> of threads and no more.</p><p class="sqsrte-large">For example instead of&nbsp;<code>Thread.sleep(1000)</code>&nbsp;, in Vert.x you write:</p>


  


  




  
    
<pre>long delay = 1000<span>;</span>
long timerId = vertx.setTimer(delay, timerId -&gt; <span>{</span> 
  <span>System</span><span>.</span>out<span>.</span>println<span>(</span>“This code is triggered after <span>1000</span> ms”<span>)</span><span>;</span> 
<span>}</span>)<span>;</span>
</pre>

  


  
  <p class="sqsrte-large">This way you simply register a callback to be executed after the delay has passed, but the thread is never blocked.</p><p class="sqsrte-large">If you write all your code in a non blocking, asynchronous way, all you need is a small number of threads, each thread with a single&nbsp;<em>Verticle&nbsp;</em>(Event loop)<em>.</em>&nbsp;That pattern is called a&nbsp;<em>Multi Reactor.</em></p><p class="sqsrte-large">Creating&nbsp;<em>Verticle</em>&nbsp;threads with Vert.x is easy.<br>All you need to do is</p><ol data-rte-list="default"><li><p class="sqsrte-large">Extend the abstractVerticle class.</p></li><li><p class="sqsrte-large">Put your code in the start() method</p></li><li><p class="sqsrte-large">Deploy your verticle.</p></li></ol>


  


  




  
    
<pre><span>public</span> <span>class</span> CustomVerticle <span>extends</span> AbstractVerticle <span>{</span>

  <span>// This is called when the verticle is deployed</span>
  <span>public</span> <span>void</span> start<span>(</span><span>)</span> <span>{</span> 
    <span>//Your code goes here</span>
  <span>}</span>
<span>}</span>
...
Vertx vertx = Vertx.vertx()<span>;</span>
CustomVerticle customVerticle = new CustomVerticle()<span>;</span> 
vertx.deployVerticle(customVerticle)<span>;</span>
</pre>

  


  
  <p class="sqsrte-large">Creating an HTTP server that runs on 8 threads is just as easy:</p>


  


  




  
    
<pre><span>public</span> <span>class</span> WebServerVertcile <span>extends</span> AbstractVerticle <span>{</span>
 
  <span>public</span> <span>void</span> start<span>(</span><span>)</span> <span>{</span> 
    HttpServer server <span>=</span> getVertx<span>(</span><span>)</span><span>.</span>createHttpServer<span>(</span><span>)</span><span>;</span> 
    server<span>.</span>requestHandler<span>(</span>request <span>-</span><span>&gt;</span> <span>{</span>   
        <span>// Code that handles the requests</span>
    <span>}</span><span>)</span><span>;</span>
    server<span>.</span>listen<span>(</span><span>8080</span><span>)</span><span>;</span>
  <span>}</span>
<span>}</span>
...

Vertx vertx = Vertx.vertx()<span>;</span>
DeploymentOptions options = new DeploymentOptions().setInstances(8)<span>;</span> 
vertx.deployVerticle("WebServerVerticle", options)<span>;</span>
</pre>

  


  
  <p class="sqsrte-large">That’s it. That is all the code you need!!</p><p class="sqsrte-large"><em>Vert.x</em>&nbsp;also supports<em>&nbsp;</em><a href="https://vertx.io/docs/vertx-rx/java/"><em>RX Java</em></a>,&nbsp;<a href="https://vertx.io/docs/vertx-sync/java/"><em>Fibers</em></a><em>,&nbsp;</em>programming using the&nbsp;<em>Actor Model&nbsp;</em>and many other ways for you to write your multithreaded code. If you still need to write blocking code, Vert.x provides with ways to do that too.</p><p class="sqsrte-large">Supported languages:&nbsp;<strong>Java</strong>,&nbsp;<strong>JavaScript</strong>,&nbsp;<strong>Groovy</strong>,&nbsp;<strong>Ruby</strong>,&nbsp;<strong>Ceylon</strong>,&nbsp;<strong>Scala</strong>&nbsp;and&nbsp;<strong>Kotlin</strong>.</p><h2><a href="https://lmax-exchange.github.io/disruptor/"><strong>2. LMAX Disruptor</strong></a></h2><p class="sqsrte-large">LMAX Disruptor comes from&nbsp;<a href="https://www.lmax.com/">LMAX Exchange</a>&nbsp;which is a foreign exchange trading facility, based in London. To achieve low level and high throughput, so important for financial trading, LMAX focused on the area of optimizing the queues which pass data in between stages of the system.</p><p class="sqsrte-large">Although created initially for financial trading,&nbsp;<em>LMAX Disruptor&nbsp;</em>aims to be a general purpose framework for solving the concurrency problem.</p><p class="sqsrte-large"><em>LMAX Disruptor&nbsp;</em>is extremely cache efficient and&nbsp;<em>lock free</em>, which comes with very high performance benefits.</p><p class="sqsrte-large">Here are some impressive&nbsp;<a href="https://github.com/LMAX-Exchange/disruptor/wiki/Performance-Results"><em>performance numbers</em></a><em>.</em></p><p class="sqsrte-large">In the heart of&nbsp;<em>LMAX Disruptor</em>&nbsp;is an extremely hardware efficient&nbsp;<a href="http://mechanitis.blogspot.com/2011/06/dissecting-disruptor-whats-so-special.html">Ring Buffer</a>, which serves as the vehicle for moving events from&nbsp;<em>producers</em>&nbsp;to&nbsp;<em>consumers.</em></p><p class="sqsrte-large">To pass an event from a producer to consumers you need to claim a sequence number in the Ring Buffer. After claiming the sequence number you produce the desired event and publish it to the consumers:<br>Lets start with creating the producer and consumer classes:</p><p class="sqsrte-large"><strong>Producer:</strong></p>


  


  




  
    
<pre><span>public</span> <span>class</span> CustomEventProducer <span>{</span>
  <span>private</span> <span>final</span> RingBuffer<span>&lt;</span>CustomEvent<span>&gt;</span> ringBuffer<span>;</span>
  <span>public</span> CustomEventProducer<span>(</span>RingBuffer<span>&lt;</span>CustomEvent<span>&gt;</span> ringBuffer<span>)</span> <span>{</span>
    <span>this</span><span>.</span>ringBuffer <span>=</span> ringBuffer<span>;</span> 
  <span>}</span>
  <span>public</span> <span>void</span> publishDataToConsumer<span>(</span><span>String</span> data<span>)</span> <span>{</span>
    <span>long</span> sequence <span>=</span> ringBuffer<span>.</span>next<span>(</span><span>)</span><span>;</span>  
    <span>try</span> <span>{</span>
      CustomEvent event <span>=</span> ringBuffer<span>.</span>get<span>(</span>sequence<span>)</span><span>;</span> 
      event<span>.</span>set<span>(</span>data<span>)</span><span>;</span>  
    <span>}</span> <span>finally</span> <span>{</span>
      ringBuffer<span>.</span>publish<span>(</span>sequence<span>)</span><span>;</span>
    <span>}</span>
  <span>}</span>
<span>}</span>
</pre>

  


  
  <p class=""><strong>Consumer:</strong></p>


  


  




  
    
<pre><span>public</span> <span>class</span> CustomEventProducer <span>{</span>
  <span>private</span> <span>final</span> RingBuffer<span>&lt;</span>CustomEvent<span>&gt;</span> ringBuffer<span>;</span>
  <span>public</span> CustomEventProducer<span>(</span>RingBuffer<span>&lt;</span>CustomEvent<span>&gt;</span> ringBuffer<span>)</span> <span>{</span>
    <span>this</span><span>.</span>ringBuffer <span>=</span> ringBuffer<span>;</span> 
  <span>}</span>
  <span>public</span> <span>void</span> publishDataToConsumer<span>(</span><span>String</span> data<span>)</span> <span>{</span>
    <span>long</span> sequence <span>=</span> ringBuffer<span>.</span>next<span>(</span><span>)</span><span>;</span>  
    <span>try</span> <span>{</span>
      CustomEvent event <span>=</span> ringBuffer<span>.</span>get<span>(</span>sequence<span>)</span><span>;</span> 
      event<span>.</span>set<span>(</span>data<span>)</span><span>;</span>  
    <span>}</span> <span>finally</span> <span>{</span>
      ringBuffer<span>.</span>publish<span>(</span>sequence<span>)</span><span>;</span>
    <span>}</span>
  <span>}</span>
<span>}</span>
</pre>

  


  
  <p class="sqsrte-large">Unlike&nbsp;<em>Vert.x&nbsp;</em>that uses the&nbsp;<em>Netty</em>&nbsp;event loop and threading model,&nbsp;<em>LMAX Disruptor</em>&nbsp;is using the general Java Executors for creating the threads.</p><p class="sqsrte-large">You could create a simple executor like so</p>


  


  




  
    
<pre>Executor executor = Executors.newCachedThreadPool()<span>;</span>
</pre>

  


  
  <p class="sqsrte-large">And pass that executor into the&nbsp;<em>LMAX Disruptor</em></p>


  


  




  
    
<pre>Disruptor&lt;CustomEvent&gt; disruptor = new Disruptor&lt;&gt;(CustomEvent::new, BUFFER_SIZE, executor)<span>;</span>
</pre>

  


  
  <p class="sqsrte-large">Now all we need to do is create a producer and a consumer and pass the consumer into the disruptor.</p>


  


  




  
    
<pre>RingBuffer&lt;CustomEvent&gt; ringBuffer = disruptor.getRingBuffer()<span>;</span>
CustomEventProducer producer = new CustomEventProducer(ringBuffer)<span>;</span>
CustomEventConsumer consumer = new CustomEventConsumer()<span>;</span>
disruptor.handleEventsWith(consumer)<span>;</span>
</pre>

  


  
  <p class="sqsrte-large">Start the disruptor and produce data</p>


  


  




  
    
<pre>disruptor.start()<span>;</span>
producer.produce("Some piece of Data")<span>;</span>
</pre>

  


  
  <p class="sqsrte-large">That’s it!</p><p class="sqsrte-large">If your application is designed to be performed in stages, such as a transformation pipeline,&nbsp;<em>LMAX Disruptor</em>&nbsp;will do it the most efficiently for you, and it leaves the threading boiler plate to the Java standard Executors which comes in many flavors and configurations.</p><p class="sqsrte-large">Supported languages:&nbsp;<strong>Java, .Net (Port of LMAX Disruptor)</strong></p><h2><a href="https://akka.io/"><strong>3. Akka</strong></a></h2><p class="sqsrte-large"><em>Akka</em>&nbsp;aims to make it easy for developers to write concurrent, message driven applications and is based on the&nbsp;<em>Actor Model.</em></p><p class="sqsrte-large">In that model you decouple your code into actors that maintain state and act on your data. The actors communicate with each other through messages that they send to each other’s “mailbox”.</p><p class="sqsrte-large">The actors are arranged in a hierarchical structure where each actor has exactly one supervisor. And the overall master actor takes the original work and splits it among its children/worker actors. This way each actor is responsible for only one task. And if the actor fails to perform that task, he can asks his supervisor for help.</p><p class="sqsrte-large">Similarly to&nbsp;<em>Vert.x,</em>&nbsp;<em>Akka</em>’s actors should not block the thread.</p><p class="sqsrte-large">In addition, actors should not pass any mutable objects between each other. This way no synchronization between threads is needed, and each actor thread can operate on its data without contention with other threads.</p><p class="sqsrte-large">Unlike&nbsp;<em>Vert.x&nbsp;</em>and&nbsp;<em>LMAX Disruptor&nbsp;</em>that aim to provide the developers with control over threading to achieve the desired performance,&nbsp;<em>Akka</em>&nbsp;is aiming to abstract the multithreading from the developer almost entirely, making it easy to focus on the logic and stay worry free about concurrency as long as you follow&nbsp;<em>Akka</em>’s best practices.</p><p class="sqsrte-large">To get the ball rolling with Akka, more boiler plate code is needed than with&nbsp;<em>LMAX Disruptor</em>&nbsp;or&nbsp;<em>Vert.x</em>, but the idea is pretty straightforward.</p><p class="sqsrte-large">Every actor has to extend the&nbsp;<code>UntypedActor</code><em>&nbsp;</em>class and implement the&nbsp;<code>public void onReceive(Object message)</code>&nbsp;method which is called when an actor receives a message.</p><p class="sqsrte-large">An example for a typical actor:</p>


  


  




  
    
<pre><span>public</span> <span>class</span> WorkerActor <span>extends</span> UntypedActor <span>{</span>
  <span>@Override</span>
  <span>public</span> <span>void</span> onReceive<span>(</span><span>Object</span> message<span>)</span> <span>{</span>
    <span>//handle message and send a message to another actor</span>
  <span>}</span>
<span>}</span>
</pre>

  


  
  <p class="sqsrte-large">Besides creating the actor classes, we also need to define the message class for every&nbsp;<em>actor to actor</em>&nbsp;communication.</p><p class="sqsrte-large">So for example if we have a master actor and a worker actor, and the master actor wants to pass a task to the worker, and get a result back, the general structure would be like this:</p>


  


  




  
    
<pre><span>public</span> <span>class</span> MasterToWorkerMessage <span>{</span>
  <span>private</span> <span>final</span> <span>String</span> message<span>;</span>
  <span>public</span> MasterToWorkerMessage<span>(</span><span>String</span> message<span>)</span> <span>{</span>
    <span>this</span><span>.</span>message <span>=</span> message<span>;</span> 
  <span>}</span>
  
  <span>public</span> <span>String</span> getMessage<span>(</span><span>)</span> <span>{</span>
    <span>return</span> message<span>;</span>
  <span>}</span>
<span>}</span>
<span>public</span> <span>class</span> WorkerToMasterMessage <span>{</span>
  <span>private</span> <span>final</span> <span>String</span> result<span>;</span>
  <span>public</span> MasterToWorkerMessage<span>(</span><span>String</span> result<span>)</span> <span>{</span>
    <span>this</span><span>.</span>result <span>=</span> result<span>;</span> 
  <span>}</span>
  
  <span>public</span> <span>String</span> getResult<span>(</span><span>)</span> <span>{</span>
    <span>return</span> result<span>;</span>
  <span>}</span>
<span>}</span>
</pre>

  


  
  <p class="sqsrte-large">And the worker class would like like this</p>


  


  




  
    
<pre><span>public</span> <span>class</span> WorkerActor <span>extends</span> UntypedActor <span>{</span>
  <span>.</span><span>.</span><span>.</span>
  <span>@Override</span>
  <span>public</span> <span>void</span> onReceive<span>(</span><span>Object</span> message<span>)</span> <span>{</span>
    <span>if</span><span>(</span>message <span>instanceof</span> MasterToWorkerMessage<span>)</span> <span>{</span>
      MasterToWorkerMessage work <span>=</span> <span>(</span>MasterToWorkerMessage<span>)</span>message<span>;</span>
      <span>String</span> result <span>=</span> calculateResult<span>(</span>work<span>.</span>getMessage<span>(</span><span>)</span><span>)</span><span>;</span>
      getSender<span>(</span><span>)</span><span>.</span>tell<span>(</span><span>new</span> WorkerToMasterMessage<span>(</span>result<span>)</span><span>,</span> 
                       getSelf<span>(</span><span>)</span><span>)</span><span>;</span>     
    <span>}</span>
    <span>else</span> <span>{</span>
      unhandled<span>(</span>message<span>)</span><span>;</span>
    <span>}</span> 
  <span>}</span>
  <span>private</span> <span>String</span> calculateResult<span>(</span><span>String</span> message<span>)</span> <span>{</span>
    <span>.</span><span>.</span><span>.</span>
  <span>}</span>
<span>}</span>
</pre>

  


  
  <p class="sqsrte-large">The master class has a little more boiler plate code to set up the router and configure how many children workers to create and how many message to send to each child at a time, but the idea is very simple.</p><p class="sqsrte-large">For more information about how to create actors in Java you can follow the official&nbsp;<a href="https://doc.akka.io/docs/akka/2.0.1/intro/getting-started-first-java.html">example</a>.</p><p class="sqsrte-large">Just like&nbsp;<em>Vert.x, Akka</em>&nbsp;also provides separate modules such as</p><ul data-rte-list="default"><li><p class="sqsrte-large"><a href="https://doc.akka.io/docs/akka-http/current/index.html?language=java">Akka HTTP</a>&nbsp;for everything relating to building HTTP servers.</p></li><li><p class="sqsrte-large"><a href="https://doc.akka.io/docs/akka/current/stream/index.html?language=java">Akka Streams</a>&nbsp;for back pressure and working with streams of data</p></li><li><p class="sqsrte-large">And many other modules for persistence, cluster management, and others</p></li></ul><p class="sqsrte-large">Supported languages :&nbsp;<strong>Scala</strong>,&nbsp;<strong>Java</strong></p><p data-rte-preserve-empty="true" class=""></p><p class="sqsrte-large"><strong>It's important to note</strong> that using either of those projects is not a substitute to knowing core Java Multithreading and Concurrency. And without that knowledge you may easily introduce data races, performance bottlenecks and many other issues so hard to debug and troubleshoot. To master those topics I recommend taking the<em> </em><a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C">Java Multithreading, Concurrency &amp; Performance Optimization course</a><em> </em>which covers all those topics in depth with strong emphasis on high performance and best practices.</p>


  


  



&nbsp;










































  

    
  
    

      

      
        <figure class="
              sqs-block-image-figure
              intrinsic
            "
        >
          
        
        

        
          <a class="
                sqs-block-image-link
                
          
        
              " href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C"
              
          >
            
          
            
                
                
                
                
                
                
                
                <img data-stretch="false" data-image="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg" data-image-dimensions="750x422" data-image-focal-point="0.5,0.5" alt="" data-load="false" elementtiming="system-image-block" src="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=1000w" width="750" height="422" sizes="(max-width: 640px) 100vw, (max-width: 767px) 50vw, 50vw" onload="this.classList.add(&quot;loaded&quot;)" srcset="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=100w 100w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=300w 300w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=500w 500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=750w 750w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=1000w 1000w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=1500w 1500w, https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/9c4d852e-2b37-4f42-8c93-4553786fc05c/image-with-me.jpg?format=2500w 2500w" loading="lazy" decoding="async" data-loader="sqs">

            
          
        
          </a>
        

        
          
          <figcaption class="image-caption-wrapper">
            <p class=""><a href="https://www.udemy.com/course/java-multithreading-concurrency-performance-optimization/?referralCode=FD0E7D8342637626B14C">Java Multithreading, Concurrency &amp; Performance Optimization</a></p>
          </figcaption>
        
      
        </figure>
      

    
  


  


&nbsp;
  
  <h2><strong>Summary</strong></h2><p class="sqsrte-large">There is no magic bullet and no one framework or toolkit to solve all problems. As software engineers and architects we need to learn the requirements of our system and use our judgment to decide which technology to use and when.</p><p class="sqsrte-large">Vert.x is an excellent choice when your application is IO bound and you need to have full control over your threading model.</p><p class="sqsrte-large"><em>Lmax Disruptor&nbsp;</em>is most efficient in message passing between stages of your application.</p><p class="sqsrte-large"><em>Akka&nbsp;</em>provides<em>&nbsp;</em>great abstraction based on the&nbsp;<em>actor model and immutability</em>, to free developers from dealing with concurrency issues in the first place.</p><p data-rte-preserve-empty="true" class=""></p><h2><span class="sqsrte-text-color--black">More Articles</span></h2>]]></content:encoded><media:content type="image/jpeg" url="https://images.squarespace-cdn.com/content/v1/5f8b6a11dab43d715aaa254a/1603490760850-LE3WDQNFYMADCR7QDU80/1_28T_V7vvpoIuiW2kWzkRog.jpeg?format=1500w" medium="image" isDefault="true" width="770" height="359"><media:title type="plain">Top 3 Projects for Java Concurrency</media:title></media:content></item></channel></rss>