Thread based development with PHP

67 %
33 %
Information about Thread based development with PHP
Technology

Published on September 22, 2013

Author: wagner_tim78

Source: slideshare.net

Description

Talk about thread based software development with PHP using Joe Watkins PECL extension phtreads.

PHP and Thread based development September 2013 Sunday, September 22, 13

PHP and Thread based development Schedule What is a Thread What do i need to work with Threads in PHP Starting a simple Thread Stack data using a Worker Sharing data using a Stackable Synchronize using a Mutex Synchronize using a Closure Stack your data on a Worker Sharing resources Problems you’ll face when working with Threads Sunday, September 22, 13

What is a Thread Procedure that runs independently from its main program Threads typically exists as subsets of processes Sunday, September 22, 13

What do i need to work with Threads PHP 5.3+ compiled thread safe with --enable-maintainer-zts PECL extension pthreads or install runtime from http://appserver.io Sunday, September 22, 13

Starting a simple Thread Shows how a Thread will be created and started That the script has been finished before the Thread has been finished Sunday, September 22, 13

PHP and Thread based development Starting a simple Thread Sunday, September 22, 13

PHP and Thread based development Starting a simple Thread - Result Sunday, September 22, 13

Stack data using a Worker Allows you to stack data and execute in a Thread Works like a queue Interesting to build a daemon e. g. a HTTP server ;) Sunday, September 22, 13

PHP and Thread based development Sharing data using a Stackable Sunday, September 22, 13

PHP and Thread based development Stacking data using a Worker - Result Sunday, September 22, 13

Sharing data using a Stackable Tasks that are executed by Worker threads Enables you to share data between threads Sunday, September 22, 13

PHP and Thread based development Sharing data using a Stackable Sunday, September 22, 13

PHP and Thread based development Sharing data using a Stackable - Result Sunday, September 22, 13

Synchronize using a Mutex Can be used to prevent threads overwrite shared data Sunday, September 22, 13

PHP and Thread based development Synchronize using a Mutex Sunday, September 22, 13

PHP and Thread based development Starting a simple Thread - Result Sunday, September 22, 13

Synchronize using a Closure Necessary to influence Thread workflow Allows starting/stopping a referenced Thread Sunday, September 22, 13

PHP and Thread based development Synchronize using a Closure Sunday, September 22, 13

PHP and Thread based development Synchronize using a Closure - Result Sunday, September 22, 13

Sharing resources Some resource types can be shared, e. g. sockets Not all resources can be shared, e. g. MySQLi Sunday, September 22, 13

PHP and Thread based development Sharing resources Sunday, September 22, 13

PHP and Thread based development Sharing resources - Result Sunday, September 22, 13

appserver.io, a reference HTTP 1.1 compliant web server Persistence Container supporting Doctrine MessageQueue Websocket Server based on Ratchet Demo applications available: Neos, Magento ... more soon Sunday, September 22, 13

PHP and Thread based development Installation as .pkg file on Mac OS X 10.8.x as .deb for Debian 7.x + Ubuntu 12.04 Debian Repository http://deb.appserver.io Sunday, September 22, 13

PHP and Thread based development Website Sunday, September 22, 13

More information ... https://github.com/krakjoe/pthreads https://computing.llnl.gov/tutorials/pthreads/ http://appserver.io https://github.com/techdivision/TechDivision_ApplicationServer http://www.slideshare.net/wagner_tim78/thread-based-development-with-php http://tinyurl.com/na5ulal Sunday, September 22, 13

PHP and Thread based development Tim Wagner TechDivision GmbH Spinnereiinsel 3a 83059 Kolbermoor +49 8031 / 221055-0 +49 8031 / 221055-22 info@techdivision.com www.techdivision.com Thanks! Sunday, September 22, 13

Add a comment

Related presentations

Related pages

THREAD | The remote patient research and care platform

Harnesses the power of patient data through the design and development of digital clinical research efforts ... Understanding the THREAD Research ...
Read more

A Basic Overview of Android Threads and Thread handlers ...

A Basic Overview of Android Threads and Thread ... Android Studio 2.2 Development ... com/index.php?title=A_Basic_Overview_of_Android_Threads_and_Thread ...
Read more

PHP For Windows: Binaries and sources Releases

PHP For Windows. This site is ... to use the Thread Safe (TS) versions of PHP ... that allows you to optimize an output file based on profiling data ...
Read more

multithreading - What is thread safe or non thread safe in ...

I saw different binaries for PHP, like non thread or thread safe? ... Speaking only of UNIX-based environments, ... WordPress Development;
Read more

Windows-based Ubuntu Installer Development Thread (merged ...

THIS THREAD, FORMERLY TITLED " Idea: Install via windows on loopmounted ntfs?" HAS BEEN MERGED TOGETHER WITH ITS CONTINUATION THREAD, FORMERLY TITLED ...
Read more

Thread (computing) - Wikipedia

I/O and scheduling. User thread or fiber implementations are typically entirely in userspace. As a result, context switching between user threads or fibers ...
Read more

Eclipse PHP Integrated Development Environment

Eclipse PHP Integrated Development Environment. The project has been created. Please visit the project page. Introduction. The PHP IDE Project is a ...
Read more