Question

Helpp: Make an application Protocol Application log for text messages In this task, an application protocol for sending...

Helpp: Make an application Protocol

Application log for text messages

In this task, an application protocol for sending and retrieving text messages is to be developed.

A client (eg app on a smartphone) communicates with an application on a web server running a database of user data (username and password) and messages (user name of the sender, user name of the recipient, message text).

The client should be able to perform the following actions:

  • Register a new user
  • Log in as a user
  • Get new messages to logged in users from the server
  • Send message to another user
  • log out

The last three actions are only successful after a login. For this purpose, the server can remember certain information for each session ( stateful ), eg. For example, here is the username.

(a) Define messages for a log that can be used to perform the actions described above.

For each message that the client can send to the server, describe what is happening on the server side (for example, changing session information, changes to the database) and what kinds of messages can be returned in response.

(b) Provide an example communication (exchanged messages) between a client A, a client B, and the server for the following scenario (think of specific message parameters, if applicable):

  • Alice successfully registers as a new user via her smartphone (Client A).
  • Alice logs in successfully.
  • Alice gets her new messages (but there are none yet).
  • Alice sends a message to Bob.
  • Bob logs in on his notebook (Client B) successfully.
  • Bob retrieves his new messages (there is a message from Alice).
  • Bob logs out successfully.
  • Alice logs out successfully.
  • Alice recalls her new messages.

Use a table in the following format:

Client A Client B server
Message from Alice →→ Reaction of the server
←← Response of the server
Message from Bob →→ Reaction of the server
←← Response of the server

(c) How does your protocol need to be adjusted if the server is stateless , so it does not notice any information about sessions with different clients? Which client actions or messages from (a) are omitted in this case, with which messages does the specification change?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution


Client side actions:

1. Clicks on register as a new user option.

2. Submits registration form.

3. Logs- in with username and password.

4. Gets new messages after log-in from server.For example connect to some suggested users.

5. Sends message to another user.

6. Check on log-out option.

Server side actions:

1. Receives a request and sends registraction form to the client.

2. Registers as a new user.

3. Successfully log-in( OR) shows log-in error (if any).

4. Sends messages to client after log-in.

5. Receives message and transfer it to respective transmission layer.(or) show error in sending messages (if any).

6. Receives request for logginf out(or) show error(if any).

ANSWER (b)-

Here Client a is Alice and Client B is Bob.

CLIENT A CLIENT B SERVER

Message from Alice Receives message request from Client A

: Sends message to Client B

Message from Bob Receives message request from Client B

: Sends message to Client A

Recalls new messages Receives request for message recalling

: Shows log-in error

Enters log-in info Receives log-in request

: Logs-in successfully

Recalls new messages Receives message-recall request

: Shows all messages

Here in message recall phase,at first server shows log-in error because,in the above given scenario,both clients are logged out after sending messages to each other.So after logging-out,message recall is not possible without logging-in.

ANSWER (c)-

What is statelessness?

It means that every HTTP request happens in complete isolation.When the client makes an HTTP request,it includes all information necessary for the server to fulfill that request.The server never relies on information from previous requests.If that information was important,the client would have sent it again in this request.

When the browser receives the request,the following happens-

1.The web server creates and activates a child process to deal with the request ,or it may reactivate an existing process which is currently "sleeping",

2.The child process deals with the request and generates a response ,which the web server will send back to the client device.

3.The child process then dies ,or puts itself in a "sleep" condition.

A way on which server doesn't notice any information about session with different clients is REST API.

As per the REST (REpresentational State Transfer) architecture,the server doesn't store any state about the client session on server side.This restriction is called Statelessness. Each request from client to server must contain all of the information necessary to understand the request,and cannot take advantage of any stored context on the server.Session state is therefore kept entirely on the client.Client is responsible for storing and handling all application state related information on client side.

In case of Client A in the above given message example,the message recall phase is an example of statelessness.This phase is omitted here because he was logged-out and then tried to recall messages without logging-in.

Cliems Sce dctions Aetabns chcks on 'Rgisna peian thcdives & raypest and vds nesation Subomits Eion - d uesname And aond Ahoct Deiz Senadsessages esere Fo sdempte Conneot to some uggestt Rrcones metagu and tranger It Neyectild Raemestion Lay Sends mestage to anathes wer shoct troo n (Cicks gn Ricaives neguust for sEwerexoor at Ihal time)

PLEASE LIKE,IT WILL INCREASE MY SCORE
Hope this helped you! Please comment below still if you have any doubts on this answer.

Add a comment
Know the answer?
Add Answer to:
Helpp: Make an application Protocol Application log for text messages In this task, an application protocol for sending...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Overview UDP is a transport layer protocol that provides no reliability. This project aims to show...

    Overview UDP is a transport layer protocol that provides no reliability. This project aims to show how to implement extra features for the protocol in the application layer. The project will develop a new version of UDP protocol called UDPplus which provides reliable connection oriented between a client and a UDPplus sever. The UDPplus is implemented at application layer using UDP protocol only. Basic Scenario The UPDplus is a simple bank inquiry application where the client sends full name and...

  • A protocol defines which of the following? Format of a message. Order of messages sent and...

    A protocol defines which of the following? Format of a message. Order of messages sent and received. Actions taken on transmission and/or receipt of a message. All of the above are true. Which of the following is unguided physical media? Coaxial Cable Fiber-optic Cable Radio Waves Twisted-pair Copper Two fundamental approaches to moving data through a network of links and switches are circuit switching and __________ switching. data information packet signal The traditional telephone network is an example of a...

  • Project Description In this project, you will be developing a multithreaded Web server and a simple...

    Project Description In this project, you will be developing a multithreaded Web server and a simple web client. The Web server and Web client communicate using a text-based protocol called HTTP (Hypertext Transfer Protocol). Requirements for the Web server The server is able to handle multiple requests concurrently. This means the implementation is multithreaded. In the main thread, the server listens to a specified port, e.g., 8080. Upon receiving an HTTP request, the server sets up a TCP connection to...

  • I need help creating a netbeans application and linking database with steps Part II – Next,...

    I need help creating a netbeans application and linking database with steps Part II – Next, build a simple Servlet called LoginServlet in your “Bank” Project. Now make it so that when the Customer logs in, the LoginServlet will get called and will validate the user id and password. At first, just make sure that the Servlet gets called correctly. So just print a simple message like “LoginServlet Running…”. Remember, to call the LoginServlet, you will need to modify the...

  • First Drawing Assignment: Draw as complete a Class diagram as you can for the following possible...

    First Drawing Assignment: Draw as complete a Class diagram as you can for the following possible application. We wish to BUILD A SOCIAL NETWORKarrow-10x10.png for COMPUTERarrow-10x10.png Science graduate students. This network will allow any graduate student to login and logout. Once logged in, the student may do any of the following: 1. Join a group of fellow students 2. Leave a group of fellow students 3. Create a group which fellow students may join if they wish. Creating a group...

  • A computerized data-management system that supports several activities—such as order entry, result retrieval, documentation, and decision-support...

    A computerized data-management system that supports several activities—such as order entry, result retrieval, documentation, and decision-support across locations—would MOST accurately be considered a(n) ________. Group of answer choices clinical information system administrative information system hospital information system database To design a nursing system that will enhance usability by the nurse user requires that ________. Group of answer choices the design be developed with the patient in mind knowledge of systems from other industries be used the technology use of the...

  • Risk management in Information Security today Everyday information security professionals are bombarded with marketing messages around...

    Risk management in Information Security today Everyday information security professionals are bombarded with marketing messages around risk and threat management, fostering an environment in which objectives seem clear: manage risk, manage threat, stop attacks, identify attackers. These objectives aren't wrong, but they are fundamentally misleading.In this session we'll examine the state of the information security industry in order to understand how the current climate fails to address the true needs of the business. We'll use those lessons as a foundation...

  • MGMT SS STATS, an umbrella body that facilitates and serves various Social Security Organizations...

    MGMT SS STATS, an umbrella body that facilitates and serves various Social Security Organizations/Departments within the Caribbean territories, stood poised to meet the needs of its stakeholders by launching an online database, located at www.SSDCI.gov. The database will provide members and the public with access to the full set of services that can (also) be initiated face to face; and it will provide managed, private, secure access to a repository of public and/or personal information. For example, insured persons accumulate...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT