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

Erika Heidi Reinaldo:
Optimizing Symfony applications on Vagrant boxes
Sep 25, 2013 @ 14:34:03

Ericka Heidi has a new post to her site today continuing on her theme of useful Vagrant advice with a look at optimizing Symfony applications on your Vagrant-managed instances.

A few months after I started playing around with Vagrant and Puppet, with smaller applications, I had the task to create a box for a Symfony app for the first time. I thought “all right, no problema! this will be a piece of cake, I already know the process, I just need to put it on puppet”. And of course I was wrong.

Most of her problem revolved around performance - the Symfony applications were taking between 6 to 8 seconds to load. After trying several options (hardware and software), she narrowed it down to the overall I/O as the application was trying to access an NFS mounted directory for the "vendors" folder. She changed around the locations of some of the directories and was able to drop the page load times by quite a bit. She's posted the results of her work as a Vagrant file for easy download and use too.

tagged: optimize symfony application vagrant instance vendor io performance

Link: http://www.erikaheidi.com/2013/09/24/optimizing-symfony-applications-vagrant-boxes/

Rob Young's Blog:
Non-blocking I/O With PHP-MIO
Apr 24, 2007 @ 15:54:00

Via the Zend Developer Zone, I found out about this new article from Rob Young about using PHP-MIO to create non-blocking I/O.

A couple of weeks ago I was thinking about non-blocking I/O in PHP, specifically about how clunky PHP's select implementation is. I say clunky because it's not bad, it's just not as easy to use as it could be.

[...] I have to remember which streams I'm interested in writing to, which streams I'm interested in reading from and when I get to accepting connections, which streams are server sockets that I'm interested in accepting connections on. I'm lazy, I don't want to have to do that , I want a library to handle all that for me. At this point I decided to implement something similar to Java's non-blocking I/O in PHP5. This is now finished and up on sourceforce (under the name of phpmio). In this article I hope to give you enough information to get up and running with the package.

He explains what multiplexed I/O is (including code), what PHP-MIO is (yes, including code), and a more real life example of how to use it - a simple server that accepts connections and spits back a simple response.

tagged: phpmio nonblocking multiplexed Io tutorial phpmio nonblocking multiplexed Io tutorial

Link:

Rob Young's Blog:
Non-blocking I/O With PHP-MIO
Apr 24, 2007 @ 15:54:00

Via the Zend Developer Zone, I found out about this new article from Rob Young about using PHP-MIO to create non-blocking I/O.

A couple of weeks ago I was thinking about non-blocking I/O in PHP, specifically about how clunky PHP's select implementation is. I say clunky because it's not bad, it's just not as easy to use as it could be.

[...] I have to remember which streams I'm interested in writing to, which streams I'm interested in reading from and when I get to accepting connections, which streams are server sockets that I'm interested in accepting connections on. I'm lazy, I don't want to have to do that , I want a library to handle all that for me. At this point I decided to implement something similar to Java's non-blocking I/O in PHP5. This is now finished and up on sourceforce (under the name of phpmio). In this article I hope to give you enough information to get up and running with the package.

He explains what multiplexed I/O is (including code), what PHP-MIO is (yes, including code), and a more real life example of how to use it - a simple server that accepts connections and spits back a simple response.

tagged: phpmio nonblocking multiplexed Io tutorial phpmio nonblocking multiplexed Io tutorial

Link:


Trending Topics: