News Feed
Sections




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

PHPWomen.org:
One way to handle concurrency in a multi-user web app
September 24, 2012 @ 10:40:33

In this new post to the PHPWomen site, Kim Rowan shows one way that you can effectively handle concurrency in your applications (in her case, a Symfony app).

Concurrent user activity on the web can take many forms. For example, two online shoppers may simultaneously try to buy the last pair of 'gotta-have-em' shoes in stock. Presumably one potential outcome in this scenario is to place the shoes on back-order for the slower shopper. The concurrency challenge I faced recently, however, was a bit different...

She uses a "last updated" data field in her form to see when the record in question was last changed. When the form is submitted the script checks against the updated date on the record to see if it's later than the one submitted. If it's more recent, the user's request could cause errors, so it fails.

0 comments voice your opinion now!
tutorial concurrency application lastupdated record


blog comments powered by Disqus

Similar Posts

Profeshunl Newbie Blog: MongoDB as in huMONGOus, not retarded

Programming Are Hard: Structuring my applications, Cont'd

Master Zend Framework: Howto Use Constructor Injection In ZF2

Mihai Corlan's Blog: Debugging Flex and PHP

Benjamin Schneider's Blog: Use PHP's Tidy extension to validate your (X)HTML markup


Community Events

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


release version laravel5 language framework community introduction voicesoftheelephpant library interview opinion unittest wordpress laravel extension example series podcast php7 api

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