Building services running on Microsoft Azure

Preview:

DESCRIPTION

this is the slides from the talk i gave at DevGeekWeek2014 further details are in my blog: http://blogs.microsoft.co.il/iblogger/2014/06/25/devgeekweek-2014-slides-and-demos/

Citation preview

Building Services on Microsoft Azure

About Me

• Software architect, consultant and instructor• Software Engineering Lecturer @ Ruppin Academic Center• Technology addict• .NET and Native Windows Programming

@tamir_dreshertamirdr@codevalue.nethttp://www.TamirDresher.com.

Agenda

• Why Cloud?

• Azure Cloud

• Services, Roles and instances

• Packaging and Deployment

• Testing and Debugging

• Configurations

Why Cloud?

A Game Changing Technology•Infinite shared resources & services

– Infrastructure is not a limiting factor– No need to equip for peak-load requirements

•Elasticity on demand– Anytime, anywhere

•Efficient scalability and high availability•Suitable pricing models

– Pay for what you use

Cloud Architecture Challenges5

hardware

software Acquisition cost is 10% of IT spend

facilities

power/cooling

IT labor

support

network

security

maintenance

management tools

Disaster Recovery

backup

Operating cost is 90%

of IT spendSource: IDC

Cloud Computing

Evolution of Computing - The Next (Current) Big Thing•Virtualization and Abstraction

– Details are abstracted from consumers• Reduces complexity

•Not necessarily the Internet, can be on premises– Private cloud

•Automation, Monitoring, Deployment– Reduce cost, shift risk, shorten time-to-market, focus on business functionality

The Benefits of the Cloud

cheap, on-demand capacity

Cloud Architecture Challenges

= Managed for you

StandaloneServers

IaaS PaaS SaaS

Applications

Runtimes

Database

Operating System

Virtualization

Server

Storage

Networking

We Are

Here

• Weddings are a tough thing to manage– Invitations, RSVPs, received greetings, etc.

He and

She are

getting

Married

Our For Today

• Enter “Best Man”– Manage your weddings– Invite your friends and family– Receive RSVP notifications– Receive greetings including wedding images

from friends

Our For Today

“Best Man” Conceptual Architecture

WeddingsWeddings InvitationsInvitations GreetingsGreetings ImagesImages

RUNNING LOCAL

Solution Structure

• WebApi Controllers• Repositories Interfaces• Services Interfaces

Solution Structure

• Repositories Implementations• Services Implementations• Domain Classes - POCO

Solution Structure

• Data Transfer Objects (DTOs)

Solution Structure

• WPF Client Application

Solution Structure

• ASP.NET Host Application

Developing with Azure Cloud

• Azure SDK – http://azure.microsoft.com/en-us/downloads/

• Azure Nuget Packages - http://www.nuget.org/profiles/azure-sdk/

• Azure API is RESTfulMethod Request URI

GET https://management.core.windows.net/<subscription-id>/services/hostedservices

“Best Man” Conceptual Architecture - Cloud

QueueQueue

WeddingsWeddings InvitationsInvitations GreetingsGreetings ImagesImages

Scaling the “Best Man” Application

QueueQueue

WeddingsWeddings InvitationsInvitations GreetingsGreetings ImagesImages

Roles

• Cloud Services are represented by roles– Worker Role

• General Application that will run in the cloud• Ideal for long running background processing

– Web Role• Customized for web application programming as

supported by IIS 7 and ASP.NET. • IIS setup is done for you.

Roles and Instances

Role D

efinition

Development Provisioning Runtime

WEB ROLE

Roles and Instances

WORKER ROLE

VM1 VM2 VM3 VM4

VM5 VM6 VM7 VM8

1. Write an amazing service

2. Service Definition

3. Service Configuration

4. Package

Creating azure service

.csdef

cscfg

CREATING CLOUD PROJECT

1. Write an amazing service

2. Service Definition

3. Service Configuration

4. Package -

Creating azure service

ZIP

Code + *.csdefZIP ()

Encrypt ()

cspkg

.csdef

cscfg

PACKAGING AND DEPLOYING

Working Local

• Running on the cloud costs you

• Azure Compute and Storage Emulator Lets you test your solution locally

DEBUGGING

Fault and Update Domains

1. RDP and update

2. Redploy

3. Service Configuration

Configuration changes

::

web.config

web.config

web.config

CHANGING CONFIGURATIONS

Summary

• Azure Cloud

• Services, Roles and instances

• Packaging and Deployment

• Testing and Debugging

• Configurations

Whats next

• Azure Websites

• Azure Tables

• Authentication and Authorization

• Monitoring

• Automation

Recommended