ANN: Twisted 1.1.1

Discussion in 'Python' started by Itamar Shtull-Trauring, Dec 10, 2003.

  1. Twisted is an event-driven networking framework for server and client
    applications.

    For more information, visit http://www.twistedmatrix.com, join the list
    http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python or
    visit us on #twisted at irc.freenode.net.

    The Twisted from Scratch tutorial is a good starting point for learning
    Twisted: http://twistedmatrix.com/documents/howto/tutorial


    What's New in 1.1.1
    ===================

    - Many bug fixes and minor improvements.

    - MSN protocol support updated to support MSN8P.

    - Conch SSH client now supports SSH auth agent.


    What is Twisted?
    ================

    Twisted is an event-driven framework for building networked clients and
    servers. It contains a powerful and simple networking core, a
    full-featured suite of interoperable protocols, among them a powerful
    web server and applications framework.
     
    Itamar Shtull-Trauring, Dec 10, 2003
    #1
    1. Advertising

  2. Itamar Shtull-Trauring

    Jarek Zgoda Guest

    Itamar Shtull-Trauring <> pisze:

    > Twisted is an event-driven networking framework for server and client
    > applications.
    >
    > For more information, visit http://www.twistedmatrix.com, join the list
    > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python or
    > visit us on #twisted at irc.freenode.net.
    >
    > The Twisted from Scratch tutorial is a good starting point for learning
    > Twisted: http://twistedmatrix.com/documents/howto/tutorial


    I am really angry that I cann't write Twisted-based applications on daily
    basis since I think it's really coolest network framework I could ever
    dream of!

    Writing one more asyncore/asynchat application pisses me off. Hate it.
    Love it. Thanks God, it's Python, not Rexx, even not Java.

    NP: The Cure - The Loudest Song

    --
    Jarek Zgoda
    Unregistered Linux User #-1
    http://www.zgoda.biz/ JID: http://zgoda.jogger.pl/
     
    Jarek Zgoda, Dec 10, 2003
    #2
    1. Advertising

  3. In article <br7te2$8il$>,
    Jarek Zgoda <> wrote:
    .
    [thoroughly deserved
    praise for Twisted]
    .
    .
    >Writing one more asyncore/asynchat application pisses me off. Hate it.
    >Love it. Thanks God, it's Python, not Rexx, even not Java.

    .
    .
    .
    Think about that last just a bit more. Asyncore is SUCH an
    upgrade over what most of the world is doing.
    --

    Cameron Laird <>
    Business: http://www.Phaseit.net
     
    Cameron Laird, Dec 10, 2003
    #3
  4. (Cameron Laird) writes:

    > .
    > Think about that last just a bit more. Asyncore is SUCH an
    > upgrade over what most of the world is doing.


    Can you explain "over what most of the world is doing" a bit more?
    I'm seriuosly interested.

    --
    Lawrence "Rhymes" Oluyede
    http://loluyede.blogspot.com
     
    Lawrence Oluyede, Dec 10, 2003
    #4
  5. Itamar Shtull-Trauring

    Jarek Zgoda Guest

    Cameron Laird <> pisze:

    >>Writing one more asyncore/asynchat application pisses me off. Hate it.
    >>Love it. Thanks God, it's Python, not Rexx, even not Java.

    > .
    > Think about that last just a bit more. Asyncore is SUCH an
    > upgrade over what most of the world is doing.


    Yes, you are right, most of world still uses synchronous sockets.
    AFAIK, asynchronous sockets are widely used in ObjectPascal (by way of
    F. Piette's work), but I don't know any such complete (like these in
    Python and ObjectPascal) implementation in other Popular Programming
    Environments (Java is PPE, Rexx is my *local* PPE ;))

    --
    Jarek Zgoda
    Unregistered Linux User #-1
    http://www.zgoda.biz/ JID: http://zgoda.jogger.pl/
     
    Jarek Zgoda, Dec 10, 2003
    #5
  6. Lawrence Oluyede wrote:

    > (Cameron Laird) writes:
    >
    >
    >> .
    >>Think about that last just a bit more. Asyncore is SUCH an
    >>upgrade over what most of the world is doing.

    >
    >
    > Can you explain "over what most of the world is doing" a bit more?
    > I'm seriuosly interested.


    [Perhaps a bit offtopic?:]

    While you're at it-- is there somewhere a *recent* tutorial on
    using asyncore/asynchat? Sam Rushing's one (found via Google)
    is from 1999...
    (I'm interested in using asyncore directly, not as part
    of a framework such as Twisted or Medusa).

    --Irmen.
     
    Irmen de Jong, Dec 10, 2003
    #6
  7. Itamar Shtull-Trauring

    Jarek Zgoda Guest

    Irmen de Jong <> pisze:

    >>>Think about that last just a bit more. Asyncore is SUCH an
    >>>upgrade over what most of the world is doing.

    >>
    >> Can you explain "over what most of the world is doing" a bit more?
    >> I'm seriuosly interested.

    >
    > [Perhaps a bit offtopic?:]
    >
    > While you're at it-- is there somewhere a *recent* tutorial on
    > using asyncore/asynchat? Sam Rushing's one (found via Google)
    > is from 1999...
    > (I'm interested in using asyncore directly, not as part
    > of a framework such as Twisted or Medusa).


    Frederik Lundh has excellent chapter on network protocols with many
    examples for asynchronous servers and clients in his "Python Standard
    Library" book, available online at
    http://effbot.org/zone/librarybook-index.htm

    It's the best I have found.

    --
    Jarek Zgoda
    Unregistered Linux User #-1
    http://www.zgoda.biz/ JID: http://zgoda.jogger.pl/
     
    Jarek Zgoda, Dec 10, 2003
    #7
  8. Itamar Shtull-Trauring

    Jarek Zgoda Guest

    Lawrence Oluyede <> pisze:

    >> Think about that last just a bit more. Asyncore is SUCH an
    >> upgrade over what most of the world is doing.

    >
    > Can you explain "over what most of the world is doing" a bit more?


    Most of the world still blocks execution with synchronous sockets. Event
    driven programming is not a wholly accepted idea.

    --
    Jarek Zgoda
    Unregistered Linux User #-1
    http://www.zgoda.biz/ JID: http://zgoda.jogger.pl/
     
    Jarek Zgoda, Dec 10, 2003
    #8
  9. offtopic: asyncore tutorial (was: Re: ANN: Twisted 1.1.1)

    Jarek Zgoda wrote:

    > Frederik Lundh has excellent chapter on network protocols with many
    > examples for asynchronous servers and clients in his "Python Standard
    > Library" book, available online at
    > http://effbot.org/zone/librarybook-index.htm


    Thanks for the link, I'll go and read it!
    And kudos to Fredrik for putting this stuff online.

    --Irmen.
     
    Irmen de Jong, Dec 10, 2003
    #9
  10. Itamar Shtull-Trauring

    Just Guest

    In article <>,
    (Cameron Laird) wrote:

    > In article <br849l$qp9$>,
    > Jarek Zgoda <> wrote:

    [ ... ]
    > >Most of the world still blocks execution with synchronous sockets. Event
    > >driven programming is not a wholly accepted idea.

    > .
    > .
    > .
    > Sooooooo true. Hang out with Perlites or C++ians sometime;
    > you'll hear them talk about how easy it is to do networking
    > now, and then they start saying words like "fork" and "thread".
    > My point is that their accepted concurrency models involve
    > serious burdens in regard to performance and developmental
    > fragility.
    >
    > Mr. Zgoda's right: event-driven networking remains poorly
    > appreciated, and those of us who favor it find it MUCH
    > preferable to the alternatives.


    This ties nicely into the xsdb + stackless discussion:

    - threads + blocking sockets is attractive since the code can be
    written in a natural style, yet cause overhead and
    synchronization headaches.

    - async sockets are attractive because they avoid threads and
    therefore avoid overhead and synchronization issues. Yet it
    is often a bit harder to code, since you need to turn your
    code inside out, using callbacks.

    But there is a "perfect" solution: co-routines. With co-routines you can
    both write the code in a "natural" style, but still using an even-driven
    core. This is a very pleasant model to work with, so I totally
    understand that some people (eg. Aaron) choose to use Stackless to make
    this possible.

    Just
     
    Just, Dec 10, 2003
    #10
  11. In article <br849l$qp9$>,
    Jarek Zgoda <> wrote:
    >Lawrence Oluyede <> pisze:
    >
    >>> Think about that last just a bit more. Asyncore is SUCH an
    >>> upgrade over what most of the world is doing.

    >>
    >> Can you explain "over what most of the world is doing" a bit more?

    >
    >Most of the world still blocks execution with synchronous sockets. Event
    >driven programming is not a wholly accepted idea.

    .
    .
    .
    Sooooooo true. Hang out with Perlites or C++ians sometime;
    you'll hear them talk about how easy it is to do networking
    now, and then they start saying words like "fork" and "thread".
    My point is that their accepted concurrency models involve
    serious burdens in regard to performance and developmental
    fragility.

    Mr. Zgoda's right: event-driven networking remains poorly
    appreciated, and those of us who favor it find it MUCH
    preferable to the alternatives.
    --

    Cameron Laird <>
    Business: http://www.Phaseit.net
     
    Cameron Laird, Dec 10, 2003
    #11
  12. Itamar Shtull-Trauring

    Just Guest

    In article <>,
    Andrew Bennetts <> wrote:

    > On Wed, Dec 10, 2003 at 11:11:40PM +0100, Just wrote:
    > >
    > > This ties nicely into the xsdb + stackless discussion:
    > >
    > > - threads + blocking sockets is attractive since the code can be
    > > written in a natural style, yet cause overhead and
    > > synchronization headaches.
    > >
    > > - async sockets are attractive because they avoid threads and
    > > therefore avoid overhead and synchronization issues. Yet it
    > > is often a bit harder to code, since you need to turn your
    > > code inside out, using callbacks.
    > >
    > > But there is a "perfect" solution: co-routines. With co-routines you can
    > > both write the code in a "natural" style, but still using an even-driven
    > > core. This is a very pleasant model to work with, so I totally
    > > understand that some people (eg. Aaron) choose to use Stackless to make
    > > this possible.

    >
    > co-routines miss one of the features of the threading model, though, which
    > is preemptive concurrency. I prefer the async way of working too, but I can
    > see that co-routines don't provide the best of both worlds...


    True, that is an important difference. However, I believe that people
    often pick threads over events not because they need preemptive
    concurrency, but because threading appears to be "easier" -- which it
    is, at least if you discount synchronization issues. Co-routines largely
    fix that particular problem.

    Just
     
    Just, Dec 11, 2003
    #12
  13. On Wed, Dec 10, 2003 at 11:11:40PM +0100, Just wrote:
    >
    > This ties nicely into the xsdb + stackless discussion:
    >
    > - threads + blocking sockets is attractive since the code can be
    > written in a natural style, yet cause overhead and
    > synchronization headaches.
    >
    > - async sockets are attractive because they avoid threads and
    > therefore avoid overhead and synchronization issues. Yet it
    > is often a bit harder to code, since you need to turn your
    > code inside out, using callbacks.
    >
    > But there is a "perfect" solution: co-routines. With co-routines you can
    > both write the code in a "natural" style, but still using an even-driven
    > core. This is a very pleasant model to work with, so I totally
    > understand that some people (eg. Aaron) choose to use Stackless to make
    > this possible.


    co-routines miss one of the features of the threading model, though, which
    is preemptive concurrency. I prefer the async way of working too, but I can
    see that co-routines don't provide the best of both worlds...

    -Andrew.
     
    Andrew Bennetts, Dec 11, 2003
    #13
  14. [Jarek]
    > Most of the world still blocks execution with synchronous sockets. Event
    > driven programming is not a wholly accepted idea.


    I just came across this in Moshe Zadka's blog. Not strictly relevant but
    it made me smile:

    "The correct way to explain [async programming] is as some kind of Zen,
    and even Buddhism.

    In order to program on the network, which is filled by buggy and evil
    agents, one must give up all expectations. One must sit quietly, without
    desires to plague the flesh, quietly meditating. Only when an event is
    received, one must react to it, and then get back to meditating. In this
    way, enlightment is achieved. This is why async systems have no read()
    call. Reading from the network means you have expectations of what will
    arrive. If it doesn't, your hopes are shattered. If you have no hopes to
    shatter, you cannot be disappointed."

    (Whether, like a lot of Eastern philosophy, the truth of that can only be
    appreciated by people who have *already* achieved async enlightenment, I
    don't know. :cool:

    --
    Richie Hindle
     
    Richie Hindle, Dec 11, 2003
    #14
  15. Itamar Shtull-Trauring

    John J. Lee Guest

    Richie Hindle <> writes:

    > [Jarek]
    > > Most of the world still blocks execution with synchronous sockets. Event
    > > driven programming is not a wholly accepted idea.

    >
    > I just came across this in Moshe Zadka's blog. Not strictly relevant but
    > it made me smile:
    >
    > "The correct way to explain [async programming] is as some kind of Zen,
    > and even Buddhism.
    >
    > In order to program on the network, which is filled by buggy and evil
    > agents, one must give up all expectations. One must sit quietly, without
    > desires to plague the flesh, quietly meditating. Only when an event is
    > received, one must react to it, and then get back to meditating. In this
    > way, enlightment is achieved. This is why async systems have no read()
    > call. Reading from the network means you have expectations of what will
    > arrive. If it doesn't, your hopes are shattered. If you have no hopes to
    > shatter, you cannot be disappointed."


    :)

    Now, if he'll just publish that in a glossy magazine and make
    asynchronous network programming fashionable... then half of all
    programmers will mindlessly stop using threads even when *they're* the
    sane way to do the job :-(


    John

    If you ever reach total enlightenment while you're drinking a beer, I bet
    it makes beer shoot out your nose.

    Jack Handey
     
    John J. Lee, Dec 11, 2003
    #15
  16. Itamar Shtull-Trauring

    Ville Vainio Guest

    (John J. Lee) writes:

    > Now, if he'll just publish that in a glossy magazine and make
    > asynchronous network programming fashionable... then half of all


    FWIW, in Symbian pretty much every program is single threaded, w/
    comms and such handled by asynchronous "Active Objects" and "Active
    Scheduler" that execs the RunL method of Active Object when the object
    has stuff to do.

    This is mostly done to save resources, allegedly.

    --
    Ville Vainio http://www.students.tut.fi/~vainio24
     
    Ville Vainio, Dec 12, 2003
    #16
  17. On Wed, 10 Dec 2003 21:57:33 +0100,
    Irmen de Jong <> wrote:
    > While you're at it-- is there somewhere a *recent* tutorial on
    > using asyncore/asynchat? Sam Rushing's one (found via Google)
    > is from 1999...


    Not really; I've been thinking of writing one, though, given that there are
    still people using asyncore and the existing material is so sparse.

    --amk
     
    A.M. Kuchling, Dec 12, 2003
    #17
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Itamar Shtull-Trauring

    ANN: Twisted 1.0.6 (includes security fixes)

    Itamar Shtull-Trauring, Jun 29, 2003, in forum: Python
    Replies:
    0
    Views:
    677
    Itamar Shtull-Trauring
    Jun 29, 2003
  2. Jean-Paul Calderone
    Replies:
    0
    Views:
    464
    Jean-Paul Calderone
    Jun 17, 2008
  3. Glyph
    Replies:
    0
    Views:
    191
    Glyph
    Dec 27, 2012
  4. Glyph
    Replies:
    0
    Views:
    165
    Glyph
    Apr 3, 2013
  5. Glyph
    Replies:
    0
    Views:
    62
    Glyph
    May 12, 2014
Loading...

Share This Page