[Twisted-Python] Teach Me Twisted?
![](https://secure.gravatar.com/avatar/2c69ccb9eb83c7ef2ba155a850df68a9.jpg?s=120&d=mm&r=g)
Hi, Twisters: I've been lurking on the list a while, and wondered how much of a Twisted presence there is going to be at PyCon in March. The reason I ask is because of a conversation that I had with Glyph recently. We both agreed that it would be a good thing to have more learning materials available for Twisted. One possible solution would be to run an open space session at PyCon in which experienced users explain to a novice how to get started in the Twisted environment. Of course the idea is that I should be the novice (I really don't know that much about Twisted) and that you should be the people explaining to me and (hopefully) leading me through to the Nirvana of twisted enlightenment. Naturally this idea won't work unless experienced Twisted users get behind it. I would like your suggestions for preliminary reading, though I don't want around arrive at the conference knowing too much. Is this a good idea? regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/
![](https://secure.gravatar.com/avatar/328b8df71b224a8e8858e157b1fd8dbe.jpg?s=120&d=mm&r=g)
I think this is a wonderful idea. But, be sure to remember those not fortunate enough to attend PyCon (me :)), and keep transcripts or video, or some medium. But the big question is, what will they teach you? You should have an idea of some type of network application you want to build. Obviously it should be something that would touch on a lot of different facets of twisted. Or maybe it would be better to have smaller "example" applications that show off neat things like conch. However it pans out, I definitely think this is a great idea... jw On Jan 23, 2008 7:04 AM, Steve Holden <steve@holdenweb.com> wrote:
Hi, Twisters:
I've been lurking on the list a while, and wondered how much of a Twisted presence there is going to be at PyCon in March.
The reason I ask is because of a conversation that I had with Glyph recently. We both agreed that it would be a good thing to have more learning materials available for Twisted.
One possible solution would be to run an open space session at PyCon in which experienced users explain to a novice how to get started in the Twisted environment.
Of course the idea is that I should be the novice (I really don't know that much about Twisted) and that you should be the people explaining to me and (hopefully) leading me through to the Nirvana of twisted enlightenment.
Naturally this idea won't work unless experienced Twisted users get behind it. I would like your suggestions for preliminary reading, though I don't want around arrive at the conference knowing too much.
Is this a good idea?
regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
-- "Government does not solve problems; it subsidizes them." Ronald Reagan
![](https://secure.gravatar.com/avatar/2c69ccb9eb83c7ef2ba155a850df68a9.jpg?s=120&d=mm&r=g)
Jaime Wyant wrote:
I think this is a wonderful idea. But, be sure to remember those not fortunate enough to attend PyCon (me :)), and keep transcripts or video, or some medium.
I plan to make my own audio recording, so at the very least I can transcribe it with Naturally Speaking and edit it for the web. I am not currently sure what plans PyCon has for supporting Open Space sessions. Sorry you won't be able to make it to PyCon :-( Aside: do you know that financial support may be available? See http://pyfound.blogspot.com/2008/01/pycon-2008-financial-aid-available.html
But the big question is, what will they teach you? You should have an idea of some type of network application you want to build. Obviously it should be something that would touch on a lot of different facets of twisted. Or maybe it would be better to have smaller "example" applications that show off neat things like conch.
That's a good point. Maybe there should be two sessions? One could focus on "Twisted principles" and establish the absolute must-know information that forms the basis of everyone's knowledge (except, currently, mine). The seconds could then focus on how to build a small application (an echo server? With Twisted that would surely be way too easy: I need community help in choosing a task of about the right scope).
However it pans out, I definitely think this is a great idea...
Thanks very much for your feedback. Without feedback this idea won't get anywhere. I'd like it to offer some sort of return to the Twisted community for the enthusiastic support its members gave to PyCon back in the early days. Note to everyone: I also need clues for reading *before* the session. Assume I have very little time ... regards Steve
jw
On Jan 23, 2008 7:04 AM, Steve Holden <steve@holdenweb.com <mailto:steve@holdenweb.com>> wrote:
Hi, Twisters:
I've been lurking on the list a while, and wondered how much of a Twisted presence there is going to be at PyCon in March.
The reason I ask is because of a conversation that I had with Glyph recently. We both agreed that it would be a good thing to have more learning materials available for Twisted.
One possible solution would be to run an open space session at PyCon in which experienced users explain to a novice how to get started in the Twisted environment.
Of course the idea is that I should be the novice (I really don't know that much about Twisted) and that you should be the people explaining to me and (hopefully) leading me through to the Nirvana of twisted enlightenment.
Naturally this idea won't work unless experienced Twisted users get behind it. I would like your suggestions for preliminary reading, though I don't want around arrive at the conference knowing too much.
Is this a good idea?
regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ <http://www.holdenweb.com/>
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com <mailto:Twisted-Python@twistedmatrix.com> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
-- "Government does not solve problems; it subsidizes them." Ronald Reagan
------------------------------------------------------------------------
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
-- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/
![](https://secure.gravatar.com/avatar/bbb5ff7c0c7b32d54e5d67c05810c69f.jpg?s=120&d=mm&r=g)
Steve Holden schrieb: > Jaime Wyant wrote: >> I think this is a wonderful idea. But, be sure to remember those not >> fortunate enough to attend PyCon (me :)), and keep transcripts or >> video, or some medium. >> > I plan to make my own audio recording, so at the very least I can > transcribe it with Naturally Speaking and edit it for the web. I am not > currently sure what plans PyCon has for supporting Open Space sessions. > Sorry you won't be able to make it to PyCon :-( > > Aside: do you know that financial support may be available? See > > http://pyfound.blogspot.com/2008/01/pycon-2008-financial-aid-available.html > >> But the big question is, what will they teach you? You should have an >> idea of some type of network application you want to build. Obviously >> it should be something that would touch on a lot of different facets >> of twisted. Or maybe it would be better to have smaller "example" >> applications that show off neat things like conch. >> > That's a good point. Maybe there should be two sessions? One could focus > on "Twisted principles" and establish the absolute must-know information > that forms the basis of everyone's knowledge (except, currently, mine). > > The seconds could then focus on how to build a small application (an > echo server? With Twisted that would surely be way too easy: I need > community help in choosing a task of about the right scope). How about a twisted version of the (in)famous "webapp in 20 minutes"? Maybe not a stupid blog but some kind of remote management by using conch? That would be: - simple persistence (maybe just files but async) - business logic (conch connecting to a host and doing stuff) - presentation layer with web or web2 I did something like that a few month back and had a hard time gathering all the pieces of information ;) I still can't believe I have to parse raw response strings to handle POST ;)) cheers Paul
![](https://secure.gravatar.com/avatar/d7d18c48316f83f1bf99618559ed2444.jpg?s=120&d=mm&r=g)
Hi there, Thanks Steve Holden for organizing this, it's a great idea. I've been using twisted for about a year now and I love it, I'm a classic case of (as you can read all over the web): "after the learning curve, you'll love Twisted" so, yeah, more learning materials would be great for those starting out. Some nice topics might include: a) Start off simple with a "twisted.web2" example (everyone "gets" http) b) then plug that into a simple sqlite database using "twisted.enterprise" c) then plug some simple usage of "twisted.pb" that does something in the backend, that gets presented to the pages being served by " twisted.web2" d) Show how using "twistd" is really convient (i.e. "twistd -ny server.tac" and "twistd -y server.tac", with some logging capability, etc) Anyways, these are just random ideas, but they are things that took me a while to get going with, but now I find them so clean and useful. Regarding Paul's post: I did something like that a few month back and had a hard time gathering
all the pieces of information ;) I still can't believe I have to parse raw response strings to handle POST ;))
You don't! This is all you need: from twisted.web2 import resource, http, http_headers CTYPE = {'content-type': http_headers.MimeType('text', 'html', {'charset':'utf-8'})} GetSomePostData(resource.PostableResource): def render(self, request): postval0 = request.args.get("val0", [""])[0] postval1 = request.args.get("val1", [""])[0] html = myhtmltemplates.comment_form_response(postval0, postval1) #for example return http.Response(200, CTYPE, html) - Alex
cheers Paul
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
![](https://secure.gravatar.com/avatar/d6328babd9f9a98ecc905e1ccac2495e.jpg?s=120&d=mm&r=g)
On 12:10 am, clemesha@gmail.com wrote:
Thanks Steve Holden for organizing this, it's a great idea.
Indeed!
Some nice topics might include:
Thanks for the suggestions. Do you have any others? :-) I hate to rain on your parade here, but I think maybe my explanation of why I don't like these suggestions will spark discussion of more different ones...
a) Start off simple with a "twisted.web2" example (everyone "gets" http)
I think that this is actually something we should avoid in a tutorial. The web situation in Twisted is complicated (http://twistedmatrix.com/trac/wiki/WebDevelopmentWithTwisted). web2 in particular is suffering from an extreme lack of maintenance and still has never "officially" been released; work is just starting to get underway to unify t.web2 and nevow into t.web and reduce the confusion, but this is all still in progress and who knows when, how, or even if it will be completed. If you get a group of experienced Twisted folks together to talk about writing web applications, you're more likely to spark a debate than an educational session. Even if all these problems were fixed, and there were a really good, well-supported, universally understood web server for Twisted, the benefits of Twisted's programming model are not immediately obvious to the bread and butter of the web programming world. Learning how to use some combination of Twisted tools to generate a web page will always be at least a little bit harder than writing the sort of glorified CGI script that most web frameworks require these days - unless you're using something like Athena, which might be too much complexity to address in a single tutorial session. (And while Athena is more polished and "one right way" than the lower-level HTTP stuff, there is still a painful dearth of documentation, not to mention the fact that you need to write JavaScript as well as Python.) Twisted really shines best when you're writing a client as well as a server. Chat is the quintessential application where Twisted makes the most sense - and the lack of a well-documented chat server is much less of a problem than the lack of a well-documented web server, since you can easily define a wire protocol and wacky semantics for your purpose- built tutorial chat application.
b) then plug that into a simple sqlite database using "twisted.enterprise"
twisted.enterprise is similarly a scary and inconsistent area, and requires understanding the interaction of the DB thread and the reactor thread. (And at least part of this section would have to be dedicated to "and never, ever touch anything in this package aside from adbapi".)
d) Show how using "twistd" is really convient (i.e. "twistd -ny server.tac" and "twistd -y server.tac", with some logging capability, etc)
This, however, is a great suggestion. Twisted plugins should be part of this discussion.
![](https://secure.gravatar.com/avatar/d7d18c48316f83f1bf99618559ed2444.jpg?s=120&d=mm&r=g)
On Jan 23, 2008 4:36 PM, <glyph@divmod.com> wrote:
On 12:10 am, clemesha@gmail.com wrote:
Thanks Steve Holden for organizing this, it's a great idea.
Indeed!
Some nice topics might include:
Thanks for the suggestions. Do you have any others? :-)
For my usage of twisted, these are important to me and I am the most familiar with them. (See below) I hate to
rain on your parade here, but I think maybe my explanation of why I don't like these suggestions will spark discussion of more different ones...
a) Start off simple with a "twisted.web2" example (everyone "gets" http)
I think that this is actually something we should avoid in a tutorial. The web situation in Twisted is complicated (http://twistedmatrix.com/trac/wiki/WebDevelopmentWithTwisted). web2 in particular is suffering from an extreme lack of maintenance and still has never "officially" been released; work is just starting to get underway to unify t.web2 and nevow into t.web and reduce the confusion, but this is all still in progress and who knows when, how, or even if it will be completed.
Oh yes, I know, I know. While learning twisted I read *most* (that's alot ;) of posts to the twisted-web mailing list. So I am very familiar with the state. That said, oh how I wish you guys could make twisted.web2 the one and only!!! It would be good for beginners and others alike. Note however: I can only barely imagine how hard that might be, so I am *definitely not* complaining ... Twisted is excellent, thanks very much for it. If you get a group of experienced Twisted folks
together to talk about writing web applications, you're more likely to spark a debate than an educational session.
Even if all these problems were fixed, and there were a really good, well-supported, universally understood web server for Twisted, the benefits of Twisted's programming model are not immediately obvious to the bread and butter of the web programming world. Learning how to use some combination of Twisted tools to generate a web page will always be at least a little bit harder than writing the sort of glorified CGI script that most web frameworks require these days - unless you're using something like Athena, which might be too much complexity to address in a single tutorial session. (And while Athena is more polished and "one right way" than the lower-level HTTP stuff, there is still a painful dearth of documentation, not to mention the fact that you need to write JavaScript as well as Python.)
"Comet" (aka what Athena does) is one of my main uses of twisted, see http://svn.xantus.org/shortbus/trunk/cometd-twisted/ is some code that I use. That and other ajax-y stuff. Not much templating html, etc.
Twisted really shines best when you're writing a client as well as a server. Chat is the quintessential application where Twisted makes the most sense - and the lack of a well-documented chat server is much less of a problem than the lack of a well-documented web server, since you can easily define a wire protocol and wacky semantics for your purpose- built tutorial chat application.
Yes!
b) then plug that into a simple sqlite database using "twisted.enterprise"
twisted.enterprise is similarly a scary and inconsistent area, and requires understanding the interaction of the DB thread and the reactor thread. (And at least part of this section would have to be dedicated to "and never, ever touch anything in this package aside from adbapi".)
I only ever use 'adbapi'. The reason I say this is database functionality is pretty darn important for all non-trivial programs, so programmers need/want to know about this functionality, wouldn't you agree?
d) Show how using "twistd" is really convient (i.e. "twistd -ny server.tac" and "twistd -y server.tac", with some logging capability, etc)
This, however, is a great suggestion. Twisted plugins should be part of this discussion.
Yes. Thanks again for Twisted! -Alex
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
![](https://secure.gravatar.com/avatar/2c69ccb9eb83c7ef2ba155a850df68a9.jpg?s=120&d=mm&r=g)
alex clemesha wrote:
On Jan 23, 2008 4:36 PM, <glyph@divmod.com <mailto:glyph@divmod.com>> wrote:
On 12:10 am, clemesha@gmail.com <mailto:clemesha@gmail.com> wrote: >Thanks Steve Holden for organizing this, it's a great idea.
Indeed! >Some nice topics might include:
Thanks for the suggestions. Do you have any others? :-)
For my usage of twisted, these are important to me and I am the most familiar with them. (See below)
I hate to rain on your parade here, but I think maybe my explanation of why I don't like these suggestions will spark discussion of more different ones... >a) Start off simple with a " twisted.web2" example (everyone "gets" >http)
I think that this is actually something we should avoid in a tutorial. The web situation in Twisted is complicated ( http://twistedmatrix.com/trac/wiki/WebDevelopmentWithTwisted). web2 in particular is suffering from an extreme lack of maintenance and still has never "officially" been released; work is just starting to get underway to unify t.web2 and nevow into t.web and reduce the confusion, but this is all still in progress and who knows when, how, or even if it will be completed.
Oh yes, I know, I know. While learning twisted I read *most* (that's alot ;) of posts to the twisted-web mailing list. So I am very familiar with the state.
Interesting. I am also subscribed to the twisted.web newsgroup, and I have been surprised about how quiet it's been. I imagine that if twisted.web2 would be very good for things like high-volume web services work. It has relatively few advantages in the heavily-competitive templating world, and I have to say that my early experience with Nevow, while it caused me to admire the system, wasn't entirely trouble-free. I think that may be partly because it wasn't being used in a Twisted environment (I'm thinking of the python.org reorganization that was put in effect after PyCon 2006).
That said, oh how I wish you guys could make twisted.web2 the one and only!!! It would be good for beginners and others alike.
Note however: I can only barely imagine how hard that might be, so I am *definitely not* complaining ... Twisted is excellent, thanks very much for it.
Hear, hear. And the world needs to know, hence my enthusiasm for "Teach Me Twisted".
If you get a group of experienced Twisted folks together to talk about writing web applications, you're more likely to spark a debate than an educational session.
Twisted's not alone there, of course.
Even if all these problems were fixed, and there were a really good, well-supported, universally understood web server for Twisted, the benefits of Twisted's programming model are not immediately obvious to the bread and butter of the web programming world. Learning how to use some combination of Twisted tools to generate a web page will always be at least a little bit harder than writing the sort of glorified CGI script that most web frameworks require these days - unless you're using something like Athena, which might be too much complexity to address in a single tutorial session. (And while Athena is more polished and "one right way" than the lower-level HTTP stuff, there is still a painful dearth of documentation, not to mention the fact that you need to write JavaScript as well as Python.)
Right. I think a Django replacement might be a bit ambitious for an open space session or two ... Maybe once I get into Twisted I'll be able to lend a hand with t.w2 development (or maybe not).
"Comet" (aka what Athena does) is one of my main uses of twisted, see
http://svn.xantus.org/shortbus/trunk/cometd-twisted/
is some code that I use.
That and other ajax-y stuff. Not much templating html, etc.
That's neat, but definitely a few too many layers for a starter project.
Twisted really shines best when you're writing a client as well as a server. Chat is the quintessential application where Twisted makes the most sense - and the lack of a well-documented chat server is much less of a problem than the lack of a well-documented web server, since you can easily define a wire protocol and wacky semantics for your purpose- built tutorial chat application.
Yes!
I'd suggest possibly a client/server game , but I am under the impression that's already taken care of.
>b) then plug that into a simple sqlite database using >" twisted.enterprise"
twisted.enterprise is similarly a scary and inconsistent area, and requires understanding the interaction of the DB thread and the reactor thread. (And at least part of this section would have to be dedicated to "and never, ever touch anything in this package aside from adbapi".)
We'll definitely stay away from that, then.
I only ever use 'adbapi'. The reason I say this is database functionality is pretty darn important for all non-trivial programs, so programmers need/want to know about this functionality, wouldn't you agree?
Important but not fundamental, I'd say.
>d) Show how using "twistd" is really convient >(i.e. "twistd -ny server.tac" and "twistd -y server.tac", with some >logging >capability, etc)
Yes, yes, yes! If I could come away with a clear understanding of how a .tac file encapsulated one or more Twisted network services I'd be happy.
This, however, is a great suggestion. Twisted plugins should be part of this discussion.
Yes.
Thanks again for Twisted!
This is great. Keep it coming! Still looking for reading suggestions ... regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/
![](https://secure.gravatar.com/avatar/841ec599723ae1bcb61b5db148c58cf8.jpg?s=120&d=mm&r=g)
Hey, I think some Twisted related sessions at PyCon would be great. Based on what's been discussed so far, I would like to humbly suggest the following (kind of breaking it down): 1) Simple line based chat server/client. 2) Same thing except using AMP. 3) twistd and plugins 4) Axiom! (could show how to 'install' and launch the chat service using axiomatic and a plugin) (Axiom rocks and I personally think it should be packaged along with Twisted itself. :) Maybe that is too much for folks just starting out, but I think it could be presented in a way that is easily grokked. As far as reading material for the above (I'm certain to be redundant here, but eh): http://twistedmatrix.com/projects/core/documentation/howto/servers.html http://twistedmatrix.com/projects/core/documentation/howto/clients.html http://twistedmatrix.com/trac/browser/trunk/twisted/protocols/amp.py(docstri...) http://twistedmatrix.com/projects/core/documentation/howto/tap.html http://www.divmod.org/trac/wiki/DivmodAxiom/WhyAxiom http://www.divmod.org/trac/wiki/Axiomatic http://www.divmod.org/trac/wiki/DivmodAxiom/Reference -Cary On Jan 23, 2008 7:47 PM, Steve Holden <steve@holdenweb.com> wrote:
alex clemesha wrote:
On Jan 23, 2008 4:36 PM, <glyph@divmod.com <mailto:glyph@divmod.com>>
wrote:
On 12:10 am, clemesha@gmail.com <mailto:clemesha@gmail.com> wrote: >Thanks Steve Holden for organizing this, it's a great idea.
Indeed! >Some nice topics might include:
Thanks for the suggestions. Do you have any others? :-)
For my usage of twisted, these are important to me and I am the most familiar with them. (See below)
I hate to rain on your parade here, but I think maybe my explanation of why I don't like these suggestions will spark discussion of more different ones... >a) Start off simple with a " twisted.web2" example (everyone
"gets"
>http)
I think that this is actually something we should avoid in a
tutorial.
The web situation in Twisted is complicated ( http://twistedmatrix.com/trac/wiki/WebDevelopmentWithTwisted). web2 in particular is suffering from an extreme lack of maintenance and
still
has never "officially" been released; work is just starting to get underway to unify t.web2 and nevow into t.web and reduce the
confusion,
but this is all still in progress and who knows when, how, or even
if it
will be completed.
Oh yes, I know, I know. While learning twisted I read *most* (that's alot ;) of posts to the twisted-web mailing list. So I am very familiar with the state.
Interesting. I am also subscribed to the twisted.web newsgroup, and I have been surprised about how quiet it's been. I imagine that if twisted.web2 would be very good for things like high-volume web services work. It has relatively few advantages in the heavily-competitive templating world, and I have to say that my early experience with Nevow, while it caused me to admire the system, wasn't entirely trouble-free. I think that may be partly because it wasn't being used in a Twisted environment (I'm thinking of the python.org reorganization that was put in effect after PyCon 2006).
That said, oh how I wish you guys could make twisted.web2 the one and only!!! It would be good for beginners and others alike.
Note however: I can only barely imagine how hard that might be, so I am *definitely not* complaining ... Twisted is excellent, thanks very much for it.
Hear, hear. And the world needs to know, hence my enthusiasm for "Teach Me Twisted".
If you get a group of experienced Twisted folks together to talk about writing web applications, you're more likely
to
spark a debate than an educational session.
Twisted's not alone there, of course.
Even if all these problems were fixed, and there were a really good, well-supported, universally understood web server for Twisted, the benefits of Twisted's programming model are not immediately obvious
to
the bread and butter of the web programming world. Learning how to
use
some combination of Twisted tools to generate a web page will always
be
at least a little bit harder than writing the sort of glorified CGI script that most web frameworks require these days - unless you're using something like Athena, which might be too much complexity to address
in
a single tutorial session. (And while Athena is more polished and
"one
right way" than the lower-level HTTP stuff, there is still a painful dearth of documentation, not to mention the fact that you need to
write
JavaScript as well as Python.)
Right. I think a Django replacement might be a bit ambitious for an open space session or two ...
Maybe once I get into Twisted I'll be able to lend a hand with t.w2 development (or maybe not).
"Comet" (aka what Athena does) is one of my main uses of twisted, see
http://svn.xantus.org/shortbus/trunk/cometd-twisted/
is some code that I use.
That and other ajax-y stuff. Not much templating html, etc.
That's neat, but definitely a few too many layers for a starter project.
Twisted really shines best when you're writing a client as well as a server. Chat is the quintessential application where Twisted makes
the
most sense - and the lack of a well-documented chat server is much
less
of a problem than the lack of a well-documented web server, since
you
can easily define a wire protocol and wacky semantics for your
purpose-
built tutorial chat application.
Yes!
I'd suggest possibly a client/server game , but I am under the impression that's already taken care of.
>b) then plug that into a simple sqlite database using >" twisted.enterprise"
twisted.enterprise is similarly a scary and inconsistent area, and requires understanding the interaction of the DB thread and the
reactor
thread. (And at least part of this section would have to be
dedicated
to "and never, ever touch anything in this package aside from
adbapi".)
We'll definitely stay away from that, then.
I only ever use 'adbapi'. The reason I say this is database
functionality
is pretty darn important for all non-trivial programs, so programmers need/want to know about this functionality, wouldn't you agree?
Important but not fundamental, I'd say.
>d) Show how using "twistd" is really convient >(i.e. "twistd -ny server.tac" and "twistd -y server.tac", with
some
>logging >capability, etc)
Yes, yes, yes! If I could come away with a clear understanding of how a .tac file encapsulated one or more Twisted network services I'd be happy.
This, however, is a great suggestion. Twisted plugins should be part of this discussion.
Yes.
Thanks again for Twisted!
This is great. Keep it coming! Still looking for reading suggestions ...
regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
-- 01100011 01100001 01110010 01111001
![](https://secure.gravatar.com/avatar/2c69ccb9eb83c7ef2ba155a850df68a9.jpg?s=120&d=mm&r=g)
Cary Hull wrote:
Hey, I think some Twisted related sessions at PyCon would be great. Based on what's been discussed so far, I would like to humbly suggest the following (kind of breaking it down):
1) Simple line based chat server/client. 2) Same thing except using AMP. 3) twistd and plugins
These are things I would really like to get to, but I'm pretty sure half an hour isn't going to cover it. Maybe we should be thinking BOF instead, then we can take an evening over it under less stressful conditions (and, who knows, even drink a beer or two in the process).
4) Axiom! (could show how to 'install' and launch the chat service using axiomatic and a plugin)
(Axiom rocks and I personally think it should be packaged along with Twisted itself. :)
OK, I;ll do "Teach Me Twisted" and you do an Open Space session on "Why Axiom Rocks and Should be In Twisted".
Maybe that is too much for folks just starting out, but I think it could be presented in a way that is easily grokked.
As far as reading material for the above (I'm certain to be redundant here, but eh): http://twistedmatrix.com/projects/core/documentation/howto/servers.html http://twistedmatrix.com/projects/core/documentation/howto/clients.html http://twistedmatrix.com/trac/browser/trunk/twisted/protocols/amp.py (docstrings) http://twistedmatrix.com/projects/core/documentation/howto/tap.html http://www.divmod.org/trac/wiki/DivmodAxiom/WhyAxiom http://www.divmod.org/trac/wiki/Axiomatic http://www.divmod.org/trac/wiki/DivmodAxiom/Reference
Thanks, I'll make a start in this in an attempt not to be completely clueless when the session starts :-) regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/
![](https://secure.gravatar.com/avatar/841ec599723ae1bcb61b5db148c58cf8.jpg?s=120&d=mm&r=g)
Minus the 'should be in twisted part' (which would be rather presumptuous of me), I wouldn't mind giving a little introduction to axiom. :) On Jan 25, 2008 3:49 PM, Steve Holden <steve@holdenweb.com> wrote:
Cary Hull wrote:
Hey, I think some Twisted related sessions at PyCon would be great. Based on what's been discussed so far, I would like to humbly suggest the following (kind of breaking it down):
1) Simple line based chat server/client. 2) Same thing except using AMP. 3) twistd and plugins
These are things I would really like to get to, but I'm pretty sure half an hour isn't going to cover it. Maybe we should be thinking BOF instead, then we can take an evening over it under less stressful conditions (and, who knows, even drink a beer or two in the process).
4) Axiom! (could show how to 'install' and launch the chat service using axiomatic and a plugin)
(Axiom rocks and I personally think it should be packaged along with Twisted itself. :)
OK, I;ll do "Teach Me Twisted" and you do an Open Space session on "Why Axiom Rocks and Should be In Twisted".
Maybe that is too much for folks just starting out, but I think it could be presented in a way that is easily grokked.
As far as reading material for the above (I'm certain to be redundant here, but eh): http://twistedmatrix.com/projects/core/documentation/howto/servers.html http://twistedmatrix.com/projects/core/documentation/howto/clients.html http://twistedmatrix.com/trac/browser/trunk/twisted/protocols/amp.py (docstrings) http://twistedmatrix.com/projects/core/documentation/howto/tap.html http://www.divmod.org/trac/wiki/DivmodAxiom/WhyAxiom http://www.divmod.org/trac/wiki/Axiomatic http://www.divmod.org/trac/wiki/DivmodAxiom/Reference
Thanks, I'll make a start in this in an attempt not to be completely clueless when the session starts :-)
regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
-- 01100011 01100001 01110010 01111001
![](https://secure.gravatar.com/avatar/7ed9784cbb1ba1ef75454034b3a8e6a1.jpg?s=120&d=mm&r=g)
On Fri, 25 Jan 2008 18:49:46 -0500, Steve Holden <steve@holdenweb.com> wrote:
Cary Hull wrote:
Hey, I think some Twisted related sessions at PyCon would be great. Based on what's been discussed so far, I would like to humbly suggest the following (kind of breaking it down):
1) Simple line based chat server/client. 2) Same thing except using AMP. 3) twistd and plugins
These are things I would really like to get to, but I'm pretty sure half an hour isn't going to cover it. Maybe we should be thinking BOF instead, then we can take an evening over it under less stressful conditions (and, who knows, even drink a beer or two in the process).
Maybe I can get you to go a little bit further than that in restricting what you'd like to see covered. Off the top of my head, and only continuing until I get bored with making this point, here's what a "Twisted" session could cover: * event driven programming * Deferreds (making them; using them; debugging them; defgen; locks/semaphors) * core reactor APIs * scheduling * implementing existing (TCP; UDP; IP) protocols * designing new (TCP; UDP; IP) protocols * using existing protocols in twisted core * integrating a protocol implementation with cred * process control/interaction * implementing a realm * implementing credentials/checkers * writing services * writing plugins (twistd; lore; cred) * handy general-purpose python utilities * adding new kinds of event sources to the reactor * gui/pygame/etc integration * threading * using SQL databases * Perspective Broker * writing unit tests * using trial * extending trial Wandering outside of the core of Twisted: * serving web pages * running a chat server * extending the chat server * jabber (jabber; jabber; jabber; sasl; jabber) * marking up documentation * dns servers and clients * usenet servers and clients * ssh/sftp clients/servers * telnet clients/servers * asynchronous terminal interaction * terminal widget rendering * smtp client/server * imap4 client/server * pop3 client/server Are any of these the things you have in mind? Can I get you to pick a very small number of them (1 or 2 per hour at most, I suspect; some are smaller, others are quite large)? Or did you have something else in mind? Jean-Paul
![](https://secure.gravatar.com/avatar/2c69ccb9eb83c7ef2ba155a850df68a9.jpg?s=120&d=mm&r=g)
Jean-Paul Calderone wrote:
On Fri, 25 Jan 2008 18:49:46 -0500, Steve Holden <steve@holdenweb.com> wrote:
Cary Hull wrote:
Hey, I think some Twisted related sessions at PyCon would be great. Based on what's been discussed so far, I would like to humbly suggest the following (kind of breaking it down):
1) Simple line based chat server/client. 2) Same thing except using AMP. 3) twistd and plugins
These are things I would really like to get to, but I'm pretty sure half an hour isn't going to cover it. Maybe we should be thinking BOF instead, then we can take an evening over it under less stressful conditions (and, who knows, even drink a beer or two in the process).
Maybe I can get you to go a little bit further than that in restricting what you'd like to see covered.
Aah, sweet sanity! Sorry about the delay in my reply, I wanted to wait until I could do this post justice (and it's not like PyCon is tomorrow).
Off the top of my head, and only continuing until I get bored with making this point, here's what a "Twisted" session could cover:
* event driven programming
Please. I've used event-driven scenarios in GUI frameworks, but I've never seen anything (please note: this does *not* imply that nothing exists) that makes clear the relationship between the Twisted reactor and the code surrounding it.
* Deferreds (making them; using them; debugging them; defgen; locks/semaphors)
These are in essence the fundamentals, no? A complete picture of the lifetime of a failed and a successful deferred would, I feel, go a long way towards filling in the picture. Plus how deferreds can interact with each other?
* core reactor APIs
This too should go into the "must know" category, right?
* scheduling
If we could cover everything up to this point I'd be happy. Like you I think it's important to limit the scope if we want to achieve something worthwhile, and I can't spend *all* my PyCon time on Twisted. It will be up to you guys to make it enjoyable enough to keep me there :-) Hopefully with community guidance I can lay the foundations for a mechanism (a pedagogy, if you will) that many people can use to flesh the rest out.
* implementing existing (TCP; UDP; IP) protocols
What, you mean they aren't all implemented yet? :-)
* designing new (TCP; UDP; IP) protocols
Good. That Twisted can get access to the raw network layer is something I wasn't aware of.
* using existing protocols in twisted core
Probably more essential than protocol design and implementation, I'd have thought.
* integrating a protocol implementation with cred
To make it an authenticated protocol? Haven't met cred yet.
* process control/interaction
I suppose one of the issues with twisted, like other asynchronous frameworks, is that you can screw things up really badly just by thoughtlessly blocking somewhere inside a handler. So this is probably important.
* implementing a realm * implementing credentials/checkers * writing services * writing plugins (twistd; lore; cred) * handy general-purpose python utilities * adding new kinds of event sources to the reactor * gui/pygame/etc integration * threading * using SQL databases * Perspective Broker * writing unit tests * using trial * extending trial
While the above remaining core issues are all valuable, I don't see us getting to them at PyCon.
Wandering outside of the core of Twisted:
* serving web pages * running a chat server * extending the chat server * jabber (jabber; jabber; jabber; sasl; jabber)
I gather you think jabber is significant?
* marking up documentation
The more widely this knowledge is disseminated, hopefully, the better the documentation will be.
* dns servers and clients * usenet servers and clients * ssh/sftp clients/servers * telnet clients/servers * asynchronous terminal interaction * terminal widget rendering * smtp client/server * imap4 client/server * pop3 client/server
Are any of these the things you have in mind? Can I get you to pick a very small number of them (1 or 2 per hour at most, I suspect; some are smaller, others are quite large)? Or did you have something else in mind?
Your detailed knowledge of the structure of Twisted lays bare the huge amount of work that *could* be done. However, there may be perfectly adequate existing materials on some or all of these topics, and I am happy to be pointed towards them. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/
![](https://secure.gravatar.com/avatar/9ad321a1a9b37df1f7c401b602f98740.jpg?s=120&d=mm&r=g)
I'm a lurker who's dabbled a bit with twisted, but never seriously used it. I have a large application that wants refactoring and Twisted may help. I'm planning to attend PyCon and if a 'Teach Me Twisted' BoF does materialize, I can show up and ask questions, if nothing else. Items of most interest to me are fairly basic:
* event driven programming * Deferreds (making them; using them; debugging them; defgen; locks/semaphors) * core reactor APIs * scheduling * using existing protocols in twisted core * process control/interaction * gui/pygame/etc integration I agree with Steve Holden that while the other topics are important, it would be difficult to do them justice in one session. If this BoF could be staged early in the conference, and there is sufficient interest/energy, perhaps they could be covered in a second session.
Regards, Steve "Every program is a part of some other program and rarely fits." -- Alan Perlis
participants (8)
-
alex clemesha
-
Cary Hull
-
glyph@divmod.com
-
Jaime Wyant
-
Jean-Paul Calderone
-
paul
-
Steve Holden
-
Steven H. Rogers