Firefox is a well known browser for using extensions. Since the last decade its a paradise for application developers. Chromium. This was initially the same as the Chrome but Google gave out the source code of chrome for developers and the name of the project was chromium. Then the developers added features and released updates under the name of chromium. Our objective is to compare the 2 browsers.
First we’ll look at a general browser and identify its characteristics. Basically browser is a app to retrieve present travers info/resources on www. Initially the user requests for a web resource using a URL. HTML is passed to the browser's layout engine to be transformed from markup to an interactive document. Other than documents most browsers can display images, audio, video, and XML files using technologies like xpath and xquery. Support Flash applications and Java applets.
User Interface: Navigation Buttons Refresh Button Stop Button Home Button Address Bar Integrated Search Bookmarking Tabbed Browsing Privacy and security Provide support for HTTPS Quick and easy ways to delete the web cache, cookies, and browsing history Extensibility Supports the development of browser extensions. Standard Support Ability to display images, audio, video, and XML files, and have extensions to support Flash applications and Java applets
We can see that Firefox architecture is largely same to the reference architecture .But there are two differences between them. 1. In the conceptual architecture user interface only builds on gecko. It is not connected to other subcomponents. In the reference architecture, the user interface connects to the Data Persistence component also. 2. In the reference architecture there are two layers for Browser engine and rendering engine. But in the conceptual they are integrated into Gecko. Gecko is an open source layout engine. Software used to implement the Firefox modules is mentioned in the figure. For ex. Expat for XML Parser, Spider monkey for java script interpreter etc.
Firefox user interface is built on XPTool kit. Three layers of the XPtool kit is shown in the figure. The Frames & Widgets layer directly defines the individual user interface components such as buttons, text fields etc. Services layer controls the services that can be executed through widgets (saving or printing document). Communication between Frames & Widgets layer, Services layer and Gecko happens through the Application Object Model.
Gecko is the heart and the brain of the Firefox. It takes in contents, such as HTML, XML, and many others, and outputs the parsed content onto the web browser display. It depends on every other sub-component except the User Interface. Gecko first receives document data from the networking subsystem Necko. HTML data is parsed by the Document Parser and sent to the Content Model along with any style data. The content model arranges the data into a DOM tree. The DOM tree, style data, and image data are combined into a frame tree by the Frame Constructor. Then it sends the data to the Graphics Interface to be displayed on the system.
Modifiability Firefox architecture consists of modules. They can be modified while the interfaces are kept unchanged. Security It uses SSL/TLS ( Secure Sockets Layer,Transport Layer Security )to protect communications with web servers using strong cryptography when using the HTTPS protocol. And Firefox integrates with Windows anti-virus software. Performance Performance of Firefox has been increased by rapid graphics rendering, improved page load speed and faster start-up time. Firefox uses single process model. Advantages It uses less system resources per tab compared to creating multiple Windows processes. Firefox can use fast in-process data access and synchronization objects when it interacts with the history, cookie and cache data stores. Disadvantages Lack of isolation means that if anything causes a page to crash, all Firefox tabs and windows lose. Reusability Firefox modules are open source and these modules are used in many applications. (E.g. Gecko is used in SeaMonkey ). Extendibility Extensions add new functionality to Firefox web browser. They can add anything from a toolbar button to a completely new feature. They allow the application to be customized to fit the personal needs of each user if they need additional features
The chromium’s architecture can be seen as a layered architecture as well as a multi process architecture. The layered architecture shown above is spitted into two parts, the browser process and the renderer process. As shown in the slide, the renderer process runs in a sandbox, a security feature which is implemented by Google. All the architectures do not have a sandbox, it could be disabled or enabled depending on the distributor ( since this is an open source project).
Multi processes for same application The chromium has 2 main processes, one for browser and other one for renderer. When there are multiple tabs, a renderer process created for each tab and a new process is created for each plug-in. Inter process communication Although the application has several processes, these processes communicate with each other. The main inter process communication primitive is the named pipe. In browser process, a separate I/O thread is used to communicate with renderer processes and renderer processes use separate thread for communicating with browser and WebKit. The so-called named pipes are used in asychronous mode ensuring neither ends are blocked wiating for each other. IPC allows processes to exchange information such as user information between tabs although they have their own separate tabs Secure and safe browsing Secure and safe browsing limits IPC with other processes. When secure browsing is enabled, data like user information are not exchanged with other tab processes and the websites visited are not saved in the history manager. Recover from crashes Suppose that the whole browser is a single process application. If that processes is crashed the whole browser will crash and will need to restart. As the chromium uses multi processes although one processes get crashed other processes will not crash and even if crashed by refreshing that tab, a new process can be created redirecting to the website it displayed previously
1. Firefox has directly used the reference architecture of a web browser. Chrome has deviated from the usual model and developed their unique architecture. 2. Rendering has complete different architectures for above 2 systems. Firefox uses Gecko layout engine where as Chromium uses Webkit layout engine. Both are very fast and compatible with their own unique differences in HTML 5 and CSS 3 features. Webkit is more popular for mobile devices though. Therefore that's something to consider if you are a mobile user. Chromium uses multi process system. That is each web-page in chromium lives in its own process and so if something bad happens to it the entire browser can continue running. Firefox uses separate threads for each web-pages in the process so if one page crashes whole process will get crashed and you will lose all the tabs opened. 4. In the sense of Extension development Chromium is in further. Because it doesn’t need restart to have the effect of a modified extension where as firefox needs. But still firefox has the lead because before chromium came alive firefox was ruling the extension world.
In Firefox security is achieved through the Networking Subsystem. NSS: (Network Security Services), Set of libraries that supports secure client-server communication and application development. 2. PSM: (Personal Security Manager) is built on top of NSS . Set of libraries that perform crypto operations for the client-side application. – support SSL/TLS/Encryption/Signatures and Certification Mgt For Chromium, security is achieved through a reference monitor and a security policy. Treat the rendering engine as a black box. Reduce the complexity of browser’s kernel security monitor
As conclusion both architectures provide all the requirements in their own ways. According to our opinion, chromium’s architecture is more efficient for the basic non functional requirements such as Usability – elegant design Availability – process based tabs over thread based Security – reference monitor Extendibility – Efficient development environment for extensions Performance – As a user and from the statistics on the internet I can say that the responsiveness of chromium is rather high than FF
References: A Reference Architecture for Web Browsers Alan Grosskurth and Michael W. Godfrey School of Computer Science University of Waterloo http://dev.chromium.org/developers/design-documents http://en.wikipedia.org/wiki/Web_browser http://www.smooth-step.com/web-browsers/features http://web.uvic.ca/~hitchner/assign1.pdf http://www.soi.wide.ad.jp/class/20070050/slides/01/index_5.html
Chromium vs. Firefox
Chromium vs. Firefox Software Architecture and Design Review
Web BrowserSoftware application for retrieving, presenting, and traversing information resources on the World Wide Web
Features of a Web Browser• User Interface• Privacy• Security• Extendibility• Standard Support