+ All Categories
Home > Documents > Nadim Abdo Principal Development Manager Microsoft Corporation Gaurav Daga Senior Program Manager...

Nadim Abdo Principal Development Manager Microsoft Corporation Gaurav Daga Senior Program Manager...

Date post: 28-Dec-2015
Category:
Upload: mervin-pitts
View: 220 times
Download: 1 times
Share this document with a friend
Popular Tags:
32
Presentation Virtualization: Graphics Remoting (RDP) Today And Tomorrow Nadim Abdo Principal Development Manager Microsoft Corporation Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21
Transcript
Page 1: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

Presentation Virtualization: Graphics Remoting (RDP) Today And Tomorrow

Nadim AbdoPrincipal Development ManagerMicrosoft Corporation

Gaurav DagaSenior Program Manager LeadMicrosoft Corporation

ES21

Page 2: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

Introduction to RDP What is new in Windows 7? Deep dive into RDP Graphics Architecture RDP Platform

How to extend RDP API Walkthroughs

How to make your apps run efficiently in a remote session

Related talks: PC-05 Unlocking the GPU with Direct3D PC-18 Introducing Direct2D and DirectWrite

RDP Graphics RemotingAgenda

Page 3: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

Current State Of RDPVista and Windows Server 2008 era

RDP is an optimized binary protocol for remoting the Windows Experience

Currently RDP provides A great remoting experience for GDI Apps Rich media and animated scenarios fallback

to bitmap remoting RDP has an extensibility model built on

Virtual Channels Used internally as basis of new features

Detailed protocol docs (2000+ pages) on MSDN

Page 4: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

RDP Platform TechnologyRemoting scenarios enabled by RDP

Terminal ServerRemote DesktopRemote AssistanceWindows Meeting spacesMedia Center Extenders and XBox 360SCCM Remote controlHyper-V Remote Control Windows Live Mesh

Page 5: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

RDP Protocol Structure

Graphics Virtual Channels (VCs)

Mouse &Keyboard VCs

Partner Virtual Channel

Plug-Ins

Bulk Compression (RDP5+, RDP6.0, RDP6.1)

Virtual Channel Multiplexing and Framing

Security Layer (SSL/Kerberos/NTLM)

Transport Layer (e.g. TCP, RPC/HTTP, Windows Live Tunnel)

DeviceVCs

Page 6: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

Why Make Changes?Trends affecting presentation remoting

Increasing graphics richness Media, 3D UI, Video, Animations, Flash,

Silverlight Increasing fragmentation of graphics stacks Strong demand for closing “gap” with the

local experience I.e. all local features “just work”

Diversity of client-side devices

Page 7: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

Agenda

Introduction to RDP What is new in Windows 7? Deep dive into RDP Graphics Architecture RDP Platform

How to extend RDP API Walkthroughs

How to make your apps run efficiently in a remote session

Page 8: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

What's New In Windows 7RDP Platform Improvements

Windows 7 Aero Direct2D &Direct 3D 10.1

Bi –directional Audio

Low latency Audio Playback

True Multimon Support

Multimedia:Media Foundation

Multimedia: DirectShow

RDP Core Performance

Improvements

Page 9: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

RDP7 Graphics: Direct 3D and Media

demo

Page 10: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

Agenda

Introduction to RDP What is new in Windows 7? Deep dive into RDP Graphics Architecture RDP Platform

How to extend RDP API Walkthroughs

How to make your apps run efficiently in a remote session

Page 11: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

RDP Graphics Remoting Internals

Approaches to graphics remoting Host rendering Client rendering

RDP in Windows 7 Does both! Remotes efficient graphics commands to client

GDI, Direct 3D, Media, DWM (Desktop Window Manager) Efficient techniques for host rendering

Caching, Compression Client-side compositor combines streams

Page 12: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

RDP Graphics Architecture In Windows 7

USER

KERNELWin32k.sys (USER/GDI)

RDPDD (Display Driver)

TS Dynamic Virtual Channels

DWMDX10.1 App

RDPD3D.DLL

D2D App GDI App

RDP Driver Stack

Transport: (TCPIP.Sys) To RDP Client

Media App

TSMF.DLL

Apps

OS

RDP

DWMcore.DLLEffi

cien

t Com

man

dSt

ream

s

Efficient G

DI

Stream

DX Runtime

Page 13: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

RDP Remoting Techniques In Windows7

Direct2D

Direct 3D: 10.1

Efficient MediaRequires: Codecs on ClientContent cannot have DRM

or licensing

GDI

WPF

Silverlight

Flash

All other media

Direct 3D <10.1

RDP Client Rendering RDP Host Rendering

Page 14: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

RDP7 Graphics: Bringing It All Together

demo

Page 15: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

RDP Graphics Intensive Performance

Executive PPT0

20

40

60

80

100

120

140

160

180

Bandwidth Improvement per release

XP (RDP 5.2)Vista (RDP 6.0)Windows 7 (RDP 7.0)

40% Gain!

Page 16: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

RDP Office And LOB Application Performance

Typing and Scrolling Scrolling0

1

2

3

4

5

6

Bandwidth - Kbps

XP (RDP 5.2)Vista (RDP 6.0)Windows 7 (RDP 7.0)

65% Drop

Page 17: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

Live Mesh Remote Desktop

demo

Page 18: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

Agenda

Introduction to RDP What is new in Windows 7? Deep dive into RDP Graphics Architecture RDP Platform

How to extend RDP API Walkthroughs

How to make your apps run efficiently in a remote session

Page 19: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

RDP PlatformAPI family overview

Dynamic Virtual Channels APIs Client/Server extensibility for RDP Bi-directional streams that extend RDP Internal features use same technology

Remote Desktop ActiveX APIs Host/customize full RDP client in your apps Usable from web, managed or native code

RDP Windows Desktop Sharing APIs RDP Platform for screen sharing Enables sharing console,

multiparty connections Basis of Remote Assistance

Page 20: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

Dynamic Virtual Channels (1/2)Intro and usage

What’s new? Automatically handles packet reconstruction Removes 32-channel limitation in past product

Server usage: Opening a channel:WTSVirtualChannelOpenEx (..,WTS_CHANNEL_OPTION_DYNAMIC)WTSVirtualChannelQuery

Data IO:ReadFile/WriteFile

Page 21: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

Dynamic Virtual Channels (1/2)Intro and usage

What’s new? Automatically handles packet reconstruction Removes 32-channel limitation in past product

Server usage: Opening a channel:WTSVirtualChannelOpenEx (..,WTS_CHANNEL_OPTION_DYNAMIC)WTSVirtualChannelQuery

Data IO:ReadFile/WriteFile

Page 22: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

Dynamic Virtual Channels (2/2)Client-side usage

1) Implement IWTSPlugin and register CLSID: HKCU\Software\Microsoft\Terminal Server Client\Default\AddIns

2) Create listener and accept new channels pChanMgr->CreateListener(Name, pMyCallback)

3) Accept and use channel::OnNewChannelConnection(pChannel)4) Do IOIWTSVirtualChannel::Write(cbSize, buf)

CMyChannel::OnDataReceived(cbSize, buf)

Page 23: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

Agenda

Introduction to RDP What is new in Windows 7? Deep dive into RDP Graphics Architecture RDP Platform

How to extend RDP API Walkthroughs

How to make your apps run efficiently in a remote session

Page 24: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

Consider scaling down expensive graphics in remote e.g., Animations

Detect if the session is remote:Managed:

System.Windows.Forms.SystemInformation.TerminalServerSession

Win32:GetSystemMetrics(SM_REMOTESESSION)

Consider session transitions Leverage RDP Compression GP’s

30-40% bandwidth savings Important to test your app remotely!

Tips For Writing Efficent Remote AppsBasics

Page 25: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

Guidance for offscreen surfaces Do NOT use DIBs (Device Independent bitmaps) DO use Device-Dependent or compatible bitmaps

(enables primitive remoting) Layered Windows can be very expensive

Except if Composed Desktop (Aero is ON) Do NOT use Screen capture - GetDC(NULL)

Can require client-roundtrip What about color depth?

Your choice! 32bpp is just as efficient as 16bpp

Tips For Writing Efficent Remote AppsGDI

Page 26: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

Use Direct2D – has efficient command remoting Direct3D Apps: Use DX10.1 and DXGI 1.1 (DirectX

Graphics Infrastructure)CreateDXGIFactory1(…);pFactory->EnumAdapters1(i, &pAdapter)

pAdapter->GetDesc1(&Desc);BOOL IsRemote = Desc.Flags & DXGI_ADAPTER_FLAG_REMOTE;

Use the new IsCurrent() API to handle session transitions and discover new adapters

Tip: Local optimizations are magnified remotely!

Tips For Writing Efficent Remote AppsRemoting Direct 3D and Direct2D

Page 27: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

Key Takeaways

RDP Platform continues to evolve and improve

RDP Platform has a rich extensibility model today with API’s and detailed protocol documentation in MSDN

Extend the TS Platform for your needs Call to action: Please optimize and test

your apps for the TS environment We would love your feedback on future

evolution and extensibility!

Page 28: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

References

Terminal Services (TS) Team Blog: http://blogs.msdn.com/ts

TS Application Compatibility Guidance: http://connect.microsoft.com/tsappcompat TS Home page: http://www.microsoft.com/ts

Page 29: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

Evals & Recordings

Please fill

out your

evaluation for

this session at:

This session will be available as a recording at:

www.microsoftpdc.com

Page 30: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

Please use the microphones provided

Q&A

Page 31: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

© 2008 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.

Page 32: Nadim Abdo Principal Development Manager Microsoft Corporation  Gaurav Daga Senior Program Manager Lead Microsoft Corporation ES21.

Recommended