brewing beer with windows azure
DESCRIPTION
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 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.TRANSCRIPT
#comdaybe
Brewing Beerwith Windows Azure
AZUGMaarten Balliauw
Panagiotis “ “ Kefalidis
Who am I?• Maarten Balliauw• Antwerp, Belgium• www.realdolmen.com • Focus on web
– ASP.NET MVC, Windows Azure, SignalR, ...– MVP Windows Azure & ASPInsider
• http://blog.maartenballiauw.be • @maartenballiauw • Author: Pro NuGet - http://amzn.to/pronuget
Who am I?
• Panagiotis “Panos” Kefalidis• www.devoteam.com• Windows Azure MVP• SOA/.NET Architect• http://www.kefalidis.me • @pkefal
Agenda
• Brewing beer• BrewBuddy• Windows Azure Websites• Service Bus & Access Control
Service• Q&A
Brewing BeerTurn water into beer
How we got started…
How we got started…
• MVP Summit 2011–Wade Wegner tells us about his
hobby
• MVP Summit 2012–Wade Wegner tells us about his
hobby
• We nodded at each other
The process
• Get your kegs clean• Add & cook ingredients• Pour in keg• Add yeast• Rinse
Difficult part # 1…
Wait for fermentation to complete
The process
• Pour into another keg• Rinse• Wait another week• Bottling time!
Difficult part # 2…
Wait 6 weeks for it to age
Panos, Maarten…
What the f* does this haveto do with Windows Azure?
www.BrewBuddy.netAzurifying the home brewer
BrewBuddy
• View public recipes• Manage your own recipes• Manage your own brews• Monitor brew fermentation
demoSocial brewing at a glance
BrewBuddy
ArchitecturePublic websiteWindows Azure Web Sites
DatabaseSQL Azure database
Sensor data processingWindows Azure Worker Role
Sensor dataService Bus topic
SensorWhatever…
Windows Azure Web Sites
Scale-fast has just become more interesting
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
1SHARED INSTANCES
:-)
shared
Windows Azure Web Sites
2SHARED INSTANCES
:-)
:-)
shared
Windows Azure Web Sites
SHARED INSTANCES
:-)
1RESERVED INSTANCE
:-):-)
0reserved
Windows Azure Web Sites
2RESERVED INSTANCE
:-)
RESERVED INSTANCE
:-)
reserved
Windows Azure Web Sites
2RESERVED INSTANCE
:-)
RESERVED INSTANCE
:-):-)
:-) :-)
:-)
:-) :-)
reserved
Windows Azure Web Sites
demoCreating a new web site in seconds
Windows Azure Web Sites
Service Bus& Access Control Service
Connecting sensors
Windows Azure Service Bus
• 2 features–Relay–Queues, Topics, Subscriptions
Topic populated by sensors
SensorBackendWorkers
Characteristics
• Workers can scale independently–Loosely coupled architecture
• Sensors connect to service bus directly–No layer in between
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
demoClaims for authZ on Service Bus
Access Control Service
ArchitecturePublic websiteWindows Azure Web Sites
DatabaseSQL Azure database
Sensor data processingWindows Azure Worker Role
Sensor managementAccess Control Service
Sensor dataService Bus topic
SensorWhatever…
How do you link a sensor?
• Every sensor has its sensor ID• Add it as an identity to ACS• Grant a “Send” claim
demoRegistering a sensor with Access Control Service
Linking a sensor to a brew
A step further!
• Custom application• Consume the data from devices• Exchange information with the
app• In other words, an API
ASP.NET MVC Web API
• <frenglish>Being h-appy about the API </frenglish>
• Use it to build your public API• Secure it using claims from ACS
ASP.NET MVC Web API
• Easy to add, it’s just a another project
• Supports all cool stuff, like JSON, XML etc.
• It’s MVC, that means awesome!
Coding took an arrow to the knee
demoCreating a simple kick-start API
Bringing the API to life
Takeaways
Keep in mind…
• Web Sites start cheap / scale fast• Combine at will (IaaS, PaaS,
SaaS)• Service bus for asynchrony and
scale• Access Control for devices• Web API
Q&A
Thanks!Brewing Beer with Windows Azure
@maartenballiauw@pkefal