Monday, December 8, 2008

Live Framework Overview

Live Framework Overview
  • Day Two
  • James McClutcheon
  • 9AM
  • The security tokens I was given enables me to access
  • I can do the labs later (only need Visual Studio, the tokens and download the CTP of Mesh)
  • Background
  • What is Live Framework
  • Example Experience
 The state of the world
  • People are increasingly “on-the-go”
  • They are using more devices
  • Connectivity is proliferating
  • Life-styles and work-styles are blending
  • They are working and playing together more digitally
  • => Increasingly Expecting – Demanding – Complete End-to-end Experiences…
 Market & Technology Trends
  • “Experience first” clients
    • iTunes/ITMS
    • Live Photo Gallery / Flickr
    • Live Mail / Photo Mail
    • Office / Office Live Workspace
    • Outlook / Salesforce Outlook Edition
  • Platform point solutions
    • Cloud storage
    • Offline application
    • Device synch and access
    • 3rd party extensibility
  • What if you had one integrated platform designed to support the rich client experience in a standard, open way?
 Getting off the island
  • Connected experience through services and devices working together
  • Connectivity and communication is everything
  • => Live Framework: Connecting devices, data and applications through a consistent, approachable framework
 Live Services
  • User-centric data:
    • Identity
    • Contacts
    • Files
    • Calendar
  • User-centric services:
    • Resource Model: Extensible, user-centric data store
    • Sync: User centric data synchronization
    • App Mgmt: Discover, provision & share apps
    • Device Mgmt: Management of a user’s devices
 Key Concepts
  • Live fx is the uniform way for programming Live Services
    • Any platform
    • Any programming language
    • Any application or device
  • Live fx makes it easy to build software + service applications
  • .NET developers can use the Live fx API Kits to build applications
 Live Framework Design Principles
  • User-centric to the core
  • Software plus Services distributed platform
    • Universal reach + “experience first”
    • Design for humans and code
  • Internet scale
  • Re-use proven assets
 What is Live Framework?
  • Platform
    • Data model and API for a S+S system
    • Integration and symmetry between devices and cloud
  • Service
    • Microsoft’s hosted instance of the Live Framework
  • Software
    • Client runtime for mesh-aware applications
    • Servers for federated Live Framework components
  • Sample application
    • Demonstrating depth of Live Framework enabled by the platform
 Live Framework Scenarios
  • Integrate Live Services into your applications
  • Opt in to as much of the Live Framework as you like
  • Expose your applications as Mesh Applications
  • => Rich + Reach Applications
  • Blockbuster favourites
 Live Framework Nutshell
  • Cloud Services
  • Client Runtime
 Understanding Live Framework: Platform value
  • Key benefits
    • Distributed system for data replication
    • Designed for “optimize online, enable offline” experience
    • Symmetric API for serviceรณservice and app<->service
    • Flexible data model to suit application needs
    • Microsoft-hosted data-centre and operations
    • Guaranteed communications regardless of topology
    • Great tool-ability
  • Target platform applications
    • Traditional client applications (e.g. Office, Photo Gallery, Media Player)
    • New classes of connected applications (e.g. Media Centre, Zune)
    • Rich interactive applications (e.g. New York Times Reader, MetaCafe)
    • Cloud services and universal web applications (e.g. SkyDrive, Flickr)
 Understanding Live Framework: Programming Model
  • APIs: REST
  • Resource Model: Feeds
  • Symmetric client/cloud programming model
  • Strongly typed managed code wrappers for simplified access
  • Pub/sub support for pushing notifications on most resources
 Experience Demos
  • Share file across devices
  • Access apps across the internet
  • Extend windows to the web and web to windows
 Demo Recap
  • Live Folders: Share and synchronize your information automatically across all your connected devices
  • Live Remote: Access to any application or device
  • Live PC: Browser based experience that enables access to your applications and information from anywhere
 Core Tenets
  • Symmetric programming model
  • Protocol based
  • Resource oriented
  • Simple infoset
    • Entities
    • Collections
    • Relationships
  • Standards based
  • Unified model for all Live types
 Resource Model
  • Consists of resources and their relationships
  • Resources
    • Uniquely addressable
    • Based on a simple infoset
    • Can be rendered to various wire representations
  • Relationships
    • Navigatable, can be inlined
  • Uniform access to all Windows Live resources types
    • Contacts, Profiles, News, Activities, Friends
    • MeshObjects (includes Files, Folders, Photos)
    • Devices
    • Applications
 Live Operating Environment
  • Top level container
  • Contains
    • Contact Collection
    • Profiles
    • Mesh
    • Possibly other Live data
  • Available online/offline
  • Owned/Controlled by the user
  • Contains all the information about: Devices, Data, Applications, News aggregation
 Mesh Objects
  • Top level resource container
  • All contained resources are related
  • Unit of permission/distribution
  • Contains: DataFeeds, Mappings, Members, News
  • Unit of synchronization
  • Container for: DataEntry, FeedSync, MediaResource
  • Can contain other DataFeeds to create hierarchy
 Data Entry
  • Smallest unit of data
  • Specifies the actual data being stored
  • Can contain enclosures of application defined schema
  • How do I identify myself?
 Web Applications
  • Cookie token
    • Obtained from Windows Live ID
    • Connects as the user
  • Delegated Authentication
    • Token based
    • User provides consent
    • Has expiration
    • Is Revokable
    • Provides ACL like restrictions
 Smart Client Applications
  • Local Mesh is already authenticated
  • Cloud Mesh
    • App must provide log in dialog
    • App must provide credentials to cloud API
  Live fx Cloud APIs Resource Access
  • Relative URI
  • Optimistic Concurrency
  • HTTP verbs
    • GET
    • PUT
    • DELETE
 GET a resource
  • Retrieves the feed for the resource
  • Common return codes
    • OK
    • Internal Server Error
  • Request Headers
    • Accept
    • ContentLength
    • ContentType
    • IfModifiedSince
    • Authorization
    • Cookie
 PUT a resource
  • Updates the resource
  • Common return codes
    • OK
    • InternalServerError
    • PreconditionFailed
  • Request Headers
    • IfMatch
    • ContentLength
    • ContentType
    • Authorization
    • Cookie
 DELETE a resource
  • Deletes a resource
  • Common return codes
    • OK
    • InternalServerError
    • PreconditionFailed
  • Request Headers
    • IfMatch
    • Authorization
    • Cookie
 OPTIONS for a resource
  • Returns information about the resource
    • Authentication model
    • Concurrency model
    • Whether the resource is subscribe-able
    • Whether the resource is extensible
    • List of supported media types
    • Life of supported query parameters
    • List of relationships for the resource
    • List of supported methods (Verbs)
    • XML Schema Definition (XSD) for the resource
  • Common return codes
    • OK
    • InternalServerError
    • PreconditionFailed
  • Request Headers
    • IfMatch
    • Authorization
    • Cookie
  • The Resource Browser is your friend!
  • But I don’t know ATOM!
  • No problem
 Multiple Formats
  • Feed types available today
    • ATOM
    • RSS
    • JSON
    • POX
  But I have a lot of data!
  • No problem
 Sorting & Filtering
  • Don’t pull all the data down
  • Pre-sort the data
  • Use the power of the server
 Filter Queries
  • Used only on GETs
  • Add clauses to regular queries
 Filter Query Operators
  • Equivalence: eq, ne, gt, lt
  • Boolean: and not, or
  • Output Parameters: orderby, skip, take, top
  Can I automate it?
  • Resource Scripts
 Resource Scripts
  • What are they?
    • Small domain specific language
    • Declarative way to interact with LOE
    • Logical equivalent of batched procedures
  • Why use them?
    • Frees you from the lower level details of the HTTP protocol
    • Improves efficiency
    • Extend the Request processing pipeline with custom business logic
 Resource Scripts
  • Declarative modelling for
    • Control Flow Statements: Sequence, Interleave, Conditional, CRUD
    • Data Flow Statements: Bind statements
  • Run locally or on the server
  • Can run as triggers
  • Serialized as POX or JSON
  • SequenceStatement: Sequentially executes child statements
  • InterleaveStatement: Executes child statements in parallel
  • ConditionalStatement: If… Else… execution
  • CRUD statements: Operate on resources
 Client vs Server
  • Server Side Execution
    • Script.RunAtServer(credentials)
    • Single HTTP request/response
  • Client Side (In Process) Execution
    • Script.Run(credentials)
    • Multiple HTTP requests/responses
    • Each statement generates request
  • Attach to a resource instance
  • Pre and post logic on Create, Update and Delete
  • Examples:
    • Create a thumbnail after an image resource is created
    • Remove a folder if the last child object is removed
 Authoring and Running
  • Create the statement DOM
  • Compile the DOM and generate the ResourceScript instance
  • Execute the ResourceScript instance
  • If a trigger, attach to the resource
 To use the cloud API
  • Understand the Resource Model
  • Use standard HTTP requests
  • Use the format you are comfortable with

No comments:

Post a Comment