nadim abdo principal development manager microsoft corporation gaurav daga senior program manager...
TRANSCRIPT
Presentation Virtualization: Graphics Remoting (RDP) Today And Tomorrow
Nadim AbdoPrincipal Development ManagerMicrosoft Corporation
Gaurav DagaSenior Program Manager LeadMicrosoft 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
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
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
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
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
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
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
RDP7 Graphics: Direct 3D and Media
demo
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
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
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
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
RDP7 Graphics: Bringing It All Together
demo
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!
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
Live Mesh Remote Desktop
demo
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
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
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
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
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)
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
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
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
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
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!
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
Evals & Recordings
Please fill
out your
evaluation for
this session at:
This session will be available as a recording at:
www.microsoftpdc.com
Please use the microphones provided
Q&A
© 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.