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

SitePoint PHP Blog:
IronMQ and Laravel Delays and Retries
August 15, 2014 @ 11:07:14

The SitePoint PHP blog has posted the second part of their IronMQ and Laravel series, part 3: IronMQ and Laravel: Delays and Retries. In this latest post Rajiv Seelam looks at how to get the Laravel-based application to overcome some of the limitations of the system.

Previously, we saw how to use Iron push queues with Laravel. All we needed to do was set up an Iron account, add a subscriber URL, push a message to queue, and receive the message. The way Laravel supports Iron push queues out-of-the-box is amazing, but there are always limitations. In this article we focus on those limitations and learn to tackle them.

He briefly talks about the three different scenarios: the happy path where everything works, the job fails and the job being a long running process. He then walks you through code that covers each of these scenarios using subscribers and the IronMQ PHP library for successful handling. He shows the push of a message then how to handle delays and retries, defining them in the job configuration.

0 comments voice your opinion now!
ironmq tutorial series delay retry laravel

Link: http://www.sitepoint.com/ironmq-laravel-delays-retries/

Paul Reinheimer:
PHP and Async requests with file based sessions
July 24, 2013 @ 09:52:43

Paul Reinheimer had a problem - when he was making asynchronous requests back to his server from his frontend (Ajax) there was a slowness he noticed when more than one connection was fired off. In this new post to his site he traces through how he found the answer and what he did to fix it.

Digging a little deeper into the queries being executed, I was expecting return times in the order of 200ms, not the several seconds I was seeing. Installing XHGui only furthered my confusion: session_start() was the culprit with incredibly high run times.

He thought first about the number of session files (stored locally) being too large and causing issues, but that turned out to be a false lead. Instead, the issue was something PHP does by default...and does correctly. When PHP executes, it locks the session file, preventing another process from writing to it. This caused the delay he saw until it was unlocked. His solution? Use session_write_close immediately after writing information to unlock the session for further use.

0 comments voice your opinion now!
asynchronous session lock delay filebased request

Link: http://blog.preinheimer.com/index.php?/archives/416-PHP-and-Async-requests-with-file-based-sessions.html

Vance Lucas' Blog:
Practical Uses for PHP 5.3 Closures
October 20, 2010 @ 08:51:47

By now everyone's heard about one of the more powerful and major advancements made in the PHP 5.3.x series of the language - closures. You might have read a description of them and been left wondering what a practical application might be to help drive the point home. Vance Lucas has written up a post to help with just that.

If you're like me, you might be wondering what the practical uses for these new features are before you can rightly justify diving in and using them in new or existing projects. I experimented a lot with closures and possible uses over the past few weeks, and came up with some compelling reasons to start using them.

He's come up with five different examples of how you can use this handy feature:

  • Templating
  • Dynamic Code Extension
  • Delayed Execution
  • Caching
  • Convenience (as in their role in one-off functions for callbacks)

Each of the tips comes with a bit of code (except delayed execution, that's a bit more involved) to help explain the point a bit more.

0 comments voice your opinion now!
closure practical example template dynamic delay cache


Derick Rethans' Blog:
Collecting Garbage Performance Considerations
September 13, 2010 @ 11:22:42

Derick Rethans has posted the third part of his series looking at the garbage collection handling in PHP (the first two parts are here: one, two). In this last part of the series, he'll look at some of the possible performance impacts the garbage collection functionality can have in your applications.

In the previous two parts of this column we have explored PHP's take on circular referenced variables and a mechanism that allows to clean up this particular problem with reference counted variable tracking. Of course, the implementation of the garbage collection mechanism in PHP 5.3 has some performance impacts. In this third and last part of the column I will cover the performance implications of the addition of this garbage collection mechanism.

He looks at the two possible places that the collection could have an impact - memory usage and run-time delays when the garbage collection routine is fired off and does its job. As before, each of the topics is accompanied by bits of code and a few graphs showing the differences between handling in PHP 5.2 and PHP 5.3 as well as a handy way to get a bit more information out of PHP (using the GC_BENCH CFLAG when compiling). ,/p>

0 comments voice your opinion now!
garbage collection performance memory usage runtime delay


Lukas Smith's Blog:
PHP 5.3.0 stable almost released )
June 25, 2009 @ 07:33:21

As Lukas Smith mentions in his latest post to his blog, the release of PHP 5.3 that was originally slated for today has been put off just a bit longer.

It almost happened, but it didn't for now. Originally we planned to release today. But again a few issues came up, even with Johannes deciding that sleep is for the weak, it just seemed unwise to announce the release today. So we pushed things back a few days, so the new date is June 30th (meaning it will be a Tuesday release).

We'll announce this as soon as its posted as stable to the PHP.net website, so keep an eye out on Tuesday for this greatly anticipated release!

0 comments voice your opinion now!
delay release php5



Community Events





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


release artisanfiles laravel series conference security version tool composer interview opinion introduction list symfony podcast library language community voicesoftheelephpant framework

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