Communication Between Desktop and Web Applications
Total Page:16
File Type:pdf, Size:1020Kb
Communication between desktop and web applications Author: Manuel Rego Casasnovas Contact: [email protected] Date: 20/11/2009 Copyright: Some rights reserved. This document is distributed under the Creative Commons Attribution-ShareAlike 3.0 licence, available in http://creativecommons.org/licenses/by-sa/3.0/. Abstract: Nowadays, everybody uses web applications. Despite of their advantages, like being available at any place with Internet, they have some usability problems with regard to common desktop applications. This article tries to analyze the possible solutions in order to interconnect desktop and web applications, centered in the GNOME platform and using RTM-GLib as example and study case. Table of Contents Introduction 2 State of the art in the GNOME platform . .2 Goals .......................................7 The library: RTM-GLib 7 Dependencies . .7 Development . .8 License ......................................8 Roadmap . .8 Usage example . .9 Future ideas 9 Mojito.......................................9 Trackerminer................................... 10 EDSbackend................................... 11 Conclusion 11 1 Introduction There are a large amount of web services in the Internet. A general definition of web service said that it is a system which provides an interface to allow interaction between machines over a network. As time passes more and more web applications provide some kind of API in order to access their services. This number is growing and it seems that will keep growing for some time. Some examples of these applications: Flickr, Facebook, Twitter, etc. Web applications has some advantages compared with desktop applications: All the data is shared and in a centralized place. They do not need any special configuration or installation, just a simple web browser is enough. Access from anywhere. Talking about desktop applications it is worth to highlight some strengths: They are faster. Usually they have better and richer user interfaces. There are different trends nowadays, some focused on develop applications to run in a browser, and other related with the development of desktop or mobile applications that uses web services. In this article we will talk about the latter group. The main problem here is the connection between desktop applications and these web services. That is not solved yet in a common way for all desktop applications. In that moment, every desktop application develops its own solution to access to some of these remote web services. Having to fight again and again with the same issues related with the implementation. Usually these web applications provide some API kit (or libraries) to make more comfortable the access to these web services from the desktop (or other web applications). That helps to share some code, but it is not a final solution thinking in the whole integration between desktop and web. State of the art in the GNOME platform There are different GNOME projects trying to fix the issues related with access to remote web services, and trying to provide a common solution for all the desktop applications. In this point, we are going to briefly review three of these projects: Online Desktop, Conduit and Mojito. There is also a page at live.gnome.org (GNOME Integration with Online Services) that tries to aggregate all the information about the different technologies that allows to integrate desktop and web applications. The idea is to collect all the different libraries to define a common way to access web services in the future GNOME 3.0. When people expect a better communication of the whole desktop with the most used web services. 2 Online Desktop Online Desktop was an important initiative that tried to join the desktop applications and the web services. The main idea is use desktop applications to access the different web applications, instead of a just a simple web browser. Online Desktop architecture overview One important part is the a central web server, written in Java, which manages the access to the different web services. This main server would be in charge to interact with the web applications, implementing the needed interfaces to do this work. This main server also store some user data like web services accounts, configuration of desktop applications, etc. Even it could end up saving passwords of web applications. This is a great idea, because all the work needed to connect with any web application would be shared in the central server. Then, when some web application changes its API, ideally, just this server should be modified. Moreover, from the final user point of view, the most important feature is that he just need to authenticate one time (against the central server) and then all his data and services would be available. Thus, the user should not care about which computer is using, because of all the information will be stored in the main server. From the point of view of desktop applications, Online Desktop provides a daemon, which defines some D-Bus methods and signals, to be used by them in order to interact with the different web services. This daemon is connected to the main server using the 3 XMPP protocol, which means that there is a two-way communication between the dae- mon and the central server. This allow to the server send signals to desktop applications when some data has changed. Even, the main server could poll the different web services from time to time, and then send signals to desktop applications. Some advantages of this solution: It is really comfortable for desktop applications, because they just need to know a D-Bus interface to interact with web applications. The logic to interact with web service is just implemented once in the main server. Some drawbacks: The central server could become a bottleneck if there are a lot of users. Perhaps, some scalability problems could appear. Security issues that could appear because of a lot of user information is stored in the main server. The project is currently abandoned. Online desktop was started by the middle of 2007 and just lasted around one year. It was started by some important GNOME hackers (Havoc Pennington, Owen Taylor and Colin Walters) working in Red Hat in that time. By the middle of 2008 the project started to decrease its activity, and it is stopped since one year ago. Conduit Conduit is a generic synchronization application for GNOME. It is not just a bridge between desktop and web applications. For example, it allows you to synchronize: two folders on your system, your music library with your iPod, your contacts with your mobile phone, etc. Conduit allows to create different modules for each kind of synchronization. By the way, Conduit supports the SyncML protocol, a synchronization standard for mobile devices. That allows to share your contacts between your computer and your mobile phone. 4 Conduit modules overview (from the point of view of desktop and web communications) As it has a wider scope than just web services, it is a completely different approach. However, it adds a new idea to fix the problem related with web synchronization. In the case of synchronize applications and web services it uses the D-Bus interfaces provided by desktop applications, or just use the files stored by these applications to get the information. Which means that for every application it should know its D-Bus interface or how are formated the files it uses. So, if something changes in the application implementation, the Conduit module should be modified. Desktop applications do not know anything about Conduit, so they do not know if somebody is doing a synchronization with their data. This can be an important source of problems, moreover the functionality that Conduit could provide is not the as powerful as if the proper applications directly access to web services. If we talk about desktop and web synchronization the main advantages: There are already some source code to access to web services APIs in different modules. Among the disadvantages: It is not thought for this specific purpose of connecting desktop and web applications. Depends on D-Bus interfaces or file formats of desktop applications, that could change in any moment. Desktop applications do not manage the interaction with the web services. 5 Mojito Mojito is a project that tries to bring social networks to the desktop. It is new project and is part of the Moblin project developed by Intel. Mojito structure overview For the moment it is just a social network aggregator, that pulls in content from some web services. Mojtio provides a D-Bus interface that desktop applications can use to get data from these web applications. Moreover, it also provide a method to update your status on web services that supports it. That is something similar to the Online Desktop approach. To sum up, you can say that it is a centralized place to manage all the interaction of the desktop with different web applications. All the logic needed to connect to these web services is implemented in Mojito. Furthermore, it polls the different web service time to time, and send D-Bus signals when something changes. Advantages: From the point of view of desktop applications that wants to interact with some web service, it is quite similar to the Online Desktop approach. All the logic related with web services is implemented in the same appli- cation, so some common code to access the web could be easily shared. Disadvantages: 6 For the moment it just support a few functionalities, and it is not sure that this will expand its current scope. It is still in an early stage and it is not part of the GNOME project yet. Goals After review the current situation related with this topic, the idea is to create a GNOME based library in order to provide access to the Remember The Milk web application.