<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Norbert Dębosz on Medium]]></title>
        <description><![CDATA[Stories by Norbert Dębosz on Medium]]></description>
        <link>https://medium.com/@ridikk12?source=rss-7d5f3cb5711c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ImAG2_hCtvACi5ioJ3ZwPA.jpeg</url>
            <title>Stories by Norbert Dębosz on Medium</title>
            <link>https://medium.com/@ridikk12?source=rss-7d5f3cb5711c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 20:35:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ridikk12/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What Great Tech Teams Do Differently — Insights from an Architect]]></title>
            <link>https://itnext.io/what-great-tech-teams-do-differently-insights-from-an-architect-e55b094bf8f2?source=rss-7d5f3cb5711c------2</link>
            <guid isPermaLink="false">https://medium.com/p/e55b094bf8f2</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[tech-leadership]]></category>
            <category><![CDATA[engineering-mangement]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Norbert Dębosz]]></dc:creator>
            <pubDate>Wed, 07 May 2025 06:45:28 GMT</pubDate>
            <atom:updated>2025-05-07T15:27:11.746Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>What Great Tech Teams Do Differently — Insights from an Architect</strong></h3><p>A couple of years ago, I wrote about what makes a strong team member — from a team leader’s point of view. That is still true.</p><p>But now, my role is different. I work more on the architecture side of things — looking at the system as a whole, working across teams, and helping connect short-term delivery with long-term goals.</p><p>Since I made that shift, I’ve seen a few patterns — ways of working that consistently make teams more effective, especially when systems grow complex, distributed, and interconnected.</p><p>This post is for <strong>developers, tech leads, and engineering managers</strong>. I want to show what architects actually do (because, let’s be honest, it’s not always clear) and how dev teams can make the most of that relationship.</p><p>Let’s jump in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LOuM9Uxk84kVuB6d" /><figcaption>Photo by <a href="https://unsplash.com/@janesky?utm_source=medium&amp;utm_medium=referral">Antonio Janeski</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>1. Ask “Why”, not just “How”</h3><p>As engineers, we’re great at solving problems. That’s what we’re trained for. But sometimes, we go straight into <em>how</em> to solve it — without fully understanding <em>why</em> the solution needs to be a certain way.</p><p>Let’s take async messaging as an example. It’s often suggested as a best practice: “It decouples services!” True. But…</p><blockquote><strong><em>If your process needs real-time feedback or strong consistency, async might actually create more problems than it solves.</em></strong></blockquote><p>As architects, our job is to constantly ask “why” — to make sure the solution fits the business need, not just the tech stack. And I’d love for more teams to ask it too. It saves so much pain later.</p><h3>2. Treat every decision as a trade-off</h3><p>This one’s big.<br>I’ve heard people say:</p><blockquote><strong><em>“We should never use sync calls.”<br> “Everything must be event-driven.”</em></strong></blockquote><p>And I get where that comes from — experience, success, patterns that work.<br>But architecture is always about <strong>trade-offs</strong>. Every decision has a cost.</p><ul><li>Async communication gives you decoupling, but it’s harder to debug and test.</li><li>Shared libraries reduce duplication, but they also increase coupling.</li><li>CQRS adds flexibility but introduces complexity.</li></ul><blockquote><strong><em>Great teams don’t just repeat what worked before — they stop and ask, “What’s the trade-off here? Is it worth it in this context?”</em></strong></blockquote><p>As an architect, I’ll always help lay out those options. But you — the devs, the tech leads — you’re in the code. Your perspective matters just as much.</p><h3>3. Help me build the bridge — not a silo</h3><p>In growing teams or larger organizations, architecture can feel like “something happening elsewhere.” Decisions are made, diagrams appear, and devs wonder, “Wait, when did this happen?”</p><blockquote><strong><em>I don’t want to design things in a vacuum.<br>I want input, feedback, and reality checks.</em></strong></blockquote><p>But I also need help getting that flow going. If you’re a tech lead, be that bridge. Help translate architecture into something your team understands and questions. Tell me when something doesn’t feel right — and I’ll do the same from my side.<br>Together, we can keep architecture grounded and connected.</p><h3>4. Show, don’t argue</h3><p>I’ve had my fair share of “architecture debates” that went absolutely nowhere.<br>What finally helps? A quick sketch, a spike, a shared screen walking through a sample workflow—something concrete.</p><blockquote><strong><em>If you’re not sure how something works — or why something won’t work — just show it.</em></strong></blockquote><p>It clears up misunderstandings fast, especially in multi-language or remote teams where we all interpret terms slightly differently. Visuals and working examples save hours of talking.</p><h3>5. Push back — please</h3><p>You might think architecture is “already decided” when it lands on your desk. It shouldn’t be.</p><blockquote><strong><em>If something doesn’t make sense, challenge it.<br>If you see a better way, bring it forward.</em></strong></blockquote><p>As architects, we’re trying to see the whole system. But we don’t see what you see in your service, your workflow, your testing pain.</p><p>I’d much rather get feedback early — even if it’s critical — than find out later that a design made things harder than they needed to be.</p><h3>6. We both own tech debt</h3><p>Technical debt isn’t just a dev thing.</p><p>Yes, devs deal with the day-to-day impact, but architecture decisions create tech debt too — especially when patterns or boundaries aren’t followed well.</p><p>But you know what? It’s not about blame.</p><blockquote><strong><em>Tech debt is a shared problem. We should be talking about it together.</em></strong></blockquote><p>Let’s keep a visible backlog. Let’s discuss what hurts the most. If I’m making decisions that might cause future debt, I want to hear about it. If you’re stuck under layers of past decisions, I’ll help find a way forward.</p><h3>7. Boundaries matter more than ever</h3><p>When systems get bigger, service boundaries start to blur. And once they do, the system slowly becomes harder to understand, harder to test, and harder to change.</p><p>I’ve seen teams pull in logic from other services “just to get it working.” And it works… until it breaks something unexpected or introduces tight coupling that’s impossible to untangle.</p><blockquote><strong><em>Boundaries aren’t about purity — they’re about clarity and autonomy.</em></strong></blockquote><p>Respect context ownership. Keep models clean. Communicate through proper contracts (APIs, events, etc). When that discipline is in place, everyone moves faster with fewer surprises.</p><h3>Final thoughts</h3><p>I didn’t write this as a checklist. These are things I’ve seen work well over time — with real teams, real codebases, and real production challenges.</p><p>If you’re a developer or tech lead, I hope this gives you a clearer idea of what architects are <em>trying</em> to do — and how we can support each other better.</p><p>Architecture doesn’t live in diagrams. It lives in your day-to-day decisions, edge cases, and constraints. And that’s why we need each other.</p><p>So next time you see an architecture doc or a new proposed pattern, don’t just nod and move on. Engage with it. Ask questions. Suggest improvements.</p><h3><strong><em>We’re building the system together. Let’s treat it that way.</em></strong></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e55b094bf8f2" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/what-great-tech-teams-do-differently-insights-from-an-architect-e55b094bf8f2">What Great Tech Teams Do Differently — Insights from an Architect</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy an application to Azure App Service Private Endpoint from the Azure DevOps pipeline.]]></title>
            <link>https://itnext.io/deploy-an-application-to-azure-app-service-private-endpoint-from-the-azure-devops-pipeline-f71c7d128dae?source=rss-7d5f3cb5711c------2</link>
            <guid isPermaLink="false">https://medium.com/p/f71c7d128dae</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[azure-devops]]></category>
            <dc:creator><![CDATA[Norbert Dębosz]]></dc:creator>
            <pubDate>Mon, 26 Sep 2022 07:14:34 GMT</pubDate>
            <atom:updated>2023-05-14T18:57:45.454Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently I had to deploy Azure App Service using Azure DevOps pipelines. <br>Sound easy? That&#39;s what I thought.</p><p>There was one catch!</p><p>App Service has been set up to cut all public access — which means the application is accessible only from within the virtual network and by a private IP address.</p><h3>Why?</h3><p>Some companies still have a lot of data/components stored on-prem. Not all of these on-prem resources can be migrated to the cloud. The are multiple reasons starting from costs, security, time, etc. That is why sometimes we need to work in and hybrid on-prem to cloud environment. In this case, the company network usually is closed to the public internet, and communication between on-prem and azure is based on VPN connection and virtual networks. That is why some resources will be deployed with restriction to a private endpoint — they can’t be publicly available.</p><p>Knowing why we need to care about such a thing, let’s look at the solution.</p><p>In this case? What is the easiest and the same time, a good solution to deploy to such App Service?</p><h4>Short answer:</h4><ul><li>Azure Virtual Network</li><li>Azure Virtual Machine Scale Set</li><li>Azure DevOps</li></ul><p>Using the above three components, we will set up a deployment pipeline that deploys our .Net Application to a private Azure App Service.</p><h3>Theory:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*xzGQRT6DFIpjLC1YBiaUXw.png" /></figure><p>In our case, the VMSS will be a container for a self-hosted Azure DevOps agent. The pipeline triggered from Azure DevOps will then execute in VMSS. The VMSS is in a private virtual network hence it can resolve private IP addresses which a private virtual network.</p><h3>Assumptions:</h3><ul><li>You already have a virtual network created</li><li>You already have your App Service, and App Service Plan created</li></ul><h3>Practical part:</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FWPaWGoyXWL4ATFHuQv%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FWPaWGoyXWL4ATFHuQv%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FWPaWGoyXWL4ATFHuQv%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/a87085f3f95a9432f9b3ac0ab88c7942/href">https://medium.com/media/a87085f3f95a9432f9b3ac0ab88c7942/href</a></iframe><p>On Azure Portal, let&#39;s create an Azure Virtual Network Scale Set.<br>There are a lot of settings here but for our demo purpose, let’s leave most of them as default.</p><p>We should focus on the “Networking tab” — here, from the list of the virtual networks, we need to choose the virtual network used by our App Service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yRwiL1ri8BmMNv3zbcF2Rw.png" /></figure><p><strong>DONE </strong>— that was fast :)</p><h4>Azure DevOps:</h4><p>Here we need to navigate to Organization Settings -&gt; Agent Pools:</p><p>On the top right, click “Add Pool,” and you should see something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a78sThgiONZg_zmoG01VJA.png" /></figure><p>Options here are quite self-describing.</p><p>Some extra options (depend on how often you need to use your pipeline and how big a budget you have):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*0avwChchtVVy0xa4J1iW5w.png" /></figure><p>After clicking the “create” button, you should see your new pool on the list:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J6LC56Npq_wDyrPAydHk2Q.png" /></figure><p>Now — change the pool used to deploy app service to the newly created one in your pipelines.</p><h4>Release pipelines:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yk09NPKb7LKYpxfYTWycsA.png" /></figure><h4>Build Pipelines (Yaml pipelines)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sGjtA6eU7-_9rUriZOTskg.png" /></figure><h4>That’s all!</h4><p>When you run your pipeline, the agent hosted on the Azure virtual machine scale set executes it. As the VM has access to the virtual network, it will be able to do a proper push to the App Service.</p><figure><a href="https://www.buymeacoffee.com/Ridikk12a"><img alt="" src="https://cdn-images-1.medium.com/max/545/1*7QWRkr8TAFQEyFKS2ZDb_w.jpeg" /></a><figcaption>If my code or articles have been helpful to you, would you mind buying me a coffee?</figcaption></figure><h3>References:</h3><p><a href="https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/scale-set-agents?view=azure-devops">Azure virtual machine scale set agents - Azure Pipelines</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f71c7d128dae" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/deploy-an-application-to-azure-app-service-private-endpoint-from-the-azure-devops-pipeline-f71c7d128dae">Deploy an application to Azure App Service Private Endpoint from the Azure DevOps pipeline.</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Active-Passive Background Service In .Net 6]]></title>
            <link>https://itnext.io/active-passive-background-service-in-net-6-952f3aebd1b7?source=rss-7d5f3cb5711c------2</link>
            <guid isPermaLink="false">https://medium.com/p/952f3aebd1b7</guid>
            <category><![CDATA[redundancy]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <dc:creator><![CDATA[Norbert Dębosz]]></dc:creator>
            <pubDate>Fri, 11 Feb 2022 08:13:21 GMT</pubDate>
            <atom:updated>2023-05-14T19:32:17.350Z</atom:updated>
            <content:encoded><![CDATA[<h3>Active-Passive Background Service In .Net 6</h3><h4>Background story:</h4><p>Imagine that you have multiple servers that try to access and manipulate some data in some time interval (like 1 second or faster). The data that servers try to manipulate can be accessed only by one process simultaneously. In other cases, it will cause some unpredicted and hard to track issues.</p><p>We should be able to run multiple instances on the same background service on multiple servers. At the same time, only one instance should be run in &quot;Active&quot; mode, which means do work. Others should run in &quot;Passive&quot; mode, waiting until the &quot;Active&quot; one goes down, and then automatically switch from &quot;Passive&quot; to &quot;Active&quot;.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*HqSTCiAhrG6R24QhaUfqHA.png" /><figcaption>Architecture</figcaption></figure><p>As you can see in the image above, we will implement a push-oriented service discovery functionality to fulfil requirements. Each instance will register itself at the start in the external data source (can be whatever Azure Database/SQL Server/No-SQL). All instances will contain a logic that will tell them which mode they should work. In case of an unexpected server failure, we will implement the logic of auto un-registration of instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2an8Xu97O8Ssmv01tg0WTQ.png" /></figure><h3>Requirements:</h3><h4>Functional requirements:</h4><ul><li>Each Background Service has to be able to manipulate data.</li><li>Each Background Service has to be able to work in &quot;Passive&quot; mode.</li><li>Each Background Service has to be able to work in &quot;Active&quot; mode.</li><li>Each Background Service will register itself at the start.</li><li>Each Background Service will re-register itself in X seconds.</li><li>Each Background Service will un-register itself at the exit.</li><li>If Background Service is unable to unregister itself — for example, server crashes — then it should be un-registered by another service.</li></ul><h4>Non Functional Requirements:</h4><ul><li>NET 6 Worker Process.</li><li>Servers have limited access to the internet.</li><li>Servers can crash un-expected.</li></ul><h4>Background Services</h4><p>NET 6 Host allow registering multiple Hosted Services as part of the same host. In this case, the application will contain two long-running background services that work in parallel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tP33ulMkd5QhxwccnNU_GQ.png" /></figure><h3>Implementation</h3><p>Let&#39;s start with background services implementation.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/25ab66dc975962cd610c1ab4af677e84/href">https://medium.com/media/25ab66dc975962cd610c1ab4af677e84/href</a></iframe><h4>RegisterInstanceWorkerProcess</h4><p>In Execute Async method (line 24) lives our whole logic.<br>AS this is Worker Process, we have a while loop which iterates each 1second and do below:</p><ul><li>Register worker process instance with unique instance id.</li><li>Delete orphaned instances</li><li>Wait 1 second and repeat the whole operation.</li></ul><p>In case of any error, we log the error, stop the instance and try to unregister it (StopAsync method). StopAsync method will trigger only if we gracefully stop the worker process. In case of unexpected critical failure (for example, the server goes down as electricity is off), the method will not execute. In this scenario, another instance of the worker process will unregister this one (<strong>DeleteOprhantInstanes </strong>method in line 36).</p><h4>Worker</h4><p>The worker process is much simpler — in a while loop, we check if the instance should be active or passive. Depending on the outcome, we execute corresponding logic (DoInActive and DoInPassive methods).</p><h4>RegisterInstanceService</h4><p>The core of this article is our RegisterInstanceService class.<br>This class contains four methods. <br>Let&#39;s take a look:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4112e177e37932bc21cb79ff5736cac1/href">https://medium.com/media/4112e177e37932bc21cb79ff5736cac1/href</a></iframe><p>In Line 20, we have a <strong>Register method</strong>. <br>The method fetches all registered instances, and If there isn&#39;t any currently active in registered instances, we register a new instance and set it as active. If our instance already exists (as we register each 10s), we just update the registration date.</p><p><strong>Unregister method </strong>(line 36) simply deletes an instance for our datastore.</p><p><strong>IsActive </strong>(line 41) method is quite simple too. From all registered instances, we try to find the one with the current id and return the active flag.</p><p><strong>DeleteOrphantInstances </strong>is more interesting. This method allows us to remove all instances that are still in the data store but hasn&#39;t been updated for at least 1 minute. This method guarantee that even though some instance can crash without unregistering, we still automatically remove them from the datastore, allowing other instance to take over an &quot;Active&quot; mode.</p><h3><strong>Summary</strong></h3><p>Sometimes we cannot use dedicated tools/frameworks to achieve the functionality requested by our stakeholders. This time it was an active-pasive functionality.</p><p>The whole code and working solution are available on my GitHub.</p><p><a href="https://github.com/Ridikk12/ActivePassiveWorkerProcess">GitHub - Ridikk12/ActivePassiveWorkerProcess</a></p><figure><a href="https://www.buymeacoffee.com/Ridikk12a"><img alt="" src="https://cdn-images-1.medium.com/max/545/1*7QWRkr8TAFQEyFKS2ZDb_w.jpeg" /></a><figcaption>If my code or articles have been helpful to you, would you mind buying me a coffee?</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=952f3aebd1b7" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/active-passive-background-service-in-net-6-952f3aebd1b7">Active-Passive Background Service In .Net 6</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easy Modular Monolith — Part 6 — Synchronous communication between modules]]></title>
            <link>https://itnext.io/easy-modular-monolith-part-5-synchronous-communication-between-modules-7af876f06c16?source=rss-7d5f3cb5711c------2</link>
            <guid isPermaLink="false">https://medium.com/p/7af876f06c16</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[modular-monolith]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[dotnet]]></category>
            <dc:creator><![CDATA[Norbert Dębosz]]></dc:creator>
            <pubDate>Sun, 28 Nov 2021 20:38:44 GMT</pubDate>
            <atom:updated>2023-05-14T19:32:59.351Z</atom:updated>
            <content:encoded><![CDATA[<h3>Easy Modular Monolith — Part 6 — Synchronous communication between modules</h3><p>Our modules sometimes have to talk with each other. <br>This article will demonstrate two ways of synchronous communication between modules using direct references and RESTFull style.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-b1tCgh8OUX3ScM-s7kL4A.jpeg" /></figure><blockquote>Synchronous communication is a real-time communication, means that we have to wait for a response until going further.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*y881-2uWGaYr_EDZoVOs0w.jpeg" /></figure><p>If there is no response or any problem with sending a response back, the caller will raise an exception. This type of communication is typical for client-server applications.</p><p>For complex architecture such as Microservices or Modular Monolith, even though that kind of communication is the most simple one and easiest to implement, it has its drawbacks such as potential performance issues or the most critical one as cascade failure (one Module down kills all other in the environment). Still, it is commonly used, so today, we will implement two possible variants in our ModularMonolith.</p><h3>Context:</h3><p>In the last article, we added a User Module that stores information about users. Let&#39;s imagine that each time we want to save a new product in <strong>ProductModule, </strong>we would like to keep information on who did that too.</p><ul><li>The caveat here is that we don&#39;t want to duplicate and save whole user details each time we save a new product. (It will be hard to maintain data consistency if someone updates the user&#39;s data in UserModule).</li><li>We don&#39;t want to duplicate a User table from UserModule for the same reason.</li></ul><p>Instead, we will — in <strong>ProductModule </strong>— save only the user&#39;s global id that executes a method; therefore, we will be able to fetch details later.</p><h3>Improvements:</h3><p>Firstly let&#39;s improve the <strong>UserModule </strong>by extending the user class with two new fields, Name and Surname. To do that, we need to inherit from <strong>IdentityUser </strong>(ASP Core Identity User Class) and then register our new class instead of IdentityUser. Take a look:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/94cef1b5329d1e6f9e7eec08644709e4/href">https://medium.com/media/94cef1b5329d1e6f9e7eec08644709e4/href</a></iframe><p>Then we should replace all IdentityUser occurrences with a new AppUser class. (I have already done that for you :) ).</p><p>Next, let&#39;s add a new field to our JWT token — it will store the Global User Id — UserId variable (<strong>Line 36</strong>).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fdc1ce0fd4d937bf5e0379c58101b27a/href">https://medium.com/media/fdc1ce0fd4d937bf5e0379c58101b27a/href</a></iframe><p>Having that, let&#39;s create a user context class that will allow extracting UserId from JWT Token. This class will be registered in the root Infrastructure project; hence will be available in each Module.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ae5c3b056627a7addeb7dfae22233632/href">https://medium.com/media/ae5c3b056627a7addeb7dfae22233632/href</a></iframe><p><strong>Line 19</strong> — From HtppContext&#39;s User context, we extract a claim that we added when logging into the application.</p><p>Ok — let&#39;s see how to use it:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/aab9596ebea29df50ccd7548a9ae92e9/href">https://medium.com/media/aab9596ebea29df50ccd7548a9ae92e9/href</a></iframe><p>Firstly, we inject <strong>IUserContext</strong> — then call a getter UserId. <br>Very simple — now we have information about UserId that is calling an <strong>AddProductCommand</strong>. Having the variable, we can pass it to <strong>Product.New</strong> method.</p><p>We good — the piece of information about a user has been saved.</p><h3>Communication</h3><p>Now, as we saved info about users in <strong>ProductModule</strong>, we have to fetch details of the saved user when querying for a product.</p><p>Let&#39;s create a new project called <strong>ModularMonolith.User.Contracts.<br></strong>The project will store interfaces for methods that UserModule wants to share with other Modules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*qaikYMtAGWw5jhutwa_pLw.png" /><figcaption>Contracts</figcaption></figure><p>UserModule then will implement a contract&#39;s interface (<strong>IUserService or IUserApi</strong>) and register it with implementation in <strong>WebApi </strong>(app entry point). Then injecting it in ProductModule will allow us to access data from <strong>UserModule</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*SrChDk845CkYn1akt76m4w.png" /><figcaption>Communication between modules</figcaption></figure><h3>Two ways of communication</h3><h4>Direct communication by reference</h4><p>Direct communication is communication that will be performed by referencing one project to another. In our case, we will use a runtime reference.</p><p><strong>Compile-time reference</strong> means that UserModule.Application project would have to be referenced by ProductModule.Application project to be able to fetch data. This reference would create a very ugly coupling and add access to the UserModule queries/command. We won&#39;t go this way.</p><p><strong>Runtime reference</strong> is something that we are using in <strong>ModularMonolith </strong>all the time. Instead of referencing the whole <strong>UserModule</strong>, <strong>ProducModule </strong>will reference only a small and neat <strong>UserModule.Contract</strong> project. <strong>UserModule.Contracts</strong> project contains only abstraction over implementation. When we run an application entry point project (<strong>WebApi project</strong>), it will register implementation; hence it is called a runtime reference — the implementation is not known until the application runtime. It is much cleaner as we share only the methods and DTOs that are necessary in this case.</p><p>Let&#39;s take a look:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/03fbc0e8721f187a4b0acc478623c433/href">https://medium.com/media/03fbc0e8721f187a4b0acc478623c433/href</a></iframe><p>In<strong> UserModule.Application</strong> we will create a new query that returns user details. What is important (<strong>Line 14)</strong> this query handler implements our contract interface <strong>IUserService. <br></strong>How as we have our method, let&#39;s see how to use it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*3ICrfJ8cqPUny0Qy3Pg_yg.png" /></figure><p>Firstly, let&#39;s reference a UserModule.Contracts in ProductModule.Application project.<br>Then let&#39;s use our new interface in <strong>GetProductQueryHandler:</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/91183bc4b4471b40e7122ed3fa7cf21c/href">https://medium.com/media/91183bc4b4471b40e7122ed3fa7cf21c/href</a></iframe><p>We inject <strong>IUserService </strong>into the constructor, then in <strong>Line 31, </strong>all we do is call a method GetUserDetails, passing a UserId that we saved earlier.</p><h4>RESTFull communication</h4><p>If we would like to prepare ModularMonolith for migration to microservices, we would like to use an HTTP request instead of using Direct Communication.<br>Similar to what we have implemented for Direct Communication in UserModule.Contracts let&#39;s create a contract interface:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c7c7cced7fca83cd8bc777e9f056551c/href">https://medium.com/media/c7c7cced7fca83cd8bc777e9f056551c/href</a></iframe><p>The most significant difference between this one and <strong>IUserService </strong>is that:</p><ul><li>It defines a REST method with a route to a resource.</li><li>It uses a Refit, a great RESTFull library that allows defining strong typed, interface-based contracts.</li></ul><p>As we declared an endpoint that will be used to deliver data, let&#39;s create it in our UserController.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e831cde5ea0f46e33d68da2eb4eb11a8/href">https://medium.com/media/e831cde5ea0f46e33d68da2eb4eb11a8/href</a></iframe><p>Line 36 — as you can see, it is similar to every other method in Controller. What is essential, the method executes <strong>GetUserDetailsQuery, </strong>which GetUserDetailsQueryHandler will handle. The same one returns data for Direct Communication. <br>If we scroll up for a moment to GetProductQueryHandler, we will notice that we inject an <strong>IUserApi </strong>interface there and then call it the same way we did for <strong>IUserService</strong>.</p><h4>UserModule Startup</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1c87fede91c8f43506ac666bfdf82160/href">https://medium.com/media/1c87fede91c8f43506ac666bfdf82160/href</a></iframe><p><strong>Line 31 </strong>— All that we do is point a base URL to our ModularMonolith instance and register <strong>IUserApi </strong>to request this base URL each time the methods from it execute.</p><p><strong>Line 39</strong> — <strong>IUSerSerive </strong>implementation registration. This simple line registers a Handler that will be executed in runtime for the GetUserDetails method. If we had more methods in the <strong>IUserServcie </strong>contract (as right now there is only GetUserDetails), instead of implementing it on the Handler level, we would create a separate UserService class that would handle our cases.</p><h3>Summary</h3><p>In this article, I showed two ways of implementing synchronous communication between Modules in Modular-Monolith Architecture.</p><p>We should remember that each time we need to communicate with another module, we create a coupling that — if introduced without reason and designed correctly, can bring a lot of troubles in future. That way, if you notice that one Module has to share a lot of data with another, you should consider merging it into one.</p><h4>Main differences:</h4><p><strong>IUserService </strong>will do an in-process call and return data.<br><strong>IUserApi </strong>will perform an HTTP Get request to a User Controller and execute it.</p><h4>Which one to choose?</h4><p>If you are not preparing to migrate into microservices, I recommend sticking to direct communication as it is more straightforward. As an intermediate phase between migration to microservices, I would use HTTP based communication.</p><p>There is one more way of communicating that involves changes in how we think about data consistency. In future articles, we will look at asynchronous communication, when and why to use it.</p><h3>The whole code is available here:</h3><p><a href="https://github.com/Ridikk12/ModularMonolith/tree/modules_communication">GitHub - Ridikk12/ModularMonolith at modules_communication</a></p><h3>Previous:</h3><p><a href="https://itnext.io/easy-modular-monolith-part-5-jwt-authentication-authorization-f7a0a275226f">Easy Modular Monolith — Part 5— JWT Authentication/Authorization</a></p><h3>In Next Part:</h3><ul><li>Domain events.</li></ul><h3>In future (this list can change):</h3><ul><li>Asynchronous communication.</li><li>OutBox improvements.</li><li>Unit/Integration tests.</li><li>Storing configuration.</li><li>The database approaches (multiple data sources).</li><li>Preparing for Microservices (Replacing MediatR by RabbitMq).</li><li>Migrate to Microservices.</li></ul><figure><a href="https://www.buymeacoffee.com/Ridikk12a"><img alt="" src="https://cdn-images-1.medium.com/max/545/1*7QWRkr8TAFQEyFKS2ZDb_w.jpeg" /></a><figcaption>If my code or articles have been helpful to you, would you mind buying me a coffee?</figcaption></figure><h3>References:</h3><p><a href="https://github.com/reactiveui/refit">GitHub - reactiveui/refit: The automatic type-safe REST library for .NET Core, Xamarin and .NET. Heavily inspired by Square&#39;s Retrofit library, Refit turns your REST API into a live interface.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7af876f06c16" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/easy-modular-monolith-part-5-synchronous-communication-between-modules-7af876f06c16">Easy Modular Monolith — Part 6 — Synchronous communication between modules</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easy Modular Monolith — Part 5— JWT Authentication/Authorization]]></title>
            <link>https://itnext.io/easy-modular-monolith-part-5-jwt-authentication-authorization-f7a0a275226f?source=rss-7d5f3cb5711c------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7a0a275226f</guid>
            <category><![CDATA[dotnet-core]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[modular-monolith]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Norbert Dębosz]]></dc:creator>
            <pubDate>Thu, 11 Nov 2021 19:46:34 GMT</pubDate>
            <atom:updated>2021-11-13T20:35:48.211Z</atom:updated>
            <content:encoded><![CDATA[<h3>Easy Modular Monolith — Part 5— JWT Authentication/Authorization</h3><p>In ModularMonolith we will implement <strong>Authentication </strong>and <strong>Authorization </strong>using the <strong>JSON Web Token</strong> and<strong> Asp Core Identity</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bRy34ot5nZdvAvMHyEmH7g.jpeg" /></figure><h4>Before we start a little theory:</h4><p><strong>Authentication</strong> —It is about confirming your ID. If you go to the bank, you have to show your id card to prove that you are you — the same will be in our system. We will achieve that by sending a username and password — If they match with those in our system, you will get an access token.</p><p><strong>Authorization</strong> — It is about what kind of privileges/roles you have. Based on that, you will get (or not) access to some parts of a system.</p><h4>Full example:</h4><p>You come to the office and use <strong>your id magnetic card (proof of identity) </strong>to go through the main door (<strong>Authentication</strong>). When you are in, based on a role that you have in the company (Software Dev / Tester etc.), you will get access to resources assigned to your position (tools/systems/). If you try to access resources outside your role, then you will be rejected (You can’t go into your boss’s office — your card will not allow you to bypass the door) <strong>Authorization</strong>).</p><h4>JSON Web Token:</h4><blockquote><a href="https://jwt.io/introduction">JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. This information can be verified and trusted because it is digitally signed. JWTs can be signed using a secret (with the <strong>HMAC</strong> algorithm) or a public/private key pair using <strong>RSA</strong> or <strong>ECDSA</strong>.</a></blockquote><h4><a href="https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity?view=aspnetcore-5.0&amp;tabs=visual-studio">ASP.NET Core Identity</a>:</h4><p>Is a framework that:</p><blockquote>Manages users, passwords, profile data, roles, claims, tokens, email confirmation, and more.</blockquote><h3>Architecture</h3><p><strong>Requirement:</strong></p><ul><li>The user is able to register a new account.</li><li>The user is able to log in using the user/password. (<strong>Authentication</strong>)</li><li>The user should be able to, based on his role, access some protected resources. (<strong>Authorization</strong>)</li></ul><h4>Implementation:</h4><p>Firstly let’s create a new module responsible for handling all user accounts in our system.<br>The structure of it will be almost the same as for others.<br>In this module, for now, we don’t have a Domain project. We don’t have it as the <strong>Asp Core Identity </strong>handles for us all domain object necessary for functionalities that we try to implement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*PuiIIktvtTyn6Pq0DS07WQ.png" /></figure><h4>Swagger Improvements:</h4><p>As of now only authenticated users will have access to our resources endpoints let’s improve our Swagger documentation page to make sending authenticated requests easier. It will contain a new “<strong>Authorize</strong>” button that will allow us to put there a JWT token that will be automatically sent in the header with each request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c8Sqy5w5lEuJ1ZNyrX-Slw.png" /></figure><p>The code responsible for this extra button is defined in<strong> line 47</strong>(code below).<br>There is no rocket science: <br>First, we need to add Security Definition that tells Swagger to send JWT by HTTP Header. After that, we should add SecurityRequirements that will tell Swagger we want to apply our definition globally to each of its endpoints.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3f14626f4c26b67bf906320c1d310ff2/href">https://medium.com/media/3f14626f4c26b67bf906320c1d310ff2/href</a></iframe><p>Ok, — Swagger is ready.</p><p>As preparation for Authentication, we need to enable it. It is very simple — <strong>Line 89 and 90</strong> doing that.</p><h4>Authentication</h4><p>To deliver authentication (log in by user name and password) we will use a part of a framework called <strong>ASP Core Identity.</strong> <br>The whole framework can be used to deliver full account management functionalities ( including frontend parts like views for login/register etc). <br>In our scenario — as ModularMonolith is WebApi, we will use only part of it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/62ff4d573f14c268a41a76fbeb5bfc48/href">https://medium.com/media/62ff4d573f14c268a41a76fbeb5bfc48/href</a></iframe><p><strong>Line 21</strong> defines a registration for our identity functionalities. It is important that we use <strong>AddIdentityCore</strong> instead of its full version AddIdentity which register much more than we need (Roles/Cookies Authentication schemas etc).</p><p>It will register <strong>UserManager</strong> class that provides a couple of important methods like:</p><ul><li>CRUD of Users</li><li>Validating Username and Password</li></ul><p>In <strong>line 24</strong> we have a big “Configure” method that setup some basic stuff around the requirements of a user account. Those options will be validated when we try to call the register user method. If validation fails we will get an error message.</p><p><strong>Line 45 </strong>registers the authentication schema that will be used. In our case, as we follow the JWT way we register the JWTBearer schema. <br><strong>Line 50 </strong>registers a middleware that will validate each request that is decorated with <strong>[Authorize] </strong>attribute.</p><h4>Register User Account</h4><p>After registration of Asp Core Identity basic components, let’s move to a command that will allow us to create a user account.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8302b123506a5fb3f1cfff4ba0bf7865/href">https://medium.com/media/8302b123506a5fb3f1cfff4ba0bf7865/href</a></iframe><p>Very short and neat command handler — all that it does is call a UserManager class’s Create method. As result, we can get a success result or validation errors. Those validation errors reflect the settings that we choose when registering Asp Core Identity.<br>If there is any error we throw our custom exception that will wrap all Identity Errors and then serve it as a user-friendly message.</p><h4>Login</h4><p>Login Command is more complex as it will not only use Identity to Validate our user but also JWTService to generate an authorization token.<br>Let’s take a look:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c9e8c508fd3e2bcb8ee7e24226a983b2/href">https://medium.com/media/c9e8c508fd3e2bcb8ee7e24226a983b2/href</a></iframe><p>First, we try to find a user. If it exists we try to validate its password. If it matches we generate a JWToken with claims that it should have (which one we should return depends on business requirements.) Adding claims is quite easy, all that you have to do is add a new item to the list.<br>If all is good we return a JWT token that later will be used to validate access to <strong>[Authorized] </strong>endpoints.</p><h4><strong>JWT Service</strong></h4><p>The heart of JWT token generation lies in JWT Service. As this one is a practical tutorial I will not dive into theory here. The most important part is that to generate a secure token we will need something to sign it.</p><p>In our example, we will sign our token with a Symmetric Key (one key is used for signing and validating). It is a good solution in our case, as there is only one service — ModularMonolith -which is responsible for creating and validating each token.</p><p>In other cases, I would recommend asymmetric keys as they are more secure in distributed systems.</p><p>In our example, the issuer and audience of the token will be the same — as ModularMonolith is the issuer of the token but at the same time, it is the audience of it as it will validate it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/148d4dfdc8b422db6e042999c73d81a3/href">https://medium.com/media/148d4dfdc8b422db6e042999c73d81a3/href</a></iframe><h4>Validation Improvements</h4><p>To be able to attach <strong>Asp Core Identity </strong>to our exception handling pipeline we will have to modify a little our <strong>ExceptionLoggingMiddleware</strong>. <br>Firstly let’s create a new class that will be responsible for returning extended messages if something goes wrong.</p><p>The difference between it and the basic one is that this one contains an extra collection that stores validation messages.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ffa7ffe7940021bf2c2cec859978bb29/href">https://medium.com/media/ffa7ffe7940021bf2c2cec859978bb29/href</a></iframe><p>We will create a new type of AppException too. Let’s call it <strong>ValidationException</strong>. Each time we want to return an extra message we will use this base class.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ada40e8cc5f6c9c1fab147a9ec39a01d/href">https://medium.com/media/ada40e8cc5f6c9c1fab147a9ec39a01d/href</a></iframe><p>Here is a usage of it:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/405c80157e78450b748fde931366df10/href">https://medium.com/media/405c80157e78450b748fde931366df10/href</a></iframe><p>As parameters in the constructor, we will accept the <strong>IdentityError </strong>list that is an <strong>ASP Core Identity</strong> class returned when trying to register a new account and there are any errors.</p><p>Now when all is ready, let’s update <strong>ExceptionLoggingMiddleware </strong>to handle our new exception type.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7c02db6e4d14ea249a06658be6e0a317/href">https://medium.com/media/7c02db6e4d14ea249a06658be6e0a317/href</a></iframe><p><strong>In Line 6 </strong>we added a new statement that now will check if the exception that we try to handle is ValidationExcception. If yes, then we return the new <strong>ValidationErrorMessage</strong> class which will contain all validation errors in a user-friendly format.</p><p>The order of handling exception types is important here as <strong>ValidationException</strong> is of <strong>AppException</strong> type — if we handled it before <strong>ValidationException</strong> that we would never get extended error messages.</p><h4>Entry Point — UserController</h4><p>This one is straightforward. It contains two methods — one for registration of the new users and the second one for login.<br>Take a look:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2a87c1999c7e6f6706fab52121687b88/href">https://medium.com/media/2a87c1999c7e6f6706fab52121687b88/href</a></iframe><h4><strong>How to protect endpoints?</strong></h4><p>Very simple:<br><strong>[Authorize]</strong> attribute will do all for us.<br>We can add this attribute above the whole Controller to apply authorization to all methods within the controller or to methods in the controller if we want to have some methods protected and others not.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dd2d20d920c4a34dbcd55cffdf521247/href">https://medium.com/media/dd2d20d920c4a34dbcd55cffdf521247/href</a></iframe><p>The <strong>[Authroize] </strong>attribute is much more powerful and can be used for Role/Policy based authorization. This topic will be part of future articles.</p><h4>Summary</h4><p>Even though the whole article is quite long implementing authentication/authorization is simple. Our new UserModule now contains:</p><ul><li>Register</li><li>Login</li><li>JWT Generation Service</li><li>JWT Token validation middleware</li></ul><p>These four functionalities are enough to provide secure access to our ModularMonolith endpoints.</p><h3>The whole code is available here:</h3><p><a href="https://github.com/Ridikk12/ModularMonolith/tree/authentication">https://github.com/Ridikk12/ModularMonolith/tree/authentication</a></p><h3>Previous:</h3><p><a href="https://ridikk12.medium.com/easy-modular-monolith-part-4-global-exception-handling-8355cc4905d4">Easy Modular Monolith — Part 4— Global Exception Handling</a></p><h3>In Next Part:</h3><ul><li>Direct communication between modules.</li></ul><h3>In future (this list can change):</h3><ul><li>OutBox improvements.</li><li>Domain events.</li><li>Unit/Integration tests.</li><li>Storing configuration.</li><li>Direct communication between modules.</li><li>The database approaches (multiple data sources).</li><li>Preparing for Microservices (Replacing MediatR by RabbitMq).</li><li>Migrate to Microservices.</li></ul><h3>References:</h3><ul><li><a href="https://jwt.io/introduction">JSON Web Token Introduction - jwt.io</a></li><li><a href="https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity?view=aspnetcore-5.0&amp;tabs=visual-studio">Introduction to Identity on ASP.NET Core</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7a0a275226f" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/easy-modular-monolith-part-5-jwt-authentication-authorization-f7a0a275226f">Easy Modular Monolith — Part 5— JWT Authentication/Authorization</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure DevOps —Build/Test/Collect Test Coverage and Publish Your Net 5 App]]></title>
            <link>https://ridikk12.medium.com/azure-devops-build-test-collect-test-coverage-and-publish-your-net-5-app-4fdf304fd1e7?source=rss-7d5f3cb5711c------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fdf304fd1e7</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Norbert Dębosz]]></dc:creator>
            <pubDate>Thu, 07 Oct 2021 21:26:38 GMT</pubDate>
            <atom:updated>2021-10-07T21:26:38.000Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s answer a question about how easy and fast you can set up your own Azure CI/CD pipeline.</p><h4>Why even bother to create azure pipelines?</h4><ul><li>Saving a lot of time as it can automate the whole process from pushing code to branch until release it to release server.</li><li>Making applications more resilient to bugs by catching them before release.</li><li>Making the release process resilient to human error as it can be fully automated.</li><li>Create a self-documentation of releases/builds etc that can be used for reports.</li><li>And much more…</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*P7uzDGqPDUy5hKkY_UyaFw.png" /></figure><p>Our pipeline will consist of 5 steps:</p><ul><li><strong>Restore </strong>— restore all NuGet packages used in the solution.</li><li><strong>Build </strong>— Build a code to check if there is any build error.</li><li><strong>Test</strong> — Run all Unit/Integration tests and see a result. Fail if at least one test fails.</li><li><strong>Collect Tests Results </strong>— test results can be later used by external tools like Sonar Cube etc to provide code quality checks.</li><li><strong>Publish </strong>— Publish source code ready to release to server.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ccbc17d1a2befbb2b17e86a8a795c6e2/href">https://medium.com/media/ccbc17d1a2befbb2b17e86a8a795c6e2/href</a></iframe><p>To be able to get a code coverage report you will have to install two extra NuGet packages in your Net 5 application shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*WRigxRbNNuaMXRluJ57DnA.png" /></figure><h3>Summary</h3><p>Azure DevOps is a powerful tool that makes work with CI/CD a pleasure. <br>With the above pipeline, you are able to configure your first full pipeline in just a couple of seconds. Feel free to use it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fdf304fd1e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easy Modular Monolith — Part 4— Global Exception Handling]]></title>
            <link>https://itnext.io/easy-modular-monolith-part-4-global-exception-handling-8355cc4905d4?source=rss-7d5f3cb5711c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8355cc4905d4</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[net-core]]></category>
            <dc:creator><![CDATA[Norbert Dębosz]]></dc:creator>
            <pubDate>Mon, 20 Sep 2021 08:18:45 GMT</pubDate>
            <atom:updated>2021-11-13T20:34:55.364Z</atom:updated>
            <content:encoded><![CDATA[<h3>Easy Modular Monolith — Part 4— Global Exception Handling</h3><p><strong>Global Exception Handling</strong> is the next feature that we will implement in our Modular application. It will allow us to handle all unpredicted and predicted exceptions in our system and deal with them — log them and return a user-friendly message to a client.</p><h3>Architecture</h3><p>Let’s establish some requirements.</p><ul><li>We would like to have a single place that can catch exceptions from any of our modules.</li><li>We should be able to transform exceptions into user-friendly messages.</li></ul><h4>A single place to catch them all</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fj2xgBIuAgmrpS%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fj2xgBIuAgmrpS%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2Fj2xgBIuAgmrpS%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="268" frameborder="0" scrolling="no"><a href="https://medium.com/media/e140e88216233b902d4cb46e4b7c69ef/href">https://medium.com/media/e140e88216233b902d4cb46e4b7c69ef/href</a></iframe><p>The easiest way to get the context of any request in a .net core application is to use middleware. Every request to our application will need to visit middleware, and hence we will be able to act — in our case, log exceptions and prepare a user-friendly message that will be returned to a client. <br>It will be the “single place to catch them all”.<br>Let’s take a look:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/89660ea5e00c56d5724b5954ca669e33/href">https://medium.com/media/89660ea5e00c56d5724b5954ca669e33/href</a></iframe><p>Wrapping line 26 in the try/catch statement will guarantee that if any (almost) unhandled exception will be thrown anywhere later in the pipeline, we will catch it here. <br>The heart of functionality lies in the “catch” statement.</p><ul><li>First, base on exception type, we resolve a logger level — all Domain and Application exceptions will be logged as “<strong><em>Information</em></strong>” as those are exceptions that we predicted could happen. <br>If there is any other exception, then we log it as an error.</li><li>Next, we resolve a <strong>HttpStatusCode </strong>— for predicted exceptions return 400. For unpredicted 500.</li><li>Last but not least is creating a user-friendly message that will be returned to the client. Here is where our status code can be handy — base on it we can transform a</li></ul><p>The last thing to do is write a response — it will be returned to the client.</p><h4>Exceptions abstraction</h4><p>The above middleware is stored in <strong>ModularMonolith.Infrastructure</strong> project which is part of our global infrastructure. It uses a common interface declared in <strong>ModularMonolith.Exceptions.Abstraction </strong>that provides abstract classes from which all exceptions in our system will inherit. <br>This will allow us to handle exceptions from each module in one place — the <strong>ExceptionLoggingMiddleware</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/437/1*NIvr5hlsSQwE5MkqD_-wTg.png" /></figure><p>Idea base on splitting exceptions into two types:</p><ul><li><strong>Domain Exceptions</strong> — all exceptions from our domain layer (NameToShort, EmptyDescription etc.).</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/21f774c1c8c520e5cc7860ed4238d54e/href">https://medium.com/media/21f774c1c8c520e5cc7860ed4238d54e/href</a></iframe><ul><li><strong>Application Exceptions</strong> — all exceptions from the application layer (NotFound, AlreadyExstis etc.).</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/90225bd250e376f297e7aafb4cde020f/href">https://medium.com/media/90225bd250e376f297e7aafb4cde020f/href</a></iframe><p>Those two are base classes from which we will be able to create custom exceptions in our modules. Exceptions abstraction will be stored in the new project <strong>ModularMonolith.Exceptions.Abstraction</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*4Imd065k-pJQBfU9ZZQl3g.png" /></figure><p>Both classes contain an extra property called <strong>StatusCode </strong>— this property is used to create a user-friendly message in the middleware. Hence we have a single place that will handle our exceptions and prepare user-friendly messages.</p><h4>Usage:</h4><p>Let’s create a <strong>DomainException </strong>in the <strong>ProductModule</strong>.<br>To be able to use our DomainException class, we have to reference the <strong>ModularMonolith.Exceptions.Abstraction</strong> to <strong>ModularMonolith.Product.Domain</strong> project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9R405KukxMNogbK09FAmRQ.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9c2bc22e222c369bbab8f8b37b41f5d5/href">https://medium.com/media/9c2bc22e222c369bbab8f8b37b41f5d5/href</a></iframe><p>And we can use the new class in the Product entity (line 23).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c8eb09d7bd5ca854204d1bcdbd14f14/href">https://medium.com/media/3c8eb09d7bd5ca854204d1bcdbd14f14/href</a></iframe><p>Here is the result when we request with an empty product name:</p><ul><li>The exception has been logged by our logger.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kGhZgH6vSnv54qt9PN6zUw.png" /></figure><ul><li>Correct status code and message have been returned to the client.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2TuBeeFOrQ3NQm_rXM_jBw.png" /></figure><h3>Summary</h3><p>Creating abstraction over exception handling makes our life much easier in terms of maintaining whole functionality. Instead of having multiple try/catches across modules, we move that responsibility to one place — our middleware.</p><h3>The whole code is available here:</h3><p><a href="https://github.com/Ridikk12/ModularMonolith/tree/Logging">https://github.com/Ridikk12/ModularMonolith/tree/Logging</a></p><h3>Previous:</h3><p><a href="https://ridikk12.medium.com/easy-modular-monolith-part-3-logging-57caceac1ff5">Easy Modular Monolith — Part 3 — Logging</a></p><h3>In Next Part:</h3><ul><li>Direct communication between modules.</li></ul><h3>In future (this list can change):</h3><ul><li>Authentication/Authorization</li><li>OutBox improvements.</li><li>Domain events.</li><li>Unit/Integration tests.</li><li>Storing configuration.</li><li>Direct communication between modules.</li><li>The database approaches (multiple data sources).</li><li>Preparing for Microservices (Replacing MediatR by RabbitMq).</li><li>Migrate to Microservices.</li></ul><h3>References:</h3><p><a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?view=aspnetcore-5.0">ASP.NET Core Middleware</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8355cc4905d4" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/easy-modular-monolith-part-4-global-exception-handling-8355cc4905d4">Easy Modular Monolith — Part 4— Global Exception Handling</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easy Modular Monolith — Part 3 — Logging]]></title>
            <link>https://itnext.io/easy-modular-monolith-part-3-logging-57caceac1ff5?source=rss-7d5f3cb5711c------2</link>
            <guid isPermaLink="false">https://medium.com/p/57caceac1ff5</guid>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[logging]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Norbert Dębosz]]></dc:creator>
            <pubDate>Mon, 06 Sep 2021 07:49:11 GMT</pubDate>
            <atom:updated>2021-11-13T20:33:25.471Z</atom:updated>
            <content:encoded><![CDATA[<h3>Easy Modular Monolith — Part 3 — Logging (Serilog and Seq)</h3><p>In a perfect world, in IT systems there is no place for bugs and maintenance. As developers, we prefer to deliver new stuff instead of maintaining old code and fixing bugs. But in most software systems, we will have to maintain something, fix some issue or change currently implemented logic.<br> <br>How to make our life easier and allow us to do the above much faster? <br>Start from <strong>IMPLEMENTING LOGGING!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*erVqlTKQ7b1wnZhdBRMNKQ.jpeg" /></figure><h4>What is logging?</h4><p>Logging is the action of storing information about an event that occurs in the system. The piece of information that is stored is called Log.<br>Logging is one of three pillars of observability alongside Tracing and Metrics.<br>It allows us to save a lot of time troubleshooting problems as it provides contextual data of an event.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ftDIHsfJFi6vq1FRWVnddA.png" /><figcaption>Sample log from ModularMonolith application</figcaption></figure><h4>What we should log?</h4><p>The most crucial part of implementing logging is that it should be used mostly as a diagnostic tool. <br>Logging should never contain any sensitive data like passwords, tokens and everything that is considered private and confidential.</p><h4>In our example we will focus on logging:</h4><ul><li>Requests flow — to be able to trace an execution flow.</li><li>Performance statistics — to troubleshoot slow requests.</li><li>Exceptions — for easier maintenance and bug fixing.</li></ul><h3>Implementation</h3><h4>Requirements:</h4><ul><li>Log information at least into two places — we should be able to see logs in console (for development environment) and in a file (for production environment).</li><li>We should be able to change the configuration from the appsettings.json file.</li><li>Implementation should be flexible and allow us to add more “sinks” (places to which we save a log) quite easily.</li></ul><p>Having those requirements in mind let implement a solution.</p><h4>Logging Tool</h4><p>Firstly, we should choose a logging tool. There is a couple of options worth considering but based on my experience <strong>Serilog* </strong>is the way to go.</p><h4>Why Serilog?</h4><ul><li>Easy to use</li><li>Flexible</li><li>Great documentation</li><li>Sinks addons (MsSql, Seq etc).</li></ul><h4>Code:</h4><p>Let’s install Serilog NuGet packages in our <strong>ModularMonolith.Infrastructure</strong> project:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K4EpPP--IPzGhEl3NjTUyg.png" /></figure><p>Next, let’s create a new extension method that will register a Logger for us.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/481aaa49bf4259cc6d3d791ab0c250da/href">https://medium.com/media/481aaa49bf4259cc6d3d791ab0c250da/href</a></iframe><p>The code above tries to resolve variables from appsettings.json(14–16) and then register a logger with corresponding “sinks”.</p><p>The configuration file looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*u63E0rbVGvRWJo1_Sz0-_Q.png" /></figure><ul><li><strong>EnableConsole </strong>and <strong>EnableFile</strong> will tell the logger to which sink log</li><li><strong>FilePath </strong>— path to the file if EnableFile enabled. The path will contain our log file.</li><li><strong>LogLevel</strong> — Tells logger which logs should be written to “sink”. Only the logs from chosen level and above will be logged.</li></ul><p>In the <strong>WebApi </strong>project let’s add our new extension — this will enable logger in the application.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a32ba7227d7815f7e9ee1eed4f6bea49/href">https://medium.com/media/a32ba7227d7815f7e9ee1eed4f6bea49/href</a></iframe><p>Let’s see what will happen now if we run the application and try to do a request to some endpoint:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eQN5tPmbMYrujRW_Y45XGA.png" /><figcaption>Logger output in the console</figcaption></figure><p>As you can see on the above image all-important messages are listed in console output. The same output is saved to file on the server hard drive so we can back to it in case the application shutdown. We are able to add new sinks to our application if needed. Depends on what exactly do we want to achieve there are multiple Serilog sinks extensions.</p><p>You can find all available sinks here:<br><a href="https://github.com/serilog/serilog/wiki/Provided-Sinks">https://github.com/serilog/serilog/wiki/Provided-Sink</a></p><h4>SEQ</h4><p><a href="https://datalust.co/seq">Seq</a> is the intelligent search, analysis, and alerting server built specifically for modern structured log data. It will allow us to view logs in a very convenient way. <br>Let’s see how easy we can add it to the ModularMonolith solution.</p><p>First, install an extra sink for Serilog:<br><a href="https://github.com/serilog/serilog-sinks-seq">https://github.com/serilog/serilog-sinks-seq</a><br>Then we will update our LoggerConfiguration class.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1a0697193892aa3281d617cee671292f/href">https://medium.com/media/1a0697193892aa3281d617cee671292f/href</a></iframe><p>In line 32 we see a new section — all that we need to do is call the new WriteTo method. <br>As a parameter, we should pass a URL address of our Seq server and API Key.</p><p>How to set up a Seq server</p><ul><li>By installing it on your computer/server.</li><li>By using Docker.</li></ul><p>We will use the second approach in this article:</p><p>Firstly install docker on your machine:<br><a href="https://www.docker.com/products/docker-desktop">https://www.docker.com/products/docker-desktop</a><br>Then all that you need to do is call this in your console:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9c13d2bc0d0a33f244715fe34537cdad/href">https://medium.com/media/9c13d2bc0d0a33f244715fe34537cdad/href</a></iframe><p>Now when we go to <a href="http://localhost:5341/">http://localhost:5341/</a> we should see a seq page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*53k8RMKAlcOzIHmLpXz2cg.png" /></figure><p>To make our logs appear on this page we have to do one more thing.<br>Navigate to: <a href="http://localhost:5341/#/settings/api-keys">http://localhost:5341/#/settings/api-keys</a> and create an API key that is used in our application to configure sink:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5v69NuGKFJEA8J137gWpTA.png" /></figure><h3>Summary</h3><p>Logs provide information about the flow of the request, the time needed to finish it and all exceptions that occur in our application. Having these pieces of information we are able to troubleshoot problems much faster.</p><p>Using such tools as Seq makes working with logs much faster and efficient, especially when we are the support team :)</p><p>In the next article, we will take a look at global exception handling and how to log that information from any of our modules.</p><h3>The whole code is available here:</h3><p><a href="https://github.com/Ridikk12/ModularMonolith/tree/Logging">https://github.com/Ridikk12/ModularMonolith/tree/Logging</a></p><h3>Previous:</h3><p><a href="https://ridikk12.medium.com/easy-modular-monolith-part-2-the-outbox-pattern-b4566724fb68">Easy Modular Monolith — Part 2— The OutBox Pattern</a></p><h4>In Next Part:</h4><ul><li>Exception Handling — Observability</li></ul><h3>In future (this list can change):</h3><ul><li>Authentication/Authorization</li><li>OutBox improvements.</li><li>Domain events.</li><li>Unit/Integration tests.</li><li>Storing configuration.</li><li>Direct communication between modules.</li><li>The database approaches (multiple data sources).</li><li>Preparing for Microservices (Replacing MediatR by RabbitMq).</li><li>Migrate to Microservices.</li></ul><h3>References:</h3><ul><li><a href="https://serilog.net/">Serilog - simple .NET logging with fully-structured events</a></li><li><a href="https://docs.datalust.co/docs/getting-started-with-docker">Getting Started with Docker</a></li></ul><h4>Worth checking:</h4><p><a href="https://github.com/serilog/serilog-settings-configuration">https://github.com/serilog/serilog-settings-configuration</a> — As an alternative to our custom code, the whole Serilog configuration can be done by appsettings.json file using this package.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57caceac1ff5" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/easy-modular-monolith-part-3-logging-57caceac1ff5">Easy Modular Monolith — Part 3 — Logging</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[7 rules to be a Great Software Team Member- Team Leader perspective]]></title>
            <link>https://ridikk12.medium.com/7-rules-to-be-a-great-software-team-member-team-leader-perspective-381366692b3a?source=rss-7d5f3cb5711c------2</link>
            <guid isPermaLink="false">https://medium.com/p/381366692b3a</guid>
            <category><![CDATA[career-advice]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[leadership-development]]></category>
            <category><![CDATA[dotnet]]></category>
            <dc:creator><![CDATA[Norbert Dębosz]]></dc:creator>
            <pubDate>Tue, 22 Jun 2021 07:09:35 GMT</pubDate>
            <atom:updated>2021-12-18T15:11:15.359Z</atom:updated>
            <content:encoded><![CDATA[<h3>7 rules to be a Great Software Team Member — Team Leader perspective</h3><p>As Software Developers we often focus most of our attention on the technical aspect of our work. Especially since we are engineers! But what if I told you that there is a second parallel world out there? <br>The world of people, business, communication and cooperation!</p><p>One of the biggest mistakes in my career was that I saw this so late. This second world has a significant influence on our day-to-day work and what’s more, future promotions and even how other people consider us. <br>That way, based on the experience that I have earned across years working in the IT industry, I would like to share with you, my dear reader, a couple of hints on how to become a great Team Member.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rzv7kXCExn6F47CCBRxuWw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@wildlittlethingsphoto?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Helena Lopes</a> on <a href="https://unsplash.com/s/photos/team-celebrating?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p><strong><em>The list contains my observations as a Team Leader and mistakes that I made as a Team Member.</em></strong></p><h3>Let’s start!</h3><h4>Be proactive</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl1KVaST85EIicDiLe%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fl1KVaST85EIicDiLe%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2Fl1KVaST85EIicDiLe%2Fgiphy.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="324" frameborder="0" scrolling="no"><a href="https://medium.com/media/db5e15b9437c1b861a1303ccc56529d1/href">https://medium.com/media/db5e15b9437c1b861a1303ccc56529d1/href</a></iframe><p>As a Team Lead, I love working with people who are into the job they are doing. I value very much all ideas/feedback/comments on my work. <br>If you are passionate about what you do and know how the project/workflow/whatever could be improved, never hesitate to start a conversation about that topic! Rember though, that it should never be in the form of sad complaining — it kills a lot of great ideas.</p><p><strong>How to start if you have never done that before?</strong></p><ul><li>Prepare a presentation about improvement that can be done along with arguments on how the system will be better and what it gives us as a team from the business and technical perspective. (Faster build/Code reviews = fewer bugs etc).</li><li>Propose a recurring meeting once per month where you and your team will be able to share ideas, talk about news from the IT world or just discuss a technical situation of the project and set technical goals for next month.</li></ul><h4>Never lie</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FAssqAJR8ib5WmCNGOU%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FAssqAJR8ib5WmCNGOU%2Fgiphy-downsized.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FAssqAJR8ib5WmCNGOU%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/5589250d1fb0715983a7c614e34ad88a/href">https://medium.com/media/5589250d1fb0715983a7c614e34ad88a/href</a></iframe><p>Remember — it is very hard to regain trust. I had an opportunity to meet in my career persons who were very unprofessional in their work.</p><p>Remember — your teammates can see that you are fixing an easy bug for two weeks — for the fourth consecutive week.</p><p><strong>What to do if you have a problem:</strong></p><ul><li>If you have trouble focusing on work or have some private issues that influence the pace of work, never hesitate to contact HR or your Team Leader. In a good workplace, everybody will try to find a solution and help.</li></ul><h4>Can-do attitude</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3o6Mb9oUlPMklRqaFa%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3o6Mb9oUlPMklRqaFa%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F3o6Mb9oUlPMklRqaFa%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/dc985a00a0816fc5ba9f0feab99b0653/href">https://medium.com/media/dc985a00a0816fc5ba9f0feab99b0653/href</a></iframe><p>A can-do attitude means that even if a problem looks tough, we believe that we are able to overcome it and find a solution.<br>Keeping a positive attitude in a team is an essential part of being a good Team Leader, but not only! It is just as important for being a good Team Member too.</p><p><strong>How to start:</strong></p><ul><li>Instead of searching for problems in every task, try to be a person who sees opportunities and challenges to overcome.</li><li>If you work in SCRUM a daily meeting could be the first place where your new attitude can be passed to other team members.</li><li>Next time a Team Lead or someone from the Business Team asks you if something can be done — instead of saying “No” try to say something like — “Yes, we should be able to do that but first we have to do research, give me X hours/days and I will get back to you” — then check how hard it will be and be back with constructive feedback.</li></ul><h4>Try to understand</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FyQF1MwG7u9OvgVAjmr%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FyQF1MwG7u9OvgVAjmr%2Fgiphy-downsized.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FyQF1MwG7u9OvgVAjmr%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="435" frameborder="0" scrolling="no"><a href="https://medium.com/media/59c928c39a00baac14010821e51864f4/href">https://medium.com/media/59c928c39a00baac14010821e51864f4/href</a></iframe><p>This one is connected to “<strong><em>Can Do Attitude</em></strong>” — try to understand that business is business — and software without clients will not pay for your home/car/holidays. As a Developer, I faced many times situation when I had to throw away work of the week, whole feature or my idea was pushed aside.</p><p>One of the hardest parts of dealing with software is to find a balance between technical quality and business value. One of the most significant positive changes that I made across my whole career is that I try to understand why some decisions were made instead of starting shouting loud that something is unfair.</p><p><strong>How to start:</strong></p><ul><li>Next time when something unclear/unfair happens in a project, try instead of shouting and being angry, to ask your Team Lead or Manager why some decision was made. This is a critical skill that will learn you how to gather why something is in the way that it is and if the future will help you to be a person who will be giving that answers :)</li></ul><h4>Don’t be afraid to ask for help</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FoGzFZek2lszlK%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FoGzFZek2lszlK%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FoGzFZek2lszlK%2Fgiphy.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="234" frameborder="0" scrolling="no"><a href="https://medium.com/media/9296975ec3b85448b4d65ff60f18d845/href">https://medium.com/media/9296975ec3b85448b4d65ff60f18d845/href</a></iframe><p>If you are stuck on some task, never hesitate to ask someone from the team for help. A great team are built on strong communication and mutual understanding. What more — even now — when I work as a Team Leader, I never hesitate to ask for help — no one knows everything!</p><blockquote>Remember:<br>He who asks a question is a fool for five minutes; he who does not ask a question remains a fool forever. — Chinese Proverb</blockquote><h4>Never sabotage</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FNWyknTtYr114s%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FNWyknTtYr114s%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FNWyknTtYr114s%2F200.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="296" frameborder="0" scrolling="no"><a href="https://medium.com/media/e5d70d8f106147d7175bd7df61a94009/href">https://medium.com/media/e5d70d8f106147d7175bd7df61a94009/href</a></iframe><p>Sadly to say, but I hate to work with people who try to sabotage a project. How would I describe a sabotager? It is a person who tries to find a problem in almost any decision made by the team. Try not to be that kind of person and as I wrote above — if something bothers you — start a conversation instead of staring fight between you and your team.</p><p><strong>Why stop:</strong></p><ul><li>There was a time in my carrier that on every possible Scrum Refinement I had to add my snappy comment on almost every task that we were planning — then I thought that I was doing good as I wanted our application to be perfect from a technical point of view — I didn’t understand that this isn’t a way of developing a real production-ready application. So even if I was quite good at delivering sprint objectives — I was a sabotager — a person who creates a bad attitude in the team. I could be more liked by other team members if I would have changed my attitude.</li></ul><p>So if you see that you are that person right now — try to change this — no one like a guy who always sees problems.</p><h4>Synergy!</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl3vQXn15dRVNMru7e%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fl3vQXn15dRVNMru7e%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2Fl3vQXn15dRVNMru7e%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="325" frameborder="0" scrolling="no"><a href="https://medium.com/media/26da1ef8f4766ea2a1e5e06e997e4db9/href">https://medium.com/media/26da1ef8f4766ea2a1e5e06e997e4db9/href</a></iframe><p>The best part about being in a team is that standard mathematic theory doesn’t work here!</p><p>Synergy means that sometimes 2+2 isn’t 4. <br>When two people with complementary skills and attitudes meet it can generate extra energy that will boost performance, create new ideas to handle obstacles and speed up the development process!</p><p><strong><em>A great Team Member will always look to find synergy.</em></strong></p><p><strong>How to do that?</strong></p><ul><li>The easiest way to be able to find synergy is to know YOUR skillset. As a great Team Member, you should know your strengths and weaknesses. <br>Knowing that will allow you to share knowledge with others team members and learn from them in parts that you feel weak. <br>As a side-effect, it will create synergies between you and your teammates.</li></ul><h3>Summary:</h3><p>Remember — Great teams are made by Great Team Members — unique persons with their own skillset and characters. Being a great Team Member isn’t an easy task — especially if you never thought that such small things like on list above have a big influence on a whole team. <br>Try to implement any of my points in your day to day work as a Team Member and let me know how it changed the attitude in your team. I’m sure that it will have a positive result!</p><h4>Try to:</h4><ul><li>Be proactive</li><li>Switch to “Can Do Attitude”</li><li>Understand</li><li>Ask for help if stuck</li><li>Seek for synergy</li></ul><h4>Don’t:</h4><ul><li>Lie</li><li>Sabotage</li><li>Complaint</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3ohs4Az5xSJj0RYrss%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3ohs4Az5xSJj0RYrss%2Fgiphy-downsized.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F3ohs4Az5xSJj0RYrss%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="435" frameborder="0" scrolling="no"><a href="https://medium.com/media/d2f9915502c51ed4dcc876e22dcb8337/href">https://medium.com/media/d2f9915502c51ed4dcc876e22dcb8337/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=381366692b3a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easy Modular Monolith — Part 2— The OutBox Pattern]]></title>
            <link>https://itnext.io/easy-modular-monolith-part-2-the-outbox-pattern-b4566724fb68?source=rss-7d5f3cb5711c------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4566724fb68</guid>
            <category><![CDATA[outbox-pattern]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[net-core]]></category>
            <dc:creator><![CDATA[Norbert Dębosz]]></dc:creator>
            <pubDate>Tue, 01 Jun 2021 07:19:40 GMT</pubDate>
            <atom:updated>2021-11-13T20:32:10.162Z</atom:updated>
            <content:encoded><![CDATA[<h3>Easy Modular Monolith — Part 2— The OutBox Pattern</h3><p>In part one we prepared an MVP version of a simple app in a modular-monolith way. Having a skeleton allow us to implement further improvements.</p><p>In this article, we will try to implement an OutBox patter that will handle a message delivery for us, and what is more important — ensure that consumers of the message will get it.</p><p>One thing in the IT systems world is sure — if something can fail — it will fail in some time. Let’s take a look at our <strong>AddProductCommandHandler</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gfGYSATryKyCdOPBSHC9SQ.png" /></figure><p>What we can see is that after we save data to our database, we produce an event that should be consumed by other “modules”. In a perfect world, sending this event will never fail and consumer will always be able to handle it — but not in ours :)</p><p>Not searching very far — MediatR can fail to publish an event for some reason — misconfiguration/infrastructure fails etc. Even after successful publish the event handler still can throw an exception because of some internal rules/validation/problems. The MVP version doesn’t handle that kind of situation well — in case of fail we will end with inconsistent data — what more as we don’t store information about failing anywhere we are lack context and not able to react.</p><h3>Architecture</h3><p>To prevent that kind of situation we will implement something that is called the “Outbox Pattern”. The whole idea behind this pattern is to instead of instantly publishing a message — store it somewhere and move responsibility for publishing to someone else.</p><p><strong>The important caveat is to remember that saving message and changes in CommandHandler should happen in one transaction!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*eMqiE9bQ42eo2c3q--_UXw.png" /></figure><p>Take a look at the above image — it looks very simple — we have OutBox Module that handles storing messages into DB and WorkerProcess that uses OutBox Module to get messages and publish them by MediatR Notifications.</p><p>Let’s try to connect this to our ModularMonolith application — it will look a little different and more complex but the whole idea is the same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*a_OYMbk8YSFI6KzEPsW-Aw.png" /></figure><p>The Web Api project is our entry point to the application. It registers all other dependencies and therefore has access to any module. The biggest change here is that it will register two new things.</p><ul><li>The Outbox module — Migration and fetching stored messages from DB. It contains an OutboxDbContext that will be used to deliver outbox DbSets to other modules.</li><li>The Outbox WorkerProcess — Background process that will dispatch all not handled messages and publish them to MediatR notification.</li></ul><p>The idea is to store all outbox messages (from any of our modules) into the same database and table in a separate schema — <strong>out.OutBoxMessages.</strong></p><h3>Implementation</h3><h4>Contracts</h4><p>First, we will need to create an abstraction over the message publishing interface. This will allow us to implement multiple ways of handling message publishing in future. Right now it will have two methods like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*PQUPDKoFh8mPByG0cAkOdg.png" /></figure><p>As you can see there is a new interface too. <strong>IIntegrationEven </strong>interface will be a marker interface for all events that should be published between modules.</p><h4>OutBox Module</h4><p>Outbox module will be much simpler than History or Product. Let’s make it flatter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*7ne4VD3BKj6S4ttYrqIWzQ.png" /></figure><p>As you can see most code here belongs to the Infrastructure layer. From a pragmatic point of view, there was no reason to split this same way as in the Product and History Module. No plans for any Domain/Application related stuff here and even if then we are able to extend this approach by splitting layers by folders instead of small projects.</p><p>What&#39;s more — this module will be used differently. It contains a base logic for our OutBox patter therefore it will be referenced by any module that would like to enable Outbox support.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*no00oGix5PdEeDFs6E_9BQ.png" /></figure><p>The most important part here is our OutBoxDbContext that is used to deliver a code responsible for saving/fetching OutBox messages.</p><p>The OutBoxMessage entity looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*RyXkotJ3QfjOKHKIkOlMHg.png" /></figure><p>In the Type property, we will store information about the type of our message (e.g ProductCreatedEvent).<br>In Message property— the whole serialized object of “Type”. <br>Both properties will be used later in WorkerProcess to deserialize the message.</p><h4>ModularMonolith.Infrastructure</h4><p>In this project, we will implement cross-cutting functionality* — in this case, it will be an <strong>InMemoryEventBus </strong>that will be handling publishing messages. In this version, we will deal only with <strong>IIntegrationEvent.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*hebroniTpknKVcsbTCGmIQ.png" /></figure><p>As you can see instead of immediate publishing messages by MediatR, we store them in our database. Thanks to that we will be able to grab all these messages later and handle them.</p><p>The most tricky part in the implementation of this EventBus was how to do that without breaking the DRY principle. As I mentioned earlier the caveat is that changes in command handler and saving the message has to happen in one transaction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OPZ3hUBrEg0t0Fj1qIlnNA.png" /></figure><p>Let’s take a look at our <strong>AddProductCommandHandler</strong>. As you can see there are new lines here:<br>One is calling Publish on our EventBus (line 27) and the second one calling Commit() on the Repository (line 29).</p><p>Ef Core works in this way that all changes added to the context in the life cycle of it will not be committed to the database until SaveChange is called.</p><p>In Part1 of this series, our repository called SaveChanges in the “Add” method committing a transaction right away. In this version, we will call commit later — after “Publish” on the EventBus called.</p><h4>So what was so tricky here?</h4><p>We can have multiple modules and all of them will use the same entity - <strong>OutBoxMessage</strong>. We don’t want to create multiple DB context and share a DB connection between them to allow committing in one transaction — it would make our life much harder in future when we would like to move our Modules to separate microservices*.</p><p>Let’s look one more time at our InMemoryEventBus:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*hebroniTpknKVcsbTCGmIQ.png" /></figure><p>As you can see as an input parameter it accepts an OutBoxDbContext. <br>The whole idea is to — in modules that we would like to apply Outbox — inherit “Module” DbContext by OutBoxDbContext like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*qLJX2Va-HI0wpCvAJ1v79Q.png" /></figure><p>Then we should create a separate, concrete module EventBus that will inherit from our base InMemoryEventBus — it will allow us to resolve proper EventBus in runtime:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*xhX9q0jzT3fwFO1jSgSBAg.png" /></figure><h4>Ok — so what happens here?</h4><p>This allows us to share an instance of DbContext (as it is registered as scoped) between InMemoryEventBus and CommandHandler — hence Commit() will save all changes from Command Handler and “Publish” in one transaction.</p><h4>Worker Process</h4><p>The worker process is our special guy who will be responsible for grabbing all our messages from the database and publish them using MediatR.<br>Let’s take a look:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YpePcWhLgkwZpKaHvvXCYw.png" /></figure><p>First, we need to grab two services from our DI container. (line 34)<br>OutBoxDbContext for DB access and MediatR for publishing.</p><p>The most important part is happening in the loop (line 38).<br>First, we need to get a type of our message. As our Modular Monolith is one application we are able to Load a DLL that contains all Contracts (ModularMonolith.Contracts project) and resolve type from there. (line 42) <br>Having a contract type we are able to deserialize a message. (line 44).</p><p>Next, we use MediatR to publish a message. If all is good, we update ExecutionData, log information about handling message and move to the next one.<br>In case of an error, log error information and try to handle the next message. What important in this version we won’t implement any more sophisticated ways of handling errors (Retries/Poison Messages/Notifications). This is something that will happen and is placed in the roadmap :)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FEmMWgjxt6HqXC%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Floop-cat-EmMWgjxt6HqXC&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2FEmMWgjxt6HqXC%2F200.gif%3Fcid%3D790b7611f889b3cc2a9d20d60efa942baab9b2e587ba9266%26rid%3D200.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="290" frameborder="0" scrolling="no"><a href="https://medium.com/media/54de32b047a6d572d7dc97ada208ff86/href">https://medium.com/media/54de32b047a6d572d7dc97ada208ff86/href</a></iframe><p>The drawback of this approach is that the worker process handles messages in the loop. In our example, it executes messages every 1 second. If we are forced to handle a lot of messages then this place WILL become our bottleneck. We will take a closer look at this problem in future.</p><h4>That it is!</h4><p>We have a working solution that guarantees our messages to be stored and handled. In the nearest feature, we will improve the way that we are handling exceptions in our Outbox to make the solution much more resistant to failures.</p><h3>Summary:</h3><ul><li>OutBoxPattern is a pattern that guaranty the delivery of a message to the consumer by persisting it (in one transaction) and delegate dispatching to an external “application”.</li><li>OutBoxModule delivers an OutBoxDbContext that can be used in other modules to deliver OutBox support. To add support for Outbox for the next module we just need to inherit DBContext by OutBoxDbContext and create a module EventBus by inheriting InMemoryEventBus.</li></ul><h3>The whole code is available here:</h3><p><a href="https://github.com/Ridikk12/ModularMonolith/tree/OutBoxPattern">https://github.com/Ridikk12/ModularMonolith/tree/OutBoxPattern</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F26tn33aiTi1jkl6H6%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F26tn33aiTi1jkl6H6%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExY3d1NnNxNGJpdWoyYW02cHJyMnEwNGtuMm12Y253dGxvNzNwbmc4ZCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2F26tn33aiTi1jkl6H6%2Fgiphy_s.gif&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/53c433cc54b5b6de2b774b317a463275/href">https://medium.com/media/53c433cc54b5b6de2b774b317a463275/href</a></iframe><h3>Previous:</h3><p><a href="https://ridikk12.medium.com/easy-modular-monolith-part-1-mvp-d57f47935e24">Easy Modular Monolith — Part 1 — MVP</a></p><h3>In Next Part:</h3><p><a href="https://ridikk12.medium.com/easy-modular-monolith-part-3-logging-57caceac1ff5">Easy Modular Monolith — Part 3 — Logging</a></p><h3>In future (this list can change):</h3><ul><li>OutBox improvements.</li><li>Domain events.</li><li>Unit/Integration tests.</li><li>Storing configuration.</li><li>Direct communication between modules.</li><li>The database approaches (multiple data sources).</li><li>Preparing for Microservices (Replacing MediatR by RabbitMq).</li><li>Migrate to Microservices.</li></ul><h4>References:</h4><p>https://docs.microsoft.com/en-us/ef/core/saving/transactions<br>https://microservices.io/patterns/data/transactional-outbox.html<br><a href="https://en.wikipedia.org/wiki/Cross-cutting_concern#:~:text=Cross%2Dcutting%20concerns%20are%20parts,oriented%20programming%20or%20procedural%20programming">https://en.wikipedia.org/wiki/Cross-cutting_concern#:~:text=Cross%2Dcutting%20concerns%20are%20parts,oriented%20programming%20or%20procedural%20programming</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4566724fb68" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/easy-modular-monolith-part-2-the-outbox-pattern-b4566724fb68">Easy Modular Monolith — Part 2— The OutBox Pattern</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>