News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Jonathan Hill:
Video Multi-tasking in PHP (from Atlanta PHP)
December 28, 2012 @ 11:33:15

Jonathan Hill has posted the video of his recent presentation at the Atlanta PHP User Group, "Multi-tasking in PHP".

When it comes to multi-tasking and interacting with the operating system, PHP is no lightweight. In this December 6, 2012 presentation Jonathon Hill (@compwright) explores PHP's little-known POSIX, Process Control, and Semaphore extensions and shows you how to introduce a parallel dimension to your applications.

His presentation covers the use of multi-tasking to accomplish some common tasks in PHP (like batch processing or creating daemons). He talks about multi-processing vs multi-threading, forking, race conditions and semaphores.

You can watch the video of the presentation over on Vimeo and check out the software and links to other resources mentioned in the talk in this link bundle.

0 comments voice your opinion now!
video multitasking fork threading semaphore links


Nikita Popov:
Cooperative multitasking using coroutines (in PHP!)
December 24, 2012 @ 09:46:36

Nikita Popov has a new post to his blog about a new feature that will be coming in PHP 5.5 and how to use them, coroutines and generators, in an example application.

Coroutines on the other hand have received relatively little attention. The reason is that coroutines are both a lot more powerful and a lot harder to understand and explain. In this article I'd like to guide you through an implementation of a task scheduler using coroutines, so you can get a feeling for the stuff that they allow you to do. I'll start off with a few introductory sections. If you feel like you already got a good grasp of the basics behind generators and coroutines, then you can jump straight to the "Cooperative multitasking" section.

He starts with a look at generators, a piece of functionality that will allow PHP to, for example, more easily create iterators "on the fly." He then moves on to coroutines, added functions that you have two-way communication with generators instead of just pulling data from them. With the basics out of the way, he gets into the "cooperative multitasking" and a sample socket-based server he implements using some of the concepts.

0 comments voice your opinion now!
generator coroutine multitasking server socket tutorial


Community News:
Atlanta PHP December 2012 Meeting - Multi-Tasking in PHP
November 13, 2012 @ 11:15:04

The Atlanta PHP User Group has announced their December 2012 meeting happening on the 6th. The presenter this time will be Jonathan Hill covering multi-tasking in PHP.

When it comes to multi-tasking and interacting with the operating system, PHP is no lightweight. In this talk we'll explore PHP's little-known POSIX, Process Control, and Semaphore extensions and show you how to introduce a parallel dimension to your applications.

A "mini-talk" will also be given by Jason Bouffard about screen scraping with Goutte. The meeting is on December 6th at 7pm at the Strongbox West offices in Atlanta.

0 comments voice your opinion now!
atlantaphp usergroup december meeting multitasking


Jacob Santos' Blog:
Multitasking in PHP
August 19, 2006 @ 15:23:43

In his latest blog post, Jacob Santos takes a look at a common request PHP developers hit after a while - is it possible to multitask processes/actions in php?

The ability to run two or more commands in parallel is totally sexy, but the Web is a different playing field and it doesn't make complete sense.

PHP loses control, once the output is sent and the connection is closed. Multithreading would probably make sense in streaming, but PHP already handles that for you where it makes sense for the function. Furthermore, mulithreading has its purpose in applications that continue to run and not something that closes and cleans up everything after the last command is issued.

He continues talking more about what multitasking is, a more real life example, the goods, the bads, and some of the issues that can come along with it. Finally, he suggests a feature to be added to the core of PHP - an "internal multitasking mechanism" to help aid these kinds of processes.

0 comments voice your opinion now!
multitasking common questions real world good bad multitasking common questions real world good bad



Community Events





Don't see your event here?
Let us know!


release podcast package deployment introduction opinion language api symfony update laravel bugfix framework install interview zendserver series community library tips

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework