PHP Office Hours

2,747 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,747
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
17
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

PHP Office Hours

  1. 1. PHP Office Hours January 12th, 2011
  2. 2. Introduction Jeff Barr, Sr. Evangelist Ryan Parman, PHP Based in Seattle Development Engineer Author of Based in Seattle “Host Your Website in the Creator of the PHP SDK Cloud”
  3. 3. Office Hours IS Simply, Office Hours is a program the enables a technical audience the ability to interact with AWS technical experts. We look to improve this program by soliciting feedback from Office Hours attendees. Please let us know what you would like to see.
  4. 4. Office Hours is NOT Support  If you have a problem with your current deployment please visit our forums or our support website http://aws.amazon.com/premiumsupport/ A place to find out about upcoming services  We do not typically disclose information about our services until they are available.
  5. 5. Agenda What’s New How-to Demonstrations  Dynamically Instantiate Infrastructure  Scalable Processing Pipeline Question and Answer  Please begin submitting questions now
  6. 6. Programming AWS With PHPWe’ll use the free AWS SDK for PHP libraries from http://aws.amazon.com/sdkforphp
  7. 7. SDK Basics  Download and unpack  Add directory to PHP’s include_path  Add AWS keys to config.inc.php define(AWS_KEY, J35NTGFCQOIUY3OMNSQQ); define(AWS_SECRET_KEY, 99pizu2vVOK11rk9UAgWVj7PBGzWwertqJlgLV0c);  Include one file: require_once(sdk.class.php);
  8. 8. SDK XML / PHP SimpleXML
  9. 9. Example 1 – Dynamically Instantiate Infrastructure 10 GB EBS Volume Elastic IPAddress EC2 Instance 100 GB EBS Volume
  10. 10. Run an EC2 Instance
  11. 11. Get Instance Info
  12. 12. Allocate Elastic IP Address
  13. 13. Attach IP Address to Instance
  14. 14. Create 2 EBS Virtual Disk Volumes
  15. 15. Attach The Volumes To the Instance
  16. 16. Example 2 – Scalable Processing Pipeline
  17. 17. Building a Scalable Image Processing Pipeline Fetch a web page, store in Amazon S3 Parse page and extract links to images Fetch first 16 images on page, store in Amazon S3 Render images as composite image
  18. 18. SQS-Based Application Architecture URL Fetch S3 Queue Images Fetch & RenderStore Page Queue Render Parse S3 Images & S3 Queue Pages Parse Page Image Queue
  19. 19. Architecture Attributes Simple  Each stage is easy to understand  AWS reduces low-level coding Scalable  Add more processes  Add more instances  Add more stages  Storage any amount of data Fault Tolerant  Messages remain in queues until processed  Messages reappear in queues if process dies Asynchronous  Each stage runs at its own speed  Build, test, run one stage at a time
  20. 20. Define Queues
  21. 21. Create Queues
  22. 22. Create Queues & Check Status
  23. 23. Locate a Queues URL
  24. 24. Post Message to Queue
  25. 25. Receive Message From Queue
  26. 26. Return Received Message
  27. 27. Sample Processing Stage
  28. 28. Detailed Processing
  29. 29. Detailed Processing
  30. 30. Render Images

×