[HW] HW#03 2022

222 views
Skip to first unread message

宇萍

unread,
Nov 7, 2022, 3:28:00 AM11/7/22
to NCCU Networking@MIS
Q1. We have discussed the non-persistent HTTP and rdt FSMs, and please try to draw
two HTTP finite state machines (one for HTTP client and one for HTTP server).
Assume we only consider a simplified HTTP that only defines the following five
messages (i.e., events): GET, 200 OK, 301 Moved Permanently, 404 Not Found, and
500 Internal Server Error. I provide an example of HTTP FSMs as following that have
only two events (i.e., ‘GET’ and ‘200 OK’) for your reference. You may extend them to
make your own version of FSMs (that support all five messages), and you can add any
function in your FSMs (as long as the function name is easy for TA to understand).
Note that we assume the underlying TCP is reliable so no HTTP message will be lost
or corrupted. You may ignore regular HTTP headers (except for Location header in
301 response message).
client.jpg

server.jpg

Q2. Considering the two FSMs that you proposed in Q1, and add a timer for the HTTP
client FSM just in case the server may not respond (for example, the server has a bug
and the server may crash randomly). Draw your two improved FSMs with a timer.
Q2.jpg

余則緯

unread,
Nov 7, 2022, 9:43:21 AM11/7/22
to NCCU Networking@MIS
老師及助教好

請問左上角的虛線是甚麼意思?謝謝

Prof. Hsiao

unread,
Nov 7, 2022, 10:15:29 PM11/7/22
to NCCU Networking@MIS
進入初始狀態。

我們應該在第一次 FSM 解釋的時候有說明,
之後每一次解釋 FSM的時候都有順口說過。


wayne...@gmail.com 在 2022年11月7日 星期一晚上10:43:21 [UTC+8] 的信中寫道:
Reply all
Reply to author
Forward
0 new messages