8. Functional Requirements
• Basic User Interface Features
• Watch Audio, Video, Images and other non-HTML
features.
• Run JavaScript and CSS
• Tabbed Browsing
• Recover from Crashes
• Manage Downloads
11. Functional Requirements
• Basic User Interface Requirements
• Multiple Processes for same Application
• Inter Process Communication
• Secure/Safe Browsing
• Watch Audio, Video, Images and other non-HTML
features.
• Run JavaScript and CSS
• Recover from Crashes
• Manage Downloads
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
To achieve the requirements of a web browser, Dr. Alan Grosskurth and Dr. Michael W. Godfrey from University of Waterloo have come up with a reference architecture for a general web browser. User Interface component Provides the methods with which a user interacts with the Browser Engine. The Browser Engine component Provides; Methods to initiate the loading of a URL Show error messages Rendering Engine component Visual representation of a given URL. Interprets the HTML, XML, and JavaScript and generates the layout that is displayed in the User Interface. Data Persistence component Manages user data such as bookmarks and preferences. Networking component Handle protocols as HTTP and FTP. Handles all aspects of Internet communication and security. Display Backend component It provides primitive drawing and windowing methods that are host operating system dependent.
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.
As any other web browser firefox provides basic user interface Features. . Watch Audio, Video, Images and other non-HTML features Without plugging Firefox supports many media formats. Audio - WAVE, PCM, WebM, Vorbis, Ogg, Video -WebM, VP8, Vorbis, Ogg, Theora, Vorbis other - APNG (Animated PNG) images with alpha transparency It Run JavaScript and CSS It providesTabbed Browsing Recover from Crashe s Firefox will offer to restore session after a crash or other unexpected close. Session Store feature saves session data, including open windows and tabs,text typed in forms. Download manager Downloading files can be stopped and started at anytime with download manager. If the downloading file is big and connection is slow, downloading can be paused and started later.
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
Security uses middleware like browser kernel which handles procedure calls to operating system. The rendering engine is bounded by a sandbox. So malicious code execution inside the sandbox cannot harm the rest of the browser. The plug-ins are not allowed to install in both rendering engine and kernel, when they are installed, they run in separate processes. The rendering engine receives the web URLs through the browser kernel so browser does not directly access the network. A compromised renderer cannot capture user’s keystrokes as each render process runs in separate windows “desktop” which is not visible to user. Performance chromium has a multi-process architecture, which means all the processes have their own memory address spaces and resource space, therefore avoiding shared memory and resources. Uses V8 JavaScript interpreter so browser is very fast relatively than others. As shown in the multiprocess architecture, the inter-process communication is reduced. So performance increases. Availability and robustness chromium architecture is built in such a way that the plug-ins run in separate processes, so plug-ins do not include in browser kernel or rendering engine processes. So if a plug-in crashes, it does not affect the whole browser. If plug-ins contained in two main processes and if plug-in crashed, there would be a great possibility that the whole browser get crashed. Since chromium has multi-process architecture, although one tab process got crashed, other tab processes do not get affected. Even when the crashed tab is refreshed a new process is created killing the crashed tab. Modifiability since the architecture of the chromium can be seen as a layered architecture, each layer can be modified easily with minimum changes to other layers(at most only adjacent 2 layers only). So a new browser can be derived from the existing architecture easily. Usability uppermost layer is the browser’s view layer. It provides an UI which is very easy to learn and use. User will not get lots of security prompts when interacting with the UI as lots of security issues are resolved using the sandbox. In process architecture, there is a separate process for handling I/O. so user will not feel degrade in performance will sending inputs to browser as they are handled separately by the I/O handing process. Extendibility Chromium is a open source project. Thus with the complete documents, this is expected to develop and extend much further. Also, chromium allows developers to build extensions/plugins and use them with the chromium browser.
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