The idea of running applications not on the user's computer, but on a remote server, and broadcasting the image to the user over the network is not new, and has long been "in the air." Agree, the idea is good: after all, to install any new software on your computer, you need to deal with the licensing policy (to whom it is relevant), find the distribution kit (preferably without malware) inside, install and configure the software - sometimes you just drop your hands. In addition, the software translation approach removes the need for its productive hardware, which becomes relevant in light of the annual growth in sales of tablet computers and smartphones. And the Internet is everywhere in megacities: listening to music and watching movies online, after all, everyone has long been accustomed.
That's just not a single full-featured development that is suitable for use on the Internet is still not visible. We thought it was no good and decided to do it.
Let's take a closer look
For my part, it will probably not be entirely honest not to mention about quite existing ones, and even well-proven Citrix XenApp and Microsoft App-V. Both products do their job well in large organizations, but the trouble is: both solutions are of little use for public service provision (that is, for the Internet). This is due to technical features, because these systems were originally designed for integration to the customer. And we are talking primarily about big business, since such systems can not be affordable for medium and small businesses. Yes, and client software must be installed on user devices, to understand, configure. In practice, it turns out that there are not clients for any devices (I’m talking about tablets. Smartphones are not supported at all), despite assurances from distributors. Needless to say, attempts to build a public service based on a database of products did not end with anything good, as far as I know.
And why not make a system capable of broadcasting Windows applications
specifically for the global network , we thought?
')
Speaking of Windows-applications, we mean any software that can operate under the control of the operating system Microsoft Windows. Why did you focus on Windows applications? Everything is very simple: Windows-based applications are applications for business, for work, for study, applications that are used (and, not least, know how to use) billions of people around the world. The number of applications already developed for Microsoft Windows, I believe, amounts to millions, which is a huge inexhaustible functionality that, in my opinion, would be great to accumulate in one place.
As the main criterion of the system, simplicity of understanding was chosen for the end user, so that even my mother, who is used to working with the already installed and configured software on her laptop of the latest model, can easily figure out.
Another important criterion was the desire to support various types of modern devices (personal computers running different OS, tablets, mobile devices, modern TVs that support smart TV technology, and others). The decision suggested itself: it is necessary to broadcast windows-applications from a remote server
to end-user web browsers , or to a web page, to be more precise. But how to do it?
Implementation
It all started with the old B / W server, located in the corridor of the apartment, and coding until late at night. What they just did not try in their search: even using Silverlight as a software platform for porting .net applications to the user, but due to obvious restrictions on the set of applications that can be delivered, this option was abandoned. Concentrated all the same on the broadcast applications in a cross-platform environment, and more from this direction did not depart. In our opinion, translation of the display of application performance is currently the best method for “delivering” applications to users.
To implement the system, it was necessary to develop the
following components :
- web client access server - provides the application server interaction with clients;
- application server - provides the transmission of keyboard and mouse events to applications, sending an image to the client, and isolating applications from each other;
- management server - provides infrastructure management;
- file server - provides storage of user data.
To implement the server of access of web-clients, the choice fell on SignalR, which is able to independently choose the optimal transport depending on the conditions. If there is a possibility, SignalR uses WebSockets as a transport, if there is no such possibility (the reason may be, for example, an outdated version of a web browser) - polling, long polling. We did not manage to achieve the optimal speed for comfortable user experience using polling, long poling, but we did provide partial support for outdated browser versions.
The application server is the core and the most not the easiest part of the developed system. Image transfer from the software running on the server is carried out by taking screen shots and transferring the received frames in real time. The image is divided into areas, and only changes are sent to the user to save traffic. It was originally planned to use the Desktop Duplication API technology, but since it can duplicate only the entire desktop, and we need windows, we had to abandon it. The module for creating screenshots as a result had to be developed independently. To develop a codec as a “role model”, FreeRDP WebConnect was adopted, the server part was naturally written by itself. To transmit keyboard and mouse events to applications, server-side events are simulated using the send input functions.
The file server and the management server are of less interest, for this reason we will not focus on them.
At the moment, the beta version looks like this:
And a little impressionism in Gimp from the author of the article
