Difference between RDP/Terminal Services and VNC Streaming Techniques

remote desktopremote-accessstreamingvnc

As part of a client support tool, I'm wanting to provide some functionality to be able to request to view/remote control a desktop session. There are a bunch of ways to get a screen capture and then stream it, but I'm wanting to find out in particular, why the RDP (Remote Desktop / Terminal Services vs. VNC experience is so different. I'm using RDP vs. VNC just because they seem to use drastically different methods to stream the screen to the client.

If I had to guess, RDP appears to transmit blocks of bitmap graphics (say 100x100px) in order to build the full picture (which can be quite slow) but seems to transfer normal painted shapes/fills, or font drawing to the client extremely quickly. VNC seems to take giant snapshots of the screen, compare a previous image and stream the changes to the client.

I feel that RDP is a much more high-quality and smooth protocol than anything else out there, so what technique does it use to accomplish this?

EDIT-Just to clarify, I am asking about these graphics techniques specifically as a streaming protocol programming method – not for which existing product/technology to use to solve this business requirement.

Best Answer

As you found out, they are both pretty different in the way they stream change. The RDP protocol from MS is and extension of a ITU standard (T.128) that can be purchased online.

RDP implements lots of bandwidth-saving techniques that complement each-other and make it very efficient over low bandwidth.

VNC on the other hand has very basic compression techniques: it will send blocks of bitmap that have changed and will use basic types of compression, from RLE to jpeg to transmit those blocks efficiently.
Unfortunately, it's still quite wasteful over low bandwidth.

VNC basically has no knowledge of the underlying graphic primitives used to build the screen. That makes it easy to use on any machine because it just monitors changes to the screen bitmap.
RDP on the other hand hooks deeper into the Windows API and is able to optimize its stream based on the minimum amount of information necessary to generate the same update on the client.

If you want to integrate remote desktop functionalities, you have a couple of choices:

  • for RDP you may use the ActiveX used for web remote functionalities. You may want to have a look at a wrapper to integrate it into your own software.
    If you want to get deeper into this there is source code available for the linux rdesktop client that does connect to Windows machines across RDP.

  • for VNC there are a number of open source implementations.
    FogCreek's Copilot actually uses one and you can get its source as it is built on TightVNC

There are also a number of projects on CodeProject on RDP and VNC.

Related Topic