<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mukesh Singh</title>
    <description>The latest articles on DEV Community by Mukesh Singh (@mukesh_singh).</description>
    <link>https://dev.to/mukesh_singh</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3347852%2F3d986c5c-cf0b-4750-8ef8-b558a40a15ff.png</url>
      <title>DEV Community: Mukesh Singh</title>
      <link>https://dev.to/mukesh_singh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mukesh_singh"/>
    <language>en</language>
    <item>
      <title>Python</title>
      <dc:creator>Mukesh Singh</dc:creator>
      <pubDate>Sat, 13 Sep 2025 19:49:16 +0000</pubDate>
      <link>https://dev.to/mukesh_singh/python-55n0</link>
      <guid>https://dev.to/mukesh_singh/python-55n0</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is a Python identifier?&lt;/strong&gt;&lt;br&gt;
A Python identifier is the name of a variable, function, class, module or object. &lt;/p&gt;

&lt;p&gt;An identifier can start with a letter A-Z or a-z or an underscore.&lt;br&gt;
An identifier can includes zero or more letter, number 0-9 and an underscore&lt;br&gt;
Class name starts with uppercase letter and other letters are lower case&lt;br&gt;
An identifier starts with a single underscore is used for private identifier&lt;br&gt;
An identifier with two underscores is used for strongly private identifier&lt;br&gt;
An identifer with prefix and suffix with two underscore indicates system identifier&lt;/p&gt;

&lt;p&gt;Date Time Format in Python&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsk6mot55exwgs5wo5zdf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsk6mot55exwgs5wo5zdf.png" alt=" " width="800" height="688"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Git</title>
      <dc:creator>Mukesh Singh</dc:creator>
      <pubDate>Thu, 21 Aug 2025 12:49:15 +0000</pubDate>
      <link>https://dev.to/mukesh_singh/git-462h</link>
      <guid>https://dev.to/mukesh_singh/git-462h</guid>
      <description>&lt;p&gt;git clone git@:&lt;/p&gt;

&lt;p&gt;ssh-agent bash&lt;br&gt;
Note if agent has not started it will throw error when running&lt;br&gt;
ssh-add -l &lt;br&gt;
Error connecting to agent: No such file or directory&lt;/p&gt;

&lt;p&gt;Also it will ask for private key password&lt;/p&gt;

&lt;p&gt;At the user folder&lt;br&gt;
ssh-add ~/.ssh/&lt;/p&gt;

&lt;p&gt;Test &lt;br&gt;
 ssh -Tv &lt;/p&gt;

&lt;p&gt;git config user.email "YOUR_EMAIL"&lt;br&gt;
git config user.name "YOUR_NAME"&lt;/p&gt;

&lt;p&gt;Check remote URL&lt;/p&gt;

&lt;p&gt;git remote -v&lt;/p&gt;

&lt;p&gt;To Check Detail&lt;br&gt;
git remote show origin&lt;/p&gt;

&lt;p&gt;To change Origin&lt;/p&gt;

&lt;p&gt;git remote set-url origin &lt;/p&gt;

</description>
      <category>git</category>
      <category>cli</category>
      <category>software</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Clean Architecture Vs Verticle Slice Achitecture</title>
      <dc:creator>Mukesh Singh</dc:creator>
      <pubDate>Sat, 19 Jul 2025 18:04:13 +0000</pubDate>
      <link>https://dev.to/mukesh_singh/clean-architecture-vs-verticle-slice-achitecture-e7c</link>
      <guid>https://dev.to/mukesh_singh/clean-architecture-vs-verticle-slice-achitecture-e7c</guid>
      <description>&lt;h1&gt;
  
  
  Clean Architecture
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Separation of concerns: Every layer has a specific responsibility and focus on single concern&lt;/li&gt;
&lt;li&gt;Dependency rules Dependency flows inward. The high-level module should not aware of low-level module&lt;/li&gt;
&lt;li&gt;Organises into layers&lt;/li&gt;
&lt;li&gt;Business logic is decoupled from external concerns&lt;/li&gt;
&lt;li&gt;Facilitates for more testing, automation testing and SOLID principles.&lt;/li&gt;
&lt;li&gt;Provides flexibility and modular design to facilitate future flexibility&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Vertical Skice Architecture
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;It emphasises end-to-end delivery, cutting layers by building small vertical features&lt;br&gt;
_Creates feature-based folders&lt;br&gt;
_It facilitates faster feedback, Team collaboration, and Incremental delivery.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;References:&lt;br&gt;
&lt;a href="https://www.freecodecamp.org/news/a-quick-introduction-to-clean-architecture-990c014448d2/" rel="noopener noreferrer"&gt;https://www.freecodecamp.org/news/a-quick-introduction-to-clean-architecture-990c014448d2/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>softwaredevelopment</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Commonly used microservices design patterns</title>
      <dc:creator>Mukesh Singh</dc:creator>
      <pubDate>Sun, 13 Jul 2025 18:16:42 +0000</pubDate>
      <link>https://dev.to/mukesh_singh/commonly-used-microservices-design-patterns-59n0</link>
      <guid>https://dev.to/mukesh_singh/commonly-used-microservices-design-patterns-59n0</guid>
      <description>&lt;ol&gt;
&lt;li&gt;Dedicated database for each service:
A database dedicated to one service can’t be accessed by other services. &lt;/li&gt;
&lt;li&gt;Saga pattern
2.1. Choreography:
2.2. Orchestration&lt;/li&gt;
&lt;li&gt;API gateway pattern&lt;/li&gt;
&lt;li&gt;Backends for Frontends pattern&lt;/li&gt;
&lt;li&gt;Circuit breaker design pattern&lt;/li&gt;
&lt;li&gt;pub-sub&lt;/li&gt;
&lt;li&gt;Asynchronous messaging&lt;/li&gt;
&lt;li&gt;Event sourcing&lt;/li&gt;
&lt;li&gt;Strangler&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>microservices</category>
      <category>systemdesign</category>
      <category>architecture</category>
      <category>pubsub</category>
    </item>
    <item>
      <title>Deploy Azure Function App using Terraform</title>
      <dc:creator>Mukesh Singh</dc:creator>
      <pubDate>Sun, 13 Jul 2025 18:15:51 +0000</pubDate>
      <link>https://dev.to/mukesh_singh/deploy-azure-function-app-using-terraform-3aad</link>
      <guid>https://dev.to/mukesh_singh/deploy-azure-function-app-using-terraform-3aad</guid>
      <description></description>
      <category>azure</category>
      <category>terraform</category>
      <category>azurefunctions</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Azure Service Bus</title>
      <dc:creator>Mukesh Singh</dc:creator>
      <pubDate>Sun, 13 Jul 2025 13:07:40 +0000</pubDate>
      <link>https://dev.to/mukesh_singh/azure-service-bus-2c56</link>
      <guid>https://dev.to/mukesh_singh/azure-service-bus-2c56</guid>
      <description>&lt;p&gt;A queue with session enabled will guarantee the message stay in the order.&lt;br&gt;
Azure Service Bus with session enabled automatically group messages into sessions.&lt;/p&gt;

&lt;h1&gt;
  
  
  Transaction in Service Bus:
&lt;/h1&gt;

&lt;p&gt;Using a transaction group combines two or more operations together in execution scope. It is processed as a single unit. In transaction retry does not happen when any exception.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;    Send&lt;/li&gt;
&lt;li&gt;    Complete&lt;/li&gt;
&lt;li&gt;    Abandon&lt;/li&gt;
&lt;li&gt;    Deadletter&lt;/li&gt;
&lt;li&gt;    Defer&lt;/li&gt;
&lt;li&gt;    Renew lock&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;var options = new ServiceBusClientOptions { EnableCrossEntityTransactions = true };&lt;br&gt;
await using var client = new ServiceBusClient(connectionString, options);&lt;/p&gt;

&lt;p&gt;ServiceBusReceiver receiverA = client.CreateReceiver("queueA");&lt;br&gt;
ServiceBusSender senderB = client.CreateSender("queueB");&lt;/p&gt;

&lt;p&gt;ServiceBusReceivedMessage receivedMessage = await receiverA.ReceiveMessageAsync();&lt;/p&gt;

&lt;p&gt;using (var ts = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))&lt;br&gt;
{&lt;br&gt;
    await receiverA.CompleteMessageAsync(receivedMessage);&lt;br&gt;
    await senderB.SendMessageAsync(new ServiceBusMessage());&lt;br&gt;
    ts.Complete();&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-transactions" rel="noopener noreferrer"&gt;Link&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Message Session in Service Bus:
&lt;/h1&gt;

&lt;p&gt;It allow joint and ordered procession of unbound sequence of related messages.&lt;/p&gt;

&lt;p&gt;Session can be used FIFO and request-response pattern.&lt;/p&gt;

&lt;p&gt;Sender can initiate a seesion when submitting message into topi with session-ID property. At AMQP 1.o it will be mapped to group-id property&lt;/p&gt;

&lt;h1&gt;
  
  
  Duplicate Detection in Service Bus:
&lt;/h1&gt;

&lt;p&gt;When creating queue enable duplicate detection and set the detction window.&lt;/p&gt;

&lt;h1&gt;
  
  
  Partitioning in Service Bus:
&lt;/h1&gt;

&lt;p&gt;A queue or topic is handled by a single message broker and stored in one messaging store.&lt;br&gt;
A Service Bus enable queues and topics to be partitioned across multiple message brokers and message stores.&lt;/p&gt;

&lt;h1&gt;
  
  
  Topic Filters and Action in Service Bus:
&lt;/h1&gt;

&lt;p&gt;## Filters&lt;br&gt;
     It's a rule consists of filter condition that selects particular message (e.g.,  SQL Filter, Boolean Filter, Correlation Filter)&lt;/p&gt;

&lt;p&gt;## Action&lt;br&gt;
     It's a update statement. The action is done on the message after it has been matched and before message is selected into subscription.&lt;/p&gt;




&lt;p&gt;adminClient = new ServiceBusAdministrationClient(connectionString);    &lt;/p&gt;

&lt;p&gt;// Create a SQL filter with color set to red&lt;br&gt;
// Action is defined to set the quantity to half if the color is red&lt;br&gt;
await adminClient.CreateRuleAsync(topicName, "ColorRed", new CreateRuleOptions &lt;br&gt;
{ &lt;br&gt;
    Name = "RedOrdersWithAction",&lt;br&gt;
    Filter = new SqlRuleFilter("user.color='red'"),&lt;br&gt;
    Action = new SqlRuleAction("SET quantity = quantity / 2;")&lt;br&gt;
}&lt;/p&gt;




&lt;h1&gt;
  
  
  Transaction in Service Bus:
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Transaction in Service Bus:
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Patterns in Service Bus:
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Broadcast Pattern&lt;/li&gt;
&lt;li&gt;Partition Pattern&lt;/li&gt;
&lt;li&gt;Routing Pattern&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Service Bus
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Azure Function App Authentication</title>
      <dc:creator>Mukesh Singh</dc:creator>
      <pubDate>Sun, 13 Jul 2025 07:34:40 +0000</pubDate>
      <link>https://dev.to/mukesh_singh/azure-function-app-authentication-23h4</link>
      <guid>https://dev.to/mukesh_singh/azure-function-app-authentication-23h4</guid>
      <description>&lt;h2&gt;
  
  
  AuthorizationLevel
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Anonymous&lt;/li&gt;
&lt;li&gt;User&lt;/li&gt;
&lt;li&gt;Function&lt;/li&gt;
&lt;li&gt;System&lt;/li&gt;
&lt;li&gt;Admin&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>azure</category>
      <category>azurefunctions</category>
      <category>authentication</category>
      <category>security</category>
    </item>
    <item>
      <title>Azure Function App</title>
      <dc:creator>Mukesh Singh</dc:creator>
      <pubDate>Sat, 12 Jul 2025 23:00:08 +0000</pubDate>
      <link>https://dev.to/mukesh_singh/azure-function-app-2bma</link>
      <guid>https://dev.to/mukesh_singh/azure-function-app-2bma</guid>
      <description>&lt;h2&gt;
  
  
  Robust function characteristics
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Avoid long-running functions&lt;/li&gt;
&lt;li&gt;Plan cross-function communication&lt;/li&gt;
&lt;li&gt;Write functions to be stateless&lt;/li&gt;
&lt;li&gt;Write defensive functions&lt;/li&gt;
&lt;li&gt;Security&lt;/li&gt;
&lt;li&gt;Concurrency&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Scaling
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Event driven scaling&lt;/li&gt;
&lt;li&gt;Concurrency in Function App
Concurrency refers to the ability of a service to handle multiple requests or operations simultaneously.
This can be achieved by&lt;/li&gt;
&lt;li&gt;Parallelism
Executing multiple tasks at the same time on different cpu/machine&lt;/li&gt;
&lt;li&gt;Overlapping Execution
Perform operation in a way that they dont block each other&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Concurreny is achived by
&lt;/h3&gt;

&lt;p&gt;-Thread pools&lt;br&gt;
Assigning threads to handle incoming requests&lt;br&gt;
-Async Operation&lt;br&gt;
Async communication patterns to decouple tasks.&lt;br&gt;
-Concurrency control mechanism&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Pessimistic locking&lt;br&gt;
Locking entire row to prevent users from modifying data that affects the current user&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Optimistic Concurrency&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Versioning&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;event driven architecture&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Static Concurrency&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dynamic Concurrency&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Fuction App Design Pattern
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Database per Service - each service has its own private database&lt;/li&gt;
&lt;li&gt;Shared database - services share a database&lt;/li&gt;
&lt;li&gt;Saga - use sagas, which a sequences of local transactions, to maintain data consistency across services&lt;/li&gt;
&lt;li&gt;Command-side replica - maintain a queryable replica of data in a service that implements a command&lt;/li&gt;
&lt;li&gt;API Composition - implement queries by invoking the services that own the data and performing an in-memory join&lt;/li&gt;
&lt;li&gt;CQRS - implement queries by maintaining one or more materialized views that can be efficiently queried&lt;/li&gt;
&lt;li&gt;Domain event - publish an event whenever data changes&lt;/li&gt;
&lt;li&gt;Event sourcing - persist aggregates as a sequence of events&lt;/li&gt;
&lt;li&gt;Event based pattern
In this way it can improve the speed, endurance and resilience of the process.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Async Pattern&lt;br&gt;
With Async approachit eliminates blocking call&lt;/p&gt;
&lt;h3&gt;
  
  
  Consider async/await misuses anti patterns
&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Concurrency settings in host.json&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;"extensions": {&lt;br&gt;
        "http": {&lt;br&gt;
            "routePrefix": "api",&lt;br&gt;
            "maxOutstandingRequests": 200,&lt;br&gt;
            "maxConcurrentRequests": 100,&lt;br&gt;
            "dynamicThrottlesEnabled": true,&lt;br&gt;
            "hsts": {&lt;br&gt;
                "isEnabled": true,&lt;br&gt;
                "maxAge": "10"&lt;br&gt;
            },&lt;br&gt;
            "customHeaders": {&lt;br&gt;
                "X-Content-Type-Options": "nosniff"&lt;br&gt;
            }&lt;br&gt;
        }&lt;br&gt;
    }&lt;/p&gt;

&lt;h2&gt;
  
  
  Idempotent Design best practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Verify input&lt;/li&gt;
&lt;li&gt;Verify data freshness&lt;/li&gt;
&lt;li&gt;Verify existence for update and delete operations&lt;/li&gt;
&lt;li&gt;Duplicate detection&lt;/li&gt;
&lt;li&gt;Concurrency control
&lt;a href="https://learn.microsoft.com/en-us/azure/azure-functions/functions-idempotent" rel="noopener noreferrer"&gt;Link&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Problem with Distributed Transaction
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdppsv322r6qfbfwiqkix.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdppsv322r6qfbfwiqkix.png" alt=" " width="611" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Problem with ACID&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

&lt;h2&gt;
  
  
  Saga Design Pattern
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhmnqnf38cndwdq3w8ixt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhmnqnf38cndwdq3w8ixt.png" alt=" " width="656" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Optimistic Locking
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Read the record and note the version. Use this version for writing the record&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Pessimistic Locking
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Apply exclusive lock until finished the operation&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>azure</category>
    </item>
  </channel>
</rss>
