Postgres and Kubernetes

When I decided to deploy all my services on Kubernetes, one of the critical components was the PostgreSQL database. Deploying databases on Kubernetes can be challenging due to their stateful nature. In this post, I’ll share how I deployed PostgreSQL on Kubernetes, the challenges I faced, and why I chose the CrunchyData PostgreSQL Operator. Understanding Stateful vs. Stateless Applications Before diving into deployment, it’s essential to understand the difference between stateful and stateless applications....

November 3, 2024 · 4 min · 740 words · Me

Astring- Front-end

I don’t have much experience in front-end development. When I started working on my web project, I decided to use React with TypeScript. It felt like a natural choice since it’s popular, has a huge ecosystem, and I wanted the type safety that TypeScript offers. Things were fine at first, but as I progressed, I realized there was more to front-end development than just writing code. Phase 1: Styling from Scratch Feeling confident, I thought, Why not write all the styles from scratch?...

November 2, 2024 · 6 min · 1181 words · Me

Astring- Infrastructure

When I first started building my application, everything ran smoothly on my laptop. Development was straightforward, and I had full control over my environment. However, as the project grew, I needed to deploy it so others could access and test it. This is where my journey into infrastructure began—a journey that took me through cloud services like Fly.io and Vercel, into managed Kubernetes on Linode, and eventually to an on-premise Kubernetes cluster....

October 18, 2024 · 5 min · 1011 words · Me

Astring- Storage

In my chat application, I need reliable object storage for handling media and file uploads. Beyond that, I also need storage for backups, logs, and other critical data. Choosing the right storage solution turned out to be one of the hardest decisions. Each option I explored had its strengths and weaknesses, and finding the right balance for both development and production was challenging. What is Object Storage? Object storage is a way of storing and managing data as discrete units called objects....

October 16, 2024 · 5 min · 1029 words · Me

Astring- Scaling the Application

Scaling a backend application can be challenging, especially when it’s built around WebSocket servers handling a large number of user sessions. On its own, a single WebSocket server can’t handle all the users, right? So, how do we scale the application effectively to meet increasing demands? When scaling horizontally, several issues arise. For instance, imagine that User A is connected to Server X, and User B is connected to Server Y....

October 14, 2024 · 4 min · 769 words · Me

Astring- Finding right Database

When I decided to build my chat application, I naturally started with PostgreSQL. It’s been my go-to database for a while - stable, feature-rich, and with a solid reputation for handling a variety of workloads. Here’s why I initially chose it: A Well-Established Ecosystem: PostgreSQL has been around for decades. The community support is fantastic, there’s extensive documentation, and a lot of extensions are available. Data Integrity: PostgreSQL’s ACID compliance means I can trust the consistency of my data....

October 10, 2024 · 4 min · 672 words · Me

Astring

It’s been a long time since I wrote a post. Here I am to share my experience with my chat application. So, let’s start with why I started learning programming. Why? Since I was young, I’ve always liked math and solving problems. When I was in 11th grade, my math teacher told me there were problems that require a computer to solve. I was so curious: what problems exactly? What do you mean by using a computer?...

October 4, 2024 · 4 min · 715 words · Me

Capture The Flag

Intro I was part of the CTF challenges admin team, where we worked on creating a CTF competition for our company. I didn’t have much experience with CTF before, so it was interesting to get involved in creating the challenges. There were four main topics I focused on when designing the problems. Btw, the problem titles are movies I recommend. Cryptography I like cryptography, and creating challenges for this CTF was really fun....

September 24, 2024 · 17 min · 3466 words · Me

Min heap implementation - C++

I have discussed the priority queue and implementations of queue, vector. Now, we are gonna discuss about min heap, also known as a priority queue. So, what’s this data structure? It has 4 main methods: size() - returns the number of the elements front() - return the current minimum element pop() - deletes the current minimum element push(element) - insert new element to the heap How do we implement this?...

October 13, 2023 · 4 min · 839 words · Me

Dynamic array implementation - C++

We discussed queue implementation in here and about vector here. Like a queue we will now discuss vector implementation in this post. A vector is a simple data structures similar to an array, but its size is dynamic. The main feature is that we can access any element in vector in O(1) time. Vector has three main methods size() - returns the number of elements. push(element) - inserts a new element at the back of the vector....

October 4, 2023 · 6 min · 1088 words · Me