PHP in the Cloud: PHP Tools for Scalable Apps
Join the DZone community and get the full member experience.
Join For FreeWhy develop for the cloud? In a word: tons of headaches vanish (scalability, reliability, interface complexity, all of IT). But you don't need to use a PaaS or IaaS in order to kill these headaches, using cloud-like techniques.
All website-serving servers, for example, need to be scalable, simply because they are accessible from the web. (What happens when reddit latches on to your site?)
Precisely for this reason, the PHP ecosystem has engendered a set of awesome scalability tools, designed to give each part of the web-serving infrastructure (storage, database, cache, queues) enough independence that a change in the size of one won't break any of the others
The basic concept is called 'shared-nothing architecture', the infrastructural analogue of modular object-oriented code. And David Coallier -- president of PEAR and co-founder of Orchestra -- is the perfect person to explain it.
In a recent blogpost titled 'Egomaniacal and Scalable Apps' (which I take to mean that good PHP apps don't have boundary issues), David explains:
A system that is tightly linked to its filesystem for file uploads, databases, sessions, &c. is not scalable. Luckily, in the PHP world, we have quite a few tools to help us attain a high degree of selfishness.
He goes on to list, describe, and code-snippify some of his favorites:
- Memcached
- Membase
- Redis
- SessionHandler
- Amazon S3
Plus a few more not so directly pluggable-into PHP tools (Gearman, ZeroMQ).
If you're not already using these tools, they could make a big difference in your PHP application reliability and performance. (And if you are already using these tools, you probably can't imagine webserving without them.)
Check out David's full post for more.
Opinions expressed by DZone contributors are their own.
Comments