MICROSOFT CONFIDENTIAL – INTERNA Marc Mercuri Sr. Director Applied Incubation Architecting and Implementing Interoperable Data Services Aaron Bosley Business Strategy Architect MCS Impact Team Ricardo Villalobos Sr. Developer Evangelist DPE Presented 2013
36
Embed
Architecting and Implementing Interoperable Data Services
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Marc MercuriSr. DirectorApplied Incubation
Architecting and Implementing Interoperable Data Services Aaron Bosley
Business Strategy ArchitectMCS Impact Team
Ricardo VillalobosSr. Developer EvangelistDPE
Presented 2013
Ok, so suppose we go ‘all in’ on cloud… We buy SaaS by default and build only what we need… what are you doing to make sure these services can talk to one another?
- Big Customer
This is the future
Wanted to extend functionalityInsertion of TripIt travel itineraries into online calendarsDetection of new travel itineraries directly from the user’s email inboxAutomated publishing of travel details to social networksIntegration of travel dates and trip segments into corporate expense reporting
IntegrationTripIt acts as a web services client to some of the APIsTripit makes itinerary available to other services via it’s APIsUsers need control over accessUsers don’t want to provide user credential for 3rd party services to TripIt
Types of services you might compose
Composition with Open Standards••
•
•••
Why are Data Services Important?
What exactly is a Data Service?
WhyBusiness has realized:Data is a strategic assetData can generate revenueData can build ecosystemsUsing data generates more data
Technology leaders have realized (painfully) that:Data is only as good/valuable/effective as the interfaces that exposes itInteroperability is best achieved thru standardization and simplicity
What
Loosely CoupledStateless
Asynchronous
DiscoverableEvolvable
Data Service Architectural Attributes
Logical Architecture
Client
Data Service
HTTP Listener
Data Service Runtime
Data Abstraction Layer
Data Providers
SQL NoSQL
Other
Example Data Services architecture
Browser
Browser
Browser
.Net Web App
OData Client Lib
Ruby on Rails Web App
OData Client Lib
Windows Azure
Application
ODataService
SQLAzure
Windows Azure Tables
<OData Protocol>
<OData Protocol>
Java Application
ODataService
<OData Protocol>
Browser
Browser
Browser
.Net Web App
OData Client Lib
Ruby on Rails Web App
OData Client Lib
Windows Azure
Application
ODataService
SQLAzure
Windows Azure Tables
<OData Protocol>
<OData Protocol>
Java Application
ODataService
<OData Protocol>
OData for Beginners
OData in 1 slideURL conventionsCollections, keys, filtering, sorting, paging, etc.
Representation for structured dataJSON and Atom/XML formats, pointers to unstructured data
OperationsGET, POST, PUT/PATCH, DELETE have well-established semantics
DescriptionService description in terms of structure, interaction and metadata in general
Libraries for serving and consuming ODataMOBILE DEV
Windows Phone Android iOS
APP DEV
Silverlight .NET JavaScript
Java PHP Ruby
WEB CMS
Joomla Drupal
CUSTOM SERVERS
.NET servers Java PHP
node.js
CLOUD APPLICATIONS
App Engine Azure
DATABASES
SQL Server MySQL Azure Data
Implementation optionsASP.NET web APIBest for API focused designAlso works best if you don’t have an IQueryable and/or if you have lots of business logicEasier to separate service interface from domain model/storage model
WCF data servicesWorks best for thin layers over databases/LINQ providers (you want to expose all data in the entity or schema)
ODatalibLowest-level library, lots of control but lots of workCovers most of the OData protocol, metadata drivenUse only if Web API or WCF doesn’t meet your needs
ASP.NET web API and ODataClient Routing Controller Model Data Provider View
Demo
OData Made Easy with ASP.Net Web API and Visual Studio 2013
• JavaScript on the ServerBased on the V8 JavaScript engine• Single thread based
Tasks run in parallel, node.js code orchestrates• Efficient and highly scalable
Each connection uses only a small heap allocation• Open and Portable
Single node.exe runtime for Windows / Linux
What is node.js?
node.exeSingle Thread
HTMLPage
DatabaseQuery
RESTfulCall
Databaseengine
Database Query Results
Work QueueResponse
Remote Client
Request
Single thread base
Asynchronous model, event loop with callbacks
node.js is…Excellent for: OK for:
Wrong for:
node.js and RESTBeing a language / engine based on JavaScript, REST and JSON are native to node.js, which means that creating a Service Layer on top of Database engines is simple and scalable.
UI
node.js Service Layer
MS SQL
ODATA
Demo
OData with Node.JS
Oauth for Beginners
What is it?An open protocol to allow secure authorization in a simple and standard method from web, mobile, and desktop applicationsFor service providers, OAuth gives users access to their data while protecting their account credentialsFor service consumers, Oauth is a simple way to publish and interact with protected data.