<?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 Deepak Barnwal on Medium]]></title>
        <description><![CDATA[Stories by Deepak Barnwal on Medium]]></description>
        <link>https://medium.com/@dbarnwal888?source=rss-9021edeb25d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*yYZGO5IV_SU1SL_l</url>
            <title>Stories by Deepak Barnwal on Medium</title>
            <link>https://medium.com/@dbarnwal888?source=rss-9021edeb25d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 08:11:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dbarnwal888/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[Basic of Messaging Queues.]]></title>
            <link>https://medium.com/@dbarnwal888/basic-of-messaging-queues-dc3db7ee5041?source=rss-9021edeb25d------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc3db7ee5041</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[rabbitmq]]></category>
            <category><![CDATA[messaging-queue]]></category>
            <dc:creator><![CDATA[Deepak Barnwal]]></dc:creator>
            <pubDate>Sat, 04 May 2024 06:44:22 GMT</pubDate>
            <atom:updated>2024-05-04T06:44:22.411Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>1. Understanding Messaging Queues</strong></blockquote><p>A message queue is a form of <strong>asynchronous service-to-service</strong> communication commonly used in serverless and microservices architectures. <br>In simple terms, it’s a method for transmitting information through messages, which are data units sent between applications or services. <strong>Messages</strong> can be formatted in various ways that can be converted into a stream of bytes for transmission, such as text, JSON, XML, serialized objects, or raw binary data.<br><strong>Queue</strong> represents a lineup of items awaiting processing, arranged sequentially from the front. In the context of message queuing, it refers to a series of work items awaiting processing and delivery between applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CL4uMUkYDw7Gnpum" /></figure><p>The fundamental architecture of a message queue is straightforward: producer client applications generate messages and dispatch them to the message queue. On the other end, consumer applications connect to the queue to retrieve and process the messages. Messages remain stored in the queue until consumed by the recipient.</p><blockquote><strong>2. Message Queue Architecture types</strong></blockquote><p>Point-to-Point: In a point-to-point architecture, messages are sent from a sender to a specific receiver. Only one receiver can receive each message.</p><p>Publish-Subscribe: In a publish-subscribe architecture, messages are sent from a sender to multiple receivers. Each receiver subscribes to a specific topic, and messages are delivered to all subscribers of that topic.</p><p>Hybrid: Some message queue implementations use a hybrid architecture that combines point-to-point and publish-subscribe architectures.</p><blockquote><strong>3. Why Use Message Queues in a Pipeline?</strong></blockquote><p>Decoupling: Message queues separate components of a pipeline, allowing them to operate independently.</p><p>Scalability: Message queues facilitate the smooth scaling of applications. <br>Resilience: If a part of the pipeline fails, the message queue retains the messages until they are processed, preventing data loss during failures.</p><p>Load leveling: Message queues help manage high loads and traffic spikes, smoothing out processing over time.</p><p>Ordering and choreography: Certain queues guarantee message order, ensuring pipeline operations occur in the correct sequence. Ex : RabbitMQ, Kafka, SQS.</p><blockquote><strong>4. RabbitMQ — message broker</strong></blockquote><p>RabbitMQ is an extremely popular open-source Message Broker used for building message-based systems. Although RabbitMQ supports multiple protocols, the most commonly used is AMQP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*osfGXaLdQrWp9B6H" /></figure><p><strong>Flow : </strong><br><strong>Producer</strong> publishes messages to exchange via a channel established between them at the time of application startup.<br><strong>Exchange</strong> receives the message and finds appropriate bindings based on message attributes and exchange types.<br><strong>Selected binding</strong> is then used to route messages to intended queues.<br>The message stays in the queue until handled by the consumer.<br><strong>Consumers</strong> receive the messages using channels established usually at application startup.</p><p>Exchange types :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*s3oL-vmZyh0KzF2n" /></figure><p><strong>Direct (Default):</strong> The message is routed to the queues whose binding key matches the message’s routing key. It is primarily used for unicast routing of messages.<br><strong>Fanout</strong>: It routes messages to all the queues bound to it, and the routing key is ignored.<br><strong>Topic</strong>: The topic exchange does a wildcard match between the routing key and the routing pattern specified in the binding.<br><strong>Header</strong>: The header exchanges use the message header attributes for routing.</p><blockquote><strong>5. Prefetching Messages</strong></blockquote><p>Prefetching in RabbitMQ refers to the process by which consumers fetch messages from queues before processing them. It allows consumers to pull multiple messages from the queue and hold them locally for processing, instead of waiting for each message to be delivered one by one.</p><p>For most consumers, it makes sense to limit the size of this window to avoid the unbounded buffer (heap) growth problem on the consumer end. This is done by setting a “prefetch count” value. The value defines the maximum number of unacknowledged deliveries permitted on a channel. When the number reaches the configured count, RabbitMQ will stop delivering more messages on the channel until at least one of the outstanding ones is acknowledged. This can be used as a simple load-balancing technique or to improve throughput if messages tend to be published in batches. In general, increasing prefetch will improve the message delivery rate to consumers.</p><blockquote><strong>6. Dead Letter Queue</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IDnojuSebfWlp497" /></figure><p><strong>Message Processing Failures</strong>: When a message cannot be processed successfully by a consumer, typically due to errors or exceptions during processing, RabbitMQ provides mechanisms for handling such scenarios.<br><br><strong>Error Handling and Analysis</strong>: Dead Letter Queues are useful for error handling, troubleshooting, and analysis purposes. Messages in the DLQ can be inspected to identify patterns of failures, diagnose processing issues, and take corrective actions to improve system reliability and performance.</p><p><strong>Reprocessing or Discarding: </strong>Messages in the Dead Letter Queue can be reprocessed, manually or automatically, after identifying and resolving the underlying issues that caused them to fail processing. Alternatively, if a message is deemed unprocessable or irrelevant, it can be discarded from the DLQ.</p><p>Dead Letter Queues provide a safety net for handling messages that cannot be successfully processed, ensuring that they are not lost or indefinitely stuck in the system. By routing failed messages to a separate queue, developers can implement retry mechanisms, analyze processing failures, and take appropriate remedial actions to maintain the robustness and reliability of the messaging system.</p><blockquote><strong>7. Uses</strong></blockquote><p>Order Processing: E-commerce platforms efficiently manage order processing, ensuring timely updates for customers.</p><p>Notifications: Instant messaging apps deliver real-time notifications to multiple devices using messaging queues.</p><p>Data Streaming: Streaming platforms process and distribute large volumes of real-time data, such as social media feeds or financial market updates like stocks , bitcoins :) .</p><p>Sending emails</p><p>Search engine indexing: say you’re building a CRM, your user modifies the info of a client company. That the info is correctly saved in DB is enough to send a reply to the user. Integrating that new info in your search engine index can happen minutes later without it being an issue.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc3db7ee5041" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CRED Interview Experience — Backend 2022]]></title>
            <link>https://medium.com/@dbarnwal888/cred-interview-experience-backend-2022-26c312595397?source=rss-9021edeb25d------2</link>
            <guid isPermaLink="false">https://medium.com/p/26c312595397</guid>
            <category><![CDATA[cred]]></category>
            <category><![CDATA[de]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Deepak Barnwal]]></dc:creator>
            <pubDate>Fri, 09 Jun 2023 06:24:29 GMT</pubDate>
            <atom:updated>2023-06-09T06:37:35.968Z</atom:updated>
            <content:encoded><![CDATA[<h3>CRED Interview Experience — Backend 2022</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/404/1*0skThpTC3LFuoVNgruKQ2g.png" /></figure><p>I recently recieved a Full time offer from CRED through On-Campus placements. I’ll try to give the insights about the recruitment process and my prepration strategy for the same. The recritment process of CRED Intern hiring is also very similar to this. So this may be useful for it also.</p><p><strong>Background : </strong>Throughout my 3 years of college I’ve majorly focused on competitive programming and tried to explore many things such as Machine Learning, Web — development, Android Development etc. I consider exploring things in the intials years is very crucial because it makes your vision clear about the path you are going to follow in the upcoming years. So after trying a lot of things I consider sticking to Competitive Programming as one of the best decisions thoughout my college life. Regularly participating in contests and hackathons boosts your confidence a lot and the knowledge growth is exponential. Also if you are appearing for full time interviews try to have a prior internship experience. It really helps you a lot but it’s fine if you don’t have it. So without further delay let’s dive in my interview process.</p><p><strong>Round 0 : Online Coding Challenge<br></strong>The coding round was conducted on Hackerrank platform which consisted 3 problems to be solved in 90 minutes. The problems were not like standard problems but they were quite intersting algorithmic challenges. The difficulty level will be something like Codeforces A , C , C respectively. Topics included were combinatorics, bitmask DP, greedy, ad-hoc.<br>I solved all the 3 problems pretty fast and was sure about the selection in the next round. Around ~200 people appeared for the test. This is the most important round and majority of the folks are eliminated in this round. Only 20 people were shortlisted for the next round.</p><p><strong>Round 1: Machine Coding Round/Project Round<br></strong>This round was also conducted on Hackerrank for a duration of 150 minutes. The intent of this round is to gauge how well you can contribute to a real-world problem and a structured codebase. The expectation during this round from you is to understand the problem statement (real-world and ambiguous), able to break down and implement the same through the code. We were provided the basic code structure and skeleton code like models/classes used in the project, basic implementations of some functions and test cases.<br>We are expected to build a understanding of the current state of project by navigating through the code before doing any implementations.</p><p>In this round we had to implement a blogging website workflow in which two classes were already implemented which had a lot of attributes and corresponding methods. Leveraging these classes we had to create some functionality which were interdependent on each other.<br>I implemented all the functionaltiy in C++. <br>The scoring for this round were pretty much same as in a normal coding problem. Your code is tested against many test cases. There were around 60 Test-Cases which you have to clear. I was able to pass all of them in ~100 mins. <br>I find this round pretty intersting and had fun while implementing the functions. Look for the edge cases while implementing the functions and try to write clean code so that it’s easy to debug. Wrting clean also gives an edge over others as it’s easy to review and more understandable. This is also very challenging and competitive round, only 5 people were shorlisted for the next round.</p><p><strong>Round 2: Technical Interview 1<br></strong>This round was conducted over Zoom meeting for me because I was in banglore for my internship. Others folks had their interviews offline in the college itself. The duration of the round was approx 60 minutes. <br>The interview started with our introductions. Both the interviwers were very friendly and first they ensured that we were comfortable enough to start the problem solving part. This round is not like other companies interviews i.e. you don’t get a problem statement from leetcode or any other online judge, instead what happens is a really cool brain-storming session on the Round 1 problem statement. My internship experience at Goldman Sachs really helped me a lot to ace this interview. I didn’t needed to specifically prepare for this round. <br>The round started with discussion of the approach that I used in Round-1 and scope of improvement in it. Then there were similar functions we needed to implement in this round which were as follows. <br><strong>a.</strong> How do we handle concurrency and multithreading. You need to be clear with basic understading of DBMS such as ACID/CAP properties and basics of threading.<br><strong>b. </strong>Many problems involving data-structures knowledge and clear algorithmic approaches.</p><p>There were few more functions which I don’t remember now but were pretty intersting to have a discussion on them. Only 4 people were selected for the next round.</p><p><strong>Round 3: CRED Mark<br></strong>This is kind of managerial discussion where you are connected with a Engineering Team Lead at CRED. This conversation would be centered around you and they would like to know and learn more about you — your behaviors and values &amp; belief system that has shaped you. It was a very good discussion round and lasted for an hour. <br>This round started with our introductions. The interviwer was very friendly. It started with a long discussion of my internship at Goldman Sachs. He dived into the project that I was working on and my experience so far in the internships such as difficulties that I faced, how I built an understanding of the current project and many stuff related to that. <br>Then we started discussion of my background in college and had a discussion on my Competitive Programming journey. After this we had a discussion on my personal projects like the approach, learnings and motivation behind these projects. It’s very important to have a deep understanding of your projects to ace such rounds. Then at the end the interviwer told me to ask a question. In my opinion this is a very great chance to end the interview on a very positive note. So you can think of some intersting questions in advance which you want to ask your interviwer. Try to keep it short and crisp.</p><p><strong>Verdict : 25 July 2022<br></strong>3 people were selected for the offer and I was one of them.😁✨</p><p><strong>Reader’s Special :<br>1. </strong>Every round is very competitive and intersting. So try to enjoy each one of them and don’t take it lightly.<br><strong>2. </strong>Keep your resume honest. Only add those things for which you are confident enough and could speak for a while.<br><strong>3. </strong>Prepare your projects in depth covering all the aspects from technical part to Motivation, Goals, Limitations etc.<br><strong>4. </strong>Communication skills are very important to ace the interviews. My experience in teaching Competitive Programming to juniors helped me a lot to clearly explain my approach to the interviewers. ( Try to give 2–3 mock interviews with your friends or sometimes teach C.P ).<strong><br>6.</strong> To prepare for the machine coding round you can have a discussion among your peers about how to design a basic application and after 1–2 discussions you can be confident enough to ace these rounds.<br><strong>7. </strong>Be <strong>HONEST </strong>during the CRED mark round. They notice each small detail very carefully.</p><p><strong>P.S.</strong> If I missed something or you have any queries feel free to reach out at any time.</p><p><strong>Contact </strong>: <br><a href="https://www.linkedin.com/in/deepak-barnwal-216b48186/">LinkedIn</a> , <a href="https://www.instagram.com/_humblefool_23/">Instagram</a></p><p><strong>All the best. Happy Coding😊</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26c312595397" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Goldman Sachs Internship Interview Experience 2021.]]></title>
            <link>https://medium.com/@dbarnwal888/goldman-sachs-internship-interview-experience-2021-16a53b77484f?source=rss-9021edeb25d------2</link>
            <guid isPermaLink="false">https://medium.com/p/16a53b77484f</guid>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[happy]]></category>
            <category><![CDATA[internships]]></category>
            <category><![CDATA[interview-experience]]></category>
            <category><![CDATA[goldman-sachs]]></category>
            <dc:creator><![CDATA[Deepak Barnwal]]></dc:creator>
            <pubDate>Mon, 27 Dec 2021 19:25:50 GMT</pubDate>
            <atom:updated>2022-02-04T07:49:37.319Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/504/1*kqVYpFsDuRKj6herj5uQtA.gif" /></figure><p>I recently received a Summer Intern offer from <strong><em>Goldman Sachs,</em></strong> through their Engineering Campus Hiring Program 2021–22. I’ll try to give you insights into my Interview experience and preparation strategy.</p><p><strong>Background : </strong>I have majorly done competitive programming. I had explored ML and Web-Development and a little bit of almost everything. I was introduced to CP by our seniors in first year. Being consistent, participating regularly in contests and doing pair programming helped me a lot to gain confidence and knowledge.</p><h4><strong>Aptitude Test</strong></h4><p>The test was conducted on 22 August 2021 on HackerRank. It consisted of 66 questions and the time duration was 90 mins. ( +5 , -2 ) marking scheme was followed. Switching sections was allowed.</p><p>The test had 6 sections.</p><ol><li>Numerical Computations — 8 questions</li><li>Numerical Reasoning -12 questions</li><li>Comprehension — 10 questions</li><li>Abstract Reasoning — 12 questions</li><li>Diagrammatic Reasoning — 12 questions</li><li>Logical Reasoning — 12 questions</li></ol><p>In my opinion this is the toughest round to clear. This year ~1e5 people appeared for the test and ~4.5k people were shortlisted for the next round. Solving 38+ questions was enough for clearing this round. I had attempted 45 questions positively :)</p><p><strong>Tip: </strong>Be smart in choosing which section to solve first as you can’t solve all the problems in the given time constraint. Don’t leave the comprehension section as they are very easy and take less time to solve. Numerical Reasoning had tough and lengthy questions so be wise to decide how much time to give for a problem.</p><h4><strong>Technical Test</strong></h4><p>The test was conducted on 24th October 2021 on HackerRank. It consisted of 22 Questions for a duration of 110 minutes.Section switching was not allowed. The Distribution was as follows :</p><ol><li>Programming — 2 Questions — 30 mins.</li><li>Quantitative — 11 Questions — 45 mins.</li><li>Subjective — 2 Questions — 15 mins.</li><li>CS Fundamentals — 7 Questions — 20 mins.</li></ol><p>The Programming Questions were codeforces ‘A’ level and ‘C’ level respectively. First question was based on Binary Tree and the second was based on Hashmap . If you are regularly doing CP, this won’t be a problem for you.( Solved both😎 ).</p><p>Again, Quant Section had very tough and lengthy problems which were based on Number Theory, Trigonometry, Time and Distance, Calculus, Set Theory. I had attempted 6 problems positively.</p><p>The subjective section had two paragraph-based behavioural subjective questions.</p><p>The CS Fundamental section had problems based on process scheduling(OS), DBMS, OOP etc. I did 4 problems.</p><h4><strong>Interviews</strong></h4><p>Goldman Sachs schedules all the interview rounds on the same day. My interview was on 6th December 2021. I had only 2 rounds of interviews ( Feeling lucky 😁). Generally they take 2–3 rounds, but for some of my friends the count went up to 5 ( 4Tech + 1HR ). All the rounds were eliminatory.</p><ol><li><strong>Technical Round 1 ( </strong>Duration — 45 min <strong>)</strong></li></ol><p>The zoom meet started at 10:00 and my first round happened at 12:30😥. Before meeting, confirm that your internet connection is stable and you are sitting in a well lighted room. My interviewer was a very senior employee at Goldman Sachs. The interview started with my introduction.</p><p>As HackerRank CodePair was not working at the moment, he asked me to explain my projects. I have included 2 projects in my resume. One is based on Web-Development and the other one is based on Data Structure and Algorithms.</p><p>I chose the second one to explain because of my Competitive Programming background. To make things more interactive &amp; interesting, I explained my project on <em>Microsoft OneNote</em> by drawing and explaining the core logic of the project ( Graph ). This took ~20mins. The interviewer was very much impressed by the way I explained the project. In the meantime, he asked a lot of questions about the project and was giving attention to the small details as well. He was impressed/satisfied with all my answers.</p><p>After 10 more minutes of discussion on motivation of project , future scopes, Limitations etc, he directly proceeded to the General or HR questions like Why Goldman Sachs, Some terms related to investment banking &amp; stock market. I Attended the Engagement Session organised by Goldman Sachs, and it was very helpful for these questions.</p><p><strong>2. Technical Round — 2 (</strong> Duration — 45min <strong>)</strong></p><p>This round started at 16:30 ( Had to wait another 3 Hrs 😥 ).</p><p>The interviewer was a senior employee at Goldman Sachs. The interview started with my introduction. He then gave a coding problem.</p><p><strong>Problem 1:</strong> Standard Problem based on sieve of eratosthenes. ( Cakewalk 😏). <br>Instead of jumping to the solutions directly I gave a brute-force approach to the problem in ~5min. I explained the optimized approach using <em>Microsoft OneNote</em> ( as I was not comfortable with HackerRank Whiteboard ).</p><p>Rather than giving the solution directly, try to explain the intuition behind your solution, how you used that intuition to arrive at the optimized solution etc. He was very much satisfied with my approach.</p><p><strong>Problem 2: </strong>Easy problem on string + stack.</p><p>I explained the brute-force solution and he asked to optimize it. I explained the stack based approach and coded it in 2 mins. The interviewer was satisfied with the code, and asked some problems related to stack and it’s uses etc.</p><p>He then asked some General questions and the interview ended on a Happy note.</p><h4><strong>Verdict</strong></h4><p>Received offer on 16 December 2021( Bahut belt padi🤕).</p><h4><strong>Reader’s Special</strong></h4><ol><li>The Initial rounds are much more competitive. Don’t take them lightly.</li><li>Keep your resume honest. Only add those things for which you are confident enough and could speak for a while.</li><li>Prepare your projects in depth covering all the aspects from technical part to Motivation, Goals, Limitations etc.</li><li>Communication skills are very important to ace the interviews. My experience in teaching CP helped me a lot to clearly explain my approach to the interviewers. ( Try to give 2–3 mock interviews with your friends or sometimes teach CP ).</li><li>Although I wasn’t asked puzzles during the interviews but do prepare them as they are very common in Goldman Sachs interviews.</li></ol><p><strong>P.S : </strong>If I missed something or you have any specific questions, feel free to reach out.</p><p><a href="https://www.linkedin.com/in/deepak-barnwal-216b48186/"><em>LinkedIn</em></a><em> </em><a href="https://www.facebook.com/deepak.barnwal.336333/"><em>Facebook</em></a><em> </em><a href="https://www.instagram.com/_deepakbarnwal/?hl=en"><em>Instagram</em></a><em> </em><a href="https://github.com/dbarnwal"><em>GitHub</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16a53b77484f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>