I like what I see in diesel.  I am not a python programmer, so please
excuse me if the question has an obvious answer.  I am looking to use
this framework to implement a text based protocol.  As with most
protocols, I need to parse incoming data, dispatch it to some handler
function, maintain sessions, use heartbeats, etc., etc.  Java
frameworks such as netty, mina and grizzly use a pattern called
"intercepting filters," (java servlets make light use of them as
well).  The idea is simple, I break up various parts of my logic into
different pieces of code, then connect them to each other in a chain.

For example, the "log in/out" filter tests to see if the connection is
valid, and nothing else.  All subsequent filter never have to worry
about authentication, if a request gets to them, then the login/out
filter approved.

As far as I can tell, Python's generators should make such a pattern
far easier than Java, but I don't see relevant examples in the
literature (python or diesel).

Any pointers?

Thanks

Reply via email to