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 - NDC2013


Published on

Inspired by one of the Windows Azure gods (Wade Wegner), Maarten and Panos decided to order a homebrewing starter kit. Being total cloud fanboys, they decided to hook their delicious creations to the cloud. Join us 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. We'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

  • Be the first to like this

Brewing Beer with Windows Azure - NDC2013

  1. 1. Brewing Beerwith Windows AzureMaarten Balliauw@maartenballiauw
  2. 2. Who am I?Maarten BalliauwTechnical Evangelist, JetBrainsAZUGFocus on webASP.NET MVC, Windows Azure, SignalR, ...MVP Windows Azure & ASPInsider self promotion: Pro NuGet -
  3. 3. Setting expectations
  4. 4. AgendaBrewing beerBrewBuddyWindows Azure WebsitesService Bus & Access Control Service (ACS)We need an APIQ&A
  5. 5. Brewing BeerTurn water into beer
  6. 6. How it started…
  7. 7. How it started…MVP Summit 2011Wade Wegner talks about his homebrewing hobbyMVP Summit 2012Wade Wegner talks about his homebrewing hobbyLet’s do it!
  8. 8. The processGet your kettle cleanAdd & boil ingredientsPour in kettleAdd yeastRinse
  9. 9. Brewing = cleaning!
  10. 10. The processWait for fermentation to complete
  11. 11. The processPour into another kettleRinseWait another weekBottling time!
  12. 12. Difficult part…Wait at least 6 weeksfor it to age
  13. 13. Maarten…What does this haveto do with Windows Azure?
  14. 14. BrewBuddy.netSocial brewing!
  15. 15. BrewBuddyView public recipesManage your own recipesManage your own brewsMonitor brew fermentation
  16. 16. demoBrewBuddySocial brewing at a glance
  17. 17. ArchitecturePublic websiteWindows Azure Web SitesDatabaseSQL Azure databaseSensor data processingWindows Azure Worker RoleSensor dataService Bus topicSensorWhatever…
  18. 18. Windows AzureWeb SitesScale fast, fail fast
  19. 19. 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 trafficgrows
  20. 20. 1SHARED INSTANCESsharedWindows Azure Web Sites
  21. 21. 2SHARED INSTANCESsharedWindows Azure Web Sites
  22. 22. SHARED INSTANCES1RESERVED INSTANCE0reservedWindows Azure Web Sites
  23. 23. 2RESERVED INSTANCERESERVED INSTANCEreservedWindows Azure Web Sites
  24. 24. 2RESERVED INSTANCE RESERVED INSTANCEreservedWindows Azure Web Sites
  25. 25. A perfect ramp-up!Start smallWeb Sites are cheapStart freeScale from 1 shared instance……up to 10 reserved instances!Grow big!Hosted Service – PaaSScale at will
  26. 26. demoWindows AzureWeb SitesCreating a new web site in seconds
  27. 27. Service Bus &Access Control ServiceConnecting sensors
  28. 28. Windows Azure Service Bus2 featuresRelayQueues, Topics, Subscriptions
  29. 29. Windows Azure Service Bus RelayClientrelay
  30. 30. Topics and subscriptionsSensor
  31. 31. CharacteristicsWorkers can scale independentlyWorkers can fail independentlySensors connect to service bus directlyNo layer in betweenCheaper
  32. 32. What about authN / authZ?Access Control Service to the rescue!SB authenticates clients over ACSACS provides “Send” claim to sensorClaims can be granted/revoked easily
  33. 33. demoAccess ControlServiceClaims for authZ on Service Bus
  34. 34. Public websiteWindows Azure Web SitesDatabaseSQL Azure databaseSensor data processingWindows Azure Worker RoleSensor managementAccess Control ServiceSensor dataService Bus topicSensorWhatever…Architecture
  35. 35. How do you link a sensor?Every sensor has its sensor IDAdd it as an identity to ACSGrant a “Send” claim
  36. 36. demoLinking a sensorto a brewRegistering a sensor with Access Control Service
  37. 37. We need an API
  38. 38. Consuming the web2000-2008: Desktop browser2008-2012: Mobile browser2008-2012: iPhone and Android apps2010-2014: Tablets, tablets, tablets2014-2016: Your fridge (Internet of Things)
  39. 39. Twitter & FacebookBy show of hands
  40. 40. Make everyone API(as the French say)
  41. 41. What is an API?Software-to-Software interfaceContract between software and developersFunctionalities, constraints (technical / legal) Programming instructions andstandardsOpen services to other software developers (public or private)
  42. 42. Expose services to 3rd partiesValuableFlexibleManagedSupportedHave a plan
  43. 43. Reach More Clients
  44. 44. ASP.NET Web APIPart of ASP.NET MVC 4Framework to build HTTP Services (REST)Solid featuresModern HTTP programming modelContent negotiation (e.g. Xml, json, ...)Query composition (OData query support)Model binding and validation (conversion to .NET objects)RoutesFilters (e.g. Validation, exception handling, ...)And more!
  45. 45. demoBe detailed!Think about RFC 2324 (HTCPCP)
  46. 46. demoASP.NET Web APILet’s craft a quick API
  47. 47. A lot of public API’s…“your API consumer isn’t really your user,but an application acting on behalf of a user”(or: API consumer != user)
  48. 48. So they do this!
  49. 49. In our own API, authN / authZAPI access using OAuth2Access Control Service to the rescue!Client authorized in BrewBuddy.netAccess/refresh tokens through ACS
  50. 50. What about authN / authZ?Access Control ServiceAccess/Refresh TokenAPI Consumerclient_id and client_secretBrewBuddy.netInitial authorization (yes/no)API implementationauthorizeregister delegationaccess/refresh tokenaccess API
  51. 51. demoAccess ControlService for API’sOAuth2 delegationInstall-Package WindowsAzure.Acs.Oauth2 -IncludePrerelease
  52. 52. Takeaways
  53. 53. Keep in mind…Web Sites start cheap / scale fastCombine/grow at will (IaaS, PaaS, SaaS)Service bus for asynchrony and scaleAccess Control for devicesWeb API & Access Control
  54. 54. Thank you!