Beam PHP2012 Workshops: The Cloud


Published on

Summary of principles and talks learnt from PHP London 2012. I have borrow ideas and materials from
I don't claim that this is all my own work, simply a summary presentation to the team at beam on what I learnt at the conference.

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

Beam PHP2012 Workshops: The Cloud

  1. 1. The Cloud An introduction, programming principles and what it means to beamTuesday, 20 March 12
  2. 2. Agenda • What is it • Types of services, and who provides them • The “hybrid cloud” • Beam (ideal) roadmap • Programming for the cloudTuesday, 20 March 12
  3. 3. What is it?Tuesday, 20 March 12
  4. 4. .... The InternetTuesday, 20 March 12
  5. 5. context From the source of all Knowledge: Cloud computing is the delivery of computing as a service rather than a product, whereby shared resources, software, and information are provided to computers and other devices as a utility (like the electricity grid) over a network (typically the Internet).[1] A model for consumption & delivery on the internet where flexibility is essential & can be guaranteed through abstractionTuesday, 20 March 12
  6. 6. Lots of Buzz Words • Fast (enough) • Infrastructure as a Service (IaaS) • Scalability • Platform as a Service (PaaS) • Always available • Software as a Service (SaaS) • As a service • StacksTuesday, 20 March 12
  7. 7. Lots of Buzz Words • We are looking at Infrastructure as a Service (IaaS) Storage, (Web/DB) Servers, Content Delivery, Caching • But we do use SaaS (harvest, etc.)Tuesday, 20 March 12
  8. 8. Providers • Amazon (self service IaaS) ✓ S3, EBS (storage), Cloudfront (CDN & Edge Caching), EC2 (Computing), Databases (RDBMS, NoSQL) • Azure (self service PaaS) ✓ Storage, CDN, SQL, Computing • Orchestra (PHP PaaS on top of AWS) ✓ Computing, Memcached, MySQL, CouchDB, MongoDB, etc. • Cloudflare (Protection SaaS) ✓ CDN, DDOS Security, Traffic Analysis • Rackspace ✓ Storage, CDN (via akamai), Computing • Many moreTuesday, 20 March 12
  9. 9. The Hybrid Cloud Pick the pieces of the puzzle yourself Mix traditional “self hosted” platform with cloud solutions Multiple ProvidersTuesday, 20 March 12
  10. 10. Quick Warning DO NOT AUTOSCALE (unless it’s on Roy’s credit card)Tuesday, 20 March 12
  11. 11. Beam Roadmap CDN for videos (Currently using cloudfront) Maybe look at akamai, limewire Offloading Using expensive BlueArc’s for all “static” files storage, cheaper cloud alternatives Put “Active” filestore in the cloud and take advantage of multiple geographical Anything else....! locations and speed Elastic Computing (transcoding, varnish caches)Tuesday, 20 March 12
  12. 12. Beam Roadmap But..... • We need to be careful about SLA’s, NDA’s • Need a reliable service • Need a secure service • There are providers that will help us with this • Not just cloud, hybrid is key (so we don’t pay for time we don’t use)Tuesday, 20 March 12
  13. 13. Programming for the cloud • Remove Single points of failure (good practice anyway) • Shared nothing (not mine, not yours, it’s ours) • Nothing is local • Be able to change and configure connections and locations easilyTuesday, 20 March 12
  14. 14. Give me some examples mysql_connect(‘localhost’) becomes mysql_connect(DB_SERVER_NAME) file_get_contents(‘/some/location/file’) becomes file_get_contents(SERVER_LOCATION . ‘/file’)Tuesday, 20 March 12
  15. 15. But they were bad examples Layers of abstraction Dependancy injection Modular DesignTuesday, 20 March 12
  16. 16. Better examples file_get_contents(‘/some/location/filename’) becomes $this->getComponent(‘fileGetter’)->getfile(‘filename’) mysql_connect(‘localhost’) becomes $this->getComponent(‘database’)->doSomethingTuesday, 20 March 12
  17. 17. Conclusion • To enable us to use Cloud, write software using already established best practices (dependancy, injection, etc.) • Cloud is scalable, can be fast and cost effective • Hybrid solution allows us to own our servers & services and keep costs down when demand is low, but scale up when needed • Don’t depend on any single itemTuesday, 20 March 12
  18. 18. QuestionsTuesday, 20 March 12