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.
Generative Artificial Intelligence: How generative AI works.pdf
Brewing Beer with Windows Azure - ASPConf
1. Brewing Beer
with Windows Azure
Maarten Balliauw
@maartenballiauw
http://jabbr.net/#/rooms/aspconf-room4
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
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
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
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. The process
• Get your kegs clean
• Add & boil ingredients
• Pour in keg
• Add yeast
• Rinse
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
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
32. Characteristics
• Workers can scale independently
• Workers can fail independently
• Sensors connect to service bus
directly
– No layer in between
– Cheaper
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
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. How do you link a sensor?
• Every sensor has its sensor ID
• Add it as an identity to ACS
• Grant a “Send” claim
37. Linking a sensor toAccess Control
Registering a sensor with a brew
Service
demo
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. 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
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!
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. 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. Access Control Service for API’s
OAuth2 delegation
demo
Install-Package WindowsAzure.Acs.Oauth2 -IncludePrerelease
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. Related sessions
Today
• 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
Don’t show everythingyet. Just log in, show themaround the recipes, brewsand public recipes. Feel free to show the monitoring but no needto display the linking of sensors.
Show Windows Azure Web SitesShow scaling / reservedinstances
Show peoplearound the ACS porta. Show identities, claims andrulegroups.
Link a sensor to a brew. Show the effect on ACS. Show the code.
Link a sensor to a brew. Show the effect on ACS. Show the code.
Show peoplearound the ACS porta. Show identities, claims andrulegroups.