Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Sistemas Distribuidos en Python

Sistemas Distribuidos en Python

Una recorrida por las principales opciones a la hora de construir sistemas de computación distribuida en Python.

Avatar for Michael Cetrulo

Michael Cetrulo

November 10, 2012
Tweet

Other Decks in Programming

Transcript

  1. Paralelismo en Python In CPython, the global interpreter lock, or

    GIL, is a mutex that prevents multiple native threads from executing Python bytecodes at once. • Note that CPython 2.x and 3.[01] suffer from a GIL, as does PyPy 1.4.1 • CPython 3.2 still has a GIL, but it's purportedly less troublesome • Jython and IronPython have no GIL, nor any GIL-related concurrency issues • Cython has the ability to selectively release the GIL using a "with" statement fuente: http://wiki.python.org/moin/Concurrency/
  2. greenlets y tasklets • "green threads" o threads de userspace

    ◦ scheduler interno ◦ concurrencia cooperativa • ofrecen mejor performance ◦ sufren las mismas limitaciones que el interprete
  3. gevent • basado en libevent y greenlet ◦ provee un

    toolkit de networking asincrono ◦ agrega utilidades como pooling a greenlet • hace monkey-patching sobre la lib estandar de Python ◦ transforma los modulos que bloquean I/O en procesos asincronos (corutinas)
  4. Twisted • networking framework ◦ basado en eventos y callbacks

    ◦ sumamente estable y performante ◦ cubre aspectos de cliente y servidor ◦ implementa muchisimos protocolos • contras: ◦ requiere codigo especifico de Twisted ◦ funciona con un "reactor" persistente
  5. • cola de tareas distribuida ◦ similar a resque de

    Ruby ◦ soporta diferentes backends: ▪ RabbitMQ, Redis, RDBMSs, Amazon SQS, MongoDB • se usa como servicio ◦ las tareas se schedulean desde la aplicacion ◦ se integra con el ORM para monitoreo Celery
  6. Michael Cetrulo • blog: http://blog2samus.tumblr.com/ • github: https://github.com/git2samus • linkedin:

    http://www.linkedin.com/in/web2samus Muchas Gracias Slides: http://goo.gl/eFXQA