@abhirampai

Abhiram R Pai

Software Engineer @ BigBinary

Grab the Rss feed here

Dec 23, 2024

How to Use the SpeechSynthesis API for Text-to-Speech in the Browser

This blog explains how to use the Web Speech API's SpeechSynthesis property to implement a text-to-speech feature in a browser. It covers creating speech requests, selecting voices, speaking text, and handling events for enhanced interactivity.

Dec 4, 2024

How to execute code using ruby and docker

In this blog we discover how to create a multi-language code executor using Ruby and Docker. It covers pulling necessary images, installing the docker-api gem, and executing programs written in various languages, including Ruby, Python, C, C++, Java, C#, and Rust using docker container...

Dec 3, 2024

Apache Kafka from Scratch part-3

In this blog post, we dive into the workings of the Fetch API in Apache Kafka. We start by updating our existing ApiVersions request handler to include the Fetch API, which has an ApiKey of 1 and supports versions ranging from 0 to 17. We then outline the structure of a Fetch API request and response, demonstrating how to parse and handle these messages using JavaScript...

Nov 26, 2024

Apache Kafka from Scratch part-2

In this blog, we explore the implementation of the Describe Topics API in Kafka. We explain the structure for the request and response of Describe Topics and also look into the cluster metadata file that holds the data related to topics sent via the Describe Topics request...

Nov 22, 2024

Apache Kafka from Scratch part-1

In this blog, we dive into various Kafka APIs, focusing primarily on the ApiVersions, DescribeTopicPartitions, and Fetch APIs. We explain the structure and parsing method of an ApiVersions request, detailing how to handle and respond to such requests in a broker server...

Nov 18, 2024

Apache Kafka from Scratch part-0

This blog demystifies the fundamental components of Apache Kafka, focusing on the role and function of Kafka brokers in distributed event streaming systems. Through a JavaScript example, we'll look into creating a simple Kafka broker, understand the Kafka wire protocol, and send response messages to client requests...

Nov 13, 2024

Understanding Magnet links

In this final part of our BitTorrent series, we explore magnet links and their use in downloading files without needing a torrent file. Magnet links are formatted as URIs that include info hashes, tracker URLs, and peer addresses to facilitate file sharing...

Nov 11, 2024

BitTorrent from Scratch part-3

In the fourth installment of our BitTorrent series, we explore the process of downloading a file piece after completing a handshake with a peer. Key steps include waiting for a bitfield message, sending an interested message, awaiting an unchoke response, sending request message, and awaiting piece message...

Nov 07, 2024

BitTorrent from Scratch part-2

This blog post is the third part of the series on implementing BitTorrent from scratch.It discusses about establishing tcp connection with a peer and exchanging handshake messages and finally validating the handshake message using the info hash...

Nov 06, 2024

BitTorrent from Scratch part-1

This blog post is the second part of a series on implementing BitTorrent from scratch. It begins by explaining the structure and contents of a torrent file, also known as a metainfo file, which includes information such as the URL of the tracker and details about the files to be distributed...

Nov 04, 2024

BitTorrent from Scratch part-0

This is the first part of a series on implementing BitTorrent from scratch. In this post, we will be looking into bencoding which is how data is communicated between peers and trackers...

Oct 30, 2024

Create simple chat application using Github Models

In this blog we will be looking into how to use github models to create a simple chat application that can generate response based on the user inputs. Also how we can keep the chatHistory so that the context is within what the user had asked the model initially...

Oct 29, 2024

Using WebLlm to run AI models in browser

In this blog we will be looking into using WebLlm to run ai models in browser. WebLlm is a high performance in-browser LLM inference engine that brings language model inference directly onto web browsers with hardware acceleration...

Oct 27, 2024

Integrating Scalar with Stimulus

In the previous blog we saw how we can generate swagger.yaml and use it with swagger ui package. In this blog we will be looking into integrating the same swagger.yaml with Scalar. Scalar has a few features of which the one I liked the most is it shows how we can use the api with different clients like node.js, curl, etc...

Oct 25, 2024

Integrating Swagger with Rails and Stimulus

Swagger is an api documentation UI that helps users that don’t require access to the application directly but require access to only apis can use. In many of the frameworks for example fastapi has swagger capabilities in build in it...

June 19, 2024

Enhance your Rails app with class-level callbacks

In this blog, we will be looking into how we can enhance our rails app with class-level callbacks. Class-level callbacks are callbacks that are defined on the class level and not on the instance level. This is a great way to add callbacks to your rails app...

May 24, 2024

Going ballistic with Rails upgrade

The journey of moving from Rails 4.2 to Rails 5 was nothing short of a rollercoaster ride. This blog is all about what were the steps taken in order to achieve the changes faster and effectively so that you won’t have to face the challenges in future rails upgrades...

Mar 22, 2024

How ChatGPT helped me to build a Ruby gem

In my free time, I wanted to learn to create something that would benefit not only my productivity but also help in my work so I decided to create a gem that can list all deprecated methods in a ruby on rails application. And that is how I approached ChatGPT to create a gem...

Nov 3, 2023

Using Stimulus with Rails engine

During my exploration with ruby on rails, I stumbled upon rails engine and how we can use it to encapsulate or make a ruby on rails application modular by splitting some functionality into smaller manageable sizes. So to learn more about rails engine I started off with creating a mountable rails engine...