Codemotion Windows Azure Mobile


Published on

Presentation for Codemotion 2013 of Rome

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • 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 platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. Allowing developers to build one code base using one language – that is the nirvana for developers. Node’s evented I/O model freed us from worrying about locking and concurrency issues that are common with multithreaded async I/O. Every connection will execute by the callback not by thread . Each connection is only a small heap allocation.
  • 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.
  • Codemotion Windows Azure Mobile

    1. 1. Antimo MusoneThe Magic Box – Windows Azure Mobile avanade italy – italian ingenium team
    2. 2. About MeAntimo musone avanade – iit Technical Architect for Avanade Microsoft Student Partner Co-Founder of 5th Element Project
    3. 3. Agenda Antimo Musone avanade – iitCloud & AzureScenarioAzure MobileDemoQ&A
    4. 4. AgendaAntimo Musone avanade – iit An approach to computing that’s about internet scale and connecting to a variety of devices and endpoints
    5. 5. Agenda Antimo Musone avanade – iitCloud Computing IaaS Infrastructure- PaaS Platform-as-a- SaaS Software-as-a- as-a-Service Service Service
    6. 6. Agenda Antimo Musone avanade – iitWindows Azure Comprehensive set of services that enable you to quickly build, deploy and manage applications across a global network of Microsoft- managed datacenters
    7. 7. Agenda Antimo Musone avanade – iitThree Reasons for Device + Cloud 1 Allows new application scenarios 2 The cloud levels the playing field 3 The cloud provides a way to reach across device platforms and a larger pool of resources from which to pull
    8. 8. Agenda Antimo Musone avanade – iitScenario
    9. 9. Agenda Antimo Musone avanade – iit Any pictures?SAS Process Image Windows Azure Translated Text Authenticate Token Access Token Job Completed Job Completed Access Shared Access Signature Translated Send Image Text Translated Text Hawaii OCR & Bing Translator
    10. 10. Agenda Antimo Musone avanade – iitAzure Mobile Features
    11. 11. Agenda Antimo Musone avanade – iitTarget Platforms
    12. 12. Agenda Antimo Musone avanade – iitInteroperability
    13. 13. Agenda Antimo Musone avanade – iitInteroperability Featureso Http Rest Interfaceo ODatao JSONo OAUTH
    14. 14. Agenda Antimo Musone avanade – iitData Storage
    15. 15. Agenda Antimo Musone avanade – iitData Storage - Technologyo REST API o https://<service><table_name>/{<item_id>}o OData Interfaceo HTTP METHOD GET, POST, PATCH, DELETEo Request & Response use JSON in request body
    16. 16. Agenda Antimo Musone avanade – iitData Storage – Authorization Levelo Authorization Header o X-ZUMO-{ APPLICATION | AUTH | MASTER }o Every Request Header has different X-ZUMO- Header for different authorizationEveryone NoneAnybody with the application key X-ZUMO-APPLICATIONOnly Authenticated Users X-ZUMO-AUTHOnly Scripts and Admins X-ZUMO-MASTER
    17. 17. Agenda Antimo Musone avanade – iitData Storage – Architectureo Leverage strengths of Windows Azure SQL Databaseo Reporting, TSQL support, existing tools, etc.o Manage your way (portal, REST API, SSMS, etc.)o Partition applications by schema o App1.Users o App2.Userso Dynamic Schema Support (on/off)
    18. 18. Agenda Antimo Musone avanade – iitData Storage – Exampleo Request Http Method : GET $filter=(complete%20eq%20false) Header : Accept: application/json X-ZUMO-APPLICATION: UzMAOXRlJdZyqibeUqCMoZZMrUXIRs92 Host: 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}]
    19. 19. Agenda Antimo Musone avanade – iitBusiness Logic
    20. 20. Agenda Antimo Musone avanade – iitBusiness Logic – Architectureo Intercept CRUD operations and apply your logic with JavaScript scripts node.js Scripting Scripting function(item, user, request) { DB DB ….. } User authentication Dynamic schematization
    21. 21. Agenda Antimo Musone avanade – iitBusiness Logic – Technologyo Known objects and modules o azure var SendGrid = require(sendgrid).SendGrid; var sendgrid = new SendGrid(‘<account>, ‘<password>); o sendgrid o console sendgrid.send({ o mssql to: userItem.EmailAddress, from:, o push subject: New ToDoItem Added!!, o statusCodes text: A new MyToDoItem was added: + item.text}, o table function(success, message) { o request // If the email failed to send, log it as an error. o crypto if (!success) { o console.error(SendGrid Error! + message); util } });
    22. 22. Agenda Antimo Musone avanade – iitAuthentication
    23. 23. Agenda Antimo Musone avanade – iitAuthenticationAccount: Microsoft, Facebook, Twitter, GoogleOAuth 2.0 to consume your data
    24. 24. Agenda Antimo Musone avanade – iitAuthenticationo Table 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 keyo Your application can add whatever other authorization is needed.
    25. 25. Agenda Antimo Musone avanade – iitAuthenticationo Server script to match against your table (role-based access, specific user, etc.)
    26. 26. Agenda Antimo Musone avanade – iitPush Notification
    27. 27. Agenda Antimo Musone avanade – iitPush Notification - Architecture (2) (1) (3) (3)
    28. 28. Agenda Antimo Musone avanade – iitPush Notification - Logico Register your push notification on mobile service o WNS client secret and package SID for Windows o API KEY for Android o Certificate for IOSo Ability to send Tile, Toast, Badge, and Raw notifications.o push logic o Node.js module to create push notifications
    29. 29. Agenda Antimo Musone avanade – iitDiagnostic & Log
    30. 30. Agenda Antimo Musone avanade – iitDiagnostics
    31. 31. Agenda Antimo Musone avanade – iitLogging
    32. 32. Agenda Antimo Musone avanade – iitScale
    33. 33. Agenda Antimo Musone avanade – iitGet Started
    34. 34. Agenda Antimo Musone avanade – iithttp://www.windowsazure.como Services -> 750 ore al mese di istanze di calcolo piccoleo Web -> 10 siti Webo Mobile Service ->10 servizi mobilio RDBS ->1 database SQLo Report SQL ->100 ore al meseo Storage -> 70 GB con 50.000.000 transazioni di archiviazioneo Trasferimenti di dati ->senza limiti in ingresso e 25 GB in uscitao Multimedial Services -> 50 GB (input e output combinati)o CDN -> 20 GB in uscita con 500.000 transazionio Cache -> 128 MB
    35. 35. AgendaAntimo Musone avanade – iit Question & Answer
    36. 36. AgendaAntimo Musone avanade – iit