INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014
Announcements Congrats on finishing PA#1 (Mon 11pm) – TONIGHT! Late days (1 day units, 3 entire quarter) Setup Windows Azure free trial! Setup Now! Setup Bootcamp to Windows for PA2 You will need Windows + Visual Studio for PA2 for more Wed Office Hours - 4/16 12:30pm to MGH 370H
Answer for Book class Bug! $name, $price
Answer, MySQL via PDO Take 10min Type this into online compiler
Information Architecture on AWS Feels like a debriefing : )
PA1 EC2 Index.php User RDS Player Database WHY? Information Architecture Diagram
PA1 EC2 Index.php + Player Database User This is faster But poor design Poor information architecture design
Scalability Scale compute instances separately from database instances Scale database when we need more storage Scale compute when we have more traffic Likely need more EC2 than RDS nodes especially with cache-ing
Scaling Data is Hard Scaling EC2 is easy, stateless Scaling RDS is hard – Data consistency – Data replication – Master/Slave? Sharding? Lesson: delay scaling data as much as possible. Scale data => downtime. – It’s like repairing a moving train
PA1 with a lot of users EC2 Index.php User RDS Player Database EC2 Index.php EC2 Index.php EC2 Index.php User
Similar to 3-tier architecture Poor Design Better Design!
Review EC2 = host your web site/web service code RDS = host your data (database)
What else can we do with AWS?
Load Balancer EC2 Index.php User RDS Player Database EC2 Index.php EC2 Index.php EC2 Index.php User What’s wrong with this?
Load Balancer EC2 Index.php User RDS Player Database EC2 Index.php EC2 Index.php EC2 Index.php What really happens…
Load Balancer Distributes traffic smartly. Done in hardware Re-route traffic when EC2 instances fail Auto-scales (AWS does this for you!) Secure (Security groups/settings) Every web site with significant traffic needs this
Load Balancer (orange) EC2 Index.php User RDS Player Database EC2 Index.php EC2 Index.php EC2 Index.php
Simple Storage Service (S3) MySQL (RDS) is great for small data that change often – NBA player stats, user data/account info S3 is better for large data that do not change often – Images, videos, css, javascript, etc – Best for read-only – Automatically scales! – Cheaper
DynamoDB NoSQL (non-relational) Auto-scaling, no limit to #GBs Huge Key-Value store – $myMap = array(“name” => “ck”, “age” => “28”) – Except in the cloud
CloudFront Content Delivery Network (CDN) Netflix => host large files closer to your location (edge node)
Message Queue Service Pass data between EC2 instances Web role vs. Worker role (future PA’s) – Website to search your facebook data – Login/front end UI/etc = Web role – But first time login, needs to crawl your facebook data, send a message to worker role to crawl. Similar in idea with AJAX except for work that takes > 30s (users won’t wait that long)
Redshift/Elastic Map Reduce Redshift = store tons of data EMR = analyze tons of data
Information Architecture Photos on S3 Product info on RDS User info on RDS Website on EC2 Load Balancer User purchase data/click data on Redshift/EMR => to produce better recommendations
Group Discussion! Groups of 3 Pick your favorite website Pick a page Draw the information architecture! (mine was a list, yours = diagram!) Presentation & submit on Canvas
Information Architecture Diagram EC2 Index.php User RDS Player Database EC2 Index.php EC2 Index.php EC2 Index.php
Questions?