Load data from file This option will ask the user for a fully qualified path and will load a JSON file containing the information for users and pending messages

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Need help to implement networking in python

Server.py

Load data from file This option will ask the user for a fully qualified path and will load a JSON file containing the information for users and pending messages. The format of the JSON file will be defined based on your implementation and it will the same used to save the data into file (menu option #4).

Functionalities the server must provide: 1)

User Sign Up: adds a user identified by a phone number to the system.

a) Protocol: USR|username|password|display_name

b) Response: 0|OK for success. 1| for an error.

c) The server should validate that the username does not exist

2) User Sign In: verify user credentials

a) Protocol: LOG|username|password

b) Response: i) 0|OK → the credentials are correct.

ii) 1|Invalid Credentials iii) 2|Already Logged In → in case that the user is logged in from another client.

c) This will help the server knowing which user is connected.

d) The server should keep a list of connected clients, which should remove the client/user upon client

disconnection/termination.

------------------------------------------------------

client.py

The client app will run on a standalone application called client.py. Once the application starts, it will display a main menu with the following options:

1. Connect to server

2. Login

3. Send Message

1. Connect to server Will request the server IP and port and will connect the client to the server. Please review the consideration section below for more details about the client/server communications.

3.2. Login Will ask for the user credentials and will authenticate the user to the connected server.

3.3. Send Message Will ask the user for the target username and the message and will send it to the server.

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education