Upload
aidan-casey
View
1.283
Download
0
Tags:
Embed Size (px)
DESCRIPTION
slidedeck for a talk at the Microsoft Technology User Group on April 18th 2013.
Citation preview
Windows Azure Mobile Services from Start to REST
MTUG.ie Windows azure group #irishazureheads
April 2013
Aidan CaseySolutions architect @MYOB Australia
[email protected] | @AIDANJCASEY | acaseyblog.wordpress.com
Agenda Overview
Storage
Push Notifications
Authentication & Authorisation
Scheduler
Diagnostics & Scale
Prize Giveaway!
Questions & Answers
Data
Auth Server Logic Scheduler
Logging & Diag
Scale
Notifications
SDK’s• Windows Store
• Windows Phone 8
• iOS
• Android
• JavaScript
All SDK’s are open sourced..
github.com/WindowsAzure/azure-mobile-services
What we are gonna build tonight
The swag that’s up for grabs!
DemoCREATING A NEW MOBILE SERVICES STACK & TWEET AGGREGATOR
Storage
Data
Structured Storage Windows Azure SQL Database
Dynamic schema on/off
Apps partitioned by schema
REST API generated per table (very data centric platform)
Access your data through the portal, SQL Management studio or REST API
JSON -> SQL data typesJSON value T-SQL type
Numeric values (integer, decimal, floating point) Float(53)
Boolean Bit
DateTime DateTimeOffset(3)
String Nvarchar(max)
DemoJAVASCRIPT SDK
Server side Logic
“Data Centric” Server LogicBackend runs Node.js on small azure VM’s
“Interceptors” exposed for all CRUD requests to all tables
You only get access to a predefined set of node modules
Third party apps exposed through node modules (sendgrid, twilio, pusher)
request, console, push.*, tables, sql, statusCodes, azure, mssql
Unstructured Storage “Virtual Tables” let you short-circuit the database entirely
E.g. offload to Azure table storage, azure blob storage, service bus queues !
var azure = require('azure');var accountName = '<storage-account-name>';var accountKey = '<storage-account-key>';var host = accountName + '.blob.core.windows.net';var blobService = azure.createBlobService(accountName, accountKey, host);
DemoINTERCEPTORS AND SENDING EMAILS WITH SENDGRID
Notifications
Notifications
Push Notifications The global push object is used to send push notifications.
Success & Error Callbacks are provided
Method
push. apns Apple Push Notification Service iOS apps
push. gcm Google Cloud Messaging Android apps
push. mpns Microsoft Push Notification Service Windows Phone 8 apps
push. wns Windows Notification Services Windows Store apps
Push Notification Lifecycle
1. register app for push notifications
2. register the apple send token to Mobile Service
3. Server side script
push.apns(…)(1)
(2)
(3)
(3)
iOS
DemoPUSH NOTIFICATIONS TO A WINDOWS STORE APP
Authentication & Authorisation
Auth
AuthorisationTable level authorization for CRUD operations
Everyone: any request by anyone is accepted.Anyone with Application Key: app key distributed w/ the app (default)Authenticated Users: users authenticated by Live Connect.Scripts and Admins: registered scripts or requests via the master key
Application Key should not be used in production !
CLI & Diagnostics
Command line tools Can do “most things” from the command line
Create/ Delete a new mobile service
Create / Delete a table
Register table scripts
list tables/ mobile services
No access to the scheduler from the command line
Scheduler
Scheduler
DemoSCHEDULED TASK TO STORE TWEETS TO #IRISHAZUREHEADS
DemoUSING THE REST API
Cool Third Party Add-Ons
Running on shared instances
10 Mobile Services
1GB SQL Database
Data transfer is per subscription, not per mobile service
Unlimited ingress
165MB daily egress
Scheduler
700 jobs a month
Free offer for current preview release
Show me the money!pricing & licensing $ service level
agreements
PreviewNo availability SLA
General Availability99.9%
Shared Instance (multitenant environment)
Small instance is the only size available; multiple may be purchased
Free at public preview launch
Up to 10 applications
Reserved Instance (private VM)
Small instance is the only size available; multiple may be purchased
Charge for Preview will be at the same reduced rate as azure websites
Up to 10 applications
Thanks to our sponsors
Competition Time!
github.com/aidancasey/AzureMobileServicesGiveAway
tweets to -
#irishazureheads
register your details here -
azurecompetition.azurewebsites.net
*All personal details will be deleted afterwards
the swag …
DataAuth
Server Logic
Scheduler
Logging & Diag
Scale
Notifications
Resources Official Videos & Tutorials
http://www.windowsazure.com/en-us/develop/mobile/
Real world Use Cases & black belt tips
http://chrisrisner.com/Common-Scenarios-with-Windows-Azure-Mobile-Services
Mr Azure Mobile Services (Josh Twist)
http://www.thejoyofcode.com/
Cloud Nick ( Nick Harris )
http://www.nickharris.net/
MTUG needs you !
?