[ 
https://issues.apache.org/jira/browse/YARN-8763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16633062#comment-16633062
 ] 

Eric Yang commented on YARN-8763:
---------------------------------

[~Zian Chen] Thank you for the patch, in TestNMWebServer test case, 
startNMWebAppServer start up the webserver then quickly shutdown the server in 
the same function.  The server.stop(); was comment out for proof of concept, 
but it will impact existing test cases.  My recommendation is to move 
testWebServerWithServlet to another file with similar setup code for testing 
web socket.  This can prevent other unit test case from failing.

In addition, I think it would be better if ContainerShellWebSocket's 
OnWebSocketMessage is rewired to write to IO streams, then change the 
connecting class with a mock version that does the upper case transformation 
for unit test.  The real implementation sends to a connecting class that writes 
to stdin/stdout IOStreamPair that is received from ContainerExecutor's 
execContainer class.

> Add WebSocket logic to the Node Manager web server to establish servlet
> -----------------------------------------------------------------------
>
>                 Key: YARN-8763
>                 URL: https://issues.apache.org/jira/browse/YARN-8763
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Zian Chen
>            Assignee: Zian Chen
>            Priority: Major
>              Labels: Docker
>         Attachments: YARN-8763-001.patch, YARN-8763.002.patch
>
>
> The reason we want to use WebSocket servlet to serve the backend instead of 
> establishing the connection through HTTP is that WebSocket solves a few 
> issues with HTTP which needed for our scenario,
>  # In HTTP, the request is always initiated by the client and the response is 
> processed by the server — making HTTP a unidirectional protocol, while web 
> socket provides the Bi-directional protocol which means either client/server 
> can send a message to the other party.
>  # Full-duplex communication — client and server can talk to each other 
> independently at the same time
>  # Single TCP connection — After upgrading the HTTP connection in the 
> beginning, client and server communicate over that same TCP connection 
> throughout the lifecycle of WebSocket connection



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to