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 ID: 424177
Download Presentation The PPT/PDF document "Presentation Virtualization: Graphics Re..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Presentation Virtualization: Graphics Remoting (RDP) Today And TomorrowSlide2
Introduction to RDP
What is new in Windows 7?Deep dive into RDP Graphics ArchitectureRDP PlatformHow to extend RDPAPI WalkthroughsHow to make your apps run efficiently in a remote sessionRelated talks:PC-05 Unlocking the GPU with Direct3DPC-18 Introducing Direct2D and DirectWrite
RDP Graphics
Remoting
AgendaSlide3
Current State Of RDP
Vista and Windows Server 2008 eraRDP is an optimized binary protocol for remoting the Windows ExperienceCurrently RDP providesA great remoting experience for GDI AppsRich 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 MSDNSlide4
RDP Platform Technology
Remoting scenarios enabled by RDPTerminal ServerRemote DesktopRemote AssistanceWindows Meeting spacesMedia Center Extenders and XBox 360SCCM Remote control
Hyper-V Remote Control
Windows Live MeshSlide5
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)
Device
VCsSlide6
Why Make Changes?
Trends affecting presentation remotingIncreasing graphics richnessMedia, 3D UI, Video, Animations, Flash, SilverlightIncreasing fragmentation of graphics stacks
Strong demand for closing “gap” with the local experience
I.e. all local features “just work”
Diversity of client-side devicesSlide7
Agenda
Introduction to RDPWhat is new in Windows 7?Deep dive into RDP Graphics ArchitectureRDP PlatformHow to extend RDPAPI WalkthroughsHow to make your apps run efficiently in a remote sessionSlide8
What's New In Windows 7
RDP Platform Improvements
Windows 7 Aero
Direct2D &
Direct 3D 10.1
Bi –directional Audio
Low latency Audio Playback
True Multimon Support
Multimedia:
Media Foundation
Multimedia: DirectShowRDP Core Performance ImprovementsSlide9
Agenda
Introduction to RDPWhat is new in Windows 7?Deep dive into RDP Graphics ArchitectureRDP PlatformHow to extend RDPAPI WalkthroughsHow to make your apps run efficiently in a remote sessionSlide10
RDP Graphics Remoting Internals
Approaches to graphics remotingHost renderingClient renderingRDP in Windows 7Does both!Remotes efficient graphics commands to clientGDI, Direct 3D, Media, DWM (Desktop Window Manager)Efficient techniques for host renderingCaching, CompressionClient-side compositor combines streamsSlide11
RDP Graphics Architecture In Windows 7
USER
KERNEL
Win32k.sys (USER/GDI)
RDPDD (Display Driver)
TS Dynamic Virtual Channels
DWM
DX10.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.DLL
Efficient Command
Streams
Efficient GDI
Stream
DX RuntimeSlide12
RDP
Remoting
Techniques In Windows7
Direct2D
Direct 3D: 10.1
Efficient Media
Requires: Codecs on Client
Content cannot have DRM or licensing
GDI
WPF
Silverlight
Flash
All other media
Direct 3D <10.1
RDP Client Rendering
RDP Host RenderingSlide13
RDP Graphics Intensive PerformanceSlide14
RDP
Office And LOB Application Performance
65% DropSlide15
Agenda
Introduction to RDPWhat is new in Windows 7?Deep dive into RDP Graphics ArchitectureRDP PlatformHow to extend RDPAPI WalkthroughsHow to make your apps run efficiently in a remote sessionSlide16
RDP Platform
API family overviewDynamic Virtual Channels APIsClient/Server extensibility for RDPBi-directional streams that extend RDPInternal features use same technologyRemote Desktop ActiveX APIsHost/customize full RDP client in your appsUsable from web, managed or native codeRDP Windows Desktop Sharing APIs
RDP Platform for screen sharing
Enables sharing console,
multiparty connections
Basis of Remote AssistanceSlide17
Dynamic Virtual Channels (1/2)
Intro and usageWhat’s new?Automatically handles packet reconstructionRemoves 32-channel limitation in past productServer usage:Opening a channel: WTSVirtualChannelOpenEx
(..,
WTS_CHANNEL_OPTION_DYNAMIC)
WTSVirtualChannelQuery
Data IO:
ReadFile/WriteFileSlide18
Dynamic Virtual Channels (1/2)
Intro and usageWhat’s new?Automatically handles packet reconstructionRemoves 32-channel limitation in past productServer usage:Opening a channel: WTSVirtualChannelOpenEx
(..,
WTS_CHANNEL_OPTION_DYNAMIC)
WTSVirtualChannelQuery
Data IO:
ReadFile/WriteFileSlide19
Dynamic Virtual Channels (2/2)
Client-side usage1) 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) Slide20
Agenda
Introduction to RDPWhat is new in Windows 7?Deep dive into RDP Graphics ArchitectureRDP PlatformHow to extend RDPAPI WalkthroughsHow to make your apps run efficiently in a remote sessionSlide21
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 savingsImportant to test your app remotely!Tips For Writing Efficent Remote AppsBasicsSlide22
Guidance for
offscreen surfacesDo 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 16bppTips For Writing Efficent Remote AppsGDISlide23
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 adaptersTip: Local optimizations are magnified remotely!
Tips For Writing Efficent Remote AppsRemoting Direct 3D and Direct2DSlide24
Key Takeaways
RDP Platform continues to evolve and improveRDP Platform has a rich extensibility model today with API’s and detailed protocol documentation in MSDN Extend the TS Platform for your needsCall to action: Please optimize and test your apps for the TS environmentWe would love your feedback on future evolution and extensibility!Slide25
References
Terminal Services (TS) Team Blog: http://blogs.msdn.com/tsTS Application Compatibility Guidance: http://connect.microsoft.com/tsappcompatTS Home page: http://www.microsoft.com/tsSlide26
Evals & Recordings
Please fill
out your evaluation for this session at:
This session will be available as
a recording at:
www.microsoftpdc.comSlide27
©
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.