[Twisted-Python] OSI 7 layer network model

Sean Riley sean at ninjaneering.com
Wed Dec 5 16:06:13 EST 2001

I was wondering... how would you categorize the various pieces of Twisted in
the OSI 7 Layer Network Model?

The layers are:

1. Physical - hardware
2. Data Link - ethernet
3. Network - IP
4. Transport - protocols(TCP/IP, UDP)
5. Session
6. Presentation
7. Application

I'm not sure how "session" fits in with Twisted. Maybe Perspectives play the
role of sessions?

Presentation is defined as "where application data is packed/unpacked" -
which seems to include both banana and jelly?

I'd like to be able to draw a diagram showing where python fits into this
model and where the opportunities for optimization are found. By explicitly
showing that the implentations of these layers are actually in C or provided
by the OS, the perception that "python is slow" could be mitigated somewhat.

I think that keeping the "session" layer in python can be justified with the
added security of no buffer overflows, and the requirement for integration
with the python application layer. There also are few tight loops in this

The "Presentation" layer seems to be the most computationally expensive
software layer as it includes encryptions, packing and compression. It is
here that the pure python implentation is a little scary for most people -
and so it is here where the most education and explicit categorization of
components by implementation would be most useful.

"If it's not running programs or fusing atoms, it's just bending space."
Sean Riley
sean at ninjaneering.com

More information about the Twisted-Python mailing list