SlideShare a Scribd company logo
1 of 27
Download to read offline
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

More Related Content

Viewers also liked

Azul Systems - Our corporate overview
Azul Systems  - Our corporate overviewAzul Systems  - Our corporate overview
Azul Systems - Our corporate overviewAzul Systems Inc.
 
Os10
Os10Os10
Os10issbp
 
Ch3 OS
Ch3 OSCh3 OS
Ch3 OSC.U
 
Class2
 Class2 Class2
Class2issbp
 
Sap Business Objects Riske Duyarlı Isletmeler Ugurcandan
Sap Business Objects Riske Duyarlı Isletmeler UgurcandanSap Business Objects Riske Duyarlı Isletmeler Ugurcandan
Sap Business Objects Riske Duyarlı Isletmeler Ugurcandanugur candan
 
Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)
Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)
Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)David Gómez García
 
Os10 2
Os10 2Os10 2
Os10 2issbp
 
Mahalli̇ İdarelerde İş Sağliği ve Güvenli̇ği̇ - Risk Değerlendirmesi Rehberi̇...
Mahalli̇ İdarelerde İş Sağliği ve Güvenli̇ği̇ - Risk Değerlendirmesi Rehberi̇...Mahalli̇ İdarelerde İş Sağliği ve Güvenli̇ği̇ - Risk Değerlendirmesi Rehberi̇...
Mahalli̇ İdarelerde İş Sağliği ve Güvenli̇ği̇ - Risk Değerlendirmesi Rehberi̇...Ekrem CAKMAK
 

Viewers also liked (9)

Azul Systems - Our corporate overview
Azul Systems  - Our corporate overviewAzul Systems  - Our corporate overview
Azul Systems - Our corporate overview
 
Os10
Os10Os10
Os10
 
Os3
Os3Os3
Os3
 
Ch3 OS
Ch3 OSCh3 OS
Ch3 OS
 
Class2
 Class2 Class2
Class2
 
Sap Business Objects Riske Duyarlı Isletmeler Ugurcandan
Sap Business Objects Riske Duyarlı Isletmeler UgurcandanSap Business Objects Riske Duyarlı Isletmeler Ugurcandan
Sap Business Objects Riske Duyarlı Isletmeler Ugurcandan
 
Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)
Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)
Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)
 
Os10 2
Os10 2Os10 2
Os10 2
 
Mahalli̇ İdarelerde İş Sağliği ve Güvenli̇ği̇ - Risk Değerlendirmesi Rehberi̇...
Mahalli̇ İdarelerde İş Sağliği ve Güvenli̇ği̇ - Risk Değerlendirmesi Rehberi̇...Mahalli̇ İdarelerde İş Sağliği ve Güvenli̇ği̇ - Risk Değerlendirmesi Rehberi̇...
Mahalli̇ İdarelerde İş Sağliği ve Güvenli̇ği̇ - Risk Değerlendirmesi Rehberi̇...
 

Similar to Thread based development with PHP

Scalability
ScalabilityScalability
Scalabilitysergeyz
 
Put a little Backbone in your WordPress vs. 3
Put a little Backbone in your WordPress vs. 3Put a little Backbone in your WordPress vs. 3
Put a little Backbone in your WordPress vs. 3adamsilverstein
 
Introduction to Node js for beginners + game project
Introduction to Node js for beginners + game projectIntroduction to Node js for beginners + game project
Introduction to Node js for beginners + game projectLaurence Svekis ✔
 
Akash rajguru project report sem v
Akash rajguru project report sem vAkash rajguru project report sem v
Akash rajguru project report sem vAkash Rajguru
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpackNodeXperts
 
Parallel programming using python
Parallel programming using python Parallel programming using python
Parallel programming using python Samah Gad
 
Node JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web AppNode JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web AppEdureka!
 
Learn backend java script
Learn backend java scriptLearn backend java script
Learn backend java scriptTsuyoshi Maeda
 
Parallel programming using python
Parallel programming using python Parallel programming using python
Parallel programming using python Samah Gad
 
Contributing to Apache Airflow | Journey to becoming Airflow's leading contri...
Contributing to Apache Airflow | Journey to becoming Airflow's leading contri...Contributing to Apache Airflow | Journey to becoming Airflow's leading contri...
Contributing to Apache Airflow | Journey to becoming Airflow's leading contri...Kaxil Naik
 
CIW Lab with CoheisveFT: Get started in public cloud - Part 1 Cloud & Virtual...
CIW Lab with CoheisveFT: Get started in public cloud - Part 1 Cloud & Virtual...CIW Lab with CoheisveFT: Get started in public cloud - Part 1 Cloud & Virtual...
CIW Lab with CoheisveFT: Get started in public cloud - Part 1 Cloud & Virtual...Ryan Koop
 
Ryan Jarvinen Open Shift Talk @ Postgres Open 2013
Ryan Jarvinen Open Shift Talk @ Postgres Open 2013Ryan Jarvinen Open Shift Talk @ Postgres Open 2013
Ryan Jarvinen Open Shift Talk @ Postgres Open 2013PostgresOpen
 
An introduction to Node.js application development
An introduction to Node.js application developmentAn introduction to Node.js application development
An introduction to Node.js application developmentshelloidhq
 
DiUS Computing Lca Rails Final
DiUS  Computing Lca Rails FinalDiUS  Computing Lca Rails Final
DiUS Computing Lca Rails FinalRobert Postill
 
php[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP apps
php[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP appsphp[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP apps
php[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP appsPablo Godel
 

Similar to Thread based development with PHP (20)

Drupal Development Tips
Drupal Development TipsDrupal Development Tips
Drupal Development Tips
 
Scalability
ScalabilityScalability
Scalability
 
Node.js and express
Node.js and expressNode.js and express
Node.js and express
 
Put a little Backbone in your WordPress vs. 3
Put a little Backbone in your WordPress vs. 3Put a little Backbone in your WordPress vs. 3
Put a little Backbone in your WordPress vs. 3
 
Cors michael
Cors michaelCors michael
Cors michael
 
Introduction to Node js for beginners + game project
Introduction to Node js for beginners + game projectIntroduction to Node js for beginners + game project
Introduction to Node js for beginners + game project
 
Akash rajguru project report sem v
Akash rajguru project report sem vAkash rajguru project report sem v
Akash rajguru project report sem v
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpack
 
Parallel programming using python
Parallel programming using python Parallel programming using python
Parallel programming using python
 
Node JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web AppNode JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web App
 
Backbone
BackboneBackbone
Backbone
 
Learn backend java script
Learn backend java scriptLearn backend java script
Learn backend java script
 
Parallel programming using python
Parallel programming using python Parallel programming using python
Parallel programming using python
 
Sword v2 at UKCoRR
Sword v2 at UKCoRRSword v2 at UKCoRR
Sword v2 at UKCoRR
 
Contributing to Apache Airflow | Journey to becoming Airflow's leading contri...
Contributing to Apache Airflow | Journey to becoming Airflow's leading contri...Contributing to Apache Airflow | Journey to becoming Airflow's leading contri...
Contributing to Apache Airflow | Journey to becoming Airflow's leading contri...
 
CIW Lab with CoheisveFT: Get started in public cloud - Part 1 Cloud & Virtual...
CIW Lab with CoheisveFT: Get started in public cloud - Part 1 Cloud & Virtual...CIW Lab with CoheisveFT: Get started in public cloud - Part 1 Cloud & Virtual...
CIW Lab with CoheisveFT: Get started in public cloud - Part 1 Cloud & Virtual...
 
Ryan Jarvinen Open Shift Talk @ Postgres Open 2013
Ryan Jarvinen Open Shift Talk @ Postgres Open 2013Ryan Jarvinen Open Shift Talk @ Postgres Open 2013
Ryan Jarvinen Open Shift Talk @ Postgres Open 2013
 
An introduction to Node.js application development
An introduction to Node.js application developmentAn introduction to Node.js application development
An introduction to Node.js application development
 
DiUS Computing Lca Rails Final
DiUS  Computing Lca Rails FinalDiUS  Computing Lca Rails Final
DiUS Computing Lca Rails Final
 
php[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP apps
php[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP appsphp[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP apps
php[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP apps
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Recently uploaded (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Thread based development with PHP

  • 1. PHP and Thread based development September 2013 Sunday, September 22, 13
  • 2. 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
  • 3. What is a Thread Procedure that runs independently from its main program Threads typically exists as subsets of processes Sunday, September 22, 13
  • 4. 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
  • 5. 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
  • 6. PHP and Thread based development Starting a simple Thread Sunday, September 22, 13
  • 7. PHP and Thread based development Starting a simple Thread - Result Sunday, September 22, 13
  • 8. 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
  • 9. PHP and Thread based development Sharing data using a Stackable Sunday, September 22, 13
  • 10. PHP and Thread based development Stacking data using a Worker - Result Sunday, September 22, 13
  • 11. Sharing data using a Stackable Tasks that are executed by Worker threads Enables you to share data between threads Sunday, September 22, 13
  • 12. PHP and Thread based development Sharing data using a Stackable Sunday, September 22, 13
  • 13. PHP and Thread based development Sharing data using a Stackable - Result Sunday, September 22, 13
  • 14. Synchronize using a Mutex Can be used to prevent threads overwrite shared data Sunday, September 22, 13
  • 15. PHP and Thread based development Synchronize using a Mutex Sunday, September 22, 13
  • 16. PHP and Thread based development Starting a simple Thread - Result Sunday, September 22, 13
  • 17. Synchronize using a Closure Necessary to influence Thread workflow Allows starting/stopping a referenced Thread Sunday, September 22, 13
  • 18. PHP and Thread based development Synchronize using a Closure Sunday, September 22, 13
  • 19. PHP and Thread based development Synchronize using a Closure - Result Sunday, September 22, 13
  • 20. Sharing resources Some resource types can be shared, e. g. sockets Not all resources can be shared, e. g. MySQLi Sunday, September 22, 13
  • 21. PHP and Thread based development Sharing resources Sunday, September 22, 13
  • 22. PHP and Thread based development Sharing resources - Result Sunday, September 22, 13
  • 23. 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
  • 24. 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
  • 25. PHP and Thread based development Website Sunday, September 22, 13
  • 27. 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