<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rohit Ranjan Pandey on Medium]]></title>
        <description><![CDATA[Stories by Rohit Ranjan Pandey on Medium]]></description>
        <link>https://medium.com/@rohitranjan.pandey?source=rss-35e9f65bae9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*asORLoSkKKxXdVyLx5BO8g.jpeg</url>
            <title>Stories by Rohit Ranjan Pandey on Medium</title>
            <link>https://medium.com/@rohitranjan.pandey?source=rss-35e9f65bae9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 00:59:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rohitranjan.pandey/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[Observability and Evaluation of My AI Agent]]></title>
            <link>https://medium.com/@rohitranjan.pandey/observability-and-evaluation-of-my-ai-agent-46bf283b3fc8?source=rss-35e9f65bae9------2</link>
            <guid isPermaLink="false">https://medium.com/p/46bf283b3fc8</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[metrics]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agents]]></category>
            <dc:creator><![CDATA[Rohit Ranjan Pandey]]></dc:creator>
            <pubDate>Fri, 14 Aug 2026 06:55:35 GMT</pubDate>
            <atom:updated>2026-08-14T08:18:46.178Z</atom:updated>
            <content:encoded><![CDATA[<p>After building a basic smolagents-based AI assistant as a hobby project, I started using it more seriously and, honestly, I wasn’t satisfied with the output quality, response time, or UI experience. For a while, it felt like a complete black box — I had no visibility into what was actually happening inside the system.</p><p>For my hobby agent, I needed answers to questions like:</p><ul><li>Is the agent completing tasks successfully?</li><li>Where is it getting stuck or failing?</li><li>How long does each step take?</li><li>Are users satisfied with the responses?</li><li>What are the actual costs in tokens and API calls?</li></ul><blockquote>In this post, I’ll share how I implemented monitoring and evaluation for my smolagents-based hobby AI agent, and how those metrics led directly to performance improvements.</blockquote><p><strong>What is Observability for AI Agents?</strong></p><p>Observability in AI agents means understanding what’s happening inside the system’s “black box.” Unlike traditional software, where you can trace function calls, AI agents involve complex reasoning steps, tool calls, and LLM interactions that aren’t immediately visible.</p><p><strong>How I did it ?</strong></p><p>I had already integrated Langfuse into the agent, but it wasn’t enough to show me everything about where the agent was struggling.</p><blockquote>The simplest and most effective approach was to use Langfuse’s @observe() decorator on tool functions. This automatically captures:</blockquote><ul><li>Every tool call with its input and output</li><li>The duration of each operation</li><li>Token usage, when available</li><li>Error states and exceptions</li></ul><blockquote>To analyze specific user sessions, I added session and user IDs.</blockquote><p>This makes it possible to filter traces by session, which is essential for debugging specific user interactions.</p><blockquote>I added thumbs-up and thumbs-down buttons to the Gradio UI to capture user satisfaction.</blockquote><p>This provides direct quality signals from actual users, making it one of the most important feedback signals.</p><blockquote>I added several evaluation processes, such as LLM-as-a-Judge and offline dataset evaluation.</blockquote><p>Using another AI to evaluate the agent’s outputs for toxicity, correctness, helpfulness, and clarity gives a useful measure of output quality. The trade-off is added overhead. For this sample project, the system is rule-based, but a production system should use a rule-plus-LLM approach.</p><p>Offline dataset evaluation is also a valuable way to assess outputs during development and can be especially helpful before production. Of course, LLM outputs depend heavily on context, so results on a controlled dataset won’t fully match real-user behavior in production. Even so, it’s an excellent way to establish a performance baseline.</p><p><strong>What Did the Metrics Reveal?</strong></p><ol><li>Excessive Step Count: Root cause — a complex prompt with a mismatched example confused the agent and caused it to loop in a ReAct pattern.</li><li>Slow Response Times: Root cause — the maximum session and maximum steps were set too high, and the search response returned multiple answers.</li><li>Poor User Experience: Root cause — using smolagents caused the UI to display raw output, and the interface stayed empty during processing even after the initial prompt.</li><li>Framework Overhead: Root cause — the complexity of the smolagents framework, with planning, multiple steps, and verbose logging, added overhead. Simplifying the agent configuration made a big difference.</li></ol><p><strong>Performance Improvements:</strong></p><p>Based on these metrics-driven changes, here’s what improved:</p><ul><li><strong>Average response time:</strong> Before: 15–20 seconds; after improvement: 5–8 seconds — 60% faster</li><li><strong>Max steps reached:</strong> Before: 70% of queries; after improvement: 10% of queries — 85% reduction</li><li><strong>Token usage:</strong> Before: 512–1024 per query; after improvement: 128 per query — 75% reduction</li></ul><p><strong>My Takeaways:</strong></p><blockquote>Start with basic tracing and improve incrementally. Avoid adding every advanced trace at the outset, since that can become a bottleneck during initial prompts.</blockquote><blockquote>Without observability, you are always guessing. With it, you can identify bottlenecks, measure the impact of changes, and validate whether improvements actually worked.</blockquote><blockquote>Prompts can be a major performance bottleneck when they are overly complex or contain mismatched examples. In those cases, a predefined decode path can become the primary failure point. (Heavy Prefill — Decode)</blockquote><blockquote>Observability is not a one-time setup; it is an ongoing process.</blockquote><p><strong>Investing in observability pays dividends through faster development, better user experiences, and more reliable production systems.</strong></p><blockquote><strong>Tools Used:</strong></blockquote><blockquote><strong>Langfuse</strong>: Tracing and evaluation platform</blockquote><blockquote><strong>smolagents</strong>: Agent framework</blockquote><blockquote><strong>Gradio</strong>: UI with user feedback</blockquote><blockquote><strong>Ollama</strong>: Local LLM inference</blockquote><blockquote><strong>DuckDuckGo</strong>: Web search API</blockquote><p><strong>If you find this content interesting, follow and </strong><a href="https://www.linkedin.com/in/rohit-ranjan-pandey-ba120840/"><strong>stay connected</strong></a><strong> for more interesting upcoming real world AI integrations and experiences. Feel free to connect for having more interesting chats for agentic AI.</strong></p><p><a href="https://github.com/RohitRanjanPandey/smolagents-code-first"><strong>My updated agent code is present here.</strong></a></p><p>#AI #AgenticAI #SmolAgents #Ollama #Langfuse #Agents #LLM</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46bf283b3fc8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[smolagents: Where AI Agents Call Code as Tools]]></title>
            <link>https://medium.com/@rohitranjan.pandey/smolagents-where-ai-agents-call-code-as-tools-2b1d54443f0c?source=rss-35e9f65bae9------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b1d54443f0c</guid>
            <dc:creator><![CDATA[Rohit Ranjan Pandey]]></dc:creator>
            <pubDate>Sun, 02 Aug 2026 23:46:01 GMT</pubDate>
            <atom:updated>2026-08-02T23:46:01.301Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve been experimenting with AI agents using Hugging Face’s smolagents framework, and here is what I’ve learned. This project explores how modern AI agents can reason, plan, and execute complex tasks using tools.</p><h3>What Is smolagents?</h3><p>smolagents is a simple yet powerful framework for building AI agents. It provides LLMs with the <em>agency</em> to interact with the real world, such as searching or generating images.</p><h3>Key Advantages of smolagents</h3><ul><li>Simplicity: Minimal code complexity and abstractions, to make the framework easy to understand</li><li>Flexible LLM Support: Works with any LLM through integration with Hugging Face tools and external APIs</li><li>Code-First Approach: First-class support for Code Agents that write their actions directly in code, removing the need for parsing and simplifying tool calling</li><li>HF Hub Integration: Seamless integration with the Hugging Face Hub, allowing the use of Gradio Spaces as tools</li></ul><h3>When to use smolagents?</h3><p>smolagents is ideal when:</p><ul><li>Need a lightweight and minimal solution.</li><li>Want to experiment quickly without complex configurations.</li><li>Application logic is straightforward.</li><li>Real world application: Given the rich toolsets offered, it can be used in any real world use cases across the industries such as healthcare, research, data analysis, e-commerce etc.</li></ul><h3><strong>What I Built</strong></h3><p>A multi-tool AI agent with:</p><p>- 🌐 <strong>Web Search</strong> — Real-time information via DuckDuckGo</p><p>- 🎨 <strong>Image Generation</strong> — Text-to-image descriptions (Could not experiment actual text to image generation as needed the money and I am looking for sponsor :D)</p><p>- 🕐 <strong>Time Zone Queries</strong> — Current time anywhere in the world</p><ul><li>📊 <strong>Monitoring </strong>— Performance tracking with Langfuse</li></ul><h3><strong>Architecture Highlights</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*DAAvLAGopPSKsj8j2m-8Pg.png" /></figure><h3><strong>Technical Decisions</strong></h3><p><strong>Local LLM</strong>: Ollama with Llama3 (8B) for quick prototyping and cost efficiency</p><p><strong>Tool System</strong>: SmolAgents’ intuitive tool architecture</p><p><strong>Monitoring</strong>: Langfuse for comprehensive observability</p><p><strong>Interface</strong>: Gradio for easy web-based interaction</p><h3><strong>Use Cases Explored</strong></h3><p>- 📚 <strong>Research Assistant</strong>: Multi-step information gathering and synthesis</p><p>- 📝 <strong>Content Creation</strong>: Image descriptions and content generation</p><p>- 🤖 <strong>Task Automation</strong>: Tool orchestration for workflows</p><h3><strong>Performance Metrics</strong></h3><p><strong>Response Time</strong>: 1–5 seconds for web search</p><p><strong>Success Rate</strong>: Target &gt;95% for tool executions</p><p><strong>Cost</strong>: $0 (local inference)</p><blockquote><strong>This is experimental code, but it demonstrates good experimental AI agent development use case. </strong><a href="https://github.com/RohitRanjanPandey/smolagents-code-first"><strong>Sample code is available on my github</strong></a><strong>.</strong></blockquote><blockquote><strong>The future isn’t just about better models — it’s about better orchestration and tool integration.</strong></blockquote><p><strong>If you find this content interesting, follow and stay tuned for more interesting upcoming real world AI integrations and experiences. Feel free to connect for having more interesting chats for agentic AI.</strong></p><p>#AI #AgenticAI #SmolAgents #Ollama #Langfuse #Agents #LLM</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b1d54443f0c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Availability & Reliability: The Backbone of System]]></title>
            <link>https://medium.com/@rohitranjan.pandey/availability-reliability-the-backbone-of-system-a1c4a108ee14?source=rss-35e9f65bae9------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1c4a108ee14</guid>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[system-architecture]]></category>
            <category><![CDATA[high-availability]]></category>
            <category><![CDATA[engineering-practices]]></category>
            <dc:creator><![CDATA[Rohit Ranjan Pandey]]></dc:creator>
            <pubDate>Sat, 23 May 2026 06:10:01 GMT</pubDate>
            <atom:updated>2026-05-23T06:10:01.192Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OM1j3Cu5dZdRjFONsfsM8g.png" /></figure><p>Most systems don’t fail loudly. They fail silently — Just a few timeouts, slight delayed response, one “try again later” .</p><p>As engineers, we often obsess over building features, scaling traffic, and optimizing performance. But underneath all of that lies a silent contract with users: Will this system be there when my users need it, and will it behave the way it is expected?</p><p>And that silent contract is defined by <strong>Availability</strong> and <strong>Reliability</strong>.</p><p>Let’s understand the basics first.</p><ul><li><strong>Availability</strong> → Is the system reachable?</li><li><strong>Reliability</strong> → Does the system behave correctly when used?</li></ul><p>Let’s say there is a mobile app:</p><ul><li>App allows to place an order — Available</li><li>Wrong item delivered — Not Reliable</li></ul><p>A system can be:</p><ul><li>Available but unreliable (responds, but wrong data)</li><li>Reliable but unavailable (correct system, but down)</li><li>Neither (worst case)</li><li>Both (what we aim to engineer)</li></ul><blockquote><strong>Frequently used, but less understood terms:</strong></blockquote><p><strong>Availability Metrics -</strong></p><ul><li><strong>Uptime (%)</strong>: 99.9%, 99.99% etc.</li><li><strong>Downtime</strong>: Total time system is not accessible</li><li><strong>SLA (Service Level Agreement)</strong>: What is promised to users</li><li><strong>SLO (Service Level Objective)</strong>: Internal targets</li><li><strong>SLI (Service Level Indicator)</strong>: Actual measurement (e.g., success rate)</li></ul><p>Availability of <strong>nine </strong>plays a very dramatic role for allowed downtime in system. A system with availability of 99.9% still has expected ~43 minutes downtime/month. Even a system with 99.99% is not perfect. It has ~4 minutes downtime/month.</p><p><strong>Reliability Metrics -</strong></p><ul><li><strong>Success Rate</strong>: % of correct responses</li><li><strong>Error Rate</strong>: Failures per request</li><li><strong>MTBF (Mean Time Between Failures)</strong>: How often things break</li><li><strong>MTTR (Mean Time To Recovery)</strong>: How fast system is fixed</li></ul><p>Between Error rate and reliability there is always a misconception. As engineers we may think if lower error rate, means a reliable system. In practical scenarios, system may look healthy but there might be a slight degradation happening with wrong/degraded data returned in few of the responses which is not shown in metrics yet.</p><blockquote><strong>Where Systems actually break:</strong></blockquote><p>Failures don’t happen randomly — they converge at predictable weak points.</p><p><strong>Dependency Chain:</strong></p><p>For example a system consists of:</p><ul><li>Databases</li><li>APIs</li><li>Third-party services</li><li>Network layers</li></ul><p>One slow dependency leads to cascading failure.</p><p><strong>Traffic Spikes:</strong></p><p>Sudden load overwhelms:</p><ul><li>CPU</li><li>DB connections</li><li>Thread pools</li></ul><p>Designing without consideration or clarity of <em>peak load</em>.</p><p><strong>State Management:</strong></p><p>Distributed systems struggles with:</p><ul><li>Consistency</li><li>Synchronization</li><li>Partial failures</li></ul><p>Money debited, but order service fails, puts the system into inconsistent state.</p><p><strong>Human Errors:</strong></p><ul><li>Bad deployments</li><li>Wrong configs</li><li>Accidental deletions</li></ul><p>Ironic, but human is also a human :D</p><p><strong>Retry Storms:</strong></p><p>Retries improve reliability… until they don’t.</p><ul><li>One failure triggers thousands of retries and system collapses</li></ul><blockquote><strong>Trade-offs in system :</strong></blockquote><p>Not everything can be maximized. When I architect a distributed system, I wear a CAP. I can practically choose any two between:</p><ul><li>Consistency</li><li>Availability</li></ul><p>Partition Tolerance is no-negotiation for a distributed system hosted over cloud.</p><p>It is almost impossible to achieve all three in a distributed system.</p><blockquote><strong>Let’s look at few patterns from my experience, that actually works in a distributed system.</strong></blockquote><p><strong>Smart Redundancy (Isolated):</strong></p><ul><li>Multiple servers, zones, regions</li><li>Active-active or active-passive (depends on nature of system and off-course the cost)</li></ul><p>Common mistake: Redundancy without isolation, causes a cascaded failure</p><p><strong>Graceful Degradation:</strong></p><p>When components fail/system finds it difficult to withstand:</p><ul><li>System should show cached data</li><li>Provide fallback responses</li></ul><p>Caution: From user experience “limited service” is preferred over “no service”</p><p><strong>Timeouts</strong>:</p><ul><li>Never wait indefinitely</li><li>Define strict boundaries</li></ul><p>Slow systems feel like broken systems, breaks trust faster and results in frustrated users.</p><p><strong>Idempotency:</strong></p><p>Safe retries without side effects. Critical for data consistency and reliability in distributed system.</p><p><strong>Observability:</strong></p><p>It can be fixed if its seen.</p><ul><li>Metrics (what is happening)</li><li>Logs (what happened)</li><li>Traces (where it happened)</li></ul><p><strong>Auto-Healing Systems:</strong></p><ul><li>Health checks</li><li>Automated restart</li><li>Self-recovery workflows (Consumers reads the messages from queue once restarted after a crash)</li></ul><blockquote><strong>Architectural learning to carry:</strong></blockquote><ul><li>Not everything needs 99.999% (Consider impact, effect and cost)</li><li>Multi-region, complex failover, heavy infra is not scalability</li><li>System can be “up” but does not add value if un-reliable (broken flows, wrong responses)</li><li>Failure can not be completely eliminated, but system should quickly and safely recover</li><li>There is no perfect system, but a mature systems exists. Such systems are designed for failures, retries without storming the system, Observes everything, Informs users, Recover automatically.</li></ul><blockquote><strong>Availability and reliability are not just fancy engineering parameters in a technical document.</strong></blockquote><p>They are <strong>trust systems</strong>.</p><p>Every time my system:</p><ul><li>Loads instantly</li><li>Returns correct data</li><li>Informs users</li><li>Recovers gracefully</li></ul><p>…it quietly tells the user:</p><p><strong>“You can depend on me.”</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1c4a108ee14" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API-First design approach & Swagger]]></title>
            <link>https://medium.com/@rohitranjan.pandey/api-first-design-approach-swagger-a1423db48f76?source=rss-35e9f65bae9------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1423db48f76</guid>
            <category><![CDATA[open-api]]></category>
            <category><![CDATA[api-first]]></category>
            <category><![CDATA[swagger]]></category>
            <category><![CDATA[api-documentation]]></category>
            <category><![CDATA[codegen]]></category>
            <dc:creator><![CDATA[Rohit Ranjan Pandey]]></dc:creator>
            <pubDate>Tue, 07 Nov 2023 12:42:15 GMT</pubDate>
            <atom:updated>2023-11-07T12:42:15.468Z</atom:updated>
            <content:encoded><![CDATA[<p>The <strong>API-First</strong> design approach prioritizes the API development at the beginning of the software development process, positioning APIs as the building blocks of software. With this design approach, the application design starts with the API, before any code is written instead of treating it as afterthoughts.</p><p>This approach is ideal for microservices architectures as it ensures the services/applications are modular and enhances the reusability in the system. Since APIs are thought of early and the structure of API requests and responses are identified, it minimizes the unwanted code as well.</p><p><strong>Why API-First Approach?</strong></p><ol><li>By defining the APIs first, there is a modular separation between the services in the system. This increases the reusability of API endpoints across different parts of the system and to external entities as well (Interoperability).</li><li>The API-first approach promotes collaboration as API documentation and contract definitions serve as a common language for stakeholders such as different teams in development (e.g. frontend and backend), V&amp;V teams for test scenarios, etc.</li><li>Creating the API contracts as part of the API-first design approach can be shared with frontend teams where the team can start building user interfaces parallelly with mocked data as per contract models, tested for the user experience. Also, codegen can be used to generate client mocks which can be directly used by client apps such as iOS/Android, etc.</li><li>It gives the flexibility for tech-stack choices. Different services or applications in the system can be in different languages as long as they adhere to API contracts. It can help in identifying the best suitable tools/options in terms of cost and performance.</li><li>With the API-First approach many concerns such as security measures, versioning, request traffic and data volume, and Integration with different services/applications within the system.</li></ol><p><strong>How to adopt an API-first Design approach?</strong></p><p>Once the requirement of the system has been identified and contexts of services are defined, APIs and their structure can be thought of. <strong>For this OpenAPI Specification (OAS), formerly known as Swagger, can be adopted</strong>. It is an open standard for defining and documenting RESTful APIs. It provides a format for describing the structure, endpoints, input/output parameters, and other details of an API. Swagger provides multiple tool options but I am going to talk about the two most used tools here named Swagger Codegen and Swagger UI.</p><p><strong>Swagger Codegen: </strong>It is used to generate the codes from an API specification as input. It can generate code in various programming languages, such as Java, C#, Python, Ruby, JavaScript, and more, based on the API definition. One use case is generating the client code from API specifications such as for Swift/Android clients or Feign clients.</p><p><strong>Swagger UI: </strong>It is a web-based interface that is primarily used for interactive API documentation and testing. It helps developers understand how to use the API effectively and quickly test API endpoints.</p><p><strong>How to integrate Swagger?</strong></p><p>I have created a <a href="https://github.com/RohitRanjanPandey/SpringBootSwagger.git">sample code on GitHub for Swagger Codegen integration in the spring-boot application</a> for reference.</p><p>Below are the steps for integration to be followed :</p><ol><li>Create an API specification file in YAML. This file should describe your API’s structure (as per Open API standard), including endpoints, request and response models, and other relevant details. (In my <a href="https://github.com/RohitRanjanPandey/SpringBootSwagger.git">sample code</a> I have named it server.yaml)</li><li>Add the necessary dependencies named <strong>springfox-swagger2</strong>, and <strong>springfox-swagger-ui</strong> in pom.xml for Maven build and build. gradle for gradle build. (I have used pom.xml for my <a href="https://github.com/RohitRanjanPandey/SpringBootSwagger.git">sample code</a>)</li><li>Create a Swagger configuration class in your Spring Boot application to configure Swagger (SwaggerConfig class in <a href="https://github.com/RohitRanjanPandey/SpringBootSwagger.git">my sample code</a>). This class should extend <strong>Docket</strong>. Specify the packages to include in the documentation information, and reference the API specification file using the paths method. This informs Swagger where to find the specification file</li><li>Enable Swagger by adding the annotation <strong>@EnableSwagger2</strong> to the Swagger config class.</li><li>In your Swagger configuration, configure Swagger to read the API specification file by using the <strong>apiInfo</strong> method.</li><li>To enable Swagger Codegen and generate documentation for Spring Boot REST controller methods, need to add specific annotations to the controller methods, (which can be added to the controller class and method params as well, depending on what info we want to include for documentation). <strong>@Api</strong> annotation is applied at the class level to provide metadata, <strong>@ApiOperation</strong> annotation is applied at the method level to provide a description for individual API endpoints, <strong>@ApiParam</strong> annotation to provide descriptions for method parameters, and <strong>@ApiResponse</strong> is used to describe the possible responses from an API endpoint. (In my <a href="https://github.com/RohitRanjanPandey/SpringBootSwagger.git">sample code</a> I have used only <strong>@ApiOperation</strong>).</li><li>Build and run the Spring Boot application. After starting the application, you can access the Swagger UI by navigating to <strong>http://localhost:8080/swagger-ui.html</strong> in the web browser. In my <a href="https://github.com/RohitRanjanPandey/SpringBootSwagger.git">Github code repo</a>, I have attached a screenshot of the Swagger-UI of my service endpoints.</li></ol><p><strong>Automatic code generation for clients</strong></p><p>Just for the testing of code generation, I have copied the <strong>server.yaml</strong> from the project and kept it in a separate folder. I installed the Swagger Codegen tool on my machine and used CLI. I have tested it for generating a swift5 client code which can be integrated directly into iOS app code. The command used for this generation :</p><p><strong>docker run — rm -v $(pwd):/gen openapitools/openapi-generator-cli generate -i /gen/server.yaml -g swift5 -o /gen/swift-client</strong></p><p>Here <strong>swift-client </strong>is the output folder where the client code was generated (Had kept in the same folder where server.yaml was kept).</p><p>This can be integrated into the Springboot application as well so that automatic code generation can happen when the application is built. For that, the dependency for <strong>swagger-codegen-maven-plugin </strong>needs to be added in pom.xml (if Maven build is followed, yes in my case) and under the execution tag, we need to provide the configurations like .yaml file path, language, and output directory.</p><p><strong>Note: </strong>This part of auto-generation is not added in my <a href="https://github.com/RohitRanjanPandey/SpringBootSwagger.git">reference spring-boot sample code</a>, but I am using it for all the API Gateway microservices, whichever is getting called/integrated by frontend apps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1423db48f76" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker Essentials: Package, distribute, and run applications]]></title>
            <link>https://medium.com/@rohitranjan.pandey/docker-essentials-package-distribute-and-run-applications-21cf093456b3?source=rss-35e9f65bae9------2</link>
            <guid isPermaLink="false">https://medium.com/p/21cf093456b3</guid>
            <category><![CDATA[docker-image]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[docker-container]]></category>
            <category><![CDATA[containerization]]></category>
            <category><![CDATA[docker-orchestration]]></category>
            <dc:creator><![CDATA[Rohit Ranjan Pandey]]></dc:creator>
            <pubDate>Thu, 31 Aug 2023 21:30:28 GMT</pubDate>
            <atom:updated>2023-09-01T11:57:53.340Z</atom:updated>
            <content:encoded><![CDATA[<p>This post is about containerization and we are going to talk about it in conjunction with Docker which is the most widely used containerization platform. Will also share the GitHub link of the sample code for Docker integration (basic microservice with Docker integration, README.md contains the instructions to check out and run it).</p><p><strong>What is Containerization?</strong></p><p>Containerization allows to packaging of an application and its dependencies together into a single unit called a container. This container includes everything needed to run the application, including the code, runtime, libraries, and system tools.</p><p>Some advantages of using Containerization are :<br><strong>Isolation</strong> — prevent conflicts between applications and dependencies, make more reliable</p><p><strong>Consistency</strong> — Same package across all different environments, such as dev, test, prod-staging, prod, etc.</p><p><strong>Fast Deployment </strong>— Packaging dependencies in one unit makes deployment and execution rapid</p><p><strong>DevOps and CI/CD</strong> — Seamless integration into a Continuous CI/CD pipeline to automate the build, test, and deployment</p><p><strong>Scalability </strong>— Ideal for horizontal scaling, can create multiple instances of a containerized application to handle increased load</p><p><strong>What is Docker?</strong></p><p>Docker is like a box for services and applications. It allows to put any services or application, along with everything it needs to run, into a small, neat package called a “container.” These containers are lightweight, portable, and consistent across different environments. It poses all the characteristics of containerization talked about above which makes it an ideal choice for microservices architecture.</p><p><strong>Basic Components of Docker to know</strong></p><p><strong>Dockerfile: </strong>Script-like file that defines the steps to build a Docker image. It is used to automate the image-building process.</p><p><strong>Docker Image: </strong>Read-only templates used to create containers. It includes the application code, runtime, libraries, and configurations.</p><p><strong>Docker Containers:</strong> A unit that encapsulates application and their dependencies.</p><p><strong>Docker Hub: </strong>Docker registry that stores docker images and provides pre-built images for various applications and services for deployment.</p><p><strong>Docker Engine:</strong> It’s responsible for running containers on a host machine. consists of Docker Dameon and CLI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n3WrhQcCFvkqvtgW6y8lDw.png" /></figure><p><strong>How to Integrate the Docker in a Microservice?</strong></p><p>A sample code for Docker integration with SpringBoot for creating and running the container is available on <a href="https://github.com/RohitRanjanPandey/SpringBootDocker"><strong>GitHub</strong></a>. I have used CLI to generate Docker images and Docker in my local machine to deploy/test. Commands and steps are mentioned in the link. Instead of deploying to docker in a local machine, images can be deployed to the cloud as well which provides IaaS e.g. AWS is one such IaaS.</p><p>AWS gives two ways to deploy a docker image and run the container. Either launch as AWS Fargate or as ECS.</p><p><strong>What is Docker Compose?</strong></p><p>Docker Compose is a tool for defining and running multi-container applications. It uses a YAML file (docker-compose.yml) to specify the services, networks, and volumes needed for an application. It simplifies the management of complex applications consisting of multiple containers. I have created a <a href="https://github.com/RohitRanjanPandey/DockerCompose"><strong>sample code on GitHub</strong></a> that depicts a solution consisting of two services, interacting with each other over feign client and managed by Docker Compose. In that sample code, I have also used the Eureka for dynamic service discovery.</p><p><strong>Do we need a service discovery tool with Docker?</strong></p><p>Docker supports the service discovery through DNS. When different containers are deployed on the same Docker network (which can be specified in the file), they can communicate with each other using the container names, and Docker’s built-in DNS resolves these names to the appropriate IP addresses.</p><p>But again it depends on the complexity and architecture. The use of any service discovery tool like Eureka, or Consul is applicable in scenarios where dynamic scaling is a need. Docker has its own orchestration tool named Docker Swarm which provides basic service discovery and load-balancing capabilities when services scale dynamically.</p><p>Usually, Kubernetes (which is a widely adopted open-source platform for container orchestration) is used to enable the deployment, scaling, and management of containers in a distributed environment.</p><p><strong>Is Docker an Infrastructure as code (IaC)?</strong></p><p>Docker has seamless integration with DevOps practices. It is not a direct part of IaC but can be used in conjunction with IaC practices. Such as:</p><p>Docker Compose defines the entire application stack and manages multiple containers.</p><p>Containers can be managed and scaled dynamically using orchestration for load balancing</p><p>Docker can be integrated into CI/CD systems for build, testing, and deploying containers.</p><p><strong>How Docker can be integrated with CI/CD (IaC practice)?</strong></p><ol><li>Host the service code in version control (e.g. Git) with Dockerfile.</li><li>Configure the CI/CD (e.g. Jenkins) to build a docker image whenever a new change/commit is pushed to the code.</li><li>Run the tests in a container and wait for completion. In case of any failure, the pipeline should fail.</li><li>Containers should be deployed to the target environment using container orchestration. CI/CD should have a script integrated for this deployment.</li><li>Continuous deployment should be configured where containers get deployed in higher environments when tests and execution are passed in lower environments.</li><li>Quality tools can be integrated into the CI/CD system to scan these containers to find any violation or vulnerability.</li><li>Health monitoring tools can be integrated into CI/CD.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21cf093456b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Service Registry and Discovery in Cloud]]></title>
            <link>https://medium.com/@rohitranjan.pandey/service-registry-and-discovery-ba928c44f61a?source=rss-35e9f65bae9------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba928c44f61a</guid>
            <category><![CDATA[microservice-architecture]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[spring-cloud]]></category>
            <category><![CDATA[eureka-discovery-service]]></category>
            <category><![CDATA[eureka-server]]></category>
            <dc:creator><![CDATA[Rohit Ranjan Pandey]]></dc:creator>
            <pubDate>Fri, 21 Jul 2023 07:23:43 GMT</pubDate>
            <atom:updated>2023-07-21T08:04:14.806Z</atom:updated>
            <content:encoded><![CDATA[<p>In my previous post, I did talk about the <a href="https://medium.com/@rohitranjan.pandey/feign-client-simplifying-microservices-communication-in-spring-boot-6155841b33ba">usage of Feign Client for microservices interaction</a>. If you take a look at the sample code I have shared, have used the URL to locate the other microservice in the Feign client interface. When we are working on cloud-native microservices, we can utilize the offerings for service registry and discovery. In this post, I am going to talk about the usage of Eureka service discovery and registry offered by Spring Cloud Netflix. I have created a <a href="https://github.com/RohitRanjanPandey/SpringCloudEureka">sample code</a> repo as well for the implementation.</p><p><strong>What is Eureka?</strong></p><p>Eureka is an open-source service discovery and registry tool developed by Netflix. In a microservices architecture, Eureka plays a crucial role in enabling service registration, discovery, and load balancing. It allows services to locate and communicate with each other without hardcoding the network locations, making the system more dynamic and flexible.</p><p><strong>Eureka in Microservices Architecture:</strong></p><ol><li><strong>Service Registration: </strong>Each service registers itself on startup by providing its metadata (e.g., host, port, service name) to Eureka, allowing other services to discover and access it.</li><li><strong>Service Discovery:</strong> Eureka maintains a dynamic registry of all the registered services. It updates its registry, in case any registered service goes down. When a microservice wants to communicate with another service, it can query the Eureka server to obtain the location of the desired service.</li><li><strong>Load Balancing:</strong> Ribbon comes by default with NetFlix Eureka which acts as a client-side load balancer. It distributes the incoming requests across multiple instances of the same service to balance the load.</li><li><strong>High Availability:</strong> Eureka ensures high availability by running multiple instances across different data centers or availability zones (when deployed over the cloud such as AWS). This ensures the availability of the service registry even if some instances go down.</li><li><strong>Fault Tolerance:</strong> Eureka automatically removes the service from the registry as soon as it goes down. This helps in handling failures gracefully and maintaining system stability.</li></ol><p><strong>When can I use Eureka?</strong></p><ul><li>Well-suited for microservices architectures, where services are continuously deployed, and run on different servers.</li><li>When there are multiple microservices that need to communicate with each other.</li><li>If the application experiences varying levels of traffic, Eureka’s load balancing capabilities can help in dynamically scaling services to handle the load efficiently.</li><li>In cloud-based environments where services are distributed across multiple servers, data centers, or cloud providers.</li></ul><p>From Spring Cloud 2020.0.0 (Ilford), Ribbon has been deprecated, and Spring Cloud LoadBalancer is the recommended alternative for client-side load balancing. Spring Cloud LoadBalancer is responsible for selecting an appropriate service instance from the available pool of instances. When a client application needs to make a request to a service, it first consults the Spring Cloud LoadBalancer to determine the target service instance to which the request should be sent. The load balancer chooses an instance based on its load-balancing algorithm and then forwards the request to that specific instance.</p><p>Spring Cloud offers another service discovery tool named Spring Cloud Consul.</p><p><strong>Below are some scenarios to consider Eureka for service discovery:</strong></p><ul><li>If using other components from Netflix OSS ecosystems, Eureka is recommended.</li><li>Good fit for smaller projects, since Eureka is lightweight</li><li>Eureka is a well-supported and commonly used service registry within the Spring Cloud ecosystem. Eureka is recommended if you are using Spring Cloud for microservices development.</li><li>Eureka works well in environments like AWS, where the default AWS Auto Scaling groups integrate with Eureka for service discovery.</li></ul><p><strong>Scenarios to consider Spring Cloud Consul :</strong></p><ul><li>Consul can be used in environments outside of Spring Cloud when working with a variety of technologies.</li></ul><p><a href="https://github.com/RohitRanjanPandey/SpringCloudEureka"><strong>Sample Code</strong></a><strong> — Follow Readme. md file to run</strong></p><p>In this sample code, you can see the application.yml files of all services to get an idea about how to register for the Eureka service registry and discovery. Also, in the <strong>/order </strong>endpoint, I have tried to catch the Feign client exception and return a dummy response. you can stop the Product-Service while leaving EurekaServer and Order-Service running, try to access <strong>/order </strong>from the browser, and see the fallback response.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba928c44f61a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Microservices Communication using Feign Client in Spring Boot]]></title>
            <link>https://medium.com/@rohitranjan.pandey/feign-client-simplifying-microservices-communication-in-spring-boot-6155841b33ba?source=rss-35e9f65bae9------2</link>
            <guid isPermaLink="false">https://medium.com/p/6155841b33ba</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[microservices-pattern]]></category>
            <dc:creator><![CDATA[Rohit Ranjan Pandey]]></dc:creator>
            <pubDate>Tue, 18 Jul 2023 11:08:28 GMT</pubDate>
            <atom:updated>2023-07-18T11:14:03.440Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Microservices Communication using Feign Client in Spring Boot</strong></p><p>In my previous post, I explained the different ways in which <a href="https://medium.com/@rohitranjan.pandey/how-microservices-communicates-a5762876a995">multiple services interact with each other in a microservices architecture</a>.</p><p>In this post, I am going to talk about Feign Client for microservices communication and also share a <a href="https://github.com/RohitRanjanPandey/SpringBootFeignClient">sample code hosted on Git Hub</a> (Can checkout and follow the README. md file to run the code)</p><p><strong>What is Feign Client</strong></p><p>Feign Client is a declarative web service client developed by Netflix. It simplifies the process of making HTTP requests between microservices by providing a higher-level abstraction over the underlying HTTP client libraries. Thus it reduces the boilerplate code, and integrates well with other Spring Cloud components, making it a powerful choice for microservices communication in a Spring Boot application.</p><p><strong>Advantages of Feign Client :</strong></p><ul><li><strong>Declarative approach</strong>: Feign allows to define the API interactions in an interface using annotations, which makes it easy to understand and maintain your code. It eliminates the need for writing boilerplate code for making HTTP requests. It also offload the effort of writing extra test code for HTTP calls.</li><li><strong>Integration with service discovery</strong>: Feign integrates well with service discovery tools like Eureka or Consul (I will share a sample integration in coming posts). It can automatically resolve the service endpoints based on the service names and handle load balancing.</li><li><strong>Load balancing</strong>: Feign supports load balancing out of the box by integrating with client-side load balancing solutions such as Ribbon. It can distribute requests among multiple instances of the target service to improve performance and availability.</li><li><strong>Interceptors and fallbacks</strong>: Feign allows you to define interceptors to add cross-cutting concerns such as logging, authentication, or request/response manipulation. It also provides the ability to define fallback methods that are invoked when a request fails or times out (will share how to integrate this in code in next post).</li><li><strong>Integration with other Spring components</strong>: Feign seamlessly integrates with other Spring components such as Spring Cloud Config, Spring Cloud Hystrix, providing additional features such as centralized configuration management, distributed tracing, and circuit breaking.</li></ul><p><strong>When Can we use Feign Clients ?</strong></p><p>Feign client can be used in microservices architecture under scenarios such as :</p><ul><li>You have multiple microservices that need to communicate with each other over HTTP.</li><li>You want a more declarative and concise approach for making HTTP requests instead of manually dealing with HTTP client libraries.</li><li>You are using service discovery and want to leverage features like load balancing and automatic service endpoint resolution.</li><li>You want to integrate with other Spring Cloud components easily and take advantage of their capabilities.</li></ul><p><a href="https://github.com/RohitRanjanPandey/SpringBootFeignClient"><strong>Sample Code</strong></a></p><p>I have created a sample code of Feign Client that consists of two micro services. First service has exposed endpoints which can be called from browser clients. First service synchronously calls the second service using Feign Client and returns the responses to calling clients.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6155841b33ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Microservices communicates]]></title>
            <link>https://medium.com/@rohitranjan.pandey/how-microservices-communicates-a5762876a995?source=rss-35e9f65bae9------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5762876a995</guid>
            <dc:creator><![CDATA[Rohit Ranjan Pandey]]></dc:creator>
            <pubDate>Fri, 26 May 2023 15:42:46 GMT</pubDate>
            <atom:updated>2023-05-26T15:42:46.692Z</atom:updated>
            <content:encoded><![CDATA[<p>In my last post, I explained <a href="https://medium.com/@rohitranjan.pandey/microservices-architecture-5fbaccc41875">Microservices architecture</a>, its advantage &amp; disadvantages, design considerations, and a few use cases. In this post, I am going to explain how microservices communicate with each other to solve a business problem/offer functionality.</p><p>The foundation of how the architecture is going to be and whether you are making the right choice by moving to microservices architecture or not heavily depends on the understanding of how microservices communicate with each other. Since microservices says small, single-responsibility, context bounded, there is a need for the microservices to talk to each other in the solution to meet all business requirements.</p><p>Two types of communication :</p><ul><li>Synchronous blocking communication — When a microservice sends a request to another microservice and waits or blocks all the operations further until it receives a response from another microservice.</li><li>Asynchronous non-blocking communication — When a microservice sends some kind of data or events or requests to another microservice and does not wait for it to respond. It might process the response that another microservice has sent over time but it will not block any other operations.</li></ul><p>How to implement synchronous communication :</p><ul><li>REST API calls and waiting for API responses</li><li>RPC calls</li><li>gRPC calls</li></ul><p>How to implement asynchronous communication (widely used) :</p><ul><li>Using Message Queuing:- e.g. RabbitMQ which is a distributed message broker</li><li>Using Publish/Subscribe:- e.g. Kafka which is distributed publish-subscribe streaming platform</li></ul><p>Both of the above are used to implement event-driven communication, where one service communicates with another service by sending an event/message, and the other service acts/perform a task.</p><p>There is another approach we see sometimes in some of the solutions, which is the Shared database approach, where a common database is shared between two different microservices for read/write. This approach leads to data inconsistency and data leaks in many occurrences when all services start writing and reading together.</p><p>Let’s take an example of a basic ordering system where we have an order service that talks to the inventory service to get a count and then place an order. If we look at the synchronous communication approach then it will look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*Fp1NKLQ1SiZHF8uFlBosvA.png" /></figure><p>But if we have such a system that grows tomorrow with business needs, it will start becoming slower to return the response as the number of services increases. e.g. if tomorrow we have a requirement where it says, the system should send the email notification once the order is placed. The design will look something like this :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*oZQAmeW44dofLHRY5tNIsQ.png" /></figure><p>Also, it will miss the intent of having microservices. It will be similar to the monolithic system with code separated in different boxes.</p><p>Let’s take a look at the same ordering system with event-based communication and asynchronous design :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fZq5Im43UMXRGG2F4PzrEQ.png" /></figure><p>Here we have decoupled the systems using the Rabbit message queue. Order service publishes a message to the queue, which inventory service will listen to and respond to over the same queue with status which will be listened back by order service and place the order based on item stock.</p><p>But I will not go with this design. The reason is, Order service has an immediate dependency on the inventory service to get the stock to place an order. But for notification, there is no such dependency as sending an email is not necessary to complete the order. Instead, it is a later process, and the order service has no dependency on this downstream service as the order service is only responsible for placing the order and notifying downstream services (as it is an event-based design/arch). So, I will choose below design :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*GHjj76LKJbnEucvrnckmXQ.png" /></figure><p>Here it is a combination of synchronous and asynchronous communication.</p><p>So when we design a solution, it all depends on how can this design solve a business problem and scale if the solution and user grows tomorrow. For example, the shared database approach is less preferred but again can fit in some use cases. Such as, you have services that use some static configurations on the service startup and cache it for further usage. In this case, since no further read/write operation is required and it is a common static configuration, it will help to maintain the single source of truth.</p><p>For event-based architecture, we can use the Rabbit messaging queues or Kafka event streaming. Both options are useful for asynchronous, decoupled, microservices design. But they both have their own importance to fit into the business use cases and problems. Will talk about that in later posts.</p><p>Also, one notable thing for synchronous communication for microservices in SpringBoot is Feign client. It gives an abstraction over the REST template and makes integration easy. Will talk about this also in later posts. Stay tuned !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5762876a995" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MicroServices Architecture]]></title>
            <link>https://medium.com/@rohitranjan.pandey/microservices-architecture-5fbaccc41875?source=rss-35e9f65bae9------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fbaccc41875</guid>
            <category><![CDATA[microservices-application]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[microservice-architecture]]></category>
            <dc:creator><![CDATA[Rohit Ranjan Pandey]]></dc:creator>
            <pubDate>Tue, 17 Jan 2023 15:45:30 GMT</pubDate>
            <atom:updated>2023-01-17T15:45:43.184Z</atom:updated>
            <content:encoded><![CDATA[<h3>What are MicroServices?</h3><p>Microservices are a way of breaking large monolithic software projects into loosely coupled modules, which communicate with each other through simple Application Programming Interfaces (APIs).</p><p>“gather together those things that change for the same reason, and separate those things that change for different reasons.” Microservices architecture takes this same approach and extends it to the loosely coupled services which can be developed, deployed, and maintained independently. Each of these services is responsible for discrete tasks and can communicate with other services.</p><p><strong>Some of the advantages of a microservices architecture are :</strong></p><ol><li>Improved fault tolerance and isolation</li></ol><p>2. Scalability</p><p>3. Smaller and faster deployments</p><p>4. Language and technology agnostic</p><p>5. Faster time to market</p><p>6. Easily understandable</p><p><strong>Disadvantages of a microservices architecture :</strong></p><ol><li>Communication between services is complex</li></ol><p>2. More resources and infra need, higher on the cost side</p><p>3. Debugging problems can be harder</p><p>4. Global testing is difficult for the entire system in dev environments</p><p><strong>Considerations while designing a microservice</strong></p><ol><li>Single responsibility — To avoid bloated service development, one service is handling one functionality</li><li>Separate data store per microservice — Separate database for a microservice, avoids impact on all services in case of downtime</li><li>Asynchronous communication — For loose coupling, and do not see the need for immediate interaction among services as per the requirement</li><li>Fault tolerance — To avoid the cascade failure and return some response in case of any microservice goes down</li><li>API gateway — Can be used additionally but is optional, and more useful in complex systems and workflows.</li><li>Versioning micro services — Useful for consuming applications, futuristic</li><li>REST APIs for clients to interact with services</li><li>Containerization and separate deployment</li></ol><p>This is how the microservice architecture looks on a high level :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vl6ceimml3PUuiQdUpfNwA.png" /></figure><p>A few applications where Microservice architecture will be useful are :</p><p>Data processing apps</p><p>Streaming apps</p><p>Transactions</p><p>E-Commerce</p><p>Online booking and scheduling</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fbaccc41875" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mobile App Usage, Privacy, And Safety]]></title>
            <link>https://medium.com/@rohitranjan.pandey/mobile-app-usage-privacy-and-safety-966e3b26fa52?source=rss-35e9f65bae9------2</link>
            <guid isPermaLink="false">https://medium.com/p/966e3b26fa52</guid>
            <dc:creator><![CDATA[Rohit Ranjan Pandey]]></dc:creator>
            <pubDate>Fri, 18 Nov 2022 05:31:35 GMT</pubDate>
            <atom:updated>2022-11-18T05:31:35.710Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aQyswhyTlSsfkRDp9Sop7g.png" /></figure><p>Mobile apps are an essential part of our modern life. From connecting with friends and family to shopping online, sending and receiving money, and entertainment, everything has become so easy with mobile apps. From the moment we wake up, we start using a range of apps as they’ve become a permanent fixture in our routines.</p><p>With this, we are also facing a bigger problem of our privacy violations, which we are not always aware of. Let’s take the example of watching a video on a streaming app. Next time when we open the same app, we get video suggestions that definitely enrich our experience. Same with online shopping too. How does the app get to know, what we like or what we should watch? Definitely, it is based on our last usage. Which means the app tracks our usage patterns. The app knows, what video or kind of video we browsed or streamed. Similar things happen with online shopping too.</p><p>Sometimes we install a few apps for some good offers, coupons, or any kind of monetary benefit as well, without thinking too much about the source of the apps. It may be spam or a spy app which gets access to our camera, location, gallery, microphone, etc., and keep stealing our data from the phone even without our knowledge.</p><p>Now the question is, how do we protect our privacy? Can follow the below pointers to protect our privacy while using mobile apps :</p><ul><li>Download the apps only from official app stores (such as Google Play, and App Store).</li><li>Before downloading the app from App Stores, read the privacy policy to know how the app will use/share your data. One can find privacy policy details on the app store if checking the app’s details. If privacy policies are vague, look for an alternate app.</li><li>If you have installed the app and opened it, it may ask for the permissions such as Contacts, Location, Camera, Bluetooth, and Microphone on first-time usage or after an upgrade. Pay attention to these permissions and see if this is really required from the app you have installed or are using. Is it providing any such service which requires these permissions? If you get an answer of No, stop using it.</li><li>If you have existing apps, review permissions periodically ( go to settings -&gt; apps -&gt; permissions) to make sure the app doesn’t have access to anything it doesn’t need.</li><li>If you are not using a location-based app, always, try changing the permissions to location service for access only when the app is in use.</li><li>Try to avoid logging in with social media accounts for apps. It mostly asks you for the permissions to access basic profile data to allow login. Instead, use a unique username-password combination.</li><li>Keep your apps updated as soon as they are released. Outdated apps may increase the threat of being hacked.</li><li>If you are not using any app, delete it. Do not keep it unnecessary in your phone.</li></ul><p>I hope this information and pointers help you protect your privacy and the data on your phone</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=966e3b26fa52" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>