Network Simulations using Python

I'm putting together some problems for students in ECE 578, Computer Networks. The simulator being used in the class is truly awful, one of these expensive commercial programs, dumbed down for academic use, but still loaded with the non-essential complexity typical of programs written for full-time professionals. It occurs to me that Python would be a much better tool for what we are doing. The objects in a network are easily modeled as Python objects, and students gain a much better understanding when they see what is inside the objects, rather than just picking them off a menu, and using them as black boxes. Take a look at http://ece.arizona.edu/~edatools/ece578/Ethernet/ The Python program is still in its early stages. Next step is to "refactor" it, making the main program a Network object, so we can run it in a loop. Comments and suggestions are welcome, especially for more clarity in the Python code. Python is still not used in any class at U of A, and this could be one of our shining examples to get it started.

On Wed, Sep 10, 2008 at 12:43 PM, David MacQuigg <macquigg@ece.arizona.edu> wrote:
I'm putting together some problems for students in ECE 578, Computer Networks. The simulator being used in the class is truly awful, one of these expensive commercial programs, dumbed down for academic use, but still loaded with the non-essential complexity typical of programs written for full-time professionals.
It occurs to me that Python would be a much better tool for what we are doing. The objects in a network are easily modeled as Python objects, and students gain a much better understanding when they see what is inside the objects, rather than just picking them off a menu, and using them as black boxes.
Take a look at http://ece.arizona.edu/~edatools/ece578/Ethernet/ The Python program is still in its early stages. Next step is to "refactor" it, making the main program a Network object, so we can run it in a loop.
Comments and suggestions are welcome, especially for more clarity in the Python code. Python is still not used in any class at U of A, and this could be one of our shining examples to get it started.
Sorry no comment about the code (yet...). Perhaps it would also be suitable to send this to the python tutor list. They tend to provide a lot more feedback of the type you're asking than one typically gets here. And I don't mean this in a negative way about discussions on this list; just pointing out the different focus... André
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig

On Wednesday September 10, 2008, David MacQuigg wrote:
It occurs to me that Python would be a much better tool for what we are doing. The objects in a network are easily modeled as Python objects, and students gain a much better understanding when they see what is inside the objects, rather than just picking them off a menu, and using them as black boxes.
Dave brings up this great idea about using Python to develop network simulators. A related issue is that it is possible to use Python in a networks course for manipulating the actual network components (e.g. sockets, pipes, clients, servers). It certainly is easier to do that type of programming with Python's libraries when compared to the traditional approach done in C. At first glance I see a couple of nice tutorials to this end in academia targeting upper-level networks courses: http://ilab.cs.byu.edu/python http://heather.cs.ucdavis.edu/~matloff/Python/PyNet.pdf In fact network programming in Python is so easy we've done units on it at the CS1 level. A discussion of our approach appeared at ITICSE 2007 in a paper titled "Introducing Network Programming into a CS1 Course." That paper can be downloaded at http://cs.slu.edu/~goldwasser/publications and more complete teaching materials from that unit appear in Chapter 14 of our text. With regard, Michael +----------------------------------------------- | Michael Goldwasser | Associate Professor | Dept. Mathematics and Computer Science | Saint Louis University | 220 North Grand Blvd. | St. Louis, MO 63103-2007 | | Office: Ritter Hall 6 | Email: goldwamh@slu.edu | URL: http://cs.slu.edu/~goldwasser | Phone: (314) 977-7039 | Fax: (314) 977-1452
participants (3)
-
Andre Roberge
-
David MacQuigg
-
Michael H. Goldwasser