You are previewing Distributed Computing with Python.
O'Reilly logo
Distributed Computing with Python

Book Description

Harness the power of multiple computers using Python through this fast-paced informative guide

About This Book

  • You'll learn to write data processing programs in Python that are highly available, reliable, and fault tolerant

  • Make use of Amazon Web Services along with Python to establish a powerful remote computation system

  • Train Python to handle data-intensive and resource hungry applications

  • Who This Book Is For

    This book is for Python developers who have developed Python programs for data processing and now want to learn how to write fast, efficient programs that perform CPU-intensive data processing tasks.

    What You Will Learn

  • Get an introduction to parallel and distributed computing

  • See synchronous and asynchronous programming

  • Explore parallelism in Python

  • Distributed application with Celery

  • Python in the Cloud

  • Python on an HPC cluster

  • Test and debug distributed applications

  • In Detail

    CPU-intensive data processing tasks have become crucial considering the complexity of the various big data applications that are used today. Reducing the CPU utilization per process is very important to improve the overall speed of applications.

    This book will teach you how to perform parallel execution of computations by distributing them across multiple processors in a single machine, thus improving the overall performance of a big data processing task. We will cover synchronous and asynchronous models, shared memory and file systems, communication between various processes, synchronization, and more.

    Style and Approach

    This example based, step-by-step guide will show you how to make the best of your hardware configuration using Python for distributing applications.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

    Table of Contents

    1. Distributed Computing with Python
      1. Table of Contents
      2. Distributed Computing with Python
      3. Credits
      4. About the Author
      5. About the Reviewer
      6. www.PacktPub.com
        1. eBooks, discount offers, and more
          1. Why subscribe?
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. An Introduction to Parallel and Distributed Computing
        1. Parallel computing
        2. Distributed computing
        3. Shared memory versus distributed memory
        4. Amdahl's law
        5. The mixed paradigm
        6. Summary
      9. 2. Asynchronous Programming
        1. Coroutines
        2. An asynchronous example
        3. Summary
      10. 3. Parallelism in Python
        1. Multiple threads
        2. Multiple processes
        3. Multiprocess queues
        4. Closing thoughts
        5. Summary
      11. 4. Distributed Applications – with Celery
        1. Establishing a multimachine environment
        2. Installing Celery
        3. Testing the installation
        4. A tour of Celery
        5. More complex Celery applications
        6. Celery in production
        7. Celery alternatives – Python-RQ
        8. Celery alternatives – Pyro
        9. Summary
      12. 5. Python in the Cloud
        1. Cloud computing and AWS
        2. Creating an AWS account
        3. Creating an EC2 instance
        4. Storing data in Amazon S3
        5. Amazon elastic beanstalk
        6. Creating a private cloud
        7. Summary
      13. 6. Python on an HPC Cluster
        1. Your typical HPC cluster
        2. Job schedulers
        3. Running a Python job using HTCondor
        4. Running a Python job using PBS
        5. Debugging
        6. Summary
      14. 7. Testing and Debugging Distributed Applications
        1. The big picture
        2. Common problems – clocks and time
        3. Common problems – software environments
        4. Common problems – permissions and environments
        5. Common problems – the availability of hardware resources
        6. Challenges – the development environment
        7. A useful strategy – logging everything
        8. A useful strategy – simulating components
        9. Summary
      15. 8. The Road Ahead
        1. The first two chapters
        2. The tools
        3. The cloud and the HPC world
        4. Debugging and monitoring
        5. Where to go next
      16. Index