Hey, I think some Twisted related sessions at PyCon would be great.<br>Based on what&#39;s been discussed so far, I would like to humbly suggest<br>the following (kind of breaking it down):<br><br>1) Simple line based chat server/client.<br>
2) Same thing except using AMP.<br>3) twistd and plugins<br>4) Axiom! (could show how to &#39;install&#39; and launch the chat service using axiomatic and a plugin)<br><br>(Axiom rocks and I personally think it should be packaged along with Twisted itself. :)<br>
<br>Maybe that is too much for folks just starting out, but I think it could be<br>presented in a way that is easily grokked.<br><br>As far as reading material for the above (I&#39;m certain to be redundant here, but eh):<br>
<a href="http://twistedmatrix.com/projects/core/documentation/howto/servers.html">http://twistedmatrix.com/projects/core/documentation/howto/servers.html</a><br><a href="http://twistedmatrix.com/projects/core/documentation/howto/clients.html">http://twistedmatrix.com/projects/core/documentation/howto/clients.html</a><br>
<a href="http://twistedmatrix.com/trac/browser/trunk/twisted/protocols/amp.py">http://twistedmatrix.com/trac/browser/trunk/twisted/protocols/amp.py</a> (docstrings)<br><a href="http://twistedmatrix.com/projects/core/documentation/howto/tap.html">http://twistedmatrix.com/projects/core/documentation/howto/tap.html</a><br>
<a href="http://www.divmod.org/trac/wiki/DivmodAxiom/WhyAxiom">http://www.divmod.org/trac/wiki/DivmodAxiom/WhyAxiom</a><br><a href="http://www.divmod.org/trac/wiki/Axiomatic">http://www.divmod.org/trac/wiki/Axiomatic</a><br>
<a href="http://www.divmod.org/trac/wiki/DivmodAxiom/Reference">http://www.divmod.org/trac/wiki/DivmodAxiom/Reference</a><br><br>-Cary<br><br><div class="gmail_quote">On Jan 23, 2008 7:47 PM, Steve Holden &lt;<a href="mailto:steve@holdenweb.com">steve@holdenweb.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">alex clemesha wrote:<br>&gt;<br>&gt;<br>&gt; On Jan 23, 2008 4:36 PM, &lt;<a href="mailto:glyph@divmod.com">glyph@divmod.com</a> &lt;mailto:<a href="mailto:glyph@divmod.com">glyph@divmod.com</a>&gt;&gt; wrote:<br>
<div><div></div><div class="Wj3C7c">&gt;<br>&gt; &nbsp; &nbsp; On 12:10 am, <a href="mailto:clemesha@gmail.com">clemesha@gmail.com</a> &lt;mailto:<a href="mailto:clemesha@gmail.com">clemesha@gmail.com</a>&gt; wrote:<br>&gt; &nbsp; &nbsp; &nbsp;&gt;Thanks Steve Holden for organizing this, it&#39;s a great idea.<br>
&gt;<br>&gt; &nbsp; &nbsp; Indeed!<br>&gt; &nbsp; &nbsp; &nbsp;&gt;Some nice topics might include:<br>&gt;<br>&gt; &nbsp; &nbsp; Thanks for the suggestions. &nbsp;Do you have any others? &nbsp;:-)<br>&gt;<br>&gt; For my usage of twisted, these are important to me and I am<br>
&gt; the most familiar with them. (See below)<br>&gt;<br>&gt;<br>&gt; &nbsp; &nbsp; I hate to<br>&gt; &nbsp; &nbsp; rain on your parade here, but I think maybe my explanation of why I<br>&gt; &nbsp; &nbsp; don&#39;t like these suggestions will spark discussion of more different<br>
&gt; &nbsp; &nbsp; ones...<br>&gt; &nbsp; &nbsp; &nbsp;&gt;a) Start off simple with a &quot; twisted.web2&quot; example (everyone &quot;gets&quot;<br>&gt; &nbsp; &nbsp; &nbsp;&gt;http)<br>&gt;<br>&gt; &nbsp; &nbsp; I think that this is actually something we should avoid in a tutorial.<br>
&gt; &nbsp; &nbsp; The web situation in Twisted is complicated<br>&gt; &nbsp; &nbsp; ( <a href="http://twistedmatrix.com/trac/wiki/WebDevelopmentWithTwisted" target="_blank">http://twistedmatrix.com/trac/wiki/WebDevelopmentWithTwisted</a>).<br>
&gt; &nbsp; &nbsp; &nbsp;web2 in<br>&gt; &nbsp; &nbsp; particular is suffering from an extreme lack of maintenance and still<br>&gt; &nbsp; &nbsp; has never &quot;officially&quot; been released; work is just starting to get<br>&gt; &nbsp; &nbsp; underway to unify t.web2 and nevow into t.web and reduce the confusion,<br>
&gt; &nbsp; &nbsp; but this is all still in progress and who knows when, how, or even if it<br>&gt; &nbsp; &nbsp; will be completed.<br>&gt;<br>&gt;<br>&gt; Oh yes, I know, I know. &nbsp;While learning twisted I read *most* (that&#39;s<br>&gt; alot ;)<br>
&gt; of posts to the twisted-web mailing list. &nbsp;So I am very familiar with<br>&gt; the state.<br>&gt;<br></div></div>Interesting. I am also subscribed to the twisted.web newsgroup, and I<br>have been surprised about how quiet it&#39;s been. I imagine that if<br>
twisted.web2 would be very good for things like high-volume web services<br>work. It has relatively few advantages in the heavily-competitive<br>templating world, and I have to say that my early experience with Nevow,<br>
while it caused me to admire the system, wasn&#39;t entirely trouble-free. I<br>think that may be partly because it wasn&#39;t being used in a Twisted<br>environment (I&#39;m thinking of the <a href="http://python.org" target="_blank">python.org</a> reorganization that was put<br>
in effect after PyCon 2006).<br><div class="Ih2E3d"><br>&gt; That said, oh how I wish you guys could make twisted.web2 the one and<br>&gt; only!!!<br>&gt; It would be good for beginners and others alike.<br>&gt;<br>&gt; Note however: I can only barely imagine how hard that might be,<br>
&gt; so I am *definitely not* complaining ... Twisted is excellent, thanks<br>&gt; very much for it.<br>&gt;<br></div>Hear, hear. And the world needs to know, hence my enthusiasm for &quot;Teach<br>Me Twisted&quot;.<br><div class="Ih2E3d">
<br>&gt;<br>&gt; &nbsp; &nbsp; If you get a group of experienced Twisted folks<br>&gt; &nbsp; &nbsp; together to talk about writing web applications, you&#39;re more likely to<br>&gt; &nbsp; &nbsp; spark a debate than an educational session.<br>&gt;<br>
</div>Twisted&#39;s not alone there, of course.<br><div class="Ih2E3d"><br>&gt; &nbsp; &nbsp; Even if all these problems were fixed, and there were a really good,<br>&gt; &nbsp; &nbsp; well-supported, universally understood web server for Twisted, the<br>
&gt; &nbsp; &nbsp; benefits of Twisted&#39;s programming model are not immediately obvious to<br>&gt; &nbsp; &nbsp; the bread and butter of the web programming world. &nbsp;Learning how to use<br>&gt; &nbsp; &nbsp; some combination of Twisted tools to generate a web page will always be<br>
&gt; &nbsp; &nbsp; at least a little bit harder than writing the sort of glorified CGI<br>&gt; &nbsp; &nbsp; script that most web frameworks require these days - unless you&#39;re<br>&gt; &nbsp; &nbsp; using<br>&gt; &nbsp; &nbsp; something like Athena, which might be too much complexity to address in<br>
&gt; &nbsp; &nbsp; a single tutorial session. &nbsp;(And while Athena is more polished and &quot;one<br>&gt; &nbsp; &nbsp; right way&quot; than the lower-level HTTP stuff, there is still a painful<br>&gt; &nbsp; &nbsp; dearth of documentation, not to mention the fact that you need to write<br>
&gt; &nbsp; &nbsp; JavaScript as well as Python.)<br>&gt;<br></div>Right. I think a Django replacement might be a bit ambitious for an open<br>space session or two ...<br><br>Maybe once I get into Twisted I&#39;ll be able to lend a hand with t.w2<br>
development (or maybe not).<br><div class="Ih2E3d"><br>&gt;<br>&gt; &quot;Comet&quot; (aka what Athena does) is one of my main uses of twisted, see<br>&gt;<br>&gt; <a href="http://svn.xantus.org/shortbus/trunk/cometd-twisted/" target="_blank">http://svn.xantus.org/shortbus/trunk/cometd-twisted/</a><br>
&gt;<br>&gt; is some code that I use.<br>&gt;<br>&gt; That and other ajax-y stuff. &nbsp;Not much templating html, etc.<br>&gt;<br></div>That&#39;s neat, but definitely a few too many layers for a starter project.<br><div class="Ih2E3d">
&gt;<br>&gt;<br>&gt; &nbsp; &nbsp; Twisted really shines best when you&#39;re writing a client as well as a<br>&gt; &nbsp; &nbsp; server. &nbsp;Chat is the quintessential application where Twisted makes the<br>&gt; &nbsp; &nbsp; most sense - and the lack of a well-documented chat server is much less<br>
&gt; &nbsp; &nbsp; of a problem than the lack of a well-documented web server, since you<br>&gt; &nbsp; &nbsp; can easily define a wire protocol and wacky semantics for your purpose-<br>&gt; &nbsp; &nbsp; built tutorial chat application.<br>&gt;<br>&gt; Yes!<br>
&gt;<br></div>I&#39;d suggest possibly a client/server game , but I am under the<br>impression that&#39;s already taken care of.<br><div class="Ih2E3d">&gt;<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp;&gt;b) then plug that into a simple sqlite database using<br>
&gt; &nbsp; &nbsp; &nbsp;&gt;&quot; twisted.enterprise&quot;<br>&gt;<br>&gt; &nbsp; &nbsp; twisted.enterprise is similarly a scary and inconsistent area, and<br>&gt; &nbsp; &nbsp; requires understanding the interaction of the DB thread and the reactor<br>&gt; &nbsp; &nbsp; thread. &nbsp;(And at least part of this section would have to be dedicated<br>
&gt; &nbsp; &nbsp; to &quot;and never, ever touch anything in this package aside from adbapi&quot;.)<br>&gt;<br></div>We&#39;ll definitely stay away from that, then.<br><div class="Ih2E3d">&gt;<br>&gt; I only ever use &#39;adbapi&#39;. &nbsp;The reason I say this is database functionality<br>
&gt; is pretty darn important for all non-trivial programs, so programmers<br>&gt; need/want<br>&gt; to know about this functionality, wouldn&#39;t you agree?<br>&gt;<br></div>Important but not fundamental, I&#39;d say.<br>
<div class="Ih2E3d">&gt;<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp;&gt;d) Show how using &quot;twistd&quot; is really convient<br>&gt; &nbsp; &nbsp; &nbsp;&gt;(i.e. &quot;twistd -ny server.tac&quot; and &quot;twistd -y server.tac&quot;, with some<br>&gt; &nbsp; &nbsp; &nbsp;&gt;logging<br>
&gt; &nbsp; &nbsp; &nbsp;&gt;capability, etc)<br>&gt;<br></div>Yes, yes, yes! If I could come away with a clear understanding of how a<br>.tac file encapsulated one or more Twisted network services I&#39;d be happy.<br><div class="Ih2E3d">
<br>&gt; &nbsp; &nbsp; This, however, is a great suggestion. &nbsp;Twisted plugins should be<br>&gt; &nbsp; &nbsp; part of<br>&gt; &nbsp; &nbsp; this discussion.<br>&gt;<br>&gt; Yes.<br>&gt;<br>&gt;<br>&gt; Thanks again for Twisted!<br>&gt;<br></div>This is great. Keep it coming! Still looking for reading suggestions ...<br>
<div class="Ih2E3d"><br>regards<br> &nbsp;Steve<br>--<br>Steve Holden &nbsp; &nbsp; &nbsp; &nbsp;+1 571 484 6266 &nbsp; +1 800 494 3119<br>Holden Web LLC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.holdenweb.com/" target="_blank">http://www.holdenweb.com/</a><br>
<br><br>_______________________________________________<br></div><div><div></div><div class="Wj3C7c">Twisted-Python mailing list<br><a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br></div></div></blockquote></div><br><br clear="all"><br>-- <br>
01100011 01100001 01110010 01111001