INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.

12
INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014

Transcript of INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.

Page 1: INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.

INFO 344Web Tools And Development

CK WangUniversity of Washington

Spring 2014

Page 2: INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.

Azure Services

• Azure Blob => AWS S3

• Azure SQL Database => AWS RDS

• Azure Tables => AWS Dynamo DB

• Azure Queues => AWS Message Queue Service

Page 3: INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.

Create a web service in VS 2013We know the drill…

Modify web.config too

Page 4: INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.

C# LINQ

• One of my favorite features in C#• Create [WebMethod] – public List<int> ShowResults(int N)– Create N integers {0…N-1}• Square them• Order by Descending!• Convert them to String

– Using LINQ• << demo >>

Page 5: INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.

Azure Tables

• Like Amazon’s DynamoDB

• “Infinite” scaling

• Map in the cloud (key/value pair)

Page 6: INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.

Azure Tables

[WebMethod]• Read PA1 CSV data file into memory

[WebMethod]• Save PA1 data to Azure Tables

[WebMethod]• Search Azure Tables for data

Page 7: INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.

Azure Tables

• Create NBAPlayerStats Class

• Read PA1 CSV data file via LINQ

Page 8: INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.

Azure Tables

• Insert & Read Player data Warning:Insert & Read should be different web methods.

This is just code blocks.Search on Goog for “azure table tutorial”

Part 2 = search via points per game

Page 9: INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.

Azure Queue

• Like Amazon’s Message Queue

• Communicate between machines

• Property = any machine reading the queue can take the data

• FIFO

Page 10: INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.

Azure Queue

[WebMethod]• Insert url into Queue

[WebMethod]• Read url from Queue (invisible for limited

time)

Page 11: INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.

Azure Queue

Warning:You need to write the web methods. This is just code blocks.

Why do we need delete message?

Page 12: INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.

Questions?