<?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 Shailaja Gummudhavelly on Medium]]></title>
        <description><![CDATA[Stories by Shailaja Gummudhavelly on Medium]]></description>
        <link>https://medium.com/@shailajat2281?source=rss-ccd2856aec98------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Y5dAJ0QEHn4t3akk</url>
            <title>Stories by Shailaja Gummudhavelly on Medium</title>
            <link>https://medium.com/@shailajat2281?source=rss-ccd2856aec98------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 04:36:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shailajat2281/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[Are You Trusting Client‑Side Timestamps in Distributed Systems]]></title>
            <link>https://medium.com/@shailajat2281/are-you-trusting-client-side-timestamps-in-distributed-systems-4e2e1888c196?source=rss-ccd2856aec98------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e2e1888c196</guid>
            <dc:creator><![CDATA[Shailaja Gummudhavelly]]></dc:creator>
            <pubDate>Tue, 03 Feb 2026 02:41:59 GMT</pubDate>
            <atom:updated>2026-02-03T02:41:59.893Z</atom:updated>
            <content:encoded><![CDATA[<p>When building distributed systems, it’s tempting and common to let each service or client generate its own timestamps — things like createdAt and updatedAt. After all, every machine has a clock. Why not use it?</p><p>But relying on timestamps generated on different machines is one of the easiest ways to introduce subtle, hard‑to‑debug problems in a distributed system. The clocks on those machines drift. They fall out of sync. They jump forward and backward. And once your data depends on these clocks, your system becomes unpredictable.</p><p>In this article, let’s break down <strong>why client‑side timestamps are risky</strong>, <strong>a simple example of the trouble they cause</strong>, and <strong>how using server‑side timestamps — usually at the database layer — avoids the pain</strong>.</p><h4>The Problem: Clocks Don’t Agree in Distributed Systems</h4><p>Every machine has its own clock, and those clocks don’t always match.</p><p>Even with NTP (Network Time Protocol, <em>an application-layer protocol that synchronizes the clocks of computers across a network</em>) running, two machines can still be off by:</p><ul><li>a few milliseconds</li><li>a few seconds</li><li>sometimes even minutes</li></ul><p>And in cloud environments or containerized systems, VM migrations or resource throttling can cause time drift much more frequently than you’d expect.</p><p>Now imagine a system where the backend, frontend, background jobs, and multiple microservices all generate their own timestamps for records.</p><p>Suddenly:</p><ul><li>A record created “later” might look older.</li><li>A record updated “earlier” might look newer.</li><li>Logs and metrics become hard to correlate.</li><li>Ordering based on timestamps becomes unreliable.</li></ul><p>This is how inconsistent clocks silently break workflows.</p><h3>Example</h3><p>Suppose you have two services:</p><ul><li><strong>Service A</strong> inserts a record with a timestamp from its own machine.</li><li><strong>Service B</strong> updates that same record later, using its own local clock.</li></ul><p>Let’s say Service B’s clock is <strong>30 seconds behind</strong>.</p><p>From the database’s perspective:</p><pre>createdAt = 2026-01-31T10:00:15Z  (created by Service A)<br>updatedAt = 2026-01-31T09:59:45Z  (updated by Service B)</pre><figure><img alt="Clock drift resulting in inconsistent data" src="https://cdn-images-1.medium.com/max/1024/1*1sUC7aJjeY9VGvFNtgvwhQ.png" /></figure><p>Now you have a record where the “updated” timestamp is <em>earlier</em> than the creation time. This breaks:</p><ul><li>sorting by time</li><li>syncing logic</li><li>change‑data‑capture streams</li><li>UI displays</li><li>cache invalidation logic</li></ul><p>All because the system trusted two clocks that didn’t agree.</p><h3>Fix: Use Server‑Side or Database‑Generated Timestamps</h3><p>The safest and simplest way to avoid this entire class of problems is:</p><h4>Let the server — or even better, the database — generate timestamps.</h4><p>Databases like PostgreSQL, MongoDB, MySQL, DynamoDB, and Firestore have built‑in mechanisms to set server‑time fields on insert and update.</p><p><strong>Example with MongoDB using database timestamp :</strong></p><pre>from pymongo import MongoClient<br><br>client = MongoClient(&quot;mongodb://localhost:27017&quot;)<br>orders = client.shop.orders<br><br># Upsert:<br># - createdAt set only on insert (server time)<br># - updatedAt set on every write (server time)<br>def upsert_order(order_id: str, patch: dict):<br>    orders.update_one(<br>        {&quot;_id&quot;: order_id},<br>        [<br>            {&quot;$set&quot;: {**patch, &quot;updatedAt&quot;: &quot;$$NOW&quot;}},   # server clock<br>            {&quot;$setOnInsert&quot;: {&quot;createdAt&quot;: &quot;$$NOW&quot;}}     # server clock<br>        ],<br>        upsert=True<br>    )<br><br># Update/touch with server time<br>def touch_order(order_id: str):<br>    orders.update_one({&quot;_id&quot;: order_id}, [{&quot;$set&quot;: {&quot;updatedAt&quot;: &quot;$$NOW&quot;}}])<br><br># Example usage<br>upsert_order(&quot;order-123&quot;, {&quot;status&quot;: &quot;PLACED&quot;})<br>touch_order(&quot;order-123&quot;)</pre><p>Some examples with other database products:</p><ul><li>PostgreSQL: DEFAULT NOW() and triggers</li><li>DynamoDB: updatedAt automatically set via ADD/SET with server time</li><li>MongoDB: operators like $currentDate</li><li>SQL triggers for creation/update timestamps</li></ul><p>Because the DB runs on a single authoritative clock for that dataset, you eliminate cross‑machine drift. This approach provides benefits :</p><h4>✓ All writes use the same clock :</h4><p>No matter which microservice, job, or client triggers the write, the timestamp source is consistent.</p><h4>✓ Ordering becomes trustworthy</h4><p>Sorting events or changes is now meaningful.</p><h4>✓ Easier debugging</h4><p>Logs, events, and data changes line up correctly.</p><h4>✓ Safer concurrency &amp; versioning</h4><p>Optimistic locking and CDC streams rely heavily on accurate timestamps.</p><h4>✓ No dependency on client machines</h4><p>Frontend, mobile apps, or edge devices may have wildly wrong clocks — this avoids relying on them entirely.</p><p>If multiple machines modify data, you almost always want server‑time, not client‑time. This approach will be helpful anytime your system depends on ordering, freshness, or synchronization like the below :</p><ul><li>Microservices writing to the same database</li><li>Event sourcing or change‑log pipelines</li><li>Distributed job schedulers</li><li>APIs accepting writes from external clients</li><li>Any system that sorts by timestamps</li><li>Multi‑region deployments where clocks differ even more</li></ul><h3>When Client‑Side Timestamps Are Still Okay in some scenarios</h3><p>Client-side timestamps are valuable for capturing user experience events, managing telemetry in offline-first applications, and ordering local user actions independent of system state. However, due to the potential unreliability of client clocks, they should be stored in a separate field, such as clientTimestamp, distinct from system-defined record timestamps.</p><h3>Conclusion</h3><p>Distributed systems are complex enough without the added chaos of inconsistent clocks; however, by establishing the database as your <strong>single source of time truth</strong>, you effectively eliminate common pitfalls like ordering bugs and conflicting data states. Relying on server or database timestamps ensures a unified chronological record that dramatically improves system consistency and simplifies debugging. This simple design choice saves countless hours of troubleshooting, ensuring that no matter how many machines are writing data, your system maintains a clear, reliable order of events.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e2e1888c196" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Microservices to Mindful Agents: A Practical Guide for Engineers Entering the AI Agent World]]></title>
            <link>https://medium.com/@shailajat2281/from-microservices-to-mindful-agents-a-practical-guide-for-engineers-entering-the-ai-agent-world-19bb301e8e8a?source=rss-ccd2856aec98------2</link>
            <guid isPermaLink="false">https://medium.com/p/19bb301e8e8a</guid>
            <dc:creator><![CDATA[Shailaja Gummudhavelly]]></dc:creator>
            <pubDate>Sat, 06 Sep 2025 20:31:41 GMT</pubDate>
            <atom:updated>2025-09-06T20:31:41.552Z</atom:updated>
            <content:encoded><![CDATA[<p>As AI agents begin to reshape how we build and interact with software, engineers with a background in microservices and cloud architecture are uniquely positioned to lead this transformation. But how do you go from designing stateless services to building intelligent, goal-driven agents—and do you really need to be an AI expert to start?</p><p><strong>The good news:</strong> Stepping into the world of AI agents doesn’t have to be overwhelming. Many of the skills you already have—like modular design, event-driven workflows, and API integration—translate beautifully into agentic systems.</p><p>This article offers practical tips for making the transition, explores how simplifying traditional microservice applications can unlock new possibilities, and compares a basic employee onboarding app with a smarter, context-aware onboarding agent.</p><p><strong>AI Terms in simple words</strong></p><blockquote><strong>Artificial Intelligence (AI):</strong> Computers doing things that usually need human thinking—like learning, solving problems, or understanding language.</blockquote><blockquote><strong>Machine Learning (ML): </strong>A way for computers to learn from data and get better at tasks without being told exactly what to do.</blockquote><blockquote><strong>Deep Learning:</strong> A type of machine learning that uses layers of “neurons” (like a brain) to understand complex things like images or speech.</blockquote><blockquote><strong>Large Language Model (LLM):</strong> A smart computer program trained on lots of text so it can understand and respond in human-like language (e.g., ChatGPT, Gemini). Think of it like a human being who can understand and respond in English(or any other language).</blockquote><blockquote><strong>Natural Language Processing (NLP)</strong> : Teaching computers to understand and work with human language—like answering questions or translating text.</blockquote><blockquote><strong>Prompt : </strong>The question or instruction you give to an AI model to get a response; like what you ask ChatGPT or Copilot.</blockquote><blockquote><strong>Inference : </strong>When an AI model uses what it has learned to give you an answer or prediction.</blockquote><blockquote><strong>Training Data : </strong>The examples (text, images, numbers) used to teach an AI model how to do its job.</blockquote><blockquote><strong>Fine-tuning : </strong>Giving an AI model extra training on specific topics so it becomes better at those things.</blockquote><blockquote><strong>Embeddings:</strong> A way to turn words or images into numbers so computers can understand and compare them.</blockquote><blockquote><strong>Vector Database :</strong> A special kind of database that stores embeddings (numbers that represent meaning) for fast searching and matching. Also enables semantic search.</blockquote><blockquote><strong>AI Agent :</strong>A smart helper that can understand tasks, make decisions, and use tools to get things done.</blockquote><blockquote><strong>Tool : </strong>A service or function the agent can use—like calling an API, running a database query, or sending an email.</blockquote><blockquote><strong>Instructions : </strong>Clear, plain-language commands or requests given to an AI agent during agent development to guide what it should do to process the user’s prompt —like “show me all returns from last week” or “summarize this report.” These can be very detailed to have the agent perform exactly as you need.</blockquote><blockquote><strong>Function : </strong>A specific action the agent can perform, like “search the web” or “fetch a file.” Functions are like buttons the agent can press to do something.</blockquote><blockquote><strong>Memory : </strong>What the agent remembers—either just for one task (short-term) or across many tasks (long-term).</blockquote><blockquote><strong>Planning : </strong>The agent figuring out what steps it needs to take to reach a goal.</blockquote><blockquote><strong>Reasoning :</strong> The agent thinking through a problem to find the best solution.</blockquote><blockquote><strong>Token : </strong>A small piece of text (like a word or part of a word) that the AI reads and understands. AI models process text in tokens, and the number of tokens affects cost and performance.</blockquote><blockquote><strong>Model Context Protocol (MCP) :</strong> A standard way to give AI agents access to tools, documents, databases, and other resources. It helps agents understand the context of a task and interact with external systems securely and efficiently in natural language.</blockquote><p>Enough of terminology now let’s walk through how a simple employee onboarding flow looks in the microservice world versus how it transforms in the agentic world.</p><h4>Traditional Microservice Architecture</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ASrMRQlcSPsO3_ZFtuNZUg.jpeg" /></figure><p>In a typical microservice setup:</p><ol><li>HR interacts with a UI built using React.js to enter new employee details.</li><li>The UI sends this data to an Employee Service, often a backend-for-frontend (BFF) layer.</li><li>The Employee Service makes an API call to a CRUD service.</li><li>The CRUD service processes the request and inserts the data into the Employee Database.</li></ol><p>This design is clean, modular, and follows well-established patterns. Each service has a clear responsibility, and the flow is <strong>deterministic</strong>. However, it requires:</p><ol><li><strong>Rigid UI forms</strong></li><li><strong>Strict API Contracts</strong></li><li><strong>Manual orchestration of services</strong></li></ol><h4>Agentic Architecture with LLMs</h4><p>Now, let’s look at the same flow through the lens of an Employee Onboarding Agent:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lpwa5bVbeR2V6nGooxRoNQ.jpeg" /></figure><ol><li>HR simply types a prompt in natural language, e.g., “Add John Doe to the engineering team starting next Monday.”</li><li>The Employee Onboarding Agent, powered by a Large Language Model (LLM), parses the prompt and extracts relevant entities. It can ask for additional information if key details are not provided in the prompt.</li><li>The agent uses tools like the MongoDB MCP server to interact with the database in natural language. No need to develop a CRUD service.</li><li>It autonomously creates the employee record and inserts it into the Employee DB.</li></ol><p>This approach is:</p><ol><li><strong>Conversational</strong>: No need for structured forms.</li><li><strong>Flexible</strong>: Handles variations in input naturally.</li><li><strong>Autonomous</strong>: The agent orchestrates the flow without explicit service calls.</li><li>Significantly <strong>faster time to market</strong> with smaller development cycle.</li><li>Easily <strong>extensible </strong>to trigger other agents/workflows with simple instructions.</li></ol><h4><strong>Why This Matters :</strong></h4><p>Agentic systems shift the paradigm from explicit orchestration to intent-driven automation. Instead of wiring services together, we define capabilities and let the agent decide how to fulfill the task.</p><p>For developers, this means:</p><ol><li>Designing tools instead of APIs.</li><li>Thinking in terms of capabilities and intents.</li><li>Embracing LLMs as reasoning engines, not just text processors.</li></ol><h4><strong>Real-World Use Cases:</strong></h4><ol><li><strong>Log Analysis agent :</strong> This agent to build dashboards and configure alerts from SentinelOne logs using plain English instructions, this will reduce time in creating these dashboards manually.</li><li><strong>DB assistant agent for Returns</strong>: Assistant for business and technical users which can understand business queries and translate to queries to run against the backend databases/collections to retrieve the information and summarize in natural language. This agent will be trained in the business domain to assist the end users.</li><li><strong>Deploy Assistance Agent</strong>: Agent will take instructions from the developer about the repo and environment to deploy to; once the merge request is approved it will trigger the Jenkins build. Example of a deterministic series of tasks can be achieved using a workflow agent. Below are a few sample prompts the agent could act on :</li></ol><blockquote>Build and deploy orderservice to dev environment from feature/f1 branch</blockquote><blockquote>Deploy the latest tag for orderservice to qa environment.</blockquote><blockquote>Once the merge request MR123 is approved, Build and deploy orderservice to dev environment from feature/f1 branch</blockquote><h4>Basic Tech Stack for AI Agent Development</h4><p>Here’s a beginner-friendly tech stack and set of frameworks to get started with AI agent development, especially if you&#39;re coming from a traditional microservices background:</p><p><strong>Programming Language :</strong></p><p><strong>Python</strong>, the most widely used language for AI and agentic systems due to its rich ecosystem, simplicity and language support.</p><p><strong>Core AI Frameworks :</strong></p><p><strong>LangChain or Haystack:</strong> Frameworks for building LLM-powered agents with tool integration, memory, and reasoning capabilities.</p><p><strong>Google ADK (Agent Development Kit):</strong> Ideal for building agents on Google Cloud with native support for Gemini models and toolchains.</p><p><strong>OpenAI Function Calling / Tools API</strong>: If using OpenAI models, this enables agents to interact with external tools.</p><p><strong>LLMs and Embeddings :</strong></p><p><strong>Gemini (Google) or OpenAI GPT-4: </strong>For reasoning and natural language understanding.</p><p><strong>Embedding Models:</strong> Gemini Embeddings, OpenAI Embeddings, Hugging Face Sentence Transformers</p><p><strong>Vector Database:</strong></p><p><strong>MongoDB Atlas with Vector Search:</strong> Great for integrating with existing document stores.</p><p><strong>Pinecone, Weaviate, or FAISS</strong>: Popular choices for storing and querying embeddings.</p><p><strong>Tooling &amp; Orchestration:</strong></p><p><strong>MCP Server:</strong> For tool-based interaction with databases and files.</p><p><strong>Docker: </strong>Containerize your agent and its tools for portability.</p><p><strong>FastAPI or Flask: </strong>Lightweight APIs to expose agent capabilities.</p><p><strong>UI &amp; Interaction</strong></p><p><strong>Streamlit or Gradio:</strong> For building quick frontends to interact with agents.</p><p><strong>React.js: </strong>If integrating into existing enterprise UIs.</p><p>If you’re interested in a deeper dive into the challenges and considerations of building agentic systems—such as prompt engineering, security, and data privacy—<em>stay tuned for a dedicated article where I’ll share practical lessons learned from my own journey.</em></p><h4>Conclusion: Step Boldly Into the Agentic Era</h4><p>The journey from microservices to agentic architectures is more than just a technical evolution—it’s a shift in how we think about building software. By leveraging your existing strengths in modular design and system integration, you’re already well-equipped to embrace this new paradigm.</p><p>AI agents empower us to create applications that are more conversational, adaptive, and user-centric. They reduce friction, automate intent-driven workflows, and open doors to innovation that were previously out of reach with traditional architectures.</p><p><strong>You don’t need to be an AI expert to get started.</strong> Begin by experimenting with small agentic workflows, integrating them with your current microservices, and learning from real-world feedback. The tools and frameworks are more accessible than ever, and the community is growing rapidly.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19bb301e8e8a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an Audit Log for MongoDB Collections Using Change Streams]]></title>
            <link>https://medium.com/@shailajat2281/building-an-audit-log-for-mongodb-collections-using-change-streams-d5fbe1184932?source=rss-ccd2856aec98------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5fbe1184932</guid>
            <dc:creator><![CDATA[Shailaja Gummudhavelly]]></dc:creator>
            <pubDate>Fri, 25 Jul 2025 22:57:24 GMT</pubDate>
            <atom:updated>2025-07-25T22:57:24.166Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In today’s data-driven applications, audit logging is not just a compliance checkbox — it’s a critical feature for debugging, security, and traceability. Whether you’re tracking who changed what and when, or building a forensic trail for sensitive operations, having a robust audit mechanism is essential.</p><p>If you’re using MongoDB, you’re in luck. MongoDB’s Change Streams provide a powerful, real-time way to listen to changes in your collections without polling or modifying your application logic. You can monitor changes at the <strong>database</strong> or <strong>collection</strong> level. The listener module can be implemented to support multiple collections with minimal changes.</p><p>In this post, we’ll walk through how to build a scalable, production-ready audit logging system using MongoDB Change Streams, complete with architecture, code examples, caveats, and best practices.</p><h3>Architecture Overview</h3><p>Here’s a high-level view of the system:</p><ul><li><strong>MongoDB Replica Set</strong>: Your primary data store.</li><li><strong>Change Stream Listener (Java Service):</strong> Subscribes to changes in collections.</li><li><strong>Audit Log Collection:</strong> Stores structured audit records.</li><li><strong>Optional Kafka/Queue</strong>: Buffers events for decoupling and scalability.</li><li><strong>Dashboard/Analytics:</strong> Visualizes audit data for compliance or debugging.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lfBd9FHpjDz2fv1EORcnoA.png" /><figcaption>High level flow</figcaption></figure><h3>Step-by-Step Implementation</h3><h3>1. Enable Change Streams</h3><p>Change Streams require a replica set or sharded cluster. If you’re using a standalone MongoDB instance, convert it to a replica set:</p><pre><br>rs.initiate()</pre><h3>2. Create a Java Listener</h3><p>Using the MongoDB Java Driver (JDK 21 compatible):</p><pre><br>MongoCollection&lt;Document&gt; source = db.getCollection(&quot;yourCollection&quot;);<br>MongoCollection&lt;Document&gt; audit = db.getCollection(&quot;auditLogs&quot;);<br><br>MongoChangeStreamCursor&lt;ChangeStreamDocument&lt;Document&gt;&gt; cursor =<br>    source.watch().fullDocument(FullDocument.UPDATE_LOOKUP).iterator();<br><br>while (cursor.hasNext()) {<br>    ChangeStreamDocument&lt;Document&gt; change = cursor.next();<br>    Document auditLog = new Document()<br>        .append(&quot;timestamp&quot;, change.getClusterTime().getValue())<br>        .append(&quot;operationType&quot;, change.getOperationType().getValue())<br>        .append(&quot;documentKey&quot;, change.getDocumentKey())<br>        .append(&quot;fullDocument&quot;, change.getFullDocument())<br>        .append(&quot;updateDescription&quot;, change.getUpdateDescription());<br><br>    audit.insertOne(auditLog);<br>}</pre><h3>3. Design the Audit Schema</h3><pre><br>{<br>  &quot;timestamp&quot;: ISODate(&quot;...&quot;),<br>  &quot;operationType&quot;: &quot;insert&quot;,<br>  &quot;collection&quot;: &quot;users&quot;,<br>  &quot;documentId&quot;: ObjectId(&quot;...&quot;),<br>  &quot;fullDocument&quot;: { ... },<br>  &quot;updateDescription&quot;: {<br>    &quot;updatedFields&quot;: { ... },<br>    &quot;removedFields&quot;: [ ... ]<br>  },<br>  &quot;user&quot;: {<br>    &quot;id&quot;: &quot;user123&quot;,<br>    &quot;name&quot;: &quot;John Johnson&quot;<br>  },<br>  &quot;source&quot;: {<br>    &quot;ip&quot;: &quot;192.168.1.10&quot;,<br>    &quot;app&quot;: &quot;employee-service&quot;<br>  }<br>}</pre><h3>Indexing for Performance</h3><p>Audit logs can grow rapidly, so indexing is crucial for query performance and scalability.</p><h3>Recommended Indexes</h3><ul><li>Time-based queries:</li></ul><pre>db.auditLogs.createIndex({ timestamp: -1 })</pre><ul><li>Document traceability:</li></ul><pre>db.auditLogs.createIndex({ documentId: 1 })</pre><ul><li>Operation filtering:</li></ul><pre>db.auditLogs.createIndex({ operationType: 1 })</pre><ul><li>Compound index for frequent queries:</li></ul><pre>db.auditLogs.createIndex({ collection: 1, documentId: 1, timestamp: -1 })</pre><ul><li>TTL Index (if logs are ephemeral):</li></ul><pre>db.auditLogs.createIndex({ timestamp: 1 }, { expireAfterSeconds: 2592000 }) // 30 days</pre><h3>Caveats &amp; Blind Spots</h3><h3>1. Oplog Retention</h3><p>Change Streams rely on the oplog, which has limited retention. If your listener is down too long, you may miss events.</p><p>✅ Mitigation: Use resume tokens and monitor oplog window size.</p><h3>2. No User Context</h3><p>MongoDB doesn’t track who made the change.</p><p>✅ Mitigation: Pass user metadata from your app into the audit log. Include metadata like userId, appName, and IP address in the audit schema.</p><h3>3. Partial Updates</h3><p>Update events only include changed fields by default.</p><p>✅ Mitigation: Use FullDocument.UPDATE_LOOKUP to fetch the full document. Be aware this adds read overhead and may impact performance.</p><h3>4. Performance Overhead</h3><p>Writing every change to an audit log can increase I/O and storage.</p><p>✅ Mitigation: Use batching, TTL indexes, and archive old audit logs.</p><h3>5. Schema Evolution and Flexibility</h3><p>If your source documents evolve, your audit schema may become inconsistent.</p><p>✅ Mitigation: Use a flexible schema (e.g., dynamic fields in fullDocument). Version your audit schema and include a schemaVersion field..</p><h3>📈 Monitoring &amp; Alerting</h3><p>To ensure reliability:</p><ul><li>Monitor listener uptime, lag (time between event and audit log write), and error rates (failed writes to audit collection).</li><li>Track MongoDB oplog window and audit collection growth.</li><li>Use Prometheus + Grafana or MongoDB Atlas Monitoring.</li><li>Set alerts for Listener downtime, Resume token errors, Disk usage thresholds</li></ul><h3>Best Practices</h3><ul><li>Use structured audit schemas with versioning.</li><li>Encrypt or mask sensitive fields.</li><li>Store resume tokens for fault tolerance.</li><li>Use Kafka or queues for decoupling and scalability.</li><li>Implement access controls on audit logs.</li></ul><h3>Bonus: Use Cases</h3><ul><li>Security: Detect unauthorized changes.</li><li>Compliance: Meet regulatory requirements (e.g., HIPAA, GDPR).</li><li>Debugging: Trace data corruption or unexpected behavior.</li><li>Analytics: Understand user behavior and system usage.</li></ul><h3>🏁 Conclusion</h3><p>MongoDB Change Streams offer a clean, scalable way to implement real-time audit logging without modifying your core application logic. With the right architecture, schema design, indexing strategy, and monitoring in place, you can build a robust audit trail that supports security, compliance, and operational excellence. You can build a generic audit module that can support multiple entities easily.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5fbe1184932" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Moving from Project to Product Models And how to effectively organize your knowledgebase]]></title>
            <link>https://medium.com/@shailajat2281/moving-from-project-to-product-models-and-how-to-effectively-organize-your-knowledgebase-96bf45320342?source=rss-ccd2856aec98------2</link>
            <guid isPermaLink="false">https://medium.com/p/96bf45320342</guid>
            <dc:creator><![CDATA[Shailaja Gummudhavelly]]></dc:creator>
            <pubDate>Tue, 13 May 2025 12:41:53 GMT</pubDate>
            <atom:updated>2025-05-13T12:41:53.428Z</atom:updated>
            <content:encoded><![CDATA[<p>In the ever-evolving world of technology, agility and customer focus are no longer optional — they’re essential. That’s why many IT organizations are shifting from a project-based model to a product-based model. This transformation isn’t just a trend; it’s a strategic move toward delivering continuous value and staying competitive in a digital-first world. In this blog I will also provide a way to organize the knowledgebase in Product centric approach, but also not loose sight of the Project that is in flight.</p><h3>From Projects to Products: What’s the Difference?</h3><p>Traditionally, IT teams have operated under a project model — a temporary endeavor with a defined scope, timeline, and budget. Once the project ends, the team disbands, and the product is handed off to operations.</p><p>In contrast, the product model treats software as a living entity. Teams are formed around products or services and remain intact throughout the product’s lifecycle. They continuously improve and adapt the product based on user feedback and evolving business needs.</p><h3>The Benefits of the Product Model</h3><h3>1. Customer-Centric Mindset</h3><p>Product teams are aligned around customer outcomes, not just deliverables. This fosters a deeper understanding of user needs and leads to solutions that truly add value.</p><h3>2. Continuous Innovation</h3><p>With a focus on long-term ownership, teams can iterate quickly, release updates frequently, and respond to market changes in real time.</p><h3>3. Greater Accountability</h3><p>Stable, cross-functional teams own the product end-to-end. This accountability improves quality, reduces technical debt, and enhances team morale.</p><h3>4. Operational Efficiency</h3><p>The product model minimizes handoffs and knowledge loss. Teams retain domain expertise, which leads to faster decision-making and fewer delays.</p><h3>5. Scalability and Agility</h3><p>The model aligns naturally with Agile and DevOps practices, making it easier to scale digital transformation efforts across the organization.</p><h3>Organizing an application knowledgebase</h3><p>Organizing an application knowledge base using the product model means structuring information around long-term products or services rather than short-term projects. This helps teams maintain, scale, and improve the product more effectively over time.</p><h3>Structure by Product</h3><p>Create top-level categories for each product or service your team supports. Under each product, organize content by functional areas, modules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/1*8HSk1zuU2YPDdRdwssEXag.png" /><figcaption>Oraganizing knowledgebase by Product/module</figcaption></figure><h4>Organizing knowledgebase by Project has its own benefits</h4><p>This structure allows teams to easily find specific information related to their ongoing projects, minimizing wasted time and effort searching for relevant details. Additionally, it facilitates knowledge sharing within project teams.</p><p>What if I tell you there is a hybrid approach which can bring the best of both worlds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gTNvNsHfXJzKm8BUK-BhAA.png" /><figcaption>Hybrid approach</figcaption></figure><p>In this hybrid approach, you can still maintain all the knowledgebase pertaining to each project, but instead of making a copy of the information in multiple places, add links to Product based documentation. This way you can easily find the information for that project in one place, and also do not have to duplicate the documentation. You can get the best of both worlds with this approach.</p><p>This approach has helped me in my current project to efficiently organize the knowledge base for the product that I was architecting.</p><h3>Practical pointers for effective documenation</h3><ol><li>Add clear titles and keywords, and use a tool that supports full-text search and filtering to find information quickly.</li><li>Maintain documentation for different product versions.</li><li>Include links to Source code repositories, CI/CD pipelines, Monitoring dashboards, Ticketing systems</li><li>Encourage continuous updates by assigning documentation ownership to product teams. Use checklists or reminders during sprint reviews to update docs. Make it part of the Definition of Done.</li></ol><h3>Conclusion</h3><p>Moving from a project to a product model is more than just a structural change — it’s a mindset shift that helps IT teams deliver better, faster, and more customer-focused solutions. By organizing your knowledge base around products, while still keeping project-specific information accessible through a hybrid approach, you can support both long-term product evolution and short-term project execution. This method not only reduces duplication but also improves collaboration, clarity, and efficiency across teams. With the right structure and habits in place, your documentation can become a powerful tool for scaling success.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96bf45320342" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enhancing Code Security with Snyk and Increase Adoption]]></title>
            <link>https://medium.com/@shailajat2281/enhancing-code-security-with-snyk-and-increase-adoption-69dde3cbca5e?source=rss-ccd2856aec98------2</link>
            <guid isPermaLink="false">https://medium.com/p/69dde3cbca5e</guid>
            <dc:creator><![CDATA[Shailaja Gummudhavelly]]></dc:creator>
            <pubDate>Tue, 06 May 2025 00:12:32 GMT</pubDate>
            <atom:updated>2025-05-06T00:12:32.754Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s fast-paced development environment, ensuring the security of your code is more important than ever. Snyk is a powerful tool that helps developers identify and fix security vulnerabilities in their code. This blog post will explore how Snyk can be integrated into your development workflow, from your Integrated Development Environment (IDE) to your Continuous Integration/Continuous Deployment (CICD) pipeline. Further more I will also share an approach for increasing adoption of this tool in the developer community in the enterprise.</p><h4>What is Snyk?</h4><p>Snyk is a developer-first security platform that provides static code analysis to detect vulnerabilities in your codebase. It supports a wide range of programming languages and integrates seamlessly with various development tools, making it an essential addition to any developer’s toolkit.</p><h4>Integrating Snyk with Your IDE</h4><p>One of the best ways to ensure your code is secure is to catch vulnerabilities early in the development process. Snyk makes this easy by integrating directly with popular IDEs such as Visual Studio Code, IntelliJ IDEA, and Eclipse. Here’s how you can get started:</p><ol><li><strong>Install the Snyk Plugin</strong>: Begin by installing the Snyk plugin for your IDE. This can usually be done through the IDE’s marketplace or plugin manager.</li><li><strong>Authenticate with Snyk</strong>: Once the plugin is installed, you’ll need to authenticate with your Snyk account. This allows the plugin to access your project’s data and provide real-time security analysis.</li><li><strong>Scan Your Code</strong>: With the plugin installed and authenticated, you can now scan your code for vulnerabilities. Snyk will highlight any issues directly within your IDE, allowing you to address them before they become a problem. When using the code fixes suggested by Snyk AI, developers should always do their due diligence to ensure the proposed changes align with their project’s specific requirements and coding standards. It’s important to thoroughly review and test the suggested fixes to confirm they do not introduce new issues or negatively impact the application’s functionality.</li></ol><p>By integrating Snyk into your IDE, you can ensure that security is a part of your development process from the very beginning.</p><h4>Integrating Snyk into Your CICD Pipeline</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YeG4J1g-2f7S48GP-B0a0Q.jpeg" /><figcaption>Integrate Snyk into your CICD pipeline</figcaption></figure><p>In addition to integrating Snyk with your IDE, you can also incorporate it into your CICD pipeline. This ensures that every code commit is automatically scanned for vulnerabilities, providing an additional layer of security. Here’s how you can do it:</p><ol><li><strong>Add Snyk to Your Pipeline</strong>: Most CICD platforms, such as Jenkins, GitHub Actions, and GitLab CI, support Snyk integration. You can add Snyk to your pipeline by including it in your build configuration file.</li><li><strong>Configure Snyk:</strong> Once added, you’ll need to configure Snyk to scan your code at the appropriate stages of your pipeline. This might include scanning your code after each commit or before deploying to production.</li><li><strong>Review and Fix Vulnerabilities</strong>: Snyk will automatically scan your code and provide a report of any vulnerabilities found. You can then review these reports and address any issues before they make it into your production environment.</li></ol><p>By integrating Snyk into your CICD pipeline, you can ensure that your code is continuously monitored for security vulnerabilities, giving you peace of mind that your applications are secure.</p><h4>Snyk’s Developer-First Approach</h4><p>Snyk’s developer-first approach means that it is designed to be easy to use and integrate into your existing workflows. Whether you’re working on open-source projects, container images, or Infrastructure as Code (IaC) configurations, Snyk provides comprehensive support to help you secure your code. The platform allows you to scan, prioritize, and fix security vulnerabilities efficiently, ensuring that security is not an afterthought but a fundamental part of your development process.</p><h4>Real-World Application and Benefits</h4><p>Using Snyk in your development process can significantly reduce the risk of security breaches. For example, Snyk can help identify common vulnerabilities such as hard-coded secrets, cross-site scripting (XSS), SQL injection, and path traversal issues. By addressing these vulnerabilities early, you can prevent potential exploits and maintain the integrity of your applications.</p><p>Moreover, Snyk’s integration with IDEs and CICD pipelines ensures that security checks are automated and consistent. This automation not only saves time but also ensures that security standards are maintained across all stages of development.</p><h4>Downsides of Inconsistent Adoption</h4><p>If not all teams in the company are using Snyk, several downsides could arise:</p><ul><li><strong>Inconsistent Security Practices</strong>: Different teams might use various methods or tools for security, leading to inconsistent security practices across the organization.</li><li><strong>Operational Inefficiencies</strong>: Without a unified tool, different teams might duplicate efforts in setting up and maintaining their own security tools, leading to inefficiencies and increased costs.</li><li><strong>Challenges in Meeting Compliance Requirements</strong>: Using a standardized tool like Snyk helps ensure that all teams meet compliance requirements consistently. Without it, some teams might fall short.</li><li><strong>Inconsistent Reporting</strong>: Generating comprehensive and consistent security reports becomes difficult if not all teams use Snyk, complicating audits and assessments.</li></ul><h4>Security Team’s Approach to Increase Adoption</h4><p>The security team at your company has taken a comprehensive approach to increase the adoption of Snyk within the developer community. Here are the key strategies and steps they have implemented:</p><ul><li><strong>Overview and Education</strong>: The team has provided a detailed overview of what Snyk is and its importance in securing code, dependencies, containers, and infrastructure as code. They emphasize Snyk’s developer-first approach, which integrates security into the development process seamlessly.</li><li><strong>Workshops and Training</strong>: Organized workshops, lunch-and-learns and training sessions educate developers on the use of Snyk, covering the differences between Snyk Open Source (SCA) and Snyk Code (SAST), and how to use these tools to identify and remediate vulnerabilities.</li><li><strong>Integration and Automation</strong>: Detailed guides have been provided on setting up Snyk in popular IDEs like Visual Studio Code and IntelliJ, including step-by-step instructions for installation, authentication, and configuration. The team has also focused on integrating Snyk into the CICD pipeline to ensure continuous security monitoring.</li><li><strong>Practical Application and Support</strong>: Practical examples of how Snyk can be used to scan GitLab repositories, create projects, and manage vulnerabilities help developers understand its real-world application. Contact information for the Application Security Team and links to additional resources ensure developers have access to ongoing support and updates.</li><li><strong>Continuous Improvement</strong>: The security team encourages feedback from developers to continuously improve the adoption process, addressing any challenges and making necessary adjustments to the training and integration processes.</li></ul><p>By implementing these strategies, the security team aims to make Snyk an integral part of the development process, ensuring that security is prioritized and seamlessly integrated into the workflow.</p><h4>Conclusion</h4><p>Snyk is a powerful tool that helps developers identify and fix security vulnerabilities in their code. By integrating Snyk with your IDE and CICD pipeline, you can ensure that security is a part of your development process from start to finish. Whether you’re a developer, engineering manager, or lead, incorporating Snyk into your workflow is a smart move that will help you build more secure applications.</p><p>If you haven’t tried Snyk yet, now is the perfect time to start. Secure your code, protect your users, and enhance your development process with Snyk.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69dde3cbca5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring GitLab Feature Flags: Enhancing Development Flexibility]]></title>
            <link>https://medium.com/@shailajat2281/exploring-gitlab-feature-flags-enhancing-development-flexibility-995dae2ff67a?source=rss-ccd2856aec98------2</link>
            <guid isPermaLink="false">https://medium.com/p/995dae2ff67a</guid>
            <category><![CDATA[feature-toggles]]></category>
            <category><![CDATA[gitlab-feature-flags]]></category>
            <category><![CDATA[feature-flags]]></category>
            <category><![CDATA[gitlab]]></category>
            <dc:creator><![CDATA[Shailaja Gummudhavelly]]></dc:creator>
            <pubDate>Mon, 21 Apr 2025 20:49:18 GMT</pubDate>
            <atom:updated>2025-04-21T20:49:18.487Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*IsUspjR81e1uUY9h1NryRw.jpeg" /><figcaption>source: <a href="https://8grams.medium.com/feature-flag-release-new-versions-of-software-safely-74f7e4043605">https://8grams.medium.com/feature-flag-release-new-versions-of-software-safely-74f7e4043605</a></figcaption></figure><p>In the fast-paced world of software development, the ability to manage and deploy features efficiently is crucial. Without feature flags, you are deploying an entirely new feature to all the users at once, and rolling back the code changes can be more time-consuming and disruptive that simply toggling a flag. Your code deploy will have to be very closely coordinated with your interfacing systems’ deploy timelines. Deployment of the code is tightly coupled with release of a feature to your users.</p><p>Feature Flags offer a powerful solution to these challenges, enabling teams to control the release of new features with precision and flexibility.</p><p><strong>What are Feature Flags?</strong></p><p>Feature Flags, also known as feature toggles, are a mechanism that allows developers to enable or disable features in a software application without deploying new code. This approach provides several benefits:</p><ul><li>Gradual Rollout: Features can be released to a subset of users before a full rollout, reducing risk and gathering feedback.</li><li>A/B Testing: Different versions of a feature can be tested simultaneously to determine which performs better.</li><li>Quick Reversal: If a feature causes issues, it can be turned off instantly on the feature flag management system, without touching/redeploying the application. The application at runtime makes an API call which will reflect the updated status of the flag.</li></ul><p><strong>Popular Feature Flag tools</strong></p><p>Feature flag tools, such as <strong>Unleash</strong>, <strong>Flagsmith</strong>, <strong>LaunchDarkly</strong>, and <strong>Statsig</strong> offer different approaches to managing feature flags and controlled rollouts. Some tools, like Unleash and Flagsmith, focus on open-source flexibility and enterprise-level security, offer free and paid options, allowing users to choose a self-hosted or cloud-based solution.<br>while others like LaunchDarkly and Statsig provide more advanced features, analytics and support but may come with higher costs.</p><p>In this blog, I’m going to focus on leveraging feature flags capability provided by GitLab.</p><p><strong>Implementing Feature Flags in GitLab</strong></p><p>GitLab integrates Feature Flags seamlessly into its CI/CD pipeline, making it easy for teams to manage feature releases. Gitlab offers an api compatible with Unleash for feature flags. Here’s how you can get started:</p><p><strong>Step-by-Step Guide</strong></p><ol><li>Define Feature Flags:</li></ol><ul><li>Navigate to your project in GitLab.</li><li>Go to Deploy &gt; Feature Flags.</li><li>Click on New feature flag.</li><li>Enter a name and description for the flag.</li><li>Configure strategies for the flag, such as enabling it for all users or a percentage of users.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*9GPb0Z5zE_Bo6lPLeo0KiQ.png" /></figure><p>Enter the details and hit “Create feature flag”</p><p>2. Provide Config details to the developers</p><p>Click Configure in the feature flags list page. This will opena pop-up window with the configuration details to be used in the application for retrieving the flags.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*nFNOH2SNaI4tBX_GRwRbxA.png" /></figure><p>Make a note of the API URL, and Instance Id.</p><p>3. Use Feature Flags in Code:</p><ul><li>Install the Unleash client library in your application. Add the following dependency</li></ul><pre>  &lt;dependency&gt;<br>   &lt;groupId&gt;io.getunleash&lt;/groupId&gt;<br>   &lt;artifactId&gt;unleash-client-java&lt;/artifactId&gt;<br>   &lt;version&gt;9.2.1&lt;/version&gt;<br>  &lt;/dependency&gt;</pre><ul><li>Use the following code snippet to check the status of a feature flag</li></ul><pre>import io.getunleash.Unleash;<br>import io.getunleash.UnleashConfig;<br>import io.getunleash.DefaultUnleash;<br><br>public class FeatureFlagExample {<br>    public static void main(String[] args) {<br>        UnleashConfig config = UnleashConfig.builder()<br>            .appName(&quot;&lt;ENV_FROM_RUNTIME&gt;&quot;)//pass the environment name here, ex dev.<br>            .instanceId(&quot;instance_1&quot;) //Instance Id<br>            .unleashAPI(&quot;https://gitlab.example.com/api/v4/feature_flags&quot;)//API URL<br>            .build();<br><br>        Unleash unleash = new DefaultUnleash(config);<br><br>        if (unleash.isEnabled(&quot;new_feature&quot;)) {<br>            // Code for the new feature<br>            System.out.println(&quot;New feature is enabled&quot;);<br>        } else {<br>            // Code for the old feature<br>            System.out.println(&quot;New feature is disabled&quot;);<br>        }<br>    }<br>}</pre><p>4. Monitor and Adjust:</p><ul><li>Use GitLab’s monitoring tools to track the performance and usage of feature flags.</li><li>Adjust the flags based on real-time data and user feedback.</li></ul><p>5. Things to remember :</p><ul><li>Code will encounter an error if you pass an invalid instance name, api url.</li><li>If you provide an incorrect flag name/flag with that name does not exist, the flag value will come as disabled/false.</li></ul><p><strong>Access Control</strong></p><p>One of the key features of GitLab Feature Flags is that they are accessible to anyone who has access to the repository. This means that team members with repository access can create, modify, and manage feature flags, ensuring collaborative control over feature deployment.</p><ul><li>Security and Permissions: Access to feature flags is governed by the same permissions as the repository, ensuring that only authorized users can make changes.</li></ul><p><strong>Limitations of GitLab Feature Flags</strong></p><p>While GitLab Feature Flags offer significant advantages, there are some limitations to be aware of:</p><ul><li><strong>Maximum Number of Feature Flags</strong>: GitLab imposes limits on the number of feature flags per project. For GitLab.com, the limits are 50 for Free tier, 150 for Premium, and 200 for Ultimate.</li><li><strong>Open Access</strong>: Anyone with MAINTAINER access to the git repo can add, edit the feature flags. That means any developer who can commit code to the repo can change flags. You can mitigate this by dedicating a repo for maintaining your feature flags and provide access to the Release manager/Technical product manager to manage the flags.</li><li><strong>No view access: </strong>There is no view-only access to the feature flags defined. To mitigate this you can write a quick program to display all the feature flags using the apis provided for quick visibility.</li><li><strong>Only supports on/off</strong>: Only supports two values for feature flags (on/off), not suitable for a requirement where you are looking for a list of values to be returned or a Json(LaunchDarkly).</li></ul><p><strong>Benefits of Using GitLab Feature Flags over others</strong></p><ul><li><strong>No additional cost</strong>: No additional cost if you already have an enterprise license to GitLab, its included. Contrast to paid tools like LaunchDarkly.</li><li><strong>No provisioning</strong>: Don’t have to manage a config server/unleash instance.</li><li><strong>Quick setup: </strong>You are ready to go once you have a repo in GitLab.</li></ul><p>Further read : <a href="https://docs.gitlab.com/operations/feature_flags/">https://docs.gitlab.com/operations/feature_flags/</a></p><p>Comparison of other tools in the market : <a href="https://www.infracloud.io/blogs/feature-flag-tools-to-confidently-release-new-features/">https://www.infracloud.io/blogs/feature-flag-tools-to-confidently-release-new-features/</a></p><p><strong>Conclusion</strong></p><p>GitLab Feature Flags are a valuable tool for modern software development, offering flexibility, control, and insights that enhance the development process, already available with no additional cost with GitLab enterprise license. By integrating feature flags into your workflow, you can improve deployment strategies, optimize user experiences, and make data-driven decisions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=995dae2ff67a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>