Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Brewing Beer with Windows Azure - ASPConf

2,458 views

Published on

Inspired by one of the Windows Azure gods (Wade Wegner), Maarten decided to order a homebrewing starter kit. Being a total cloud fanboy, he decided to hook those delicious creations to the cloud. Join Maarten and discover how you can connect a variety of devices (like *duino) and USB temperature sensors to Windows Azure to monitor brewing and fermentation temperatures. He'll show you how to do distributed brewing in this fun yet practical session on an interesting use case for the cloud: beer.

Published in: Technology
  • Be the first to comment

Brewing Beer with Windows Azure - ASPConf

  1. 1. Brewing Beer with Windows Azure Maarten Balliauw @maartenballiauwhttp://jabbr.net/#/rooms/aspconf-room4
  2. 2. Who am I?• Maarten Balliauw• www.realdolmen.com• Focus on web – ASP.NET MVC, Windows Azure, SignalR, ... – MVP Windows Azure & ASPInsider• http://blog.maartenballiauw.be• @maartenballiauw
  3. 3. Antwerp, Belgium
  4. 4. Who am I?• Maarten Balliauw• www.realdolmen.com• Focus on web – ASP.NET MVC, Windows Azure, SignalR, ... – MVP Windows Azure & ASPInsider• http://blog.maartenballiauw.be• @maartenballiauw
  5. 5. Shameless commercial plug• Pro NuGet: http://amzn.to/pronuget• MyGet - NuGet-as-a-Service: http://www.myget.org
  6. 6. Agenda• Brewing beer• BrewBuddy• Windows Azure Websites• Service Bus & Access Control Service (ACS)• We need an API http://jabbr.net/#/rooms/aspconf-room4• Q&A
  7. 7. Turn water into beerBrewing Beer
  8. 8. How it started…
  9. 9. How it started…• MVP Summit 2011 – Wade Wegner talks about his homebrewing hobby• MVP Summit 2012 – Wade Wegner talks about his homebrewing hobby• Convinced!
  10. 10. The process• Get your kegs clean• Add & boil ingredients• Pour in keg• Add yeast• Rinse
  11. 11. The processWait for fermentation to complete
  12. 12. The process• Pour into another keg• Rinse• Wait another week• Bottling time!
  13. 13. Difficult part…Wait at least 6 weeks for it to age
  14. 14. Maarten… What does this haveto do with Windows Azure?
  15. 15. Azurifying the home brewerwww.BrewBuddy.net
  16. 16. BrewBuddy• View public recipes• Manage your own recipes• Manage your own brews• Monitor brew fermentation
  17. 17. BrewBuddy Social brewing at a glancedemo
  18. 18. Architecture Sensor Public website Windows Azure Web Sites Whatever… Database SQL Azure database Sensor data Sensor data processing Service Bus topic Windows Azure Worker Role
  19. 19. Scale-fast has just become more interestingWindows Azure Web Sites
  20. 20. Windows Azure Web Sites  Build with ASP.NET, Node.js or PHP  Deploy in seconds with FTP, Git or TFS  Start for free, scale up as your traffic grows
  21. 21. Windows Azure Web Sites shared 1SHARED INSTANCES
  22. 22. Windows Azure Web Sites shared 2SHARED INSTANCES
  23. 23. Windows Azure Web Sites reserved 0 1SHARED INSTANCES RESERVED INSTANCE
  24. 24. Windows Azure Web Sites reserved 2 RESERVED INSTANCE
  25. 25. Windows Azure Web Sites reserved 2 RESERVED INSTANCE RESERVED INSTANCE
  26. 26. A perfect ramp-up!• Start small – Web Sites are cheap – Scale to 3 reserved instances• Grow big! – Hosted Service – PaaS – Scale at will
  27. 27. Windows Azure Web Sites Creating a new web site in secondsdemo
  28. 28. Connecting sensorsService Bus& Access Control Service
  29. 29. Windows Azure Service Bus• 2 features – Relay – Queues, Topics, Subscriptions
  30. 30. Windows Azure Service Bus Relay relay Client
  31. 31. Topics and subscriptions Sensor
  32. 32. Characteristics• Workers can scale independently• Workers can fail independently• Sensors connect to service bus directly – No layer in between – Cheaper
  33. 33. What about authN / authZ?• Access Control Service to the rescue!• SB authenticates clients over ACS• ACS provides “Send” claim to sensor• Claims can be granted/revoked easily
  34. 34. Access Control Service Claims for authZ on Service Busdemo
  35. 35. Architecture Sensor Public website Windows Azure Web Sites Whatever… Sensor management Database Access Control Service SQL Azure database Sensor data Sensor data processing Service Bus topic Windows Azure Worker Role
  36. 36. How do you link a sensor?• Every sensor has its sensor ID• Add it as an identity to ACS• Grant a “Send” claim
  37. 37. Linking a sensor toAccess Control Registering a sensor with a brew Servicedemo
  38. 38. <french>Make everyone API!</french>We need an API
  39. 39. What is an API?• Software-to-Software interface• Contract between software and developers – Functionalities, constraints (technical / legal) Programming instructions and standards• Open services to other software
  40. 40. Do we need one?• Reach to scale• Smartphone generation• BYOD with 3 screens: phone, tablet and computer• Flexibility in providing content• You have data to share• Integration
  41. 41. Build Richer AppsReach More Clients
  42. 42. ASP.NET Web API• Part of ASP.NET MVC 4• Framework to build HTTP Services (REST)• Solid features – Modern HTTP programming model – Content negotiation (e.g. Xml, json, ...) – Query composition (OData query support) – Model binding and validation (conversion to .NET objects) – Routes – Filters (e.g. Validation, exception handling, ...) – And more!
  43. 43. ASP.NET Web API Let’s craft a quick APIdemo
  44. 44. What about authN / authZ?• API access through OAuth2• Access Control Service to the rescue!• Client authorized in BrewBuddy.net• Access/refresh tokens through ACS
  45. 45. What about authN / authZ? API Consumer BrewBuddy.net client_id and client_secret access API authorize Initial authorization (yes/no) API implementation access/refresh token register delegation Access Control Service Access/Refresh Token
  46. 46. Access Control Service for API’s OAuth2 delegationdemo Install-Package WindowsAzure.Acs.Oauth2 -IncludePrerelease
  47. 47. Takeaways
  48. 48. Keep in mind…• Web Sites start cheap / scale fast• Combine/grow at will (IaaS, PaaS, SaaS)• Service bus for asynchrony and scale• Access Control for devices• Web API & Access Control
  49. 49. Related sessionsToday• 3:30-5pm UTC – Test-First and Functional-First with Web API (room 3)• 8-9:30pm UTC – Ask the Experts (SignalR, MVC, Web API) (live video)• 9:30-11pm UTC – Azure SDK (room 1) – Introduction to the ASP.NET Web API (room 2)Tomorrow• 3:30-5pm UTC – From Zero to Hero: Windows Azure Web Sites and TFS Preview (room 3) – Advanced ASP.NET Web API (room 5)• 9:30-11pm UTC – The Lightweight Approach to Building Web Based APIs with .Net
  50. 50. Q&A
  51. 51. http://bit.ly/Mrx0tH Brewing Beer with Windows AzureThanks! @maartenballiauw

×