[Twisted-Python] Re: Teach Me Twisted?
cary.hull at gmail.com
Fri Jan 25 15:35:10 EST 2008
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
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,
On Jan 23, 2008 7:47 PM, Steve Holden <steve at holdenweb.com> wrote:
> alex clemesha wrote:
> > On Jan 23, 2008 4:36 PM, <glyph at divmod.com <mailto:glyph at divmod.com>>
> > On 12:10 am, clemesha at gmail.com <mailto:clemesha at 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
> > >http)
> > I think that this is actually something we should avoid in a
> > 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
> > has never "officially" been released; work is just starting to get
> > underway to unify t.web2 and nevow into t.web and reduce the
> > 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
> > 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
> > the bread and butter of the web programming world. Learning how to
> > some combination of Twisted tools to generate a web page will always
> > 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
> > a single tutorial session. (And while Athena is more polished and
> > 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
> 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
> > most sense - and the lack of a well-documented chat server is much
> > of a problem than the lack of a well-documented web server, since
> > can easily define a wire protocol and wacky semantics for your
> > 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
> > thread. (And at least part of this section would have to be
> > to "and never, ever touch anything in this package aside from
> We'll definitely stay away from that, then.
> > I only ever use 'adbapi'. The reason I say this is database
> > 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
> > >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 ...
> Steve Holden +1 571 484 6266 +1 800 494 3119
> Holden Web LLC http://www.holdenweb.com/
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
01100011 01100001 01110010 01111001
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python