Free Sample
+ Collection

Parallel Programming with Python

Jan Palach

Develop efficient parallel systems using the robust Python environment.
RRP $13.99
RRP $22.99
Print + eBook

Want this title & more?

$16.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781783288397
Paperback128 pages

About This Book

  • Demonstrates the concepts of Python parallel programming
  • Boosts your Python computing capabilities
  • Contains easy-to-understand explanations and plenty of examples

Who This Book Is For

If you are an experienced Python programmer and are willing to utilize the available computing resources by parallelizing applications in a simple way, then this book is for you. You are required to have a basic knowledge of Python development to get the most of this book.

Table of Contents

Chapter 1: Contextualizing Parallel, Concurrent, and Distributed Programming
Why use parallel programming?
Exploring common forms of parallelization
Communicating in parallel programming
Identifying parallel programming problems
Discovering Python's parallel programming tools
Taking care of Python GIL
Chapter 2: Designing Parallel Algorithms
The divide and conquer technique
Using data decomposition
Decomposing tasks with pipeline
Processing and mapping
Chapter 3: Identifying a Parallelizable Problem
Obtaining the highest Fibonacci value for multiple inputs
Crawling the Web
Chapter 4: Using the threading and concurrent.futures Modules
Defining threads
Using threading to obtain the Fibonacci series term with multiple inputs
Crawling the Web using the concurrent.futures module
Chapter 5: Using Multiprocessing and ProcessPoolExecutor
Understanding the concept of a process
Implementing multiprocessing communication
Using multiprocessing to compute Fibonacci series terms with multiple inputs
Crawling the Web using ProcessPoolExecutor
Chapter 6: Utilizing Parallel Python
Understanding interprocess communication
Discovering PP
Using PP to calculate the Fibonacci series term on SMP architecture
Using PP to make a distributed Web crawler
Chapter 7: Distributing Tasks with Celery
Understanding Celery
Understanding Celery's architecture
Setting up the environment
Dispatching a simple task
Using Celery to obtain a Fibonacci series term
Defining queues by task types
Using Celery to make a distributed Web crawler
Chapter 8: Doing Things Asynchronously
Understanding blocking, nonblocking, and asynchronous operations
Understanding event loop
Using asyncio

What You Will Learn

  • Explore techniques to parallelize problems
  • Integrate the Parallel Python module to implement Python code
  • Execute parallel solutions on simple problems
  • Achieve communication between processes using Pipe and Queue
  • Use Celery Distributed Task Queue
  • Implement asynchronous I/O using the Python asyncio module
  • Create thread-safe structures

In Detail

Starting with the basics of parallel programming, you will proceed to learn about how to build parallel algorithms and their implementation. You will then gain the expertise to evaluate problem domains, identify if a particular problem can be parallelized, and how to use the Threading and Multiprocessor modules in Python.

The Python Parallel (PP) module, which is another mechanism for parallel programming, is covered in depth to help you optimize the usage of PP. You will also delve into using Celery to perform distributed tasks efficiently and easily. Furthermore, you will learn about asynchronous I/O using the asyncio module. Finally, by the end of this book you will acquire an in-depth understanding about what the Python language has to offer in terms of built-in and external modules for an effective implementation of Parallel Programming.

This is a definitive guide that will teach you everything you need to know to develop and maintain high-performance parallel computing systems using the feature-rich Python.


Read More

Recommended for You

Learning Python Data Visualization
$ 28.99