Skip to content

Objective: Build a scalable chat system that can handle high traffic and ensure messages are efficiently delivered between users. Core Components: WebSockets, Redis, Apache Kafka, and Node.js.

Notifications You must be signed in to change notification settings

arnab1656/ScalableChatArc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scalable Chat Application

Overview

This project is a scalable chat application built using Node.js, Socket.IO, Redis, Kafka and Postgres . The architecture is designed to handle high loads by scaling horizontally, ensuring that messages are efficiently distributed among clients while maintaining a responsive and real-time communication experience.

Features

  • Real-time messaging using WebSockets (Socket.IO)
  • Horizontal scalability with Redis for pub/sub messaging
  • Kafka integration for reliable message delivery
  • Structured and maintainable code following DRY and Orthogonal principles

🏗️ Development & Contribution

This is for you if you want to contribute to the Scalable_chat project or run it locally.

Please read the contribution guidelines before contributing.

Requirements

  • Node
  • yarn
  • Docker

Setup

As per Example .env.example file Look for the setup and create it .env or .env.developement in root, but you can choose to create your own .env.local files instead.

In a terminal, start the dependencies (Postgres, Kafka ,Zookeeper and Redis) as Docker containers:

docker compose -f docker-compose.yaml up

Then:

Go to the Server workspace of the apps

RUN:

Push the most recent Prisma schema to the database

npx run prisma db push

Database migrations

If you make changes to the Prisma schema, you need to run the following command to create a migration:

pnpm run prisma migrate dev

You can also open Prisma Studio to see the database interface and edit data directly:

pnpm run prisma studio
yarn install

# Run build to build everything once
yarn build


# Start the dev server
yarn run dev

You can now open the ChatApp at http://localhost:4040, API on port 8080.

About

Objective: Build a scalable chat system that can handle high traffic and ensure messages are efficiently delivered between users. Core Components: WebSockets, Redis, Apache Kafka, and Node.js.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published