<?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 Rohit Singh on Medium]]></title>
        <description><![CDATA[Stories by Rohit Singh on Medium]]></description>
        <link>https://medium.com/@Rohiidev?source=rss-399b4122bafc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cVXF6ZS2m5CD6JMZuaCvMQ.jpeg</url>
            <title>Stories by Rohit Singh on Medium</title>
            <link>https://medium.com/@Rohiidev?source=rss-399b4122bafc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 23:42:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Rohiidev/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[Messeging Queue BreakDown]]></title>
            <link>https://medium.com/@Rohiidev/messeging-queue-breakdown-d152a413834d?source=rss-399b4122bafc------2</link>
            <guid isPermaLink="false">https://medium.com/p/d152a413834d</guid>
            <category><![CDATA[task-management-software]]></category>
            <category><![CDATA[message-queue]]></category>
            <category><![CDATA[asynchronous-programming]]></category>
            <category><![CDATA[kafka]]></category>
            <category><![CDATA[task-queues]]></category>
            <dc:creator><![CDATA[Rohit Singh]]></dc:creator>
            <pubDate>Mon, 22 Jun 2026 07:58:47 GMT</pubDate>
            <atom:updated>2026-06-22T07:58:47.478Z</atom:updated>
            <content:encoded><![CDATA[<p>So Recently i have had a chance to work on messeging queue during building one of my project. And I got to know that messeging queue is much more than i anticipated and its really a dark hoarse.</p><p>So today i am going to discuss what messeging queue is, how it works , what happens when something breaks and then how to fix it</p><p>Alright so first of all we should understand why do we even need a message queue ?</p><p>What problem does it solve ?</p><p>Let’s look at one diagram and figure out what’s wrong in that..</p><figure><img alt="fig 1.1" src="https://cdn-images-1.medium.com/max/1024/1*aB1tfkN9DcIbtgaRvo3qBQ.png" /></figure><p>Now this is the basic architecture that you can design and here a client is uploading an image to the server and the server is doing three synchronous tasks which takes total of ~6s to complete and once the tasks are completed then only the server returns some response.</p><p>But this architecture has few limitations as well like —</p><ol><li>Latency, a client stares at the spinner(loader) for like ~ 6s just to get the confirmation that all right image is uploaded or if there is a network hicup then that response time might increase even more !</li><li>The second limitation is that this architecture can break in a lot of places like resize image is done but server crashed during filtering.Then all the work of resizing the image is gone and we have to do that again when the server is up.</li><li>The third limitation is high throughput, right now there is only one client but what if there are 100000 clients uploading the image on the server and as we know that our server is processing the task synchronously, then that would really overwelhm our server and server will either drop request or through internal server error or might crash in worst case.</li></ol><p>The above limitation are the real deal in a production envirnoment so to solve this we can introduce something called as <strong>MESSAGE QUEUE.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fCkzSXwZc7wHa8B4fboH0g.png" /></figure><p>So how does Queue solve the above problems , now what happens is if a client comes and uploads the image he immedietly gets a response that image is uploaded. And the resizing, filter etc goes to the queue and are processed asynchronoulsy by some worker. Basically the server is not doing any computation on its end it is delegating that to the message queue.</p><p>So if thousands of request comes in then server basically delegates them to the message queue and moves on with the new task. In worst case if a message queue is full the response is delayed but no messages are dropped. because there are multiple worker consuming from the queue that is the reason the server is not overwhelmed.</p><p>So lets formalize it and understand what is a message queue :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YH1I-ZeU1i8OLOtElYB3lA.png" /></figure><p>A Message Queue is just a buffer of async tasks that sits between the producer and consumer.</p><p>Producer — Producer produce the task in the above example it was the API server that was handling upload. The producer pushes the task in the queue and then forgets it.</p><p>Consumer — Consumer is the server the pulls the task from the queue and process them in the above example it was the pool or workers.</p><p>So the whole flow goes like this —</p><p>Producer pushes the task in the queue and forgets about it , then the queue holds those task until someone is ready to process them and then a consumer pulls the task from the queue and process them and ACKs the queue about task completion.</p><p>The key thing to note here is that both consumer and producer are decopuled and that is the key thing here. It helps in indivual scaling of both.</p><p>Alright now we know what a message queue is … but how does it work under the hood ???</p><p><strong>ACK(acknowledgement) — </strong>So let’s say that a worker is currently processing a task and during mid execution the worker crashed for whatever reason’s now if the queue deleted the task after handing it off to the worker then that task is lost cause now the worker is crashed and queue deleted the task … so what to do ?? That is why ACK are used , when a consumer pulls the task from the queue the queue does not immedietly deletes the task, when a worker finshed executing the task it sends an ACK to the queue and then the task is deleted…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*02oJ5-PM_7__FS6XKHuy8Q.png" /></figure><p>But if the task is still on the queue then two workers can pickup the same task and process them right ?</p><p>That will be wastage of resources and duplicate processing also it could be catastrophic if its related to money…..</p><p>So different queues handle it differently for example —</p><p>SQS basically makes a task invisible for a configurable amount time until a worker is processing the task and if the ACK is recieved within that duration then the task is deleted otherwise it becomes visible again and gets pickup up by other worker.</p><p>Kafka on the other hand follows the mechanism of partition, kafka has seperate partition for seperate worker so the issue of two worker picking the same task does not happen in kafka…</p><p>But there is one tricky thing here ….</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cMkrkvhc0aomJN8h0xncMg.png" /></figure><p>Now what happens ?</p><p>The queue thinks that the task is still not completed and waits for the ACK which the queue is not going to recieve because the worker crashed. So the queue makes the task visible again after the configured duration and new worker picks the task and executes it again….</p><p>If its about resizing the image and filter then duplicate processing does not matter at all but…</p><p>Think what if task is deduct $500 from accout X , that means accout X will be debited twice which is unacceptable.</p><p>This problem in messaging queue is called <strong>delivery gaurantees</strong> —</p><p><strong>At-least Once — </strong>Message may be delivered more than once.</p><p><strong>At-most Once — </strong>Message may never be delivered at all.</p><p><strong>Exactly Once — </strong>Message will only be delivered once.</p><p>In Our Case we are going with At-least Once with Idompotent workers, which will solve our problem that we discussed above.</p><p><strong>Idompotent — </strong>Processing the same message twice produces the same result.</p><p>Alright we got that right….</p><p>Now lets discuss one more scenario —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cd4Fm7_bnan1XhFwR0RedQ.png" /></figure><p>What if we have more producer and less consumers so the producers produces a lot of messages at once which the consumers are not able to handle that means the consumer and cosuming slower that the producer is producing… which could could problem of message lost if the queue becomes full or it reaches its maximum depth…</p><p>We solve this with <strong>Back Pressure</strong> , back pressure means slowing down the producer producing rate to match the consumer consuming pace.</p><p>We can also solve this by adding more partitions to the queue or by adding more workers though…</p><p>The next problem that might come is — what if a task failed after max attempts .. what will happen to it ?</p><p><strong>DLQ — </strong>Dead letter queue is a special queue that keeps the failed messages and the messages are later inspected by the admin and are discarded or replayed.</p><p>Alright now the main problem is — What if the Queue goes down??</p><p>That means the producer won’t be able to produce and the consumer won’t be able to consume and the messages in the queue are all gone….</p><p>During my own project i had used redis as a queue and redis by default does not persist the data so to presit the data we can use its feature such as AOF or RDS.</p><p>And we can also use a replica or queue which is always at stand by and takes over if the main queue goes down….</p><p>That was it about the message queue.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d152a413834d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to set-up React-Native environment. And create your first React-Native App.]]></title>
            <link>https://medium.com/@Rohiidev/how-to-set-up-react-native-environment-and-create-your-first-react-native-app-e138fc2ba252?source=rss-399b4122bafc------2</link>
            <guid isPermaLink="false">https://medium.com/p/e138fc2ba252</guid>
            <category><![CDATA[how-to-setup-react-native]]></category>
            <category><![CDATA[react-native-setup]]></category>
            <category><![CDATA[react-native-environment]]></category>
            <category><![CDATA[fist-react-native-app]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Rohit Singh]]></dc:creator>
            <pubDate>Thu, 19 Jun 2025 08:48:22 GMT</pubDate>
            <atom:updated>2025-06-19T08:48:22.726Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>React Native is a Girl that is not so easy to understand my friends.</strong></blockquote><p>This setup is for windows user specifically.</p><p><strong>Alright, so we will go step by step :</strong></p><p><strong>Step 1</strong>: You will have to visit some external websites.</p><p>Just like our applications require an operating system to run, same way react-native also require certain baseline to get executed properly.</p><p>Firstly Visit <a href="https://nodejs.org/en">https://nodejs.org/en</a> to download the latest nodejs runtime environment. Its definately obvious that for running the javascript outside the browser you will require nodejs , so download that first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*yEv9LPtGaPbhTtuaqWbkjg.png" /></figure><p>Click on download nodejs(LTS)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*fHcs4-CuKKl4FOMnr8nKIw.png" /></figure><p>After that is done now visit the <a href="https://www.oracle.com/in/java/technologies/downloads/">https://www.oracle.com/in/java/technologies/downloads/</a> to download the latest java development kit(JDK) and install it properly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wc9wo0iO9JjtpNWGiBUjOw.png" /><figcaption>Default oracle website</figcaption></figure><p>After that in this section “Java downloads”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/176/1*lgYlAlxiPSJ2FQB9NJJN0w.png" /></figure><p>Now choose the platform like you can windows if are using windows or otherwise. Then download the latest stable JDK.</p><p>Most poeple have this question reqarding how to install nodejs and how to install jdk, now that question is also answerd.</p><p>Wait…..this has not finished yet, now you have to add their path to the environment variables of your system.</p><p>Go to the location where you have installed these runtime enviroments.</p><p>for my case it is C:\Program Files\nodejs. Copy your own path where you nodejs is installed and do the same for jdk. My jdk is installed at C:\Program Files\Java\jdk-21.</p><p>After that go to start menu and search “edit environment variables” and open it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*wzOS-PlVV2J5KipLLzU7Xw.png" /></figure><p>Then click on the Environment Variables button.</p><p>The this window will open</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*R3hOsFHxDOSprTEIukZ2wQ.png" /></figure><p>After that navigate to system variable Path as highlighted and then click on edit button and add the copied path there for both nodejs and jdk.</p><p>Tadaa… now your nodejs and jdk are installed properly on your system and configured.</p><p>Check using CMD.</p><p>open CMD and write node — version to check for nodejs and java — version for java. if they are showing the versions properly it means they are configured and are ready to use.</p><p><strong>Step 2</strong>:Now you have to download android studio</p><p>Visit download android and then download the latest android studio version right from the homepage of android studio.</p><p>It will take some time to download.</p><p>After it is downloded install it doing the next next next…..</p><p>It will again download some files and will take some time.</p><p>After you have installed android studio launch it and do the following things.</p><p>Click on More Action.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*veylA1snqpCGTwTUQIRuBw.png" /></figure><p>Then navigate and click on sdk Manager and a new tab will open like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tprW9sFWRTtCGla6P9gRVA.png" /></figure><p>Now navigate to the stable android version as highlighted here that the stable version was android 15 at this time. firstly make show that on the bottom right corner Show Package Details is checked after that make sure that</p><ol><li>Android SDK Platform 35 (Current sdk version)</li><li>Sources of Android 35</li><li>Intel x86_64 Atom System Image</li></ol><p>These are selected. Select these three options for one older version of android also in case of any issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2MP_CcXf6qJRHSHwiRPn1A.png" /></figure><p>After that click on the tab on the right of sdk Platforms that is sdk tools</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y9WxoEXl0DK3ItBaq3dknA.png" /></figure><p>And check the versions you want to install.It is reccommended that you install 1 or 2 older versions as well.</p><p>After that click on the Apply button and it will download these tools for you. After they are downloaded.</p><p>Copy the android sdk location for adding it to enivronment variable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*VzTHtIrRaDqRgPwxzulmVA.png" /></figure><p>make sure your username has no space between them. It should be without spaces as it may cause issues later.</p><p>Now do same as you did with nodejs and jdk enivronment setup</p><p>paste this path to the system variables and user variables.</p><p>After that paste this path to the my computer application like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KmDgXts96BaxhhfUgVLN7A.png" /></figure><p>and then open these folders one by one and copy the path from the tab and paste these in you environment variables. Do same for all of them and carefully paste them.</p><p>And tadaaaa…your android studio development envirnoment is now ready.</p><p><strong>Step 3</strong>: Open cmd in the folder you want to create your project</p><p>Type</p><blockquote>npx @react-native-community/cli@latest init projectName</blockquote><p>And a react-native project will be created in your directory.</p><p>After then open this project in VScode.</p><p>And open terminal in VScode to run the project.</p><p>And type</p><blockquote>npx react-native run android</blockquote><p>And then it will take time to build the project and install the app in your Physical device or ADB device.</p><p>If you have not downloaded any adb device then download it first from android studio and then execute this command otherwise build will fail.</p><p>And it all the things goes well then</p><p>Tadaaaa your first react-native app is built and installed on your mobile phone.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e138fc2ba252" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>