architecting and implementing interoperable data services

Post on 16-Apr-2017

205 Views

Category:

Data & Analytics

3 Downloads

Preview:

Click to see full reader

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

CustomDon’t do this

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.

TerminologyResource OwnerClientResource ServerAuthorization ServerAccess TokenRefresh Token

Authorization code flow

B

A

BC

A ED

D

D

A

C

B

E

F

Associating Users and Apps with Devices

demo

link

Oauth in Action

OAuth Protocol Flow in Office 365

SharePoint 2013 content server

End user•••

Client app

Authentication server

1

2

3

4

5

6

7

8

9

10

A Composite Scenario

Picture Site

© 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

top related