Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help writing the server side of this. Server Details Create a Jupyter Notebook called serveerynb. Your server will accept clients connections, parse the

I need help writing the server side of this.

image text in transcribed
Server Details Create a Jupyter Notebook called serveerynb. Your server will accept clients connections, parse the messages and forward messages to the user. Functionalities your server must provide: 1) Add User: adds a user identied by a phone number to the system. a) Protocol: Al phone | password b) Response: 0 |ok for success. 1 | Error description for an error. 2) Login: verify user credential or) Protocol: L| phone | password b) Response: 0 |ok if the phone/password are correct, 1|error, otherwise. This will help the server knowing which user is connected. Optionally you can implement a Logout, but is up to your implementation. 3) Send Message to User from User: send a message to a user. a) Protocol: M |phone_from |passwo rd | phone_to | message i) phone_from: the user sending the message ii) password: the password for the user sending the message iii) phone_to: the user to which the server will relay the message iv) message: up to 500 character message The server will validate phone_from and password before relying the message. b) Response.- i) D |ok -> message relayed successfully ii) 1 | no source user -> phone_from does not exist iii) 2 |wrong password iv) 3 | no target user -> the phone_to does not exist. v) 4 | user not online If the user is not connected, then the server will not rely the message. Messages are not stored in the server side. 4) Relay Message: this functionality is asynchronous with respect to the main thread. Check considerations. Protocol represents the message received by the server. Response the message the server responds to the client

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Programming questions

Question

=+ What measures would an institutionalist suggest government use?

Answered: 1 week ago