Home on @saswatamcode https://saswatamcode.tech/ Recent content in Home on @saswatamcode Hugo en-us Mon, 30 Aug 2021 05:35:07 +0000 Introducing mdox! https://saswatamcode.tech/posts/intro-to-mdox/ Mon, 30 Aug 2021 05:35:07 +0000 https://saswatamcode.tech/posts/intro-to-mdox/ <p> <figure class=""> <div class="img-container" style="--w: 719; --h: 438;"> <img loading="lazy" alt="The magic of mdox!" src="https://saswatamcode.tech/posts/intro-to-mdox/mdox_initial.gif" width="719" height="438"> </div> </figure> </p> <p>Writing software documentation is hard. Maintaining it is even more challenging in both closed and open-source worlds.</p> <p>You are probably familiar with the disdain that everyone has for writing, maintaining, and updating documentation, especially software engineers. But it is a necessary process that helps future teams, users and developers to use your project and contribute effectively. It might be a factor between life and death for a project or adoption game changer.</p> Build a chat app with GraphQL and TypeScript: Part 3 https://saswatamcode.tech/posts/build-a-chat-app-with-graphql-typescript-3/ Sun, 28 Feb 2021 05:37:07 +0000 https://saswatamcode.tech/posts/build-a-chat-app-with-graphql-typescript-3/ <p>Now that our server&rsquo;s ready let&rsquo;s start making our frontend! We won&rsquo;t be adding any CSS in this article, but you can definitely style it later on!</p> <h2 class="heading" id="initializing-your-frontend"> Initializing your frontend <a class="anchor" href="#initializing-your-frontend">#</a> </h2> <p>At the root of your project run the following. We&rsquo;ll be using TypeScript here as well.</p> <div class="highlight"><pre tabindex="0" style="color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>npx create-react-app chat-client --template typescript </span></span></code></pre></div><p>Once that&rsquo;s done, add the dependencies we&rsquo;ll need. We&rsquo;ll be using <a href="https://www.apollographql.com/docs/react/" target="_blank" rel="noopener noreferrer">Apollo Client</a> for this tutorial, so run,</p> Build a chat app with GraphQL and TypeScript: Part 2 https://saswatamcode.tech/posts/build-a-chat-app-with-graphql-typescript-2/ Sun, 28 Feb 2021 05:36:07 +0000 https://saswatamcode.tech/posts/build-a-chat-app-with-graphql-typescript-2/ <p>In this part, we&rsquo;ll be adding our subscription to our GraphQL API.</p> <h2 class="heading" id="what-are-subscriptions"> What are subscriptions? <a class="anchor" href="#what-are-subscriptions">#</a> </h2> <blockquote> <p>Subscriptions are long-lasting GraphQL read operations that can update their result whenever a particular server-side event occurs. Most commonly, updated results are pushed from the server to subscribing clients. For example, a chat application&rsquo;s server might use a subscription to push newly received messages to all clients in a particular chat room.</p> </blockquote> <p>That&rsquo;s according to the official <a href="https://www.apollographql.com/docs/apollo-server/data/subscriptions/" target="_blank" rel="noopener noreferrer">Apollo Server documentation</a> . Essentially, it allows us to update our clients based on any server-side events. And since subscription updates are usually pushed by the server, they usually use the <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API" target="_blank" rel="noopener noreferrer">WebSocket</a> protocol instead of HTTP.</p> Build a chat app with GraphQL and TypeScript: Part 1 https://saswatamcode.tech/posts/build-a-chat-app-with-graphql-typescript-1/ Sun, 28 Feb 2021 05:35:07 +0000 https://saswatamcode.tech/posts/build-a-chat-app-with-graphql-typescript-1/ <p>Hey there!</p> <p>If you&rsquo;re a little familiar with <a href="https://graphql.org/" target="_blank" rel="noopener noreferrer">GraphQL</a> , you&rsquo;ve probably heard of subscriptions and how useful they are in building real-time applications. In this series of blogs, we&rsquo;re going to build a simple chat application using Node.js and React with GraphQL. We&rsquo;ll use TypeScript throughout this series and will be following a code-first approach!</p> <h2 class="heading" id="installing-dependencies"> Installing dependencies <a class="anchor" href="#installing-dependencies">#</a> </h2> <p>We&rsquo;ll be using <a href="https://www.apollographql.com/docs/apollo-server/" target="_blank" rel="noopener noreferrer">Apollo Server</a> , <a href="https://expressjs.com/" target="_blank" rel="noopener noreferrer">Express</a> and <a href="https://typegraphql.com/docs/introduction.html" target="_blank" rel="noopener noreferrer">TypeGraphQL</a> for this server.</p> Build a gRPC microservice Go https://saswatamcode.tech/posts/build-a-grpc-microservice/ Sun, 06 Dec 2020 05:35:07 +0000 https://saswatamcode.tech/posts/build-a-grpc-microservice/ <p>Hey there!</p> <p>If you&rsquo;ve dealt with microservices before, you&rsquo;ve probably heard about <code>gRPC</code>.</p> <p>In this blog, we&rsquo;ll be exploring the awesome world of gRPC and write our very own microservice with it. We&rsquo;ll also delve into why gRPC might be better than our traditional REST architectures as well the caveats associated with it.</p> <h2 class="heading" id="what-is-grpc"> What is gRPC? <a class="anchor" href="#what-is-grpc">#</a> </h2> <blockquote> <p>gRPC is a modern open source high performance RPC framework that can run in any environment. It can efficiently connect services in and across data centers with pluggable support for load balancing, tracing, health checking and authentication. It is also applicable in last mile of distributed computing to connect devices, mobile applications and browsers to backend services.</p> Protocol Buffers in Go https://saswatamcode.tech/posts/protocol-buffers/ Wed, 05 Aug 2020 05:35:07 +0000 https://saswatamcode.tech/posts/protocol-buffers/ <p>Hey there! If you&rsquo;ve explored the world of microservices, you&rsquo;ve probably come across the term <code>gRPC</code>. It&rsquo;s a modern open source high performance Remote Procedure Call framework which can run in any environment. It&rsquo;s grown super popular recently with scalable distributed system architecture.</p> <p>A major reason why <code>gRPC</code> has grown so popular, is due to the fact that it uses a special mechanism for data serialisation which makes payloads smaller, faster and simpler. This helps us save those precious milliseconds. But what is this special mechanism?</p> Dynamic Pages in React Router https://saswatamcode.tech/posts/dynamic-routing/ Fri, 03 Jul 2020 05:35:07 +0000 https://saswatamcode.tech/posts/dynamic-routing/ <p>Hey there!</p> <p>If you&rsquo;ve ever visited a site with a bunch of different users with different content from each user such as a blogging site, social media or even <a href="http://dev.to" target="_blank" rel="noopener noreferrer">dev.to</a> , you&rsquo;ve probably noticed that each page of a particular user has a route along the lines of <code>/username</code> or if you visit a particular article of the user on the site then a route like <code>/username/article</code>. You&rsquo;ll even notice that while all the pages have similar structure, their content is different.</p> Write your first API with Deno https://saswatamcode.tech/posts/first-api-with-deno/ Tue, 19 May 2020 05:35:07 +0000 https://saswatamcode.tech/posts/first-api-with-deno/ <p>ICYMI, Deno v1.0 has been released!</p> <h2 class="heading" id="but-what-is-deno"> But what is Deno? <a class="anchor" href="#but-what-is-deno">#</a> </h2> <blockquote> <p>Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.</p> </blockquote> <p>That&rsquo;s according to the official <a href="https://deno.land/" target="_blank" rel="noopener noreferrer">website</a> .</p> <p>​Ryan Dahl the original creator of Node.js (the popular server-side JavaScript runtime) announced Deno at JSConf EU 2018 in <a href="https://youtu.be/M3BM9TB-8yA" target="_blank" rel="noopener noreferrer">his talk</a> &ldquo;10 Things I Regret About Node.js&rdquo;. Deno is pretty similar to Node. Except that it&rsquo;s improved in many ways, since it was created to be a better implementation of Node.js. It has a ton of great features like security by default, TypeScript by default, ES modules and Golang-like package management.</p> React Context+Hooks API => Ideal State Management https://saswatamcode.tech/posts/react-context-state/ Thu, 07 May 2020 05:35:07 +0000 https://saswatamcode.tech/posts/react-context-state/ <p>Hey there! React is pretty great with a ton of stuff. But sometimes we need global states, such as a UI theme or locale preferences. Now ordinarily, to pass states down to child components what we do is pass down props. But with global states, we have to pass down props several times down the component tree or the roots of a potato if you&rsquo;ve seen <a href="https://www.youtube.com/watch?v=K8MF3aDg-bM" target="_blank" rel="noopener noreferrer">Women Of React 2020</a> . This creates a cumbersome phenomenon known as &ldquo;prop drilling&rdquo;. This means that we are passing down the props from grandparent to parent to child and so on.</p> About Me! https://saswatamcode.tech/about/ Mon, 01 Jan 0001 00:00:00 +0000 https://saswatamcode.tech/about/ <p>Hi there! πŸ‘‹</p> <p>I&rsquo;m Saswata Mukherjee, a Senior Software Engineer at <a href="https://www.redhat.com/en" target="_blank" rel="noopener noreferrer">Red Hat</a> , currently based in London, UK. πŸ‡¬πŸ‡§</p> <p>As a member of the Multi-cluster Observability team (RHOBS) at Red Hat, I work on monitoring-related technologies for building and running distributed observabiliy platforms at a global scale on <a href="https://kubernetes.io/" target="_blank" rel="noopener noreferrer">Kubernetes</a> /<a href="https://www.redhat.com/en/technologies/cloud-computing/openshift" target="_blank" rel="noopener noreferrer">OpenShift</a> .</p> <p>Currently, I help maintain several open-source projects, including <a href="https://thanos.io/tip/thanos/maintainers.md/#core-maintainers-of-this-repository" target="_blank" rel="noopener noreferrer">Thanos</a> , a <a href="https://www.cncf.io/" target="_blank" rel="noopener noreferrer">CNCF</a> incubating project for distributed scalable monitoring, and <a href="https://perses.dev/" target="_blank" rel="noopener noreferrer">Perses</a> , an observability vizualization toolkit (I maintain Go-based <a href="https://github.com/perses/community-mixins" target="_blank" rel="noopener noreferrer">community-mixins</a> for the same). Also, I am a <a href="https://prometheus.io/governance/#team-members" target="_blank" rel="noopener noreferrer">Prometheus</a> team member and help maintain other tools &amp; libraries within the community, such as <a href="https://github.com/bwplotka/mdox" target="_blank" rel="noopener noreferrer">mdox</a> , <a href="https://github.com/prometheus-community/avalanche" target="_blank" rel="noopener noreferrer">avalanche</a> , <a href="https://github.com/efficientgo/e2e" target="_blank" rel="noopener noreferrer">efficientgo/e2e</a> , <a href="https://github.com/observatorium/api" target="_blank" rel="noopener noreferrer">observatorium</a> , and more!</p> Public Talks & Presentations https://saswatamcode.tech/talks/ Mon, 01 Jan 0001 00:00:00 +0000 https://saswatamcode.tech/talks/ <p>Some public talks that I performed or co-performed at various conferences/podcasts! πŸ€— (Will try to keep them as updated as I can)</p> <table> <thead> <tr> <th>Title</th> <th>Event</th> <th>Month</th> <th>Recording</th> </tr> </thead> <tbody> <tr> <td>No Jsonnet, No Problem! Prometheus in Perses, Powered by Go</td> <td>PromCon EU 2025 EU, Munich</td> <td>October, 2025</td> <td><a href="https://youtu.be/fImIhZYXpfM" target="_blank" rel="noopener noreferrer">Watch</a> </td> </tr> <tr> <td>Prometheus Deep Dive: What&rsquo;s New in v3.0 and Beyond</td> <td>KubeCon EU, London</td> <td>April, 2025</td> <td><a href="https://youtu.be/KS_rGWazTio" target="_blank" rel="noopener noreferrer">Watch</a> </td> </tr> <tr> <td>GitOps Guide to the Galaxy (Ep. 84): Multicluster Observability Red Hat</td> <td>Virtual</td> <td>October, 2024</td> <td><a href="https://www.youtube.com/live/fZh4ylyXkGM" target="_blank" rel="noopener noreferrer">Watch</a> </td> </tr> <tr> <td>Observability Metrics - Feat. Prometheus, Cortex, and Thanos (You Choose!, Ch. 4, Ep. 03)</td> <td>Virtual</td> <td>September, 2024</td> <td><a href="https://www.youtube.com/live/UXC9w3R9k8M" target="_blank" rel="noopener noreferrer">Watch</a> </td> </tr> <tr> <td>⚑️ Enlightning - Scaling Your Metrics with Thanos</td> <td>Virtual</td> <td>August, 2024</td> <td><a href="https://www.youtube.com/live/1qvcVJiVx7M" target="_blank" rel="noopener noreferrer">Watch</a> </td> </tr> <tr> <td>Cloud Native Club Project Spotlight: Thanos</td> <td>Virtual</td> <td>August, 2024</td> <td><a href="https://www.youtube.com/live/ELj8vQSLoGU" target="_blank" rel="noopener noreferrer">Watch</a> </td> </tr> <tr> <td>Thanos&rsquo; Infinity Stones and How You Can Operate Them!</td> <td>KubeCon EU, Paris</td> <td>March, 2024</td> <td><a href="https://youtu.be/e8kvX6mRlyE" target="_blank" rel="noopener noreferrer">Watch</a> </td> </tr> <tr> <td>Thanos Project Updates</td> <td>ThanosCon EU, KubeCon EU, Paris</td> <td>March, 2024</td> <td><a href="https://youtu.be/wmNtCj5D4_A" target="_blank" rel="noopener noreferrer">Watch</a> </td> </tr> <tr> <td>Metrics at Full Throttle: Intro and Deep Dive Into Thanos</td> <td>KubeCon EU, Amsterdam</td> <td>May, 2023</td> <td><a href="https://youtu.be/2GokLB5_VfY" target="_blank" rel="noopener noreferrer">Watch</a> </td> </tr> <tr> <td>Fleeting Metrics: Monitoring Short-lived or Serverless Jobs with Prometheus</td> <td>PrometheusDay EU, KubeCon EU Valencia</td> <td>May, 2022</td> <td><a href="https://youtu.be/rt4JiK995s8" target="_blank" rel="noopener noreferrer">Watch</a> </td> </tr> </tbody> </table>