Master's Thesis
Total Page:16
File Type:pdf, Size:1020Kb
MASTER'S THESIS Web-based collaboration through screen sharing Catalina Tejada Pérez Master of Science in Engineering Technology Computer Science and Engineering Luleå University of Technology Department of Computer Science, Electrical and Space Engineering Web-based Collaboration through Screen Sharing Catalina Tejada P´erez Dept. of Computer Science and Electrical Engineering Lule˚aUniversity of Technology Lule˚a, Sweden November, 2011 Supervisors: Adam Bergkvist K˚areSynnes ABSTRACT Nowadays there are plenty of different options for connecting users all around the world: video- conferencing, audio-conferencing, chat applications... Nevertheless, most of these need specific software, plug-ins or separate applications installed in the personal devices. This could be avoided by using web-based technologies, so the user would not have to agree any term or condition in order to communicate with the other end. In this area, the main aim of this thesis is to investigate, study and analyse the different approaches and options available nowadays to share the screen or part of it, natively in the browser, without the need of plug-ins or added software. It is also implemented an application with this characteristics, so two users will be able to share their screen, or part of it, directly from the browser. The application implemented takes the images from the screen (encoded in jpeg format) using GStreamer. It uses the WebSocket protocol to communicate both ends, using a server which will push the data from one user to another, both connected with a password to allow the identification. In this thesis it is also compared this implemented application, with another approach which uses different technology but the same idea of not using any added software. For further work or in case it is intended to create a commercial product, at the end of the report it is proposed some ideas to improve it. 2 To my family and friends. 3 ACKNOWLEDGEMENTS This thesis work has been taken place in Ericsson Lule˚a,from April 2011 to November 2011. I would like to thank all the people that have participated with their effort and time in the carrying out of this thesis. First of all, to my supervisor in Ericsson, Adam Bergkvist for his dedication, time spent and effort, guiding and giving advice whenever I needed. To K˚areSynnes, for encouraging me in this challenge and Stefan H˚akansson for trusting in me for this thesis. To everyone in Ericsson that made the work easier for me with their support and company. Finally, I would like to thank everyone who has supported and taught me throughout these years: family and friends. Thank you. Catalina Tejada 4 CONTENTS 1 Introduction 8 1.1 Today's communication . .8 1.2 Problem Statement and Approach . .8 1.3 Thesis Purpose . .9 1.4 Delimitation . .9 1.5 Related Work . 10 2 Theory 11 2.1 Desktop sharing . 11 2.1.1 Protocols . 11 2.1.2 Comparison table of protocols . 13 2.1.3 Web Standards . 13 2.2 GStreamer . 14 2.3 WebKit . 14 3 Design Decisions 16 3.1 Sending images versus sending instructions . 16 3.2 Communication . 16 3.3 Websockets versus XMLHttpRequest . 17 3.4 Image encoding . 18 4 Results 19 4.1 Image provider . 19 4.2 Link images . 20 4.3 Image sender . 20 4.4 Server . 20 4.5 Image painter . 21 4.6 Total . 21 4.6.1 Final implementation . 21 4.6.2 Final application behaviour . 23 4.6.3 Final code diagram . 23 4.7 User application . 25 4.7.1 Use cases . 25 4.7.2 Requirements . 26 5 5 Application Screenshots 28 5.1 General . 28 5.2 Sharer . 28 5.3 Viewer . 30 5.4 Sharing . 31 6 Testing 33 6.1 Image provider testing . 33 6.2 Image sender testing . 33 6.3 Server testing . 34 6.4 General testing . 34 7 Discussion 35 7.1 General Implementation . 35 7.2 Base64 encoded images and Blob Images . 36 7.3 Image encoding . 36 7.4 Server . 36 7.5 Viewing remote desktop . 36 7.6 Identifying the \Viewer" . 37 7.7 Comparison with video stream Implementation . 37 7.8 Working flow . 37 7.9 Problems encountered . 38 7.10 Future work . 38 8 Conclusion 40 References 41 6 LIST OF FIGURES 1 Remote sharing Desktop [4] . 10 2 VNC architecture protocol [10] . 12 3 Xpra Protocol . 12 4 Three elements linked together [25] . 14 5 Different sending possibilities . 17 6 Difference between websockets and XHR [31] . 17 7 Linked GStreamer pipeline . 19 8 WebSocket server handler . 21 9 Final implementation image . 22 10 Application flow chart . 23 11 Code diagram from the final application . 24 12 Share the entire desktop Diagram . 25 13 Sharing part of the screen Diagram . 26 14 Cancel sharing the screen Diagram . 26 15 View Diagram . 27 16 General view of the application . 28 17 Share the entire desktop image . 29 18 Share only one rectangle image . 30 19 Id message . 30 20 Confirmation message . 31 21 View remote desktop menu . 31 22 Viewer password . 32 23 Viewing one fourth of clientA's desktop . 32 24 Viewing one half of clientA's screen . 33 LIST OF TABLES 1 Comparison between protocols [13] . 13 7 Web Collaboration Tools -Screen Sharing- Introduction This section will begin with an introduction of today's communication, trends and differences, and will go on with the problem area in general and how this thesis will try to solve part of it. This will lead to state the purpose and delimitations which will characterize this thesis, and will end with some related work in the area. 1.1 Today's communication Communication nowadays takes an important role in everybody's life. In the last thirty years it has develop a lot; from telephone exchanges to cellphones, from sending postcards to sending e-mails, from having PDA's to being able to communicate between them. Not only helping in every day's life, but also in being informed: news about what is happening all over the world instantaneously, changes in the trends or needs of users, how markets are going... The definition of communication is the exchange of information, by speaking, writing, or using some other medium [1]. It can be divided, therefore, in several different groups: type of device used (smartphone, computer, tablet...), type of channel (satellite, optical fiber, copper line...), number of transmitters and receivers... Nevertheless, we will focus on two; the type of communication considering the need of users, and considering how it is presented in the users' device. If we consider users' need, people can communicate between them for personal needs or pro- fessional needs. In the personal area, now more than ever, communication among people from all over the world is important. As travelling is cheaper and easier, little by little more people tend to live away from their home countries and want to maintain their relationship with their family and friends. Normally, this communication is preferred to be as real as possible and not just telephone calls, as we can see in the constant growth of users in Skype or Gtalk, which both support video-conferencing [2] [3]. On the other hand, for companies, due to globalization and their willing to expand their market, to reach all types of users in different cities or countries, communication among their offices, workers and clients is essential. Software products in their majority focus their market on them, as they know that these will pay for the service obtained, in order to be guaranteed a good quality in their communication with the client (not being interrupted at any time, high video and audio quality...). In contrast with private users, which will try to look for other alternatives, maybe less competent or with less characteristics, to save money, as the use of the service will be more intermittent. If we considered how this communication is presented to.