-
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
-
3.
Antwerp, Belgium
-
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.
Shameless commercial plug
• Pro NuGet:
http://amzn.to/pronuget
• MyGet - NuGet-as-a-Service:
http://www.myget.org
-
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.
Turn water into beer
Brewing Beer
-
8.
How it started…
-
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
-
11.
The process
Wait for fermentation to complete
-
12.
The process
• Pour into another keg
• Rinse
• Wait another week
• Bottling time!
-
13.
Difficult part…
Wait at least 6 weeks
for it to age
-
14.
Maarten…
What does this have
to do with Windows Azure?
-
15.
Azurifying the home brewer
www.BrewBuddy.net
-
16.
BrewBuddy
• View public recipes
• Manage your own recipes
• Manage your own brews
• Monitor brew fermentation
-
17.
BrewBuddy
Social brewing at a glance
demo
-
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.
Scale-fast has just become more interesting
Windows Azure Web Sites
-
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.
Windows Azure Web Sites
shared 1
SHARED INSTANCES
-
22.
Windows Azure Web Sites
shared 2
SHARED INSTANCES
-
23.
Windows Azure Web Sites
reserved 0
1
SHARED INSTANCES RESERVED INSTANCE
-
24.
Windows Azure Web Sites
reserved 2
RESERVED INSTANCE
-
25.
Windows Azure Web Sites
reserved 2
RESERVED INSTANCE RESERVED INSTANCE
-
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.
Windows Azure Web Sites
Creating a new web site in seconds
demo
-
28.
Connecting sensors
Service Bus
& Access Control Service
-
29.
Windows Azure Service Bus
• 2 features
– Relay
– Queues, Topics, Subscriptions
-
30.
Windows Azure Service Bus Relay
relay
Client
-
31.
Topics and subscriptions
Sensor
-
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
-
34.
Access Control Service
Claims for authZ on Service Bus
demo
-
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
-
38.
<french>Make everyone API!</french>
We need an API
-
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
-
41.
Build Richer Apps
Reach More Clients
-
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.
ASP.NET Web API
Let’s craft a quick API
demo
-
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
-
47.
Takeaways
-
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
-
50.
Q&A
-
51.
http://bit.ly/Mrx0tH
Brewing Beer with Windows Azure
Thanks! @maartenballiauw
Maarten
Maarten
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.