1 / 39

DFW Amazon WS Dev Garage Cloud Computing, Web services, etc.

DFW Amazon WS Dev Garage Cloud Computing, Web services, etc. Hosted Raymond Gao Saturday, August 1 st , 2009. Agenda of the Day. 9 – 9:30 A.M. Introduction 9:30 – 10:15 A.M. Setting up the Environment 10:15 – 10:30 Break 10:30 – 11:30 Emergsoft Presentation

marcin
Download Presentation

DFW Amazon WS Dev Garage Cloud Computing, Web services, etc.

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DFW Amazon WS Dev GarageCloud Computing, Web services, etc. Hosted Raymond Gao Saturday, August 1st, 2009

  2. Agenda of the Day 9 – 9:30 A.M. Introduction 9:30 – 10:15 A.M. Setting up the Environment 10:15 – 10:30 Break 10:30 – 11:30 Emergsoft Presentation 11:30 – Noon Miscellaneous Discussion Noon – 1:30 P.M. Lunch Break 1:30 – 4:00 Lab, Networking, Idea Exchange

  3. Infrastructure Discussion

  4. Personal Impetus ? • I want to develop a Facebook Application • Can’t forecast usage curve • Need a Static IP address • Other Constraints • Save money • Easy to setup and immediate availability • Curiosity

  5. Cloud Computing Providers • Amazon EC2 – Classic Approach • Google App Engine – Developer Approach • Microsoft Azure – Microsoft Stack Approach • Rackspace Cloud – Classic Approach • Heroku – Ruby on Rails only Approach • Zembly.com – Social Programming Approach • RightScale –Virtual Machine Configuration and Deployment

  6. Amazon Cloud Computing • VM Images based approach • Linux: Fedora, Ubuntu, Solaris, SUSE, Centos, … • Microsoft Windows • Allows customizations of VM Images • Easy to start, and nice Management Console • Proven technology for production sites • Requires system administration knowledge, e.g. • Opening firewall ports • Support mainly through Message Forum, paid telephone support plan is available • Instance Types - http://aws.amazon.com/ec2/instance-types/

  7. Google App Engine • Basic usage is free,- limited to 1 GB storage and data transfer & 6.5 CPU hr, Over the quota costs money • Only supports Python and Java Programming Languages, no Ruby or C# • Must learn Google App Engine API and GQL (Google Query Language) • Was down for six hours straight several weeks ago • Fairly basic administrative features

  8. Microsoft Azure • Pure Microsoft technology stack • Windows Azure OS, SQL Server, Live, .Net, SharePoint • Will available at the of 2009 • Supports only Visual Studio 2008, (limited PHP supported through 3rd party libraries) • Does not support Linux, or Mac

  9. Rackspace Cloud • Similar to the Amazon Cloud Offering • Has some cheaper options for tiny VMs, e.g. • 1.5 cents/hour for 256 Meg machine (which is pretty useless) • More expensive for the large instances • Based in San Antonio, with 24x7 paid telephone support

  10. Heroku • Ruby On Rails only application hosting provider • Has a proprietary way of deploying applications into Heroku grid with Git (source code control system) • No need of system administration knowledge, e.g. maintaining patches and applying updates. • Unique pricing (4 dynos = 1 CPU), more expansive than Amazon EC2 (paying for system admin)

  11. Zembly • Social Application Development • Turns application modules into widgets • Allows people to share widgets • Has several templates for creating cookie-cutter Facebook applications (great for building simple applications) • Owned by Sun Microsystem, Inc. • Six month free for Pro account during Beta

  12. Amazon Offerings • Infrastructure Technologies • Application Technologies • Payment Technologies • Merchant Technologies

  13. Amazon Technologies

  14. Amazon Infrastructure Offerings • Elastic Computing Cloud (EC2) – Computation-on-demand • Simple DB (Alternative to maintaining a database, …) • Simple Storage Service (S3) – External attached storage • Cloud Front – Similar to Akamai, put data center near the geography • Simple Queue Service (SQS) – Messaging Bus • Elastic MapReduce – Work Flow Management Tool, schedule job flow between different servers

  15. Amazon Application Technologies • Using Amazon as a source of content and a catalog • Product Advertising API – Search Against Amazon listings, wishing list, etc. Uses Web Services • Payment & Billing System • DevPay – Using Amazon as a billing system for subscriptions. • Flexible Payment System – Amazon’s alternative to Paypal, for transfering fund between two or more parties.

  16. Other Amazon Offerings • Mechanical Turk – Ad Hoc Human labors • Alexa Web Information Service – alternative to Google Analytics, returns website load, ranking, traffic analysis, visitor statistics, etc. • Fulfillment Services (Merchant Services) – Use Amazon Fulfillment Center to ship, store, and track item and deliveries

  17. Setting up Amazon Web Services Account • Pre-requisites • SSH client – Putty.exe on Windows, built-in in Mac and Linux • To-do • Access Key • Secret Key • X.509 Certificate • Private Key • Public Key

  18. Account Page

  19. Getting AWS Access Identifiers • Access Key • Secret Key • X.509 Certificate files (Self-signed) • Public • Private

  20. Amazon WS Management Console • Allows • Start / Stop / Pause a VM instance • Manage Firewall ports • Add S3 storage • Take snapshot of volumes & VMs • Create Security Group and Key Pair (Amazon use secure key to manage access to VM via SSH), This is different from X509 keys. • Control Job Flow between VMs • CloudFront Services (pushing data to the edge of network)

  21. Developing App that connects to Amazon

  22. Benefits of Connecting to Amazon • Get Product information: • Images • Product details • Reviews • Editorials • Search by UPC, Title, Keyword, etc. • Make money from referring to Amazon Products • Retrieve Items from Wish list, etc.

  23. Details • Classic Web Services Approach • WSDL based lookup (Request/Response) • Available for Following Countries • Canada • France • Germany • Japan • UK • USA

  24. Visual View of the PAAPI • Developer’s Documentation: • http://docs.amazonwebservices.com/AWSECommerceService/2009-06-01/DG/ • Find an item - http://docs.amazonwebservices.com/AWSECommerceService/2009-06-01/DG/FindingItems.html • Item detail - http://docs.amazonwebservices.com/AWSECommerceService/2009-06-01/DG/FindingOutMoreAboutanItem.html • Seller Information - http://docs.amazonwebservices.com/AWSECommerceService/2009-06-01/DG/GettingSellerInformation.html • Shopping Cart - http://docs.amazonwebservices.com/AWSECommerceService/2009-06-01/DG/ImplementingaShoppingCart.html • Other Documentations • http://developer.amazonwebservices.com/connect/entry.jspa?externalID=2667&categoryID=19

  25. Available Categories

  26. Available Operations See: http://docs.amazonwebservices.com/AWSECommerceService/2009-06-01/DG/

  27. My Project – DVD Flex • Running as a Facebook Application • http://apps.facebook.com/dvdflex • Enter a UPC code find your friends DVD, share, exchange, export, or find a torrent • Technical Details • Ruby on Rails Application • Consumes Web Services and JSON • Running on Mongrel Cluster and Pound (moving to Passenger + Ngnix) • Source code on Git Hub • http://github.com/raygao/dvdflex/tree/master

  28. Screenshot of DVDFlex

  29. Setting Up your machine • Install • MySQL • Ruby & Rails 2.2.2 • Ruby Gems • MySQL • Ruby-AAWS • Facebooker • Facebooker Authentication • Tunnlr • Excel

  30. Get My Application • Install Git • Download My Application Source Code • http://github.com/raygao/dvdflex/tree/master • Configure the application • Facebooker.yml • Tunnlr.yml • Database.yml

  31. Deploying the Application • Install • Pound • Mongrel • Configure Pound & Mongrel • Create the ‘pound.conf’ file • Create the ‘mongrel_cluster.yml’ file

  32. Use EmergSoft Pre-requisites • Pre-requisites: • Mac • Language packages from Dev CD installed • Wget • MS Windows • Cygwin • Unzip, ruby, Python, Wget • Linux • It’s already included • See http://wiki.emergsoft.com/index.php/Special:Search?search=Prerequisites&go=Go

  33. Use EmergSoft Recipe to setup your Dev Env. • My Recipes • Install Rails • Install NetBeans 6.5 on Ubuntu • Create Facebook Application

  34. Using Ruby-AAWS to Search Against Amazon • Prerequisite: Ruby 1.8.7 • Installation: gem install ruby-aaws • API Documentation – http://www.caliban.org/ruby/ruby-aws/

  35. Create App Using NetBeans

  36. Amazon Product Advertising API • Each request needs: • AssociateTag – gives you credit for the sale through shopping cart • SubscriptionId / AWSAccessKeyId –key to use Amazon PAAPI • ContentType: text/xml, or text/html • Operation – ItemLookup, ItemSearch, … • Service – always AWSECommerceService • Version – Version of the API

  37. http://ecs.amazonaws.com/onca/xml?Service=AWSECommerceService&Version=2005-03-23&Operation=ItemLookup&SubscriptionId=1D5H84BYKDE3XKW4QSR2&AssociateTag=dvdflare4us-20&SearchIndex=DVD&ItemId=794043100918&IdType=UPC&ResponseGroup=Medium,Smallhttp://ecs.amazonaws.com/onca/xml?Service=AWSECommerceService&Version=2005-03-23&Operation=ItemLookup&SubscriptionId=1D5H84BYKDE3XKW4QSR2&AssociateTag=dvdflare4us-20&SearchIndex=DVD&ItemId=794043100918&IdType=UPC&ResponseGroup=Medium,Small

  38. How to Use Ruby-AAWS • Use ItemLookup as an example • Create Request with Your Amazon Key and Associate ID • Specify locale • Create ItemLookup Object, including type of search, index, and search parameter • Escape special characters • Perform the search • Extract the content • Be careful with null value. Ruby-AAWs throws Amazon::AWS::Error::AWSError exception, it is a null value.

  39. Contact me • Email:raygao@verizon.net • Blog:http://raysblog.are4.us

More Related