Presentation is loading. Please wait.

Presentation is loading. Please wait.

2 3 4 EntitiesTablesAccounts 5 6 7 8 PartitionKey (Category) RowKey (Title) TimestampReleaseDate Action Fast & Furious…2009 Action The Bourne Ultimatum…2007.

Similar presentations


Presentation on theme: "2 3 4 EntitiesTablesAccounts 5 6 7 8 PartitionKey (Category) RowKey (Title) TimestampReleaseDate Action Fast & Furious…2009 Action The Bourne Ultimatum…2007."— Presentation transcript:

1

2 2

3 3

4 4

5 EntitiesTablesAccounts 5

6 6

7 7

8 8

9 PartitionKey (Category) RowKey (Title) TimestampReleaseDate Action Fast & Furious…2009 Action The Bourne Ultimatum…2007 … ……… Animation Open Season 2…2009 Animation The Ant Bully…2006 PartitionKey (Category) RowKey (Title) TimestampReleaseDate Comedy Office Space…1999 … ……… SciFi X-Men Origins: Wolverine …2009 … ……… War Defiance…2008 PartitionKey (Category) RowKey (Title) TimestampReleaseDate Action Fast & Furious…2009 Action The Bourne Ultimatum…2007 … ……… Animation Open Season 2…2009 Animation The Ant Bully…2006 … ……… Comedy Office Space…1999 … ……… SciFi X-Men Origins: Wolverine …2009 … ……… War Defiance…2008 9

10

11 11 [DataServiceKey("PartitionKey", "RowKey")] public class Movie { /// /// Category is the partition key /// public string PartitionKey { get; set; } /// /// Title is the row key /// public string RowKey { get; set; } public DateTime Timestamp { get; set; } public int ReleaseYear { get; set; } public string Language { get; set; } public string Cast { get; set; } }

12 12 StorageCredentialsAccountAndKey credentials = new StorageCredentialsAccountAndKey( myaccount", myKey"); string baseUri = "http://myaccount.table.core.windows.net"; CloudTableClient tableClient = new CloudTableClient(baseUri, credentials); tableClient.CreateTable(Movies"); TableServiceContext context = tableClient.GetDataServiceContext(); CloudTableQuery q = (from movie in context.CreateQuery (Movies") where movie.PartitionKey == Action" && movie.RowKey == "The Bourne Ultimatum" select movie).AsTableServiceQuery (); Movie movieToUpdate = q.FirstOrDefault(); // Update movie context.UpdateObject(movieToUpdate); context.SaveChangesWithRetries(); // Add movie context.AddObject(new Movie(Action", movieToAdd)); context.SaveChangesWithRetries();

13 13

14 14

15 15

16 16 PartitionKey (Account name) RowKey (Title) Category… moviesonline 12 RoundsAction… moviesonline A Bugs LifeAnimation… 100,000,000 more rows……… moviesonline Office SpaceComedy… moviesonline PlatoonWar… 50,000,000 more rows……… moviesonline WALL-EAnimation…

17 PartitionKey (Account name) RowKey (Title) Category… moviesonline 12 RoundsAction… moviesonline A Bugs LifeAnimation… 100,000,000 more rows……… moviesonline Office SpaceComedy… moviesonline PlatoonWar… 50,000,000 more rows……… moviesonline WALL-EAnimation… Client 17

18 PartitionKey (Category) RowKey (Title) ActionFast & Furious …10000 more Action movies ActionThe Bourne Ultimatum … 100000 more Action & Animation movies AnimationOpen Season 2 … 100000 more Animation movies AnimationThe Ant Bully ComedyOffice Space …1000000 more Comedy & SciFi movies SciFiStar Trek …100000 more SciFi & War movies …100000 more War movies WarDefiance Client 18 PartitionKey (Category) RowKey (Title) ActionFast & Furious …10000 more Action movies ActionThe Bourne Ultimatum … 100000 more Action & Animation movies AnimationOpen Season 2 … 100000 more Animation movies AnimationThe Ant Bully ComedyOffice Space …1000000 more Comedy & SciFi movies SciFiStar Trek …100000 more SciFi & War movies …100000 more War movies WarDefiance

19 19

20 PartitionKey (Timestamp) Properties 2009-11-15 02:00:01 … 2009-11-15 02:00:11 … 100000 more rows… 2009-11-17 05:40:01 … … 80000 more rows… 2009-11-17 12:30:00 … 2009-11-17 12:30:01 … Applications Client 2009-11-17 12:30:01 … 2009-11-17 12:30:02 … 2009-11-17 12:30:03 … 20

21 PartitionKey (ID_Timestamp) Properties 01_2009-10-12 05:10:00… …… 100000 more rows… 09_2009-11-15 12:31:00… …… 20000000 more rows… 10_2009-10-05 05:10:10… 5000000 more rows… …… 900000 more rows… 19_2009-11-17 12:20:02… ApplicationsApplications Client 15_2009-11-17 12:30:01… 09_2009-11-17 12:30:22… 19_2009-11-17 12:30:10… 01_2009-11-17 12:30:01… 21

22 22

23 PartitionKey (Category) RowKey (Title) ActionFast & Furious …10000 more Action movies ActionThe Bourne Ultimatum … 100000 more Action & Animation movies AnimationOpen Season 2 … 100000 more Animation movies AnimationThe Ant Bully ComedyOffice Space …1000000 more Comedy & SciFi movies SciFiStar Trek …100000 more SciFi & War movies …100000 more War movies WarDefiance Client 23

24 Client PartitionKey (Category) RowKey (Title) Rating ActionFast & Furious5 …999 more movies rated > 4… … Action and Anim. movies here with rating < 4 … AnimationA Bugs life2 …100 more movies < 4 here… AnimationThe Ant Bully3 ComedyAre we there yet?2 …More movies here… ComedyOffice Space5 …800000 more movies here… DramaA Beautiful Mind5 …1200000 more movies here… WarDefiance4 24 Returns 1000 movies Partition range boundary hit Return continuation

25 Client PartitionKey (Category) RowKey (Title) Rating ActionFast & Furious5 …More movies here… ComedyOffice Space5 …More movies here… DocumentaryPlanet Earth4 …More movies here DramaSeven Pounds4 HorrorSaw 53 …More movies here… Music8 Mile2 …More movies here… SciFiStar Trek5 …More movies here… 25

26 26

27 27

28 28

29 29

30 PartitionKey (UserId) RowKey () Timestam p ReleaseDateAction Assault on Precinct 13…2005 … ……… Action Face off…1997 Action Fast & Furious…2009 … … Hundreds of thousands of movies here …… Action Four Brothers…2005 Animatio n Open Season 2…2009 Animatio n The Ant Bully…2006 30

31 PartitionKey (AccountID) RowKey (Kind_*) KindTotalRentalsNameAddressCheckOutOnTitleDueOn ……………………… SallyA_SallyAccount8Sally FieldAnn Arbor, MI SallyR_JawsRental2009/11/16Jaws2009/11/20 SallyR_TaxiRental2009/11/16Taxi2009/11/20 ……………………… 31

32 32

33 33

34 34

35 MessagesQueuesAccounts 35

36 36

37 37

38 38 CloudQueueClient queueClient = new CloudQueueClient(baseUri, credentials); CloudQueue queue = queueClient.GetQueueReference("test1"); queue.CreateIfNotExist(); //MessageCount is populated via FetchAttributes queue.FetchAttributes(); CloudQueueMessage message = new CloudQueueMessage("Some content"); queue.AddMessage(message); message = queue.GetMessage(TimeSpan.FromMinutes(10) /*visibility timeout*/ ); //Process the message here … queue.DeleteMessage(message);

39 39

40 2121 2121 1111 1111 C1C1 C1C1 C2C2 C2C2 1111 1111 2121 2121 3 3 4040 4040 Producers Consumers P2P2 P2P2 P1P1 P1P1 3030 3030 2. GetMessage(Q, 30 s) msg 2 1. GetMessage(Q, 30 s) msg 1 1111 1111 2121 2121 40 1010 1010 2020 2020

41 C1C1 C 1 C2C2 C2C2 3 4040 4040 Producers Consumers P2P2 P2P2 P1P1 P1P1 1111 1111 2121 2121 2. GetMessage(Q, 30 s) msg 2 3. C2 consumed msg 2 4. DeleteMessage(Q, msg 2) 7. GetMessage(Q, 30 s) msg 1 1. GetMessage(Q, 30 s) msg 1 5. C 1 crashed 1111 1111 2121 2121 6. msg1 visible 30 s after Dequeue 3030 3030 41 1212 1212 1111 1111 1212 1212

42 C1C1 C1C1 C2C2 C2C2 3 4040 4040 Producers Consumers P2P2 P2P2 P1P1 P1P1 1212 1212 2. Dequeue(Q, 30 sec) msg 2 3. C2 consumed msg 2 4. Delete(Q, msg 2) 7. Dequeue(Q, 30 sec) msg 1 8. C2 crashed 1. Dequeue(Q, 30 sec) msg 1 5. C 1 crashed 10. C1 restarted 11. Dequeue(Q, 30 sec) msg 1 12. DequeueCount > 2 13. Delete (Q, msg1) 1212 1212 6. msg1 visible 30s after Dequeue 9. msg1 visible 30s after Dequeue 3030 3030 42 1313 1313 1212 1212 1313 1313

43 43

44 Future Features 44 > Allow workers to extend invisibility time > Time to process message unknown at dequeue time > Worker can extend the time as needed > Allow longer invisibility time > Long running work items may need more than 2 hours > Allow messages to not expire > Large backlogs will not cause messages to expire

45 45

46

47

48

49

50 Built by Developers for Developers….

51 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

52


Download ppt "2 3 4 EntitiesTablesAccounts 5 6 7 8 PartitionKey (Category) RowKey (Title) TimestampReleaseDate Action Fast & Furious…2009 Action The Bourne Ultimatum…2007."

Similar presentations


Ads by Google