brewing beer with windows azure

43
#comdaybe Brewing Beer with Windows Azure AZUG Maarten Balliauw Panagiotis “ “ Kefalidis

Upload: maarten-balliauw

Post on 19-May-2015

2.298 views

Category:

Technology


1 download

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

Page 1: Brewing Beer with Windows Azure

#comdaybe

Brewing Beerwith Windows Azure

AZUGMaarten Balliauw

Panagiotis “ “ Kefalidis

Page 2: Brewing Beer with Windows Azure
Page 3: Brewing Beer with Windows Azure

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

Page 4: Brewing Beer with Windows Azure

Who am I?

• Panagiotis “Panos” Kefalidis• www.devoteam.com• Windows Azure MVP• SOA/.NET Architect• http://www.kefalidis.me • @pkefal

Page 5: Brewing Beer with Windows Azure

Agenda

• Brewing beer• BrewBuddy• Windows Azure Websites• Service Bus & Access Control

Service• Q&A

Page 6: Brewing Beer with Windows Azure

Brewing BeerTurn water into beer

Page 7: Brewing Beer with Windows Azure

How we got started…

Page 8: Brewing Beer with Windows Azure

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

Page 9: Brewing Beer with Windows Azure

The process

• Get your kegs clean• Add & cook ingredients• Pour in keg• Add yeast• Rinse

Page 10: Brewing Beer with Windows Azure

Difficult part # 1…

Wait for fermentation to complete

Page 11: Brewing Beer with Windows Azure

The process

• Pour into another keg• Rinse• Wait another week• Bottling time!

Page 12: Brewing Beer with Windows Azure

Difficult part # 2…

Wait 6 weeks for it to age

Page 13: Brewing Beer with Windows Azure

Panos, Maarten…

What the f* does this haveto do with Windows Azure?

Page 14: Brewing Beer with Windows Azure

www.BrewBuddy.netAzurifying the home brewer

Page 15: Brewing Beer with Windows Azure

BrewBuddy

• View public recipes• Manage your own recipes• Manage your own brews• Monitor brew fermentation

Page 16: Brewing Beer with Windows Azure

demoSocial brewing at a glance

BrewBuddy

Page 17: Brewing Beer with Windows Azure

ArchitecturePublic websiteWindows Azure Web Sites

DatabaseSQL Azure database

Sensor data processingWindows Azure Worker Role

Sensor dataService Bus topic

SensorWhatever…

Page 18: Brewing Beer with Windows Azure

Windows Azure Web Sites

Scale-fast has just become more interesting

Page 19: Brewing Beer with Windows Azure

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

Page 20: Brewing Beer with Windows Azure

1SHARED INSTANCES

:-)

shared

Windows Azure Web Sites

Page 21: Brewing Beer with Windows Azure

2SHARED INSTANCES

:-)

:-)

shared

Windows Azure Web Sites

Page 22: Brewing Beer with Windows Azure

SHARED INSTANCES

:-)

1RESERVED INSTANCE

:-):-)

0reserved

Windows Azure Web Sites

Page 23: Brewing Beer with Windows Azure

2RESERVED INSTANCE

:-)

RESERVED INSTANCE

:-)

reserved

Windows Azure Web Sites

Page 24: Brewing Beer with Windows Azure

2RESERVED INSTANCE

:-)

RESERVED INSTANCE

:-):-)

:-) :-)

:-)

:-) :-)

reserved

Windows Azure Web Sites

Page 25: Brewing Beer with Windows Azure

demoCreating a new web site in seconds

Windows Azure Web Sites

Page 26: Brewing Beer with Windows Azure

Service Bus& Access Control Service

Connecting sensors

Page 27: Brewing Beer with Windows Azure

Windows Azure Service Bus

• 2 features–Relay–Queues, Topics, Subscriptions

Page 28: Brewing Beer with Windows Azure

Topic populated by sensors

SensorBackendWorkers

Page 29: Brewing Beer with Windows Azure

Characteristics

• Workers can scale independently–Loosely coupled architecture

• Sensors connect to service bus directly–No layer in between

Page 30: Brewing Beer with Windows Azure

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

Page 31: Brewing Beer with Windows Azure

demoClaims for authZ on Service Bus

Access Control Service

Page 32: Brewing Beer with Windows Azure

ArchitecturePublic websiteWindows Azure Web Sites

DatabaseSQL Azure database

Sensor data processingWindows Azure Worker Role

Sensor managementAccess Control Service

Sensor dataService Bus topic

SensorWhatever…

Page 33: Brewing Beer with Windows Azure

How do you link a sensor?

• Every sensor has its sensor ID• Add it as an identity to ACS• Grant a “Send” claim

Page 34: Brewing Beer with Windows Azure

demoRegistering a sensor with Access Control Service

Linking a sensor to a brew

Page 35: Brewing Beer with Windows Azure

A step further!

• Custom application• Consume the data from devices• Exchange information with the

app• In other words, an API

Page 36: Brewing Beer with Windows Azure

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

Page 37: Brewing Beer with Windows Azure

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!

Page 38: Brewing Beer with Windows Azure

Coding took an arrow to the knee

Page 39: Brewing Beer with Windows Azure

demoCreating a simple kick-start API

Bringing the API to life

Page 40: Brewing Beer with Windows Azure

Takeaways

Page 41: Brewing Beer with Windows Azure

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

Page 42: Brewing Beer with Windows Azure

Q&A

Page 43: Brewing Beer with Windows Azure

Thanks!Brewing Beer with Windows Azure

@maartenballiauw@pkefal