You are on page 1of 10

By Tanaya Thakur

Shraddha Tamhane

Guide Name : Rupali Mam


INTRODUCTION
To attain a chat model which can perform many processes Or
tasks at same time with very low halting problem i.e. a Multi –
Threaded Client Server Chat Model.
MULTITHREADING

• A thread is sub process that runs a set of commands


individually of any other thread.
• So, every time a user connects to the server, a separate
thread is created for that user and communication from
server to client takes place along individual threads based
on socket objects created for the sake of identity of each
client.
• We will require two scripts to establish this chat room.
• One to keep the serving running, and another that every
client should run in order to connect to the server.
SOCKETS
• Sockets can be thought of as endpoints in a communication channel that is bi-
directional, and establishes communication between a server and one or more clients.
• Here, we set up a socket on each end and allow a client to interact with other clients via
the server.
• The socket on the server side associates itself with some hardware port on the server
side.
• Any client that has a socket associated with the same port can communicate with the
server socket.
WHY USE SOCKETS TO SEND DATA?
Internet-connected applications that need to operate in realtime greatly
benefit from the implementation of sockets in their networking code.
Some examples of apps that use socket programming are:
• Web pages that show live notifications (Facebook, Twitch, eBay)
• Multiplayer online games (League of Legends, WoW , Counter Strike)
• Chat apps (WhatsApp, WeChat, Slack)
• Realtime data dashboards (Robinhood , Coinbase )
• IoT devices (Nest, August Locks
SERVER

• A server is either a program, a computer, or a device that is devoted to managing


network resources.
• Servers can either be on the same device or computer or locally connected to other
devices.
• There are various types of servers such as database servers, network servers, print
servers, etc.
• Servers commonly make use of methods like socket.socket(), socket.bind(),
socket.listen(), etc to establish a connection and bind to the clients.
CLIENT

• A client is either a computer or software that receives information or services from the
server.
• In a client-server module, clients requests for services from servers.
• The best example is a web browser such as Google Chrome, Firefox, etc.
• These web browsers request web servers for the required web pages and services as directed
by the user.
• Other examples include online games, online chats, etc.
• ADVANTAGES:
• Centralized system with all data in a single place.
• The capacity of client and servers can be changed separately.
• Cost efficient requires less maintenance cost and Data recovery is possible.

• DISADVANTAGES:
• Client are prone to viruses if present in the server or uploaded into the server.
• Server are prone to Denial of service(DOS) attacks.
• Data Packets may be modified during transmission.
OUTPUT
THANK YOU

You might also like