Standard Networking Protocols using flask socketIO
- sliding window works for gobackN and selective repeat.
- output as expected for base test cases. logs attached.
- might need more time for complex manual test cases. - later
- all good. quick UI revamp and ready.
-
shift google font to online version to remove mixed content error
-
unipage deployment to heroku
- merge all three with namespaces and serve in
app.py
- test local, test heroku local and deploy
- merge all three with namespaces and serve in
-
heroku deployment - aim
-
good UX / UI to see the logs
- font done
- But design needs rework.
- need to make Packet # and ACK # separate
- show message : resending >>>> in sender logs
- prettify everything with bootstrap
- give option between custom message & Packet number on button
- refactor done
- medium now part of handshake
- make packets and acknowledgement
- automate packets as P1, P2, etc. & ack as A1, A2, etc.
- Middle layer needs to work out - drop ack & message
- start a clock each time a packet is sent
- threaded timer
- resend the packet if clock is over and acknowledgement is not received
- put proper long comments
- to be told about crashing in the medium logs
- refactoring
- index.html
- sorted by events
- documented
- formatted
- prettify from separate pretty.js
- app.py
- sorted by events
- documented
- formatted
- pretty.js
- prettier formatting is an acquired taste
- decide flow of Packet and Acknowledgement
- checkpoints
- put exact packet numbers in all messages
- Packet at sender backend
- packet at receiver backend
- ack at receiver backend == current pack
- ack at sender backend
- add packet crashing
- add acknowledgement crashing
- tested for continuous bursts. All good and async.
- add capability to timer so it can uniquely identify at state of packet when it is blasted off. Do retain the packet numbers.
this current approach won't workapproach now updated- the session handling is too weak right now - still weak
- need to implement sliding window in REAL - done
that might lead to the update of stop and wait, but that's another case- nope- failure log
- still weak, but handles cases well. success log
- Hi sender & Hi receiver - both connected
- Packet forms at senderFrontend
- SendPacketToMiddleLayerBackend
- SendPacketToMiddleLayerFrontend
- SendPacketToReceiverBackend
- sendPacketToReceiverFrontend
- sendAckToMiddleLayerBackend
- sendAckToMiddleLayerFrontend
- sendAckToSenderBackend
- sendAckToSenderFrontend
- git clone the repo
- navigate to directory
- make sure you have pipenv installed, or run
brew install pipenv
- type
pipenv shell
to activate the virtual environment - install requirements from requirements.txt or pip lock file
- run
python app.py
and navigate tolocalhost:5000
in browser - disable debugging in app.py if you don't want messages in terminal
- Protocols backend
- app.py
- stop-and-wait.py
- go-back-N.py
- Protocols frontend
- templates/index.html
- templates/stop-and-wait.html
- templates/go-back-N.html
- Static assets
- static/bootstrap-4.0.0-dist
- jquery
- socket.io
- experimental
- prettified part of protocols frontend js
- templates/prettified-stop-and-wait-js
- frontend
- bootstrap vs skeleton
- templates/skeleton.html
- gitignored
- skeleton lib
- heroku dev files
- node modules
- package-lock.json
- official references/
-
In dev mode (Active currently)
- Each protocol has different python file, namely
stop-and-wait.py
,go-back-N.py
- These files serve respective html files as well
- To run a protocol, it's py file needs to be run and the access point for each is
localhost:5000/
- Each protocol has different python file, namely
-
In Deployment Mode
- All python files for protocols can be merged with each having a different namespace.
- Now a single
app.py
is sufficient. - Similarly, modify html files to serve for different namespaces.
- Protocols will be then served at
localhost:5000/stop-and-wait
,localhost:5000/go-back-N
- Every protocol running on same socket but with different namespace.
- dope.
- colors for ack, message, and crashes
- put socketIO functions in separate file if possible
- try sliding - works well - amazing
- status in table format - scrollable