3. chi siamo / chi sono
Technical Architect for Avanade
Microsoft Student Partner
Co-Founder of 5 th Element Project
http://www.fifthelementproject.com
http://antimomusone.com
5. Cloud Computing
What is the cloud?
An approach to computing that’s about internet scale
and connecting to a variety of devices and endpoints
6. Cloud Computing Types
IaaS
Infrastructure-
PaaS
Platform-as-a-
SaaS
Software-as-a-
StaS
Storage-as-a-
NaaS
Network-as-a-
as-a-Service Service Service Service Service
7. Windows Azure
Windows Azure Comprehensive set of services that enable you to quickly build,
deploy and manage applications across a global network of
Microsoft-managed datacenters
8. Device + Cloud
Three Reasons for Device + Cloud
1 Allows new application scenarios
2 The cloud levels the playing field
The cloud provides a way to reach across device
3 platforms and a larger pool of resources from
which to pull
10. Scenario OCR App
Any pictures?
SAS Process Image
Windows Azure
Translated Text
Authenticate Token
Access Token
Job Completed
Access
Shared Access Send Image
Signature Translated
Text
Translated
Text
Hawaii OCR &
Bing Translator
15. Storage Technology
REST API Interface
Features
https://<service>. azuremobile.net/tables /<tabl
e_name>
OData Protocol
HTTP METHOD GET, POST, PATCH, DELETE
Request & Response Body use JSON
16. Authorization Level
Authorization Header Request
X-ZUMO-{ APPLICATION | AUTH |
MASTER
X-ZUMO- Header for different
authorization
Everyone None
Anybody with the
X-ZUMO-APPLICATION
application key
Only Authenticated
X-ZUMO-AUTH
Users
Only Scripts and Admins X-ZUMO-MASTER
17. Storage Architecture
SQL Azure Database Infrastructure
Features
Manage your way (portal, REST API, SSMS, etc.)
Partition applications by schema in DB
Dynamic Schema Support (on/off)
Reporting, TSQL support, existing tools, etc.
18. Example of Request
Data Storage – Example for Todo List Service
oRequest
HTTP Method : GET https://todolist.azuremobile.net/tables/TodoItem?$filter=(complete%20eq%20false)
Header : Accept: application/json X-ZUMO-APPLICATION: UzMAOXRlJdZyqibeUqCMoZZMrUXIRs92 Host: todolist.azure-mobile.net
o Response
HTTP/1.1 200 OK
[{"id":1,"text":"Sign-up for the free trial","complete":false},
{"id":2,"text":"Create the mobile service","complete":false }, {"id":3,"text":"Complete the quickstart","complete":false}]
21. Node.js
Node's goal is to
provide an easy way to
build scalable network
programs
Mono –Thread Networking
Event-Driven
Google's V8 JavaScript engine
Server-side JavaScript application
No dead-locking
Improvement of memory management
22. Node.js
Windows Azure offer a SDK to develop and build web
application with Node.js hosted in the cloud
Example of server var http = require("http");
application
function onRequest(request, response) {
File javascript Server.js -> console.log("Richiesta ricevuta dal server");
response.writeHead(200, {"Content-Type":"text/plain"});
response.write("Richiesta ricevuta");
response.end();
}
http.createServer(onRequest).listen(8080);
console.log("Server avviato");
23. Azure Mobile Business Logic
Architecture
Intercept CRUD operations and apply your logic with JavaScript scripts
node.js
Scripting
function(item, user, request)
{ DB
…..
}
User authentication Dynamic schematization
24. Business Logic
Business Logic – Node.js
Kn o w n ob je cts an d mo d ule s
o azure
o sendgrid
o console
o mssql
o push
o statusCodes
o table
o request
o crypto
o util
var SendGrid = require('sendgrid').SendGrid;
var sendgrid = new SendGrid(‘<account>', ‘<password>');
sendgrid.send({
to: userItem.EmailAddress,
from: 'notifications@mytodoitem.azure-mobile.net',
subject: 'New ToDoItem Added!!',
text: 'A new MyToDoItem was added: ' + item.text},
function(success, message)
{
// If the email failed to send, log it as an error.
if (!success) {
console.error('SendGrid Error! ' + message);
} });
28. Authentication - Rules
Set Level of Authorization
Table level authorization for CRUD operations
Everyone any request by anyone is accepted
Anybody with the application key app key distributed w/ the app (default
Only Authenticated Users users authenticated by Live Connect
Only Scripts and Admins registered scripts or requests via the master key
Your application can add whatever other authorization is needed.
32. Push Notifications - How
Push Notification – Logic
Register your push notification on mobile service
WNS client secret and package SID for Windows
API KEY for Android
Certificate for IOS
Ability to send Tile, Toast, Badge, and Raw notifications.
Push logic
Node.js module to create push notifications
38. Get Started
http://www.windowsazure.com
Services -> 750 ore al mese di istanze di calcolo piccole
Web -> 10 siti Web
Mobile Service ->10 servizi mobili
RDBS ->1 database SQL
Report SQL ->100 ore al mese
Storage -> 70 GB con 50.000.000 transazioni di archiviazione
Trasferimenti di dati ->senza limiti in ingresso e 25 GB in uscita
Multimedial Services -> 50 GB (input e output combinati)
CDN -> 20 GB in uscita con 500.000 transazioni
Cache -> 128 MB
39. Grazie
:-)
Per contattarmi
antimo.musone@student-partners.com
antimo.musone@avanade.com
Notas del editor
X-ZUMO-APPLICATION – The application key of the mobile service. X-ZUMO-AUTH - T he service-generated authentication token for an authenticated user. You must specify a token for an authenticated user when required to access the table operation. X-ZUMO-MASTER - The service master key. OData does this by applying and building upon Web technologies such as HTTP , Atom Publishing Protocol (AtomPub) and JSON to provide access to information from a variety of applications, services, and stores
X-ZUMO-APPLICATION – The application key of the mobile service. X-ZUMO-AUTH - T he service-generated authentication token for an authenticated user. You must specify a token for an authenticated user when required to access the table operation. X-ZUMO-MASTER - The service master key. OData does this by applying and building upon Web technologies such as HTTP , Atom Publishing Protocol (AtomPub) and JSON to provide access to information from a variety of applications, services, and stores
X-ZUMO-APPLICATION – The application key of the mobile service. X-ZUMO-AUTH - T he service-generated authentication token for an authenticated user. You must specify a token for an authenticated user when required to access the table operation. X-ZUMO-MASTER - The service master key. OData does this by applying and building upon Web technologies such as HTTP , Atom Publishing Protocol (AtomPub) and JSON to provide access to information from a variety of applications, services, and stores
Node.js is a software system designed for writing scalable Internet applications, notably web servers . [1] Programs are written in JavaScript , using event-driven,asynchronous I/O to minimize overhead and maximize scalability. La natura event-driven di Node.js si manifesta nella gestione delle operazioni concorrenti: nei Web server tradizionali come Apache utilizziamo ad esempio un thread per elaborare ogni richiesta, mentre Node.js genera un nuovo evento che finirà in un unico processo, un "loop" che gestirà a suo tempo l'evento stesso eseguendo le relative funzioni di callback. Il altre parole le funzioni più comuni di un server Web sono svolte da moduli diversi e gestite con eventi di input/output. Una scelta particolarmente azzeccata visto che un server web trascorre maggior parte del tempo ad attendere l'esito di operazioni di input/output, dunque la possibilità di lavorare in modo asincrono tramite funzioni di callback
Node.js is a software system designed for writing scalable Internet applications, notably web servers. [1] Programs are written in JavaScript, using event-driven,asynchronous I/O to minimize overhead and maximize scalability. La natura event-driven di Node.js si manifesta nella gestione delle operazioni concorrenti: nei Web server tradizionali come Apache utilizziamo ad esempio un thread per elaborare ogni richiesta, mentre Node.js genera un nuovo evento che finirà in un unico processo, un "loop" che gestirà a suo tempo l'evento stesso eseguendo le relative funzioni di callback. Il altre parole le funzioni più comuni di un server Web sono svolte da moduli diversi e gestite con eventi di input/output. Una scelta particolarmente azzeccata visto che un server web trascorre maggior parte del tempo ad attendere l'esito di operazioni di input/output, dunque la possibilità di lavorare in modo asincrono tramite funzioni di callback
An open protocol to allow secure authorization in a simple and standard method from web, mobile and desktop applications. If you're storing protected data on your users' behalf, they shouldn't be spreading their passwords around the web to get access to it. Use OAuth to give your users access to their data while protecting their account credentials. Service use Oauth to access your data without your credentials.