brewing beerwith windows azure ukwaug

53
6/6/22 | SLIDE 1 #londonazure Brewing Beer with Windows Azure Maarten Balliauw @maartenballiauw

Upload: maarten-balliauw

Post on 03-Sep-2014

1.953 views

Category:

Technology


5 download

DESCRIPTION

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.

TRANSCRIPT

Page 1: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 1

#londonazure

Brewing Beer with Windows AzureMaarten Balliauw

@maartenballiauw

Page 2: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 3

#londonazure

Who am I? Maarten Balliauw www.realdolmen.com AZUG Focus on web

ASP.NET MVC, Windows Azure, SignalR, ... MVP Windows Azure & ASPInsider

http://blog.maartenballiauw.be @maartenballiauw

Page 3: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 4

#londonazure

Shameless commercial plug Pro NuGet:

http://amzn.to/pronuget

MyGet - NuGet-as-a-Service: http://www.myget.org

Page 4: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 5

#londonazure

Agenda Brewing beer BrewBuddy Windows Azure Websites Service Bus & Access Control Service (ACS) We need an API Q&A

Page 5: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 6

#londonazure

BREWING BEERTurn water into beer

Page 6: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 7

#londonazure

How it started…

Page 7: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 8

#londonazure

How it started… MVP Summit 2011

Wade Wegner talks about his homebrewing hobby

MVP Summit 2012 Wade Wegner talks about his homebrewing

hobby Convinced!

Page 8: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 9

#londonazure

The process Get your kegs clean Add & boil ingredients Pour in keg Add yeast Rinse

Page 9: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 10

#londonazure

The process

Wait for fermentation to complete

Page 10: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 11

#londonazure

The process Pour into another keg Rinse Wait another week Bottling time!

Page 11: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 12

#londonazure

Difficult part…

Wait at least 6 weeks for it to age

Page 12: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 13

#londonazure

Maarten…

What does this haveto do with Windows Azure?

Page 13: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 14

#londonazure

WWW.BREWBUDDY.NETAzurifying the home brewer

Page 14: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 15

#londonazure

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

Page 15: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 16

#londonazure

demoSocial brewing at a glance

BrewBuddy

Page 16: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 17

#londonazure

ArchitecturePublic websiteWindows Azure Web Sites

DatabaseSQL Azure database

Sensor data processingWindows Azure Worker Role

Sensor dataService Bus topic

SensorWhatever…

Page 17: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 18

#londonazure

WINDOWS AZURE WEB SITESScale-fast has just become more interesting

Page 18: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 19

#londonazure

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 19: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 20

#londonazure

1SHARED INSTANCES

:-)

shared

Windows Azure Web Sites

Page 20: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 21

#londonazure

2SHARED INSTANCES

:-)

:-)

shared

Windows Azure Web Sites

Page 21: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 22

#londonazure

SHARED INSTANCES

:-)

1RESERVED INSTANCE

:-):-)

0reserved

Windows Azure Web Sites

Page 22: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 23

#londonazure

2RESERVED INSTANCE

:-)

RESERVED INSTANCE

:-)

reserved

Windows Azure Web Sites

Page 23: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 24

#londonazure

2RESERVED INSTANCE

:-)

RESERVED INSTANCE

:-):-)

:-) :-)

:-):-) :-)

reserved

Windows Azure Web Sites

Page 24: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 25

#londonazure

A perfect ramp-up! Start small

Web Sites are cheap Scale to 3 reserved instances

Grow big! Hosted Service – PaaS Scale at will

Page 25: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 26

#londonazure

demoCreating a new web site in seconds

Windows Azure Web Sites

Page 26: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 27

#londonazure

SERVICE BUS &ACCESS CONTROL SERVICE

Connecting sensors

Page 27: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 28

#londonazure

Windows Azure Service Bus 2 features

Relay Queues, Topics, Subscriptions

Page 28: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 29

#londonazure

Windows Azure Service Bus Relay

Client Service

relay

Page 29: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 30

#londonazure

Topics and subscriptions

SensorBackendWorker

Page 30: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 31

#londonazure

Characteristics Workers can scale independently Workers can fail independently Sensors connect to service bus directly

No layer in between Cheaper

Page 31: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 32

#londonazure

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 32: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 33

#londonazure

demoClaims for authZ on Service Bus

Access Control Service

Page 33: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 34

#londonazure

ArchitecturePublic websiteWindows Azure Web Sites

DatabaseSQL Azure database

Sensor data processingWindows Azure Worker Role

Sensor managementAccess Control Service

Sensor dataService Bus topic

SensorWhatever…

Page 34: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 35

#londonazure

How do you link a sensor? Every sensor has its sensor ID Add it as an identity to ACS Grant a “Send” claim

Page 35: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 36

#londonazure

demoRegistering a sensor with Access Control Service

Linking a sensor to a brew

Page 36: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 37

#londonazure

WE NEED AN API<french>Make everyone API!</french>

Page 37: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 38

#londonazure

Consuming the web 2000-2008: Desktop browser 2008-2012: Mobile browser 2008-2012: iPhone and Android apps 2010-2014: Tablets, tablets, tablets 2014-2016: Your fridge (Internet of Things)

Page 39: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 40

#londonazure

Twitter & FacebookBy show of hands…

Page 40: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 41

#londonazure

(as the French say)

Make everyone API

Page 41: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 42

#londonazure

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 developers (public or private)

Page 42: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 43

#londonazure

Expose services to 3rd parties

Valuable Flexible Managed Supported Have a plan

Page 43: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 44

#londonazure

Reach More Clients

Page 44: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 45

#londonazure

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!

Page 45: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 46

#londonazure

Be detailed!Think about RFC 2324 (HTCPCP)

Page 46: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 47

#londonazure

demoLet’s craft a quick API

ASP.NET Web API

Page 47: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 48

#londonazure

What about authN / authZ? API access through OAuth2 Access Control Service to the rescue! Client authorized in BrewBuddy.net Access/refresh tokens through ACS

Page 48: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 49

#londonazure

What about authN / authZ?

Access Control ServiceAccess/Refresh Token

API Consumerclient_id and client_secret

BrewBuddy.netInitial authorization (yes/no)API implementation

authorize

register delegationaccess/refresh token

access API

Page 49: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 50

#londonazure

demoOAuth2 delegation

Access Control Service for API’s

Install-Package WindowsAzure.Acs.Oauth2 -IncludePrerelease

Page 50: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 51

#londonazure

TAKEAWAYS

Page 51: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 52

#londonazure

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

Page 52: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 53

#londonazure

Cloud Burst 2012 - Sweden September 27 – 28, 2012 Stockholm http://www.azureug.se/CloudBurst2012 There will be live streaming!

http://bit.ly/cloudburststream

Page 53: Brewing Beerwith Windows Azure UKWAUG

APRIL 7, 2023 | SLIDE 54

#londonazure

THANK YOU!

http://blog.maartenballiauw.be@maartenballiauw

http://amzn.to/pronuget