CONNECTIFY
- REAL TIME CHAT APPLICATION Presented by Kaung Si Thu and Rohit Sardar
12 December 2024
Agenda
01
02
03
Introduction
Problem
Statement
Data Structures
and Algorithms
04
05
System
Design
Conclusion
01
Introduction
Overview
Essential for social interactions, business
collaboration, and customer service in today's digital
world
Emails and forums are too slow and asynchronous
for modern needs
Ineffective for scenarios requiring immediate
responses, such as customer service or casual online
chats
02
Problem Statement
Problem Domain
Need for a real-time communication platform using
WebSockets
Traditional HTTP is request-response-based and
unsuitable for real-time applications like chat
systems
Objective
Develop a real-time chat application to bridge the
communication gap
Enable instant communication in virtual rooms
using:
Django
Django Channels
WebSocket
03
Data Structures and
Algorithms
Algorithms and Their Rationale
•
•
WebSocket communication enables real-time messaging between users.
When a user sends a message, the system pushes it to all users in the chat room via
the WebSocket connection.
•
WebSockets provide efficient bi-directional communication, ideal for real-time
messaging applications.
•
Upon receiving a message, the system broadcasts it to all connected users within the
chat room using Django Channels' group_send method.
•
This allows every user in the room to receive new messages without needing to
refresh the page.
API Integration
•
Django Channels extends Django to handle WebSockets and long-lived connections
and enables real-time functionality.
•
Used for setting up WebSocket connections and handling communication between
the frontend and backend.
•
Django ORM allows easy interaction with the database and manages user
authentication, chat rooms, and database queries for real-time communication
(message storage currently unused).
•
HTMX enhances the frontend by enabling AJAX-style behavior for dynamic content
updates, with potential for partial page updates for chat messages (not fully utilized
yet).
04
System Design
Use Case Diagram
Activity Diagram
Activity Diagram
Deployment Diagram
Component Diagram
05
Conclusion
Conclusion
•
Demonstrates the implementation of a basic real-time chat system using: Django
Channels, WebSockets, A simple frontend interface
•
Key functionality includes real-time messaging
Limitation
● No message persistence; messages are not stored in the
Further
Development
● Implement database storage for message persistence
database
● Conduct further testing and scaling to support larger user bases
and higher traffic