<?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 Vikas Maurya on Medium]]></title>
        <description><![CDATA[Stories by Vikas Maurya on Medium]]></description>
        <link>https://medium.com/@vikasmauryatech?source=rss-5935e0877213------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*D11iCfP0pdlrJnSwox33dQ.jpeg</url>
            <title>Stories by Vikas Maurya on Medium</title>
            <link>https://medium.com/@vikasmauryatech?source=rss-5935e0877213------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 07:12:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vikasmauryatech/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[The AI Agent Vocabulary]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://vikasmauryatech.medium.com/the-ai-agent-vocabulary-9d4f5158c339?source=rss-5935e0877213------2"><img src="https://cdn-images-1.medium.com/max/2600/1*ghxhI_ehb_tY8CBtxYiDXg.jpeg" width="3000"></a></p><p class="medium-feed-snippet">Part 1 of The Builder&#x2019;s Field Guide- 44 essential terms for anyone building with LLMs and agents. Short, simple, with examples.</p><p class="medium-feed-link"><a href="https://vikasmauryatech.medium.com/the-ai-agent-vocabulary-9d4f5158c339?source=rss-5935e0877213------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://vikasmauryatech.medium.com/the-ai-agent-vocabulary-9d4f5158c339?source=rss-5935e0877213------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d4f5158c339</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[basics]]></category>
            <category><![CDATA[guide]]></category>
            <category><![CDATA[rags]]></category>
            <dc:creator><![CDATA[Vikas Maurya]]></dc:creator>
            <pubDate>Wed, 27 May 2026 04:35:43 GMT</pubDate>
            <atom:updated>2026-05-27T04:35:43.148Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Why Vibe Coders Love Supabase: Build a Secure App Without Writing a Backend]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://blog.chatbotslife.com/why-vibe-coders-love-supabase-build-a-secure-app-without-writing-a-backend-58d112b1d7dc?source=rss-5935e0877213------2"><img src="https://cdn-images-1.medium.com/max/1422/1*cqRa_YfFNogUlWwXHqGuDA.png" width="1422"></a></p><p class="medium-feed-snippet">The easiest way to add auth, database, and security to your React apps.</p><p class="medium-feed-link"><a href="https://blog.chatbotslife.com/why-vibe-coders-love-supabase-build-a-secure-app-without-writing-a-backend-58d112b1d7dc?source=rss-5935e0877213------2">Continue reading on Chatbots Life »</a></p></div>]]></description>
            <link>https://blog.chatbotslife.com/why-vibe-coders-love-supabase-build-a-secure-app-without-writing-a-backend-58d112b1d7dc?source=rss-5935e0877213------2</link>
            <guid isPermaLink="false">https://medium.com/p/58d112b1d7dc</guid>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[supabase]]></category>
            <category><![CDATA[vibe-coder]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Vikas Maurya]]></dc:creator>
            <pubDate>Thu, 21 May 2026 18:40:25 GMT</pubDate>
            <atom:updated>2026-05-21T18:40:25.633Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Failed Interview Experience at PayPal]]></title>
            <link>https://vikasmauryatech.medium.com/failed-interview-experience-at-paypal-448363bee545?source=rss-5935e0877213------2</link>
            <guid isPermaLink="false">https://medium.com/p/448363bee545</guid>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[paypal]]></category>
            <category><![CDATA[layoffs]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Vikas Maurya]]></dc:creator>
            <pubDate>Wed, 18 Jan 2023 19:16:28 GMT</pubDate>
            <atom:updated>2023-01-22T11:21:13.048Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/361/1*SiRC9wD8GocGftRfevRnyA.png" /></figure><p><strong>PayPal Holdings, Inc.</strong> is an American multinational financial technology company operating an online payments system in the majority of countries that supports <a href="https://en.wikipedia.org/wiki/E-commerce_payment_system">online money transfers</a> and serves as an electronic alternative to traditional <a href="https://en.wikipedia.org/wiki/Banknote">paper</a> methods such as <a href="https://en.wikipedia.org/wiki/Cheque">checks</a> and <a href="https://en.wikipedia.org/wiki/Money_order">money orders</a>. The company operates as a payment processor for online vendors, <a href="https://en.wikipedia.org/wiki/Auction">auction</a> sites, and many other commercial users, for which it charges a fee.</p><p>Established in 1998 as Confinity, PayPal went public through an <a href="https://en.wikipedia.org/wiki/Initial_public_offering">IPO</a> in 2002. It became a wholly owned subsidiary of <a href="https://en.wikipedia.org/wiki/EBay">eBay</a> later that year, valued at $1.5 billion. In 2015 eBay <a href="https://en.wikipedia.org/wiki/Corporate_spin-off">spun off</a> PayPal to its shareholders, and PayPal became an independent company again. The company was ranked 143rd on the 2022 <a href="https://en.wikipedia.org/wiki/Fortune_500">Fortune 500</a> of the largest United States corporations by revenue.</p><blockquote><strong><em>How did I get the opportunity?</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q_h3Ogufrt4DrRvaRyJbNg.png" /></figure><p>I applied to the Paypal Carrer site when I was in Notice Period and actively looking for better opportunities. One of the HR reached out to me via email for the Data Scientist role at Banglore Location.</p><blockquote><strong><em>Interview Process</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/262/0*pi16soNvxAE5w-zU.png" /></figure><p>There will be four rounds to become Data Scientist at PayPal.</p><p>Round 1(1 Hour): Assessment</p><p>Round 2(1 Hour): Technical Round 1</p><p>Round 3(1 Hour): Technical Round 2</p><p>Round 4(30 Min): HR</p><p>I received Hackerrank SQL+MCQ coding round link via email and need to complete it within a week.</p><blockquote>Round 1- Assessment</blockquote><p>This round consists of 3 SQL(Medium and Hard) and some 10–15 MCQ questions related to Python and Machine Learning.</p><p>I am able to solve 2 SQL questions(Passed all the test cases) and some MCQs.</p><p>After 2 days HR told me that I have clear the assessment.HR scheduled my Technical round one after 1 week.</p><blockquote>Round 2-Technical Round 1</blockquote><p>In this round, Interviewer asked me various questions about Python, SQL, Machine Learning, etc.</p><h4>SQL</h4><p>1)Name all the joins and tell the difference between Inner Join and Left Join.</p><p>2)Find out the first value for each customer.</p><p>3)Give the output of full Name (Given First name and Surname) with some condition.</p><p>4) How to remove duplicate rows from a table without a Distinct Keyword?</p><p>5) What is the difference Between UNION and UNION ALL?</p><p>6) Find the AVG for the previous 30 Days.</p><h4>Machine Learning</h4><p>1) What are Hypothesis Testing and P-Value?</p><p>2) Explain Type-I and Type-II Errors?</p><p>3) Explain A/B Testing to the layman.</p><p>4) Problem faced in A/B Testing.</p><h4>Project Based</h4><ol><li>Explain one of your best Projects.</li><li>Do you have any Experience building Dashboards?</li></ol><h4>Python Coding Question</h4><p><strong>Suppose we have some URLs like “www.joinhoney.com/(user_id)/{param1}/[param2]/...”</strong></p><p><strong>We want to check that the URL is not malformed and that all brackets are correctly closed (i.e. all left parens “(“ have corresponding right parens “)”). How would you do that?</strong></p><p><strong>My Solution</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O9gacn3fEWVwNsAOqCDowg.png" /></figure><p>I have answered all the questions correctly. I am very confident that I cleared this round. After this, I waited for 3–4 days but I didn’t receive any communication. I tried calling HR but she didn’t pick up my call. I wrote e-mails but I never heard back from them.</p><p>I wrote a follow-up email and tried contacting HR to get feedback. I was frustrated but I understand the current situation of the market. So I assume that I was rejected or the position get closed.</p><p>After one month different HR from PayPal contacted me for my third round. He scheduled my 3rd round with the US interviewer at 11 PM night.</p><blockquote>Round 3-Technical Round 1</blockquote><p>On the day of the Interview, nobody showed up. I waited for 15 Minutes and tried calling HR but he didn’t pick up my call. I wrote one e-mail before I went to sleep.</p><p>Next day I called him and he picked up my call. I informed him about the situation. He told me he would soon reschedule my round.</p><p>After 2–3 days he mailed me the rescheduled time, On this occasion the interviewer was Indian and it was scheduled for 5 PM in the afternoon.</p><p>This round is a case study round. The interviewer asked me about Machine Learning and some case study question about PayPal.</p><p>1)Case Study</p><p>If Paypal has introduced a QR Code in the existing Donation Payment Page. Is it good or not? how you will design the AB test?</p><p>2)Explain one of your projects including Modeling and Machine Learning.</p><p>3)How will you explain AB testing to laymen?</p><p>4)What is c interpreted in y=mx+c?</p><p>5)Difference in R2 and Adjusted R2.</p><p>6)How you can handle Categorical Value?</p><p>7)How much do you rate yourself in Python?</p><p>8)Is the JD aligned with your skills?</p><p>I answered all the questions according to my knowledge. I am very much confident that I will clear this round.</p><p>After this round, I waited for 3–4 days but never received any feedback from HR. I tried calling HR but they didn’t pick up my calls. After one week I wrote multiple emails for asking feedback but never heard back.</p><p>Honestly, this is one of the worst Interview Experiences. Since HR is not supportive and never communicated well.</p><p>Possible Reasons I never heard back from HR:</p><ol><li>PayPal Hiring Freeze.</li><li>Someone else gets the Job.</li></ol><p>Thank you for reading! and Do follow me!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=448363bee545" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Failed Interview Experience at Google]]></title>
            <link>https://blog.chatbotslife.com/failed-interview-experience-at-google-f2857afd441d?source=rss-5935e0877213------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2857afd441d</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[data-structure-algorithm]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[google]]></category>
            <dc:creator><![CDATA[Vikas Maurya]]></dc:creator>
            <pubDate>Tue, 04 Oct 2022 16:51:48 GMT</pubDate>
            <atom:updated>2022-10-04T17:44:39.188Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*EJrJ0rPmb6BScULCAJ8tSQ.png" /></figure><blockquote><strong>Company Introduction:</strong></blockquote><p>Google LLC is an American multinational technology company that focuses on search engine technology, online advertising, cloud computing, computer software, quantum computing, e-commerce, artificial intelligence, and consumer electronics. It has been referred to as the “most powerful company in the world” and one of the world’s most valuable brands due to its market dominance, data collection, and technological advantages in the area of artificial intelligence. It is considered one of the Big Five American information technology companies, alongside Amazon, Apple, Meta, and Microsoft.</p><blockquote><strong>How did I get the opportunity?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/310/1*2SLH6okANNxXqAOZOsJZ0w.jpeg" /></figure><p>One of the HR reached out to me via Linkedin for the Software Engineer-Machine Learning role.</p><blockquote><strong>Interview Process</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/262/1*Pj0TK5QiKqQWSSevNhUYLg.png" /></figure><ul><li>5 “onsite” virtual Hangouts interviews -1 Screening, 2 x ds/ago, 1 Domain Specific, and 1 Googleyness and Leadership</li></ul><p>All the rounds are 45–60 Minutes long.</p><p>Since Hiring was on freeze at Google It took a lot of time to get me the Phone Interview. After contacting me over LinkedIn it took around 2 months and a lot of follow-ups to get the Screening Interview. HR scheduled 30 min Phone screening.</p><blockquote><strong>Screening Interview</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/299/1*UVkO8TRNEjZL0ppRKW8NkQ.png" /></figure><p>As the Interview started HR told me why it took a lot of time to schedule the interview. I said it was fine then he started the Interview, tell me about yourself. I have given my introduction and then he started asking about my background and achievements. I told him that I belong to Data Science and explain one of the projects called Video Analytics.</p><p>Then he told me I will ask some technical questions if you are able to solve then I will schedule the next round.</p><p>He asked me Time Complexity of the sorting algorithm(Merge Sort), Balance Search Tree, and Graph and their explanations. Then he asked me one tricky question and gave me 5 min to solve it.</p><p><strong>Question:</strong> Calculate the power of 2^N without a calculator. N=25.</p><p>I gave the answer in 2 minutes.</p><p>Then he told me he will schedule the next rounds. He asked me if I have any idea about Google’s rounds. I told him I don’t have any idea.</p><p>He explained to me the number of rounds and also told me he will share the preparation guide and materials.</p><p>He asked me about the time needed to prepare for the coding rounds. I asked him for 1 month.</p><p>He also asked me my preferred language then I told him Python. I also told him about Leetcode where I daily code in Python.</p><p>He told me to show him my leetcode profiles. He asked me to open some of the solutions and he evaluated the execution time for some of my submitted code. He told me you can do better while solving some of my recently solved problems. Then I told him I will work to solve every question in optimal time. HR shared the job link so that I can apply for the Software Engineer-Machine Learning role.</p><p>The Screening round ended with a one-month long time to prepare for the Coding rounds.</p><p><strong>Learning:</strong> Don’t stop if you are able to write the correct solution, Always solve the problem in the most optimal way.</p><p>After the round, I received the 2 emails which contains the Preparation Material(Coding, System Design, Behavioral), Google Principal, etc.</p><p>HR scheduled my Interview after one month with US Interviewer in the evening at 8:30 PM.</p><blockquote><strong>One month Break</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*21ZwV4vU4rncAIjICsY1Dg.jpeg" /></figure><p>Prepared for the coding round along with my job. Used Grokking pattern-based questions and solved around 200+ questions on Graph, Queue, DP, Tree, Stack, Array, etc on Leetcode. Also solved Google Tagged question. Also given some mock Interviews. Given some Leetcode contests and able to solve 2–3 Questions every time. I am confident enough to give the interview.</p><blockquote><strong>Coding Round-1:</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*butqE7U1Sjc3sDewwOGOzg.jpeg" /></figure><p>After One month of preparation, the day has come. I am nervous and praying for simple questions. The interviewer joined the call at exactly 8:30 PM. We both greeted each other and without wasting any time he told me to open the shared Google doc and started the Interview.</p><p>He started explaining the question. I didn’t understand the question completely. But after seeing the test cases I understand the question. After the Interviewer finished explaining. I take another test case and explain Interviewer and asked him If I understood the problem correctly.</p><p>He answered in affirmatively. Then I started by explaining my Approach using Queue. He understood my approach and told me to start coding instead of writing any algorithm.</p><p>I start coding and kept in mind to write clean code with meaningful variables. While writing the code I explained the code. He understood the code and looked positively. I dry run my code with the test cases which seems right. He asked me some edge cases and follow-up questions.</p><p>I modified my code according to that for handling those follow-up questions. Then I explained to him the Time Complexity and space complexity. Already 40 min passed in this. Then he told me if could we solve it in O(1) approach. I started thinking about different Data Structures which can solve this in O(1). I tried hashmap but he told me it will not work. He told me the time is done and if I have any questions about Google. I asked some questions about team structure and other questions.</p><p>After the Interview ends I went on Google to search if any related questions are there. Maybe it’s a red herring and maybe the interviewer wanted to try me out.</p><p>I am confident enough that I will be not strong hire but at least a hire. I waited for 2 days then wrote a formal mail to HR. HR told me I didn’t satisfy the criteria to go ahead for the next round. In Feedback, he told me to work more on Data Structures and Algorithms.</p><p>I think O(1) solution is required or the position got filled or my communication skills are not effective hence I got rejected.</p><p>I think I performed well, I tried hard not to mess up in the interview but couldn’t clear the round. Let’s wait for the next turn till then if you liked the Interview Experience do like it.</p><blockquote><strong>Problem</strong></blockquote><p>Random music shuffle question. Given a list of songs and a skip order like songs = [A,B,C,D], skipOrder = 2. If a song is played once, it cannot be back in the shuffling list till skipOrder is done. Ex: If A is played first and then A cannot be back in the list until the next 2 iterations.</p><p><strong>Time Expectations</strong>:<br>O(1) when selecting a song<br>O(1) when removing a song from the queue.<br>O(1) when adding a song back to the end of the queue.</p><p>We can connect here: <a href="https://www.linkedin.com/in/vikas-maurya-2b4370144/">https://www.linkedin.com/in/vikas-maurya-2b4370144/</a></p><p>Thank you for Reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2857afd441d" width="1" height="1" alt=""><hr><p><a href="https://blog.chatbotslife.com/failed-interview-experience-at-google-f2857afd441d">Failed Interview Experience at Google</a> was originally published in <a href="https://blog.chatbotslife.com/">Chatbots Life</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kafka in Nutshell]]></title>
            <link>https://towardsdev.com/kafka-in-nutshell-2fb1c80a50a3?source=rss-5935e0877213------2</link>
            <guid isPermaLink="false">https://medium.com/p/2fb1c80a50a3</guid>
            <category><![CDATA[streaming]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[pub-sub]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[kafka]]></category>
            <dc:creator><![CDATA[Vikas Maurya]]></dc:creator>
            <pubDate>Fri, 14 Jan 2022 17:59:14 GMT</pubDate>
            <atom:updated>2022-10-13T15:01:57.089Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>INTRODUCTION</blockquote><p>o Kafka is just like a messaging System.</p><p>o It is distributed Platform or Application.</p><p>o Cluster is made up of more than one Kafka Server.</p><p>o Production Environment Kafka is referred as Kafka Cluster.</p><p>o Each Kafka Server is referred as Broker.</p><blockquote>Architecture</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*Qs9CxRkkZWmiAIfPHk7J6w.png" /></figure><h4>Kafka is a Fault Tolerant</h4><p>Ability of a System to continue operating without interruption when one or more of its Component Fails.</p><h4>Replication Factor</h4><p>It decide how many replication of broker. Kafka Cluster messages are replicated in multiple of replication factor.</p><h4>Kafka is Scalable System</h4><p>You can add new Brokers and Increase the Number of Consumers.</p><h4>Throughput</h4><p>Kafka can handle 1 Million Messages per second.</p><h4>Zookeeper</h4><p>It is distributed, open-source Configuration, Synchronization service.</p><blockquote><strong>Install Kafka &amp; Zookeeper</strong></blockquote><p>Search the download link on Google.</p><p><strong>Steps to install</strong></p><p>1) wget download link</p><p>2) tar -xvzf tar file</p><p>Changes in Config Files</p><p>Kafka Configuration File named <strong>server.properties </strong>change <strong>advertised.listeners</strong>= &lt;IP_ADDRESSS&gt;:9092</p><p>9092 is a default port Address for Kafka.</p><p>Zookeeper Configuration File named <strong>zookeeper.properties</strong> change</p><p><strong>zookeeper.connect</strong>=localhost:2181</p><p>Starting Kafka</p><p>JMX_PORT=8004</p><p>bin/kafka-server-start.sh config/server.properties</p><p>Starting Zookeeper</p><p>bin/zookeeper-server-start.sh config/zookeeper.properties</p><blockquote><strong>Install Kafka Manager</strong></blockquote><p>It is Graphical User Interface for Kafka.</p><p>Pre-requisite: Install Java11</p><p>Steps:</p><p>1) Git clone <a href="http://github.com/yahoo/CMAK.git">http://github.com/yahoo/CMAK.git</a></p><p>CMAK(Cluster Manager Apache Kafka)</p><p>2) ./sbt clean dist</p><p>3) Unzip cmak Folder</p><p>4) Cmak.zkhosts=”&lt;Zookeeper-host&gt;:2181&quot; — application.conf</p><p>5) Bin/cmak -Dconfig.file=conf/application.conf -Dhttp.port=8080\</p><blockquote><strong>What is Kafka Topic?</strong></blockquote><p>o Topic is the Kafka component where producers are connected.</p><p>o Producer Publish message in Kafka Cluster.</p><p>o Topic in Kafka is multi Subscriber.</p><p>o Topic can be considered as logical Entity.</p><p>o In Kafka Cluster each topic is present in every cluster node.</p><blockquote><strong>Kafka Topic Partition</strong></blockquote><p>o Kafka Topic Divided into multiple partitions.</p><p>o Partition can be considered as linear Data Structure Topic like Array.</p><p>o Messages are actually published to a partition in the topic.</p><p>o Every Partition has Partition Number.</p><p>o Each Partition has increasing index called offsets</p><p>o New messages are always pushed at the rear end.</p><p>o Data is immutable after publish.</p><p>o In multi broker Kafka cluster partition for a topic are distributed across the whole cluster.</p><blockquote><strong>Kafka Producer in Python</strong></blockquote><p>o Message will be published by producer in available partitions.</p><p>o Message publish in random fashion in present partitions.</p><p>o Producer can also select the partition of their choice in a topic where it want to publish the message</p><p><strong>Pre-Requisites:</strong></p><p>Pip install kafka-python</p><p>Pip install Faker (For creating Fake Data)</p><h4>Configuration Needed by Producer.</h4><p>· Bootstrap-Servers</p><p>· Topic</p><p>· Value-Serializer</p><blockquote><strong>Kafka Consumer in Python</strong></blockquote><p>o Consumer are the Kafka Components that consume message from Kafka Topic.</p><p>o Internally Consumer consume message from Kafka topic partition.</p><p>o Every consumer is always assigned to a consumer group.</p><p>o If no group id is provided then random group id is assigned.</p><p>o Consumer Group is logical grouping of one or more Consumer.</p><p>o It is mandatory for a consumer for register itself to Consumer group.</p><h4>Configuration Needed by Consumer</h4><p>· Topic</p><p>· Bootstrap-Servers</p><p>· Group ID</p><p>· Value-Deserializer</p><blockquote>Implementation in Python</blockquote><h4>producer.py</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*6yYqGkXLuNPbH-b01-agqA.png" /></figure><h4>data.py</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*vecEO6Frsmfbe2eV2Yr4KA.png" /></figure><h4>consumer.py</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*q4xoJ4ObJ6fIH_ARa40vIQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2fb1c80a50a3" width="1" height="1" alt=""><hr><p><a href="https://towardsdev.com/kafka-in-nutshell-2fb1c80a50a3">Kafka in Nutshell</a> was originally published in <a href="https://towardsdev.com/">Towards Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Apache Airflow in Nutshell]]></title>
            <link>https://blog.chatbotslife.com/apache-airflow-in-nutshell-b35a651cfd56?source=rss-5935e0877213------2</link>
            <guid isPermaLink="false">https://medium.com/p/b35a651cfd56</guid>
            <category><![CDATA[dağ]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[apache-airflow]]></category>
            <category><![CDATA[etl]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Vikas Maurya]]></dc:creator>
            <pubDate>Wed, 22 Dec 2021 17:25:26 GMT</pubDate>
            <atom:updated>2021-12-22T17:43:35.185Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*rGAJOeEAba5nO6ge-o2MyQ.png" /></figure><h3><strong>What is Airflow?</strong></h3><p>Airflow is a platform to Programmatically Author, Schedule and Monitor Workflows or Data Pipeline.</p><h3>What is Workflow?</h3><p>§ A Sequence of tasks.</p><p>§ Schedule or Triggered an email</p><p>§ Frequently used to handle big data processing pipeline.</p><p>E.g. of Workflow</p><h4>Traditional ETL Approach:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*8zCU1_bZPd61esOC-MklTw.png" /></figure><p>Time Based Scheduler in UNIX like Computers for Daily Extraction is required if Data is generating every day.</p><p>Source-&gt; CRON Script-&gt; DB</p><p>These CRON Scripts has lot of problem and not scalable hence need of Airflow comes into the picture.</p><h4>Some Problems with CRON jobs:</h4><p>1) Failures-&gt; if Failure happens. (How many time? How often?)</p><p>2) Monitoring -&gt; Success or Failure States.</p><p>3) Dependencies -&gt; Execution Dependencies.</p><p>4) Scalability -&gt; New Scheduler is hard to add.</p><p>5) Deployment -&gt; Deploy New Changes.</p><p>6) Process historic data -&gt; Rerun Historic Data.</p><p>Many Problem one Solution -&gt; Apache Airflow</p><blockquote><strong>Introduction</strong></blockquote><p>Airflow Framework to define tasks and dependencies in python, Executing, Scheduling, Distributing tasks across worker Nodes. View of present and past runs, logging feature Extensible through plugins. Nice UI, Possibility to define REST interface, Interact well with databases.</p><p>Airflow DAG (Directed Acyclic Graph) with Multiple tasks which can be executed independently or interdependently.</p><blockquote><strong>Benefits:</strong></blockquote><p>1) Can handle upstream | downstream dependencies.</p><p>2) Jobs can pass parameters to other jobs.</p><p>3) Handle Errors and failures.</p><p>4) Data Sensors to trigger a DAG when data arrives.</p><p>5) Job testing through airflow itself.</p><p>6) Monitoring and email alerts.</p><p>7) Community supports</p><p>8) Accessibility of log files.</p><p>9) Implementing Trigger rules.</p><p>So as you get Familiar with Apache Airflow and its benefits. Let’s write our first Program in Airflow-Python.</p><blockquote><strong>Writing Your First Airflow Program consists of below steps:</strong></blockquote><p>Step1: Importing Modules.</p><p>Step2: Default Arguments.</p><p>Step3: Instantiate a DAG.</p><p>Step4: Tasks.</p><p>Step5: Setting up Dependencies.</p><p>Prerequisite:</p><p>Install Python and Airflow setup on your Machine.</p><p>Refer this: <a href="https://medium.com/@jacksonbull1987/how-to-install-apache-airflow-6b8a2ae60050">https://medium.com/@jacksonbull1987/how-to-install-apache-airflow-6b8a2ae60050</a></p><blockquote><strong>Step 1: Importing Modules</strong></blockquote><p>Import Python dependencies</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*SGWa30FzZuFA3PBTdN0DlA.png" /></figure><p>Airflow schedules the job on the principal of Directed Acyclic Graph i.e. DAG.</p><p>Hence we need to import DAG. If we wrote any Python Function or Shell Script according to that we have to import Operators.</p><p>We can also import date time or in built date function of airflow.</p><p>There are various modules and functionality airflow offers so do explore further as per of your requirements.</p><blockquote><strong>Step 2: Default Arguments</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*oe7kQhjivxDcL_XQ_K-DRw.png" /></figure><p>Here, we all define some default arguments. Which can be like Owner, Dag should depend on past jobs or not, whom to mail if failure occurs.</p><p>If failure occur how many times it should retries to execute the dag in how much interval of time.</p><blockquote><strong>Step 3: Instantiate a DAG.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*zWfyZH65vEGwFHxVao92og.png" /></figure><p>Here we are Instantiate DAG just like objects in case of classes.</p><p>We need to pass all the arguments to constructor so that it didn’t give any errors.</p><p>Schedule Interval is used for how often the tasks should get executed.</p><p>Find Below chart for better understanding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*WVyiKT_5rbnQuAX7RK7heQ.png" /></figure><blockquote><strong>Step 4: Tasks.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*CaKKFT-mFr0jbriu6KRR5w.png" /></figure><p>Here we can define any number of python function (or Bash Functions, etc.). Which will act as Tasks. We can write any ETL jobs inside these functions and execute as per convenience.</p><blockquote><strong>Step 5: Setting up Dependencies.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*QcBYADE80zSTUzr8CRDwAA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*9DEvNPlQiLoYPAsZZFu19w.png" /></figure><p>In which order task should be executed in.</p><p>t1.set_downstream(t2) == t1&gt;&gt;t2 (This means that t2 will depend on t1)</p><p>t1.set_upstream(t2) == t1&lt;&lt;t2 (This means that t1 will depend on t2)</p><p>for multiple task dependencies.</p><p>t1&gt;&gt;[t2,t3] (This means that t1 will depend on t2 and t3)</p><p>[t2,t3]&lt;&lt;t1 (This means that t2,t3 will depend on t1)</p><p>Follow for more Technical stories!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b35a651cfd56" width="1" height="1" alt=""><hr><p><a href="https://blog.chatbotslife.com/apache-airflow-in-nutshell-b35a651cfd56">Apache Airflow in Nutshell</a> was originally published in <a href="https://blog.chatbotslife.com/">Chatbots Life</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Experience Of My First JOB]]></title>
            <link>https://towardsdev.com/experience-of-my-first-job-c884f024429e?source=rss-5935e0877213------2</link>
            <guid isPermaLink="false">https://medium.com/p/c884f024429e</guid>
            <category><![CDATA[data-engineer]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-scientist]]></category>
            <category><![CDATA[first-job]]></category>
            <category><![CDATA[data-analyst]]></category>
            <dc:creator><![CDATA[Vikas Maurya]]></dc:creator>
            <pubDate>Sat, 13 Nov 2021 11:43:59 GMT</pubDate>
            <atom:updated>2022-10-14T15:43:24.573Z</atom:updated>
            <content:encoded><![CDATA[<h4>(Data Science)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uogTxM0a-lVa__VkjFBjew.jpeg" /></figure><h3>•Python and SQL</h3><blockquote>After almost a year at my first job I must say this is the most critical skill a Data Science Aspirant should have.</blockquote><blockquote>Without Python I can’t imagine surviving in my current job.</blockquote><blockquote>Python is one of the most powerful languages I ever come across. It is everywhere. Building MVP is very fast even for most complex Projects.</blockquote><blockquote>SQL is the basis of the RDBMS system. Most Structured Data resides in a Data warehouse which can be extracted by SQL. I used PostgreSQL in my job, which is the most popular and open source RDBMS present till date.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*J-_LusLVutaks8-IP5Z51Q.jpeg" /></figure><h3>Communication Skills</h3><blockquote>•This is one of the most required skills in the Data Science field.</blockquote><blockquote>•While Communicating with stakeholders to note down business needs become a more critical part, on which failure or success of a project is dependent.</blockquote><blockquote>• Sometimes the right business understanding can save your hours of Re-Doing Work.</blockquote><blockquote>•Good Communication skills leads to better planning of Work and getting help from your colleagues when you are stuck in any issue.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*McBXDDZTtYyG1ginUBBvhA.png" /></figure><h3>3 Phases of My first JOB</h3><blockquote>•I have engaged in 3 projects and some additional works, all those works gave me 3 different tests of Data Science Field.</blockquote><blockquote>•These 3 Fields are Data Analyst, Data scientist, Data Engineer.</blockquote><blockquote>•All Roles are different from each other but at the same time very interesting.</blockquote><blockquote>•Let me try to Explain My All experience one by one.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/311/1*tRdIQJtamotCTr1V62cn5Q.jpeg" /></figure><h3>Data Analyst</h3><blockquote>•Procurement Analytics This is my first project where I have to work on SAP data to make an Analytics Report on Power BI.</blockquote><blockquote>•It requires understanding the procurement process and Business needs.</blockquote><blockquote>•Microsoft Power BI is one of the best BI tools for creating Reports and sharing to business users.</blockquote><blockquote>•I have to deal with integration of Data with Power BI and Preprocessing of Data as a prerequisite before creating reports on Power BI.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*MPKnrRheBomgBJWSEzAu2Q.jpeg" /></figure><h3>Data Scientist</h3><blockquote>•Video Analytics with Deep Learning and OpenCV is one of my projects which requires a lot of research and persistence.</blockquote><blockquote>•After being involved in this project I got real world Data Science Experience.</blockquote><blockquote>•Data Science is 80% Preparing Datasets and 20% building models.</blockquote><blockquote>•Always be ready for new scenarios and challenges since data will change as we go ahead. Building a successful Machine Learning Solution requires more understanding of data than having a good grasp on tools.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*oqEyVZ-laetxG2Hsfh9VhQ.jpeg" /></figure><h3>Data Engineer</h3><blockquote>•Creating a Pipeline for different Data Sources (API).</blockquote><blockquote>•Built basic ETL and scheduled using Airflow that ingested every minute and hourly Weather data from API and stored in Postgres to analyze and increase Solar and Wind Power Plant Production.</blockquote><blockquote>•Utilized spark in python to distribute data processing on large streaming dataset to improve ingestion and processing speed of the application.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*fERBlGMs-wf7L16g2L1VgA.jpeg" /></figure><h3>Mathematical Model for Optimization</h3><blockquote>•Order Management where we have to predict or give a list of items to choose in the bag of list to reduce the cost.</blockquote><blockquote>•Pyomo gives a template where we can build dynamic input of data to solve.</blockquote><blockquote>•There are n-number of Solvers which can optimize our input data based on some constraints.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/268/1*EF8lAEtce_NKLv493-ln3A.jpeg" /></figure><h3>Excel</h3><blockquote>•This is one of the critical tools since all the data I got exist in Excel format only.</blockquote><blockquote>•A good knowledge of excel could save lots of time.</blockquote><blockquote>•Excel has a lot of features similar to Power BI.</blockquote><blockquote>•Advanced Excel is a must add to python and SQL.</blockquote><blockquote>•Preprocessing of data and initial stage of EDA also can be performed by Excel.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/255/1*sF4bXjDNapVH4C9ywaMP0Q.jpeg" /></figure><h3>My Tools</h3><blockquote>•Python and countless number of Libraries.</blockquote><blockquote>•SQL i.e. PostgreSQL</blockquote><blockquote>•Deep Learning/ Machine Learning/AI</blockquote><blockquote>•OpenCV</blockquote><blockquote>•Power BI</blockquote><blockquote>•Excel</blockquote><blockquote>•Kafka</blockquote><blockquote>•Airflow</blockquote><blockquote>•Spark</blockquote><p>Many More………….</p><p>Data Science is not about tools so never ever attached to any tool.</p><p>Always have a learning habit and ready for new challenges. I can assure you will be successful in this field</p><p>Thanks &amp; Regards</p><p>Vikas Maurya</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c884f024429e" width="1" height="1" alt=""><hr><p><a href="https://towardsdev.com/experience-of-my-first-job-c884f024429e">Experience Of My First JOB</a> was originally published in <a href="https://towardsdev.com/">Towards Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Share Market in Nutshell]]></title>
            <link>https://towardsdev.com/share-market-in-nutshell-aafbd59d28e?source=rss-5935e0877213------2</link>
            <guid isPermaLink="false">https://medium.com/p/aafbd59d28e</guid>
            <category><![CDATA[money]]></category>
            <category><![CDATA[trading]]></category>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[investing]]></category>
            <dc:creator><![CDATA[Vikas Maurya]]></dc:creator>
            <pubDate>Thu, 10 Jun 2021 17:17:44 GMT</pubDate>
            <atom:updated>2022-10-13T14:56:59.960Z</atom:updated>
            <content:encoded><![CDATA[<p>Fundamentals of Stock Market by Vikas Maurya</p><p>Part-I</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tBcQrs2v2ngsB7p0" /><figcaption>Photo by <a href="https://unsplash.com/@jamie452?utm_source=medium&amp;utm_medium=referral">Jamie Street</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote><strong>What is the Share Market?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bgcT-su68CDGRmlt" /><figcaption>Photo by <a href="https://unsplash.com/@alecfavale?utm_source=medium&amp;utm_medium=referral">Alec Favale</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Share Market is nothing but a shop from where you can <strong>Buy/Sale</strong> Shares of Different Companies.</p><blockquote><strong>History</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eErzwiIjh-KRIp2m" /><figcaption>Photo by <a href="https://unsplash.com/@markusspiske?utm_source=medium&amp;utm_medium=referral">Markus Spiske</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Stock markets have existed for centuries. <a href="https://www.investopedia.com/articles/07/stock-exchange-history.asp">The oldest stock exchange was started in Belgium back in 1531</a>. The brokers and moneylenders used to meet there to deal with the businesses. However, they never used actual stocks but traded in promissory notes and bonds. Later, the Amsterdam Stock Exchange was established in 1602 by the Dutch East India Company and regarded as the first real stock exchange.</p><p>Source: <a href="https://tradebrains.in/why-do-stock-markets-exist/">Why do Stock Markets Exist? And Why is it So Important? -Trade Brains</a></p><blockquote><strong>Ever think of that, Why does the Share Market come into existence?</strong></blockquote><p>Stock Market Helps Companies raise Capital (Money).</p><p>There are different companies out there that want to expand their businesses because they require money. From these needs of money Investors come into the picture.</p><blockquote><strong>What are investors?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vizSeuGQOQl9lsHo" /><figcaption>Photo by <a href="https://unsplash.com/@austindistel?utm_source=medium&amp;utm_medium=referral">Austin Distel</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Investors are those who invest money in the company and get a share of profit if the company performs well.</p><p>Stock markets exist to serve the wider economy. It helps individuals earn a profit on their income when they invest in the stock market and allows firms to spread their risks and receive large rewards. It also enables the government to increase spending through the tax revenue they earn from corporations that trade on the stock exchange. The government uses the revenue to increase reinvestment and employment capacity.</p><p>The stock market plays an important role in the economy of a country in terms of spending and investment. Without stock markets, many countries would not be as developed as they are. Alongside this, it has helped individuals become wealthy and increases the overall standard of living in many economies.</p><blockquote><strong>Some Benefits:</strong></blockquote><ul><li>Stock market helps create personal wealth.</li><li>It helps increase investment in the economy.</li><li>Market serves as an indicator of the state of the economy.</li><li>Stock Market also affects non-investors in the economy.</li></ul><blockquote><strong>Why do we need Share Market?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_DyPkmSfJbbaYhmf" /><figcaption>Photo by <a href="https://unsplash.com/@nampoh?utm_source=medium&amp;utm_medium=referral">Maxim Hopman</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>The stock market gives opportunities to the businesses and the public to transfer capital and ownership in a controlled, secure and managed environment. In addition to providing a convenient way for companies to raise capital and for individuals to increase wealth, the stock market helps keep a check on corporate regulation and increases the economic growth and prosperity of the nation.</h4><p>As we can see that is why Share Market exists. It is beneficial for everyone. Companies get Money to do business with low risk, the Government gets Tax, and as individuals we get some part of profit if we invest in profit based companies.</p><blockquote><strong>Do you know the conventional way of investment?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_5sQ2XpPVaYJyJeM" /><figcaption>Photo by <a href="https://unsplash.com/@pokmer?utm_source=medium&amp;utm_medium=referral">Jingming Pan</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Gold Investment, Real Estate Investment (Land), Bank’s Fix Deposit, LIC, etc.</p><p>Every Investment strategy has some risk involved within it. In terms of return we can say that higher the risk more the return.</p><p>The conventional way of investment always gives low interest of return since it involves low risk.</p><p>Hence the Share Market and other investment Policy comes into the picture for middle class people like you and me.</p><p>Share Market is tricky to understand but if we understand the basics of it we can do long term investment and can earn more profit than conventional way of investment.</p><p>Every person invests their money in different ways so that it can help in a financially tough time or any medical emergency.</p><p>Many people invest money to save taxes and get profit.</p><blockquote><strong>So if everyone invests why not invest in Share Market?</strong></blockquote><p>People always think the Share Market is a Gamble but this is a myth. People have to understand it’s the same like other investments but it just involves higher risk but if we understand the basics we can take calculated risk and earn a good amount of money and achieve financial independence.</p><blockquote><strong>Some Famous Personality Who makes a huge amount of money from this Stock Market.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Axr1pm-lKqbCN2j6" /><figcaption>Photo by <a href="https://unsplash.com/@mehdizadeh?utm_source=medium&amp;utm_medium=referral">Mubariz Mehdizadeh</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>After seeing this Example We can say that you don’t require commerce degee OR finance background to ace the Share Market.</p><ol><li>Porinju Veliyath (Law)</li><li>Ramesh Damani (HR)</li><li>Radhakishan Damani (UG)</li><li>Rakesh Jhunjhunwala(CA)</li><li>Ramdeo Agarwal(CA)</li><li>Parog Parekh(MS in Commerce)</li><li>Vijay Kedia (Bcom)</li></ol><p>Top 3 names are not related to Finance Background. Instead of that they have Law, HR, UG as their degree of study but they make unbelievable amounts of money in this share Market.</p><p>Note: Radhakishan Damani is the owner of DMart.</p><blockquote><strong>Myths of Stock Market</strong></blockquote><ul><li>The Stock Market is risky.</li><li>You need financial background</li><li>Small investors like you and me cannot make money from the stock market.</li><li>Renowned companies will not give profits.</li></ul><blockquote><strong>Famous Stock Brokers</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fJCr58Fes6ruh-ja" /><figcaption>Photo by <a href="https://unsplash.com/@mayofi?utm_source=medium&amp;utm_medium=referral">MayoFi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><ul><li>Zerodha</li><li>Sharekhan</li><li>Angel Broking</li><li>Upstox</li></ul><p>And Many More……</p><p>My personal favorite is Zerodha.</p><blockquote><strong>There are 3 Accounts you require to start investing in the Stock Market.</strong></blockquote><ol><li><strong><em>Saving Account</em></strong>: The Money in the bank to buy shares.</li><li><strong><em>Trading Account</em></strong>: To Trade the Share i.e. Buy/Sale.</li><li><strong><em>Demat Account:</em></strong> To hold the share.</li></ol><p>For Example when you go on Amazon website to buy a cloth then you require an Amazon account to start the online shopping and add in the cart. Here After selecting which cloth to buy using your Bank account or Credit Card you will pay the money. After that when you receive the cloth then you will put that cloth in the cupboard.</p><p>Here in the above example cupboard acts as Demat account, Cloth acts as share and Amazon Account can be related with Trading Account.</p><p>We can have 2 or more Demat accounts.</p><blockquote><strong>There are 3 types or versions of the above 3 accounts.</strong></blockquote><p><strong>Type 1</strong>: Demat Account, Saving Account, and Trading Account with 3 different Providers.</p><p><strong>Type 2</strong>: Demat Account and Trading Account with one Provider. Saving Account with other Providers.</p><p><strong>Type 3</strong>: Three in one Account. Demat Account, Saving Account, and Trading Account in one Account. This type of account is generally by a Bank which turns into a broker.</p><p>There can be many other variants but I will mention only the famous ones. Type 2 is the most popular.</p><p>Since Handling 3 different accounts is tedious that is Type 1 and in Type 3 Bank charges high brokerage for trading. So it is always advisable to go for Type 2 Option. (Just My opinion)</p><blockquote><strong>What is Market Time?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KqOXM2VOFxOveP9Z" /><figcaption>Photo by <a href="https://unsplash.com/@timmossholder?utm_source=medium&amp;utm_medium=referral">Tim Mossholder</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>Market opens from Monday to Friday. No Trade on Saturday, Sunday and Public Holidays.</strong></p><p><strong>Note:-But on Laxmi Poojan market opens for 1–2 Hours in the evening which is known as Muhurat Trading.</strong></p><p>Stock Market Opens from 9 AM to 4 PM.</p><p>9:00 to 9:15 — Pre Open Market Session</p><p>9:15 to 3:30 -Trading Time</p><p>3:30 to 4:00 -Brokers Time</p><p>4:00 to 9:00 -After Market Time</p><p>After Market Time is for those people who are not able to trade in market time that is from 4:00 to 9:00. (Working People like me and you). But all the orders will get executed when the market opens at 9:15 AM.</p><p>Pre Open Market Session is to absorb the heavy fluctuation in the market.</p><p>In After Market Time everyone places orders for stock but it will execute when the actual market opens. So if the market directly starts before executing these After Market Order then there is a huge fall or rise in the market could be seen at the start of market everyday.</p><p>Since there is a rule by SEBI if the market falls for 10% before 1PM then there is a halt in the market. If it falls by 20% then Market close for the day. Hence the Pre Open Market Session comes into the picture.</p><p>Brokers Time is tricky to explain first we have to understand short sells then we will understand the essence of Broker Time or Auction Time.</p><p>Because of the Pre Open Market Session market always opens at different prices of closing price.</p><blockquote><strong>Pre Open Market Session coins 2 terms</strong></blockquote><p>1) Gap Up Opening:- If Share price opens at price higher than previous day closing price. It is known as Gap Up Opening.</p><p>2) Gap Down Opening:- If Share price opens at price lower than previous day closing price. It is known as Gap Down Opening.</p><blockquote><strong>How to select the company for which we want to buy stocks?</strong></blockquote><p>Company has the different data available with it which is publicly available.</p><p>Like Turnover, Profit, Expenses, Revenue, etc. Which should be seen before selecting any company’s Stock.</p><p>If we say Turnover (Sales) a Top Line and Profit after Tax a Bottom Line. You always should compare these lines. If Bottom Line is higher or increasing in the current year compared to last year then go for the Stocks.</p><p>It is the general thumb rule for buying any stocks.</p><blockquote><strong>There are also 2 broad terminologies which are considered while selecting a stock of the company.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M0Scmn9Zmd1G0Sug" /><figcaption>Photo by <a href="https://unsplash.com/@isaacmsmith?utm_source=medium&amp;utm_medium=referral">Isaac Smith</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><ul><li>Fundamental Analysis</li><li>Technical Analysis</li></ul><p>This is an advanced topic which we might touch upon after we understand the fundamentals of the Stock Market.</p><blockquote><strong>So let start Fundamentals of Stock Market by Understanding different basic terminology used while trading in stock market.</strong></blockquote><p>We have to understand in the stock market we just buy or sell the shares/stock.</p><p>One person/buyer buys the share and another person/Seller sells it. This is known as Trading.</p><blockquote><strong>How do we get profit by Trading?</strong></blockquote><p>Let take one Scenario Suppose Person A buys the one share at 100 Rs. and Sales it at the price of 120 Rs. Then the profit will be of 20 Rs.</p><p>As this there can be different use cases or scenarios in which buyer or seller can make profit.</p><blockquote><strong>There are 2 terms which you always listen to that are as follows.</strong></blockquote><p>LTCG (Long Term Capital Gain)</p><p>If a person holds a share for more than a year and earns a profit. This is for long term investors and involves low risk.</p><p>STCG (Short Term Capital Gain)</p><p>If a person holds a share less than a month or even for a single day and earns profit. This is for Traders or Intraday investors and it involves higher risk.</p><p><strong>You always heard about dividends given by companies. It is nothing but return on investment in shares.</strong></p><p>Previously Dividend and LTCG were Tax Free for individuals (subject to limits).</p><p>Limit of Dividend is 10 Lac. Below this Tax free but if we earn more than 10 Lac then we have to pay taxes at a rate of 10%.</p><p>Limit of LTCG is 1 Lac. Below this Tax free but if we earn more than 10 Lac then we have to pay taxes at a rate of 10%.</p><p>Note:-Up to 1 Lac profit there is no Tax but as Modi’s government Changes Taxes Policy also changes and declares different rates at which we have to pay tax if we earn profit.</p><p>Dividend always given by the company on the face value of Share.</p><blockquote><strong>What is Face Value?</strong></blockquote><p>The Original Price at which Promoter (Who Starts the Company) bought the share.</p><blockquote><strong>What is Share Certificates?</strong></blockquote><p>When we buy any share we get the Share Certificates which shows that you are the owner of that particular share.</p><p>Share Certificates consist of Name of Share Holder, Face Value, Number of Shares bought, and other Information.</p><blockquote><strong>What is Demat?</strong></blockquote><p>Demat also known as Dematerialized Security. Before technology all the shares existed in physical format and it was very hard to handle it. It leads to many scams also in Share Market.</p><p>Scam 1992 by Harshad Mehta is one example of Share Market.</p><p>When we convert physical shares into Electronic form we call it Demat form.</p><p>Most of the Shares are converted in Demat form but for today also many shares of the company exist in physical forms.</p><p>If we want to know how many shares of the company are in Demat form and how many in physical form we have to see the Annual Report of the Company.</p><blockquote><strong>What is the Annual Report of the Company?</strong></blockquote><p>It is the report which is released by the company every year after the financial year ends.</p><p>It consists of various information about the company it also shows all the info about Demat Shares and Physical Shares.</p><blockquote><strong>Face Value and List Price</strong></blockquote><p>The Face value is the initial price at which the promoter decides the prices of one share. It is also called Issue Price.</p><p>After the issue price of shares once shares get listed on stock market. It is known as listing price or premium shares.</p><p>Price Of Share &gt; Face Value</p><p>For eg.</p><p>Issue Price could be 2 Rs. and Listed price can be 299Rs. It will increase in a long time as the company performs well.</p><blockquote><strong>What is Stock Split?</strong></blockquote><p>This term should be understood by people like me and you. Since many of the time companies declare the stock split.</p><p>In stock split Face Value/Listed value decreases and Number of share increases.</p><p>In the Share split Number of shares increases proportionally.</p><p>Suppose original Face Value is 2 Rs and Person A has 5000 shares then its total value of share will be 2*5000=10000 Rs.</p><p>After the Stock Split Revised Face Value is 1 Rs. Then Person A will be having 10000 Shares and its total will be 1*10000= 10000 Rs.</p><p>If we see the share value is intact. Just Face value proportionally (inversely) changes with Number of Shares.</p><p>Why do companies do the Share Splits?</p><p>Company do the share split because it wants to decrease the price of share so that more people buy the <strong>share.</strong></p><p><strong>Tips</strong>:-Many of the time people don’t understand this concept and when they hear stock split they start selling their shares. Since they think that company is in loss hence the share price decreases. But this is totally wrong so be aware of the news if stock price decreases because of stock split. Instead of selling, just buy more shares and then you will get more profit. (Just My opinion).</p><p>Research the past with their future Plans. (While selecting any Company).</p><p><strong>Money Control</strong> is one of the websites where you can go and see movement in the stock market.</p><blockquote><strong>There are 2 main Stock Exchanges in India.</strong></blockquote><ol><li><strong>Bombay Stock Exchange (BSE)</strong></li><li><strong>National Stock Exchange (NSE)</strong></li></ol><p>There are different exchanges in India but only these 2 are the most famous one others stock exchanges have a very low number of companies listed.</p><p>So always buy shares of companies which are listed in BSE and NSE only.</p><p>Since this has more number of traders/Investors also.</p><p>We have to understand the concept of demand and supply.</p><p>Suppose we want to buy a share that is there is a demand of stock</p><p>So there should be someone who is selling that supply of stock.</p><p>This demand and supply will not meet if we have invested in the market which has a low number of companies listed and a low number of users. Hence always trade on BSE and NSE only.</p><p><strong>Demand and Supply is the main reason which causes stock prices to differ at Stock Exchange.</strong></p><p>There are many Point which we should understand before start Trading and Investing Stock Market.</p><p>Remember Investing in anything without understanding is gambling in life.</p><p>Thank You</p><p>Regards</p><p>Vikas Maurya.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aafbd59d28e" width="1" height="1" alt=""><hr><p><a href="https://towardsdev.com/share-market-in-nutshell-aafbd59d28e">Share Market in Nutshell</a> was originally published in <a href="https://towardsdev.com/">Towards Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SYSTEM DESIGN IN A NUTSHELL]]></title>
            <link>https://blog.chatbotslife.com/system-design-in-a-nutshell-7823e40536a1?source=rss-5935e0877213------2</link>
            <guid isPermaLink="false">https://medium.com/p/7823e40536a1</guid>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[faang]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[data-analyst]]></category>
            <dc:creator><![CDATA[Vikas Maurya]]></dc:creator>
            <pubDate>Sun, 02 May 2021 15:16:30 GMT</pubDate>
            <atom:updated>2022-12-01T18:15:53.865Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/759/0*giPqAYrD42q8Ek2s" /></figure><p>After the failure in an interview, I thought let’s try to learn this system design in depth. Then I understand to crack interviews we don’t need to learn everything. Fundamentals of System Design is enough to crack this interview. I have gone through various YouTube channels which taught System Design. I looked at the course content of System expert then I thought with learning let’s create a blog that might help people in a nutshell about what topic to study or give importance to while preparing for the System Design Interview.</p><h3>Lectures</h3><p><strong>1)Introduction</strong></p><p><strong>2)What Are Design Fundamentals?</strong></p><p><strong>3)Client-Server Model</strong></p><p><strong>4)Network Protocols</strong></p><p><strong>5)Storage</strong></p><p><strong>6)Latency and Throughput</strong></p><p><strong>7)Availability</strong></p><p><strong>8)Caching</strong></p><p><strong>9)Proxies</strong></p><p><strong>10)Load Balancers</strong></p><p><strong>11)Hashing</strong></p><p><strong>12)Relational Databases</strong></p><p><strong>13)Key-Value Stores</strong></p><p><strong>14)Replication and Sharding</strong></p><p><strong>15)Leader Election</strong></p><p><strong>16)Peer-To-Peer Networks</strong></p><p><strong>17)Polling and Streaming</strong></p><p><strong>18)Configuration</strong></p><p><strong>19)Rate Limiting</strong></p><p><strong>20)Logging and Monitoring</strong></p><p><strong>21)Publish/Subscribe Pattern</strong></p><h4>“I guide others to a treasure I cannot possess”</h4><blockquote><strong>Lecture 1: Design Fundamentals Introduction</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/0*Aa4oig0lDduWMYSP" /></figure><p><strong>Definition</strong>: Systems design is the process of defining elements of a system like modules, architecture, components and their interfaces and data for a system based on the specified requirements.</p><p><strong>Description</strong>: A systemic approach is required for a coherent and well-running System.</p><p>Designing a Robust, Functional, Scalable system is very important. Since it helps reduce the complexity of the system and makes the system more efficient in terms of processing and access.</p><p><strong>Why should you learn System Design?</strong></p><p>Understanding the scalable System Design paradigm might help you save millions of dollars.</p><p>Better user experience which is good for business and helps you gain more clients.</p><p>Handling system failure becomes easy with well-designed system architecture.</p><p>Some of the important topics which help build this system are as follows.</p><p>SQL, Server, Cache, Polling, Load Balancer, Availability, Databases, Map-Reduce, Client, Leader Election, Peer to Peer, HTTP, Nginx, Replication, Hashing, Network Protocol.</p><blockquote><strong>Lecture 2: What are Design Fundamentals?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/0*7Fc-MMPF76a_QxjO" /></figure><p>No matter your role in the tech world, System design is a concept you should be somewhat familiar with. It is the process through which you can design and build scalable and maintainable applications.</p><p><strong>Interview Aspects:</strong></p><p>Always be aware of simple system design which is fundamental since sometimes in interviews the questions will be like designing YouTube with all the basic functionality.</p><p>While answering in any system design interview there is no right answer but if you want to become a software engineer you should know why and what are the basic fundamentals behind it.</p><p>You should be able to defend your solution and tackle any question from the interviewer. Here knowing design fundamentals comes into the picture.</p><p><strong>Categories for Design Fundamentals:</strong></p><ul><li>Underlying Foundational Knowledge.</li><li>Key Characteristics of System (Availability, Consistency, Latency, Throughput, Redundancy.)</li><li>Components of System (Load Balancer, Proxies, Caches, Leader Election, etc.)</li><li>Technology Tools (Nginx, Cloud Service, etc.)</li></ul><blockquote><strong>Lecture 3: Client-Server Model</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/290/0*pX6XNqgyGSNk72ht" /></figure><p>The client-server model describes how a server provides resources and services to one or more clients. Examples of servers include web servers, mail servers, and file servers. Each of these servers provides resources to client devices, such as desktop computers, laptops, tablets, and smartphones.</p><p>It is the foundation of the Modern Computer system. It explains how 2 systems communicate.</p><p>The client speaks to the server (It requests data or sends data) and the Server listens to it and on the basis of client requests, it responds to the client.</p><p>If you want to talk to anyone you should have some contact details, similarly clients should have some address of the server so that they can interact with each other.</p><p>An IP address is a unique Identifier for the Machine. Which is used by clients so that clients can send data to specific systems or servers.</p><p><strong>DNS (Domain Name Server)</strong> is used to get the IP Address of a particular site.</p><p>DNS is the database of IP or you can say that it is a phonebook of the Internet.</p><p><strong>A DNS query</strong> is a special request which goes to the server and gets the IP address.</p><p>The client sends an HTTP request to the server. The client will send the packet request which contains the source address and destination address. Servers are machines that receive the request. The server which has some IP address (Private), contains 65535 Ports. So it is very hard to find which port server is listening. Hence ports should be specified so that the request route properly to the correct server.</p><p>If a client wants to talk to a server on HTTP it uses port 80.</p><p>For HTTPS it uses Port 443.</p><p>Local IP Address: 127.0.0.1</p><blockquote><strong>Lecture 4: <em>Network Protocols</em></strong></blockquote><p>Software Engineers don’t use Network protocols every day but it is necessary to know these Network Protocols.</p><p>Focus on these 4 only for now.</p><p>IP, TCP, HTTP, UDP.</p><p><strong>Internet Protocol Address</strong>: Modern Internet runs on IP. One Machine interacts with another Machine in the form of IP packets (Made with Bytes). IP Packets have IP Header (Source IP Address, Destination IP Address, Total size of Packet, Version of IP), Data (2¹⁶ bytes)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/0*GR1hJKIQJ1kDgceE" /></figure><p>One IP packet is not enough to send data. We have to send Multiple IP Packets</p><p>But then the sequence will change and data may be corrupted. So to solve this we use <strong>TCP (Transmission Control Protocol).</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/325/0*QjHOv3-Us3VSykvr" /></figure><p>TCP Establish the Connection via 3- Way Handshaking Protocol.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/0*u-k-YLO8pjjf8Bxn" /></figure><p>TCP is a more powerful rapper around IP Addresses. It is used to Transfer Data.</p><p>But it does not assure security and robustness. So we have <strong>HTTP (HyperText Transfer Protocol).</strong></p><p>How does HTTP work? As a request-response protocol, HTTP gives users a way to interact with web resources such as HTML files by transmitting hypertext messages between clients and servers. HTTP clients generally use Transmission Control Protocol (TCP) connections to communicate with servers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/258/0*eij0-mv3edRa68Bx" /></figure><p>Suppose we want to send data very fast manner and we don’t care about their flow sequence and error control then we use UDP.</p><p>It is used for especially time-sensitive transmissions such as video playback or DNS lookups.</p><p>But if security and correctness is the core aspect of your system then avoid UDP then TCP is best used.</p><p><strong>UDP (User Datagram Protocol)</strong> is a communications protocol that is primarily used for establishing low-latency and loss-tolerating connections between applications on the internet. It speeds up transmissions by enabling the transfer of data before an agreement is provided by the receiving party.</p><blockquote><strong>Lecture 5: Storage</strong></blockquote><p>Storage is one of the backbones of System Design. If you have data you should require some storage.</p><p>The database is used as storage. Store and Retrieve Data (Read and Write).</p><p>The database is just a server. Local computers also become a Database.</p><p>Databases should be persisted if power outages occur.</p><p>The database server writes the data to disk if a power outage occurs then data is never lost.</p><p>If we used Memory to store the data then it does not have persistence.</p><p>Memory stores the data temporarily so if we restart the server then data will be lost hence to achieve persistence we need to store the data on Disk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*VQZR-6MrKDbwbJ6R" /></figure><p>While choosing a Database you should know what kind of storage system you require.</p><p>Since there are so many databases for different purposes and functionality.</p><p>If you want to store structured data then go for Relational DB.</p><p>If you want to store unstructured data then go for NoSQL DB.</p><p>Here is the list of databases you can study.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*tqCPws3q-sE_vuX7" /></figure><blockquote><strong>Lecture 6: Latency and Throughput</strong></blockquote><p>Latency is how long it takes data to get from one point of the system to another point of the system.</p><p>The amount of time taken by request from the client to the server and response from the server to the client is known as Latency.</p><p>Reading 1MB of Data Sequentially from Memory takes 250 Microseconds.</p><p>Reading 1MB of Data Sequentially from an SSD takes 1000 Microseconds.</p><p>Sending 1MB of Data 1 Gigabyte Per the second network takes 10000 Microsecond (API Request).</p><p>Reading 1MB of Data Sequentially from HDD takes 20000 Microseconds.</p><p>Sending Packet California-&gt;Netherlands-&gt;California takes 150000 Microsecond.</p><p>Latency needs to be considered. It depends on the system designer if the system is for the Game server then latency should be less but in the Payment system uptime and accuracy is more important there we can have high latency.</p><p><strong>Throughput</strong></p><p>How Much work a machine can perform in a given amount of time?</p><p>We calculate the throughput of the system in terms of Gigabytes i.e. how much amount of data it can transfer from one point to another.</p><p>How many requests a server can handle in a given amount of time is known as throughput.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/281/0*NwQrdpv_nmzux4RK" /></figure><p>Adding multiple servers helps improve throughput and latency.</p><blockquote><strong>Lecture 7: Availability</strong></blockquote><p>System availability means if a system gets failed like a Database Fails, Components Fails, etc. the system should be available to the client it should never go down.</p><p>Low Fault Tolerance is the way to increase availability.</p><p>Fault tolerance refers to the ability of a system (computer, network, cloud cluster, etc.) to continue operating without interruption when one or more of its components fail. … Fault-tolerant systems use backup components that automatically take the place of failed components, ensuring no loss of service.</p><p>If System is not available then we might lose customers and have bad publicity.</p><p>High and low availability depends on system needs. For e.g. YouTube is down then will cause problems for Google.</p><p>Availability always measures in Nines that is 99% means 2 Nines available, and 99.99% 4 Nines available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/0*XfI8RJl-PeRMoM5t" /></figure><p>More the nines it shows High Availability.</p><p><strong>Service Level Agreement/Service Level Objective:</strong></p><p>Many Service Providers made SLAs for customers. SLA guarantees a certain amount (%) of availability.</p><p>To achieve High Availability we have to avoid single-point Failure.</p><p>We have to make our system redundant. We can do this by adding many servers and adding load balancers to distribute the requests to different servers.</p><p>Redundancy could be invoked by just adding many components.</p><p><strong>Passive Redundancy:</strong> When you have multiple machines and one fails then the other Machine handles it.</p><p><strong>Active Redundancy:</strong> When one fails (Leader) then other machines take over via Leader Election.</p><p>It is one of the most important concepts of System Design.</p><p>Caching is to avoid the redo of the same task. It is used to speed up the system.</p><p>It also helps improve latency and throughput.</p><blockquote><strong>Lecture 8: Caching</strong></blockquote><p>Caching is the way to design the system and type of operation like network requests. We don’t have to face some type of requests again and again.</p><p>Caching is done at the client or server level.</p><p>So that clients don’t request a server (in client-level caching).</p><p>At the server level caching server reduces continuous database interactions.</p><p>Hardware-level and OS-level caching are also done (High-level understanding requires).</p><p>In Client-Server architecture=&gt; Client performs a network request to the server then the server request to Database. It is time-consuming sometimes if we are requesting complex computation data. Every time it will compute and which will affect latency. If we use the caching concept, then it will store those results in the client site (Like Dynamic Programming). This caching will improve the latency and time complexity of the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/0*nVIeiREih1noMW32" /></figure><p>The website uses Caching if we load any site it takes some time depending on our internet but after loading, once we navigate to other pages and come back to the previous page then it didn’t load and shows the result instantaneously.</p><p>Redis (Key-Value Store) is a famous database used to implement caching.</p><p>Redis stores the data and stores it in key-value form when the user requests some data then it will check into the database if the key is present then it will return that value.</p><p><strong>Write through Cache</strong>: When we write the piece of data in both Database and cache.</p><p><strong>Write Back Cache</strong>: When we write only in Cache and not in Database. This Database will change in a certain interval of time.</p><p>While writing a post on LinkedIn or Facebook. We might edit those posts.</p><p>For e.g. On YouTube Many people comments if we use a different cache on the client side and do not update i.e. Write Back Cache then if the user edits their comments then everyone will see a stale version of the comment.</p><p>Hence we need a Redis database between the client and server.</p><p>This caching was not required when a user saw the YouTube count since it is not an important type of data. But if a user replies to a stale version of a comment then it will give a bad user experience.</p><p>Static and immutable data caching is beautiful but for dynamic data, it is a very tricky thing. It increases the complexity.</p><p>Least Recently Used (LRU) and Least Frequently Used (LFU) is the way to remove data from the cache.</p><blockquote><strong>Lecture 9: Proxies</strong></blockquote><p>Proxy means somebody wants to access something on the internet without revealing their identity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/311/0*Ez-M-x9tlNcPXnpM" /></figure><p><strong>Forward Proxy:</strong> It is a server or set of servers it sits between the server and the client. Forward mostly acts as a client site. When the Client requests then it goes to forward proxies and then it goes to the server.</p><p>The server will respond to the proxy then it will forward it to the client. If the client doesn’t want that server should know his identity then the client uses Forward Proxies.</p><p>For e.g. VPN (Virtual Private Network)</p><p><strong>Reverse Proxy:</strong> It is mostly by the Server site. When a client requests then it will go to reverse proxy then it will go to the server. Clients do not know that all requests go to Reverse Proxy.</p><p>The server uses Reverse proxy and Client Forward proxies.</p><p>If we want that server to not get the bad request then this proxy server acts as a filter.</p><p>Proxy servers also act as a load balancers. Malicious clients or servers also get filtered by these proxy servers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/0*_AsKWLrL-AW816zN" /></figure><blockquote><strong>Lecture 10: Load Balancer</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/264/0*Lw-RscT75Ihys5Ad" /></figure><p>When there are millions of users requesting a server then the server may get overloaded or may be slow. Which will lead to failure or a bad user Experience.</p><p><strong>Horizontal and vertical scaling</strong> are the 2 ways to scale the system. Vertical scaling is limited since in this we increase the computational power of the server.</p><p>In horizontal scaling, we add more servers so that all the requests can be distributed across the server.</p><p>The load balancer helps do that in a very efficient manner so that the speed of the server increases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7hhR9iiEOtHI7MgA" /></figure><p>Rerouting or distributing the traffic coming from the client to the server in a balanced manner is the main work of a Load Balancer.</p><p>The load Balancer is mostly in between the client and the server. But it also comes in between the server and database or in between where the load is to be managed, etc.</p><p>There are software and hardware load balancers. The software load balancer is easy to customize but the hardware is hard to modify.</p><p>Configuration of load balancer done by the server owner.</p><p>For routing or distributing the request load balancer follows random order.</p><p>Which may cause issues if the same server gets the request. So we need some technique which distributes requests uniformly.</p><p><strong>Round robin</strong> technique to distribute the server evenly if one server said that it is full then it will redirect to subsequent.</p><p><strong>Weighted Round Robin</strong> technique in which the bigger the server higher the weight and the load balancer will route the requests to high-weighted servers since it can handle more requests than other servers.</p><p><strong>Performance-based</strong>: How much the server performs, if it is poorly performing then the load balancer chooses which performs well.</p><p>IP-based load balancing: In this IP hashing occurs and then it goes to the server which has the IP.</p><p><strong>Path-based Load Balancing:</strong></p><p>All the requests related to payment, different servers for different services.</p><p>Multiple Load Balancers may follow different server selection strategies also if one load balancer gets overloaded then another load balancer will help.</p><blockquote><strong>Lecture 11: Hashing</strong></blockquote><p>We can hash or transform a piece of data into the fixed length of data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*OW6fdXUbYzOGcAjZ" /></figure><p>For the same user if we cache the data in one server then the load balancer will follow the round-robin technique to route the request but it does it randomly which reduces cache hit.</p><p>A cache hit is a state in which data requested for processing by a component or application is found in the cache memory. It is a faster means of delivering data to the processor, as the cache already contains the requested data.</p><p>So if a request is routed to the same server then request processing will be very fast.</p><p>Hashing could help to route requests to the same server in a faster way for a particular user.</p><p>We will hash the Client/User that is mode the client number with the number of servers.</p><p>So it will assign the client to the server so that the load Balancer will assign the same server to the client every time.</p><p>Hashing will distribute the client&#39;s request in the desired manner.</p><p>If one of the servers dies then adding a new server and modifying the hash value will reduce the cache hit.</p><p>So we need to use some concept which solves the above problem.</p><p><strong>Consistent Hashing:</strong></p><p>Consistent Hashing is a distributed hashing scheme that operates independently of the number of servers or objects in a distributed hash table by assigning them a position on an abstract circle, or hash ring. This allows servers and objects to scale without affecting the overall system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/0*K1dsbMhykeSaZfrd" /></figure><p>The server is arranged in a circular manner with a sequential hash function.</p><p>The client also will be arranged in this ring, in the above diagram object can be considered as the client.</p><p>Object or client’s request will be routed to the server in a clockwise manner to the nearest distance.</p><p>If any server dies or adds any server then it will not affect the cache hit or response rate.</p><p>So if we want a more evenly distributed System then we can use a complex hash.</p><p>We can also place the strong server into multiple places in the ring by passing to multiple hashing functions.</p><p>Rendezvous or highest random weight (HRW) hashing is an algorithm that allows clients to achieve distributed agreement on a set of options out of a possible set. Options. A typical application is when clients need to agree on which sites (or proxies) objects are assigned to.</p><blockquote><strong>Lecture 12: Relational Database</strong></blockquote><p>A relational database is a type of database. It uses a structure that allows us to identify and access data in relation to another piece of data in the database. Often, data in a relational database is organized into tables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/0*ZujaZYKUGc9yPjX4" /></figure><p>The relational Table is very structured. It will be having rules and schema.</p><p>The Relational Table will consist of rows and columns.</p><p>SQL stands for Structured Query Language. It is designed for managing data in a relational database management system (RDBMS). It is pronounced as S-Q-L or sometime See-Quell. SQL is a database language, it is used for database creation, deletion, fetching rows, modifying rows, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/0*Q5RpkcRDaBL8CiVR" /></figure><p>Why do we need relational data?</p><p>NoSQL data is good for storing non- Relational but it is not good for querying simple data.</p><p>If we use python for querying the data then it is very hard since tera byte of data we need to first load in the memory then we can query the desired data.</p><p>Hence for large datasets python is not the best solution. SQL helps in high-speed querying hence it is used so widely and used by all organizations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/0*NQoaRUuyj3IzeQhv" /></figure><p><strong>Index in Database:</strong></p><p>It is a powerful functionality to fast the querying in SQL.</p><p>It is used for fast searching. We can create indexing on a database for optimization of searching in millions of data.</p><p>Indexes are used to quickly locate data without having to search every row in a database table every time a database table is accessed. Indexes can be created using one or more columns of a database table, providing the basis for both rapid random lookups and efficient access to ordered records.</p><blockquote><strong>Lecture 13: Key-Value Stores</strong></blockquote><p>As the name suggests it stores the data in the key-value form. It is the NoSql type of database.</p><p>You can relate this storage-type database with a hash map.</p><p>Caching implementation uses a key-value structure. Dynamic Configuration also uses this storage structure.</p><p>Since the extraction of data is very fast it reduces latency and throughput.</p><p>E.g. Dynamodb, Redis, Zookeeper, etc.</p><p>Some Key-value store data to disc. So if the system goes down you will not lose any data.</p><p>Redis is a memory-specific key-store storage type, it stores in memory if the system fails then data will be lost.</p><p>There are various other types of NoSQL also.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/0*XIBoOhOdHX1ji0lR" /></figure><blockquote><strong>Lecture 14: Replication and Sharding</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/0*Z8rDdGM1aCeKuvTB" /></figure><p>System performance mostly depends on the database. If the database is not available the system also might not be available. Hence to prevent database failure we need Replication of database or secondary database.</p><p>We will create a replica of the main database so that if the main database goes down then the replica will replace or take over the main db. So we need to synchronize the main database with the replica database. So they both should change their data with each other so that consistency is achieved and there will be no data integrity issue.</p><p>So if there is any write operation in the main Database then it will be updated in the replica database also.</p><p>Suppose we want write a post on LinkedIn</p><p>Sometimes terabytes of data in a database and replicating all the data is not an optimal way.</p><p>So for that, the solution is sharding. We split the data across multiple databases which are known as shards.</p><p>We can use different logic/strategies to split the data. We can split on the basis of places, usernames, etc.</p><p>But it will cause traffic on these shards since the split is obvious.</p><p>We should use hashing for uniform distribution across shards.</p><blockquote><strong>Lecture 15: Leader Election</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/264/0*NfNPCJtFhIfOeJ9w" /></figure><p>Many organizations have various services which depend on third-party services. This third party service should not directly have access to any sensitive data. So we can put one leader or server which should connect to third-party services so that they don’t have direct access.</p><p>If we want to deal with the failure of services we need to add redundancy by adding more copies of the leader.</p><p>But we don’t want all the copies to perform the same services which lead to multiple copied services which is useless. So we have to elect leaders from all the servers. The leader will perform all the services and the other server will wait. If a Leader fails then another leader is elected and then it will perform the previous leader’s services.</p><p>But after the failure of a leader then how to elect a new leader is very complex since gaining consensus on who will be a leader at any given point in time.</p><p>So we have to use a consensus algorithm.</p><p>A leader election algorithm is a special case of consensus algorithm where the set is the set of participants. … This is often how consensus is solved in practice: choose a leader (using a specialized consensus algorithm), then the leader broadcasts its choice of value each time a consensus is needed.</p><p>E.g. Paxos and Raft etc.</p><p>Zookeepers and Etcd help implement their own elected leader.</p><p>Etcd is a key-value pair. It uses the Raft algorithm to implement election Leader. Etcd provides high Availability and consistency. So we can ensure that it will elect properly.</p><p>A consensus algorithm is a mechanism in computer science used to establish agreement on a single data value across distributed processes or systems. … For blockchain networks, the consensus algorithms are an essential element because they maintain the integrity and security of these distributed computing systems.</p><p>The purpose of leader election is to choose a node that will coordinate activities of the system. In any election algorithm, a leader is chosen based on some criterion such as choosing the node with the largest identifier. Once the leader is elected, the nodes reach a particular state known as the terminated state.</p><blockquote><strong>Lecture 16: Peer-To-Peer Networks</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/0*IsvswhtJeKpGVDgd" /></figure><p>A peer-to-peer (P2P) network is a group of computers, each of which acts as a node for sharing files within the group. Instead of having a central server to act as a shared drive, each computer acts as the server for the files stored upon it. When a P2P network is established over the Internet, a central server can be used to index files, or a distributed network can be established where the sharing of files is split between all the users in the network that are storing a given file.</p><p>Suppose we want a server to transfer large files then Peer-to-peer is an efficient solution.</p><p>If the central server tries to transfer files one by one to the client then it will take a while.</p><p>If there are 1000 Clients and the server wants to share 5GB files per second then it will take 1000 sec which is around 17 minutes. Which is not good at all.</p><p>In a peer-to-peer network, each client computer acts as a server or peer, which can communicate with each other. So if we divide the 5GB data into 1000 chunks and then transfer them to peer then in each 0.001 sec it will exponentially transfer by the peer to its peer. Hence the speed of transfer increases.</p><p>But there should be some system that tracks which peer received what this done by Tracker.</p><p>So there is some gossip or epidemic protocol that helps transfer.</p><p>Distributed Hash Table (DHT) uses by a peer-to-peer network so that chunks of files could be merged correctly.</p><p>E.g. Kraken (Uber), Torrent</p><blockquote><strong>Lecture 17: Polling and Streaming</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/0*GA9ci1LQxgh2fUHG" /></figure><p>In systems, clients and servers communicate together in which client requests and the server responds back to the respective client with requested data. Now there can be choices on at what frequency I need to update the data. Well, it all depends on your purpose and your system.</p><p>It is defined as the process when a client requests a particular piece of data at regular intervals (maybe every x second) and the server reverts to a usual response with the required data.</p><p>In these scenarios, where the client needs to update the data (get the data from the server) regularly in instant mode, polling may not benefit your architecture. Ex: You are building a chat app where you have many clients that are meant to communicate with each other in real time. As a System Design Expert, you need to make sure that the client gets the updates instantaneously (here updates mean chats, text, and messages). But Polling is not suitable everywhere as an example of a Chat box, you need to get the instantaneous message as the other end sends it, but due to a set interval of x seconds you are unable to get the instant feel of messages and your messages would feel a lot of delays</p><p>The best suitability of Polling can be getting temperature updates maybe 30sec/1min of regular intervals.</p><p>Streaming is done through sockets, you can learn about sockets in detail In Layman&#39;s terms, sockets are a file that your computer can write/read from in a long-width connection with another computer, an open connection till one machine turns it off.</p><p>Ex: Designing a Chat Application just like What Sapp/Instagram and many others</p><p>Here you might think of a choice of reducing the set intervals and using Polling instead of Streaming, that is, you may think of reducing the set intervals to 1sec/0.5sec then within 10 seconds you are requesting up to 20 requests for a single client, and for millions of clients, this would create an issue for our server to handle these requests at the same time. Here you need to notice that you may get the instant experience in messages but this is not optimal as it would create much more load on a server.</p><p>Polling and streaming are equally important depending on the scenario or business need.</p><blockquote><strong>Lecture 18: Configuration</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/0*Prz1RYwXr-b1F2bB" /></figure><p>It is a set of parameters or constants that the system uses. There will be a file that will be having different system configurations.</p><p>It will be mostly in JSON or Yaml format since it is more readable.</p><p>There are 2 types of Configuration File.</p><p>Static Configuration and Dynamic Configuration.</p><p>In the static configuration we need to change every time manually if the Application configuration changes.</p><p>Dynamic Configuration needs some database from where it will query the system configuration.</p><p>Dynamic gives the power to build a User Interface so that we can change from there and use a different version of the Application. But it gives some complexity to the system.</p><p>Deploying new features is easy in Dynamic Configuration. But we need to review the application so that new features don’t affect the Application.</p><p>Configuration design is a kind of design where a fixed set of predefined components that can be interfaced (connected) in predefined ways is given, and an assembly (i.e. designed artifact) of components selected from this fixed set is sought that satisfies a set of requirements and obeys a set of constraints.</p><blockquote><strong>Lecture 19: Rate Limiting</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/336/0*q5Lt89XDjT38Zh_5" /></figure><p>Rate limiting is putting some limit on some operation so that it can show an error or some response.</p><p>Suppose the Client requests a service to Server if we don’t have any limit, then it may request multiple requests that the server can’t handle.</p><p>So in Rate Limiting, we put a limit that the server accepts 4 requests every 10 sec. If the request goes high then it will show errors or messages showing we can’t handle requests.</p><p>We can solve the Denial of Service Attack by using Rate Limiting.</p><p>We can apply rate limiting using different Factors.</p><p>Distributed DoS attack is not able to be solved by Rate Limiting.</p><p>Client interacting with the server then in large scale distribution is very hard since every time request may route to a different server. So if we want rate limiting to work for specific users then we have to use some different server.</p><p>Redis is a very popular key-value database, which handles rate-limiting logic.</p><blockquote><strong>Lecture 20: Logging and Monitoring</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_UBuUMoB6wDPEznI" /></figure><p>Suppose a customer buys some product from a website it gets one issue that credit card gets charged but access is not given to the customer for that product. Then it is a big issue, we should know where the problem is. In a larger-scale distributed system it might be complex, here Logging and Monitoring help find user activity while purchasing the product. It also helps store the history of every user, which can help find malicious activity also.</p><p>There are various formats for saving logs.</p><p>CIS maintains a log of events that can be viewed at any time by clicking ‘View Logs’ from the General Tasks interface. The Log Viewer module opens with its home screen displaying a summary of CIS events: The left-hand side of the home screen displays a bar graph showing a comparison of the Antivirus events, Firewall events, and Defense+ events.</p><p>The JSON format annotated each line with its origin (stdout or stderr) and its timestamp. Each log file contains information about only one container. The JSON-file logging driver uses file-based storage. These files are designed to be exclusively accessed by the Docker daemon.</p><p>Google Stack Driver provides logging and monitoring.</p><p><strong>Monitoring:</strong></p><p>It has monitoring tools to check the health of the system. A monitoring Matrix can be made of various logs of the system. Changing the log breaks the monitoring matrix.</p><p>So we should use a Time-Series Database, which is independent of logs.</p><p>Grafana is a multi-platform open-source analytics and interactive visualization web application. It provides charts, graphs, and alerts for the web when connected to supported data sources.</p><p>We also can create an alerting system, we can connect with slack if we get any errors in slack.</p><blockquote><strong>Lecture 21: Publish/Subscribe Pattern</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*_Xwx1zXhIy1EF5H4" /></figure><p>Publish-subscribe is a communication pattern that is defined by the decoupling of applications, where applications publish messages to an intermediary broker rather than communicating directly with consumers (as in point-to-point). In this sense, publishers and consumers have no knowledge of each other; they simply produce or receive the events.</p><p>Persistent storage is any data storage device that retains data after power to that device is shut off. It is also sometimes referred to as non-volatile storage.</p><p>Publish/ Subscribe Pattern helps build persistent databases.</p><p>It has 4 components:</p><p>Publisher</p><p>Topic</p><p>Subscriber</p><p>Messages</p><p>Idempotent: Performing the same operation multiple times gives the same output then it is known as idempotent. Apache Kafka, Google Cloud pub/sub.</p><p>Many more System Design concepts are yet to come.</p><p>Do give your valuable feedback and comment below.</p><p><em>Originally published at </em><a href="https://docs.google.com/document/d/e/2PACX-1vQST9N9GKb-MujHh2LjPRrcnuxg9nsiJg7WqymNSEOILXwnO4ch6VBoVrMMRz2nsHQtL6-vo9JfuwMM/pub"><em>http://docs.google.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7823e40536a1" width="1" height="1" alt=""><hr><p><a href="https://blog.chatbotslife.com/system-design-in-a-nutshell-7823e40536a1">SYSTEM DESIGN IN A NUTSHELL</a> was originally published in <a href="https://blog.chatbotslife.com/">Chatbots Life</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Converting Excel data to SQL(PostgreSQL) Table in Python]]></title>
            <link>https://vikasmauryatech.medium.com/converting-excel-data-to-sql-postgresql-table-in-python-5034d1c84c30?source=rss-5935e0877213------2</link>
            <guid isPermaLink="false">https://medium.com/p/5034d1c84c30</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[pandas]]></category>
            <dc:creator><![CDATA[Vikas Maurya]]></dc:creator>
            <pubDate>Tue, 23 Feb 2021 11:34:12 GMT</pubDate>
            <atom:updated>2021-02-23T17:51:02.393Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/274/1*mDlr0axRPZzxJ7auqbph5A.jpeg" /><figcaption>Excel to SQL Tables</figcaption></figure><h3>Introduction</h3><p>In the real world, data is mostly in the format of files i.e. Excel sheets. These excel sheets are not well structured and it contains multiple sheets, which is very complex to handle and hard to visualize (larger data) with using cross sheets with some complex conditions. SQL does this task very easily with schema structure and joins.</p><p>SQL is a Structured Query Language, which is the base of all the SQL Database. for e.g. PostgreSQL, MongoDB, Microsoft SQL Server, etc.</p><p>SQL is much faster than Excel sheets. It can take hours to do a task in Excel and in SQL it takes minutes to perform the same task.</p><p>Every big company uses databases to handle data. So there is a requirement of converting this excel sheet data into SQL Tables.</p><h3>Steps to convert the Excel data to SQL Table</h3><h4>Prerequisites</h4><p>Check that you have all the required libraries.</p><p># To create the data frame into Table</p><p>from sqlalchemy import create_engine</p><p>#For manipulating data frame</p><p>import pandas as pd</p><h4>Step1:</h4><p>First load the excel sheet.</p><p>Dataframe=pd.read_excel(filename,index_col=0,header=[1,4],sheet_name=’sheet_name_which_is_to_be_loaded’)</p><p>index_col = 0 =&gt; It will set first column as index column.</p><p>header =[1,4] =&gt; It will set first 4 row as header which is column names.</p><h4>Step2:</h4><p>Format the excel sheet so that columns contain the same datatypes and also handle the missing values.</p><p>You have four main options for converting types in pandas:</p><p>1. <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.to_numeric.html">to_numeric()</a> - provides functionality to safely convert non-numeric types (e.g. strings) to a suitable numeric type. (See also <a href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.to_datetime.html#pandas.to_datetime">to_datetime()</a> and <a href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.to_timedelta.html#pandas.to_timedelta">to_timedelta()</a>.)</p><p>2. <a href="https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.astype.html">astype()</a> - convert (almost) any type to (almost) any other type (even if it&#39;s not necessarily sensible to do so). Also allows you to convert to <a href="https://pandas.pydata.org/pandas-docs/stable/user_guide/categorical.html">categorial</a> types (very useful).</p><p>3. <a href="https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.infer_objects.html">infer_objects()</a> - a utility method to convert object columns holding Python objects to a pandas type if possible.</p><p>4. <a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.convert_dtypes.html#pandas.DataFrame.convert_dtypes">convert_dtypes()</a> - convert DataFrame columns to the &quot;best possible&quot; dtype that supports pd.NA (pandas&#39; object to indicate a missing value).</p><p>Handling Missing Values:</p><p>Dataframe.fillna(Dataframe.mean())</p><p>fillna =&gt; It will fill the null value with the mean of that column.</p><p>For string type, we can replace it with string to handle missing or null values.</p><h4>Step3:</h4><p>Create Engine in sqlalchemy</p><p>engine = create_engine(r’postgresql://user_name:password@server_ip_address:port_number/Database_name’, echo = True)</p><p>create_engine =&gt; It will create the engine for postgresql that will connect the server to the postgreSQL .</p><p>Type your username, password, server IP address, Port number, and Database Name to connect that specified server.</p><p>Dataframe.to_sql(‘table_name’,engine,if_exists=’replace’)</p><p>to_sql =&gt; It will convert the Excel sheet into specified table name.</p><p>if_exists=&gt;It will replace the Table to handle multiple execution of program.</p><p>Replace will drop the table before inserting new values.</p><p>To Execute SQL query using the following command:</p><p>engine.execute(“Write the SQL Query”)</p><p>You can read more about the to_sql from the below link:</p><p><a href="https://pandas.pydata.org/pandas-docs/version/0.23.4/generated/pandas.DataFrame.to_sql.html">https://pandas.pydata.org/pandas-docs/version/0.23.4/generated/pandas.DataFrame.to_sql.html</a></p><p>Read more about sqlalchemy:</p><p><a href="https://www.compose.com/articles/using-postgresql-through-sqlalchemy/">https://www.compose.com/articles/using-postgresql-through-sqlalchemy/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5034d1c84c30" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>