You need to design the application to meet the requirements

You are developing an ASP.NET MVC application that provides instant messaging capabilities to customers.
You have the following requirements:
Messages must be able to be sent and received simultaneously.
Latency and unnecessary header data must be eliminated.
The application must comply with HTML5 standards.You need to design the application to meet the requirements.
What should you do?

You are developing an ASP.NET MVC application that provides instant messaging capabilities to customers.
You have the following requirements:
Messages must be able to be sent and received simultaneously.
Latency and unnecessary header data must be eliminated.
The application must comply with HTML5 standards.You need to design the application to meet the requirements.
What should you do?

A.
Configure polling from the browser.

B.
Implement long-running HTTP requests.

C.
Implement WebSockets protocol on the client and the server.

D.
Instantiate a MessageChannel object on the client.



Leave a Reply 7

Your email address will not be published. Required fields are marked *


ahmad

ahmad

wrong
answer is C

ahmad

ahmad

sorry… D
is correct

Mkool

Mkool

Correct answer is C.
The question is a bit ambiguous that is why we can think D is correct, but MessageChannel serves a different purpose.
– MessageChannel: The Channel Messaging API allows two separate running scripts in different browsing contexts attached to the same document (e.g., two IFrames, or the main document and an IFrame, or two documents via SharedWorker) to communicate directly.
– WebSockets is an advanced technology that makes it possible to open an interactive communication session between the user’s browser and a server. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply

The Question states that the ASP.Net app provides IM communications, so the server interaction is required. ergo we need to use WebSockets.