Networking

../_images/34151833832_6bdfd930af_k_d.jpg

Twisted

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

PyZMQ

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

  • request-reply: conecta um conjunto de clientes a um conjunto de serviços. Esta é uma chamada de procedimento remoto e um padrão de distribuição de tarefas.
  • publish-subscribe: conecta um conjunto de editores a um conjunto de assinantes. Este é um padrão de distribuição de dados.
  • push-pull (or pipeline): connects nodes in a fan-out/fan-in pattern that can have multiple steps and loops. This is a parallel task distribution and collection pattern.

Para ler um guia rápido veja ZeroMQ guide.

gevent

gevent é uma biblioteca de rede Python baseada em corutine que usa greenlets para fornecer uma API síncrona de alto nível em cima do loop de eventos libev.