Networking

https://d33wubrfki0l68.cloudfront.net/14fc2321ce393d5bb666295c27fcfdb944a21eae/b8f49/_images/34151833832_6bdfd930af_k_d.jpg

Twisted

Twisted is an event-driven networkingengine. It can be used to build applications around many different networkingprotocols, including HTTP servers and clients, applications using SMTP, POP3,IMAP, or SSH protocols, instant messaging,and much more.

PyZMQ

PyZMQ is the Python binding forZeroMQ, which is a high-performance asynchronousmessaging library. One great advantage of ZeroMQ is that it can be used formessage queuing without a message broker. The basic patterns for this are:

  • request-reply: connects a set of clients to a set of services. This is aremote procedure call and task distribution pattern.
  • publish-subscribe: connects a set of publishers to a set of subscribers.This is a data distribution pattern.
  • push-pull (or pipeline): connects nodes in a fan-out/fan-in pattern thatcan have multiple steps and loops. This is a parallel task distributionand collection pattern.
    For a quick start, read the ZeroMQ guide.

gevent

gevent is a coroutine-based Python networkinglibrary that uses greenlets to provide a high-level synchronous API on top ofthe libev event loop.

原文: https://docs.python-guide.org/scenarios/network/