As part of the internal work here at DWS, I tried Google Chrome. What I was looking for was another browser that did in-line spell checking; Firefox is the other one I know of and there are likely more. Interestingly, IE doesn’t provide this functionality.
As I looked around this new browser, I went through the comic presentation on the design decisions. It’s quite inspiring and the browser does well for their approach. What I want to talk about today is the sort of thought that went in to this browser.
Threading vs Multi-Process
A stand-out decision was to make each tab a different process. IE, in comparison, treats every tab as a separate thread. If you’re not quite familiar about topics this close to the silicon, keep reading, I’ll expand on how very different these two approaches are!
Threading is all about one process doing multiple things. Threading is often used on the Windows platform. It is a historical decision as much as a technical decision. Some of the key considerations about this are:
- If the master thread dies, all threads die
- There are difficulties to be overcome when threads begin talking to each other or using the same memory space
- Threads have to be monitored and managed
Multi-processing is quite different. It’s about multiple processes all doing their own thing. The multi-process approach is very popular on the Unix platform as well as Unix clones such as Linux. Again, it is a historical decision as much as a technical decision and its key considerations are:
- Processes are managed by the operating system rather than by a master thread
- Processes are self-containing, if all the other processes die, the one remaining continues to function unaffected
- There is no shared memory to manage, although some information can be exchanged using a shared space
Now, what makes one better than the other? For me, it’s all about two competing desires: memory footprint and simplicity. Threads are a smaller memory footprint while multi-processes are simpler to implement. Interestingly, Google went the way of multi-processing and their reasons for doing it appear quite sound. I won’t go in to detail here but take a look at their comic presentation for details.
Focusing on the Tab
Google have also focused greatly on the tab. They think it so important, they put it at the top of the window. Each tab has its own address bar and buttons as well. What’s more, because each tab is a separate process, it’s simple to undock each tab in to a new window.
Speed
People I ask about Google Chrome all say the same thing: it’s fast. A lot of effort has been put in to speeding up the rendering engine as well as Google’s own JScript VM which compiles native code. It all makes a faster browsing experience.
Security
Google sandbox their browser processes. This means that websites can’t change your hosts file to some-very-bad-website.com to steal your credit card number or show inappropriate content. Of course, there are some limitations with plug-ins because they’re not sand-boxed, but the attach surface is greatly reduced.
Summary
So, why do I care about blogging about some new browser? The reason why is because it is another example of people getting together to produce a quality product. It’s not about what makes it so good, it’s about how Google went about creating this product. As a tester/developer, I want to make fantastic cool products that close the gap between people and their tasks.
Kind Regards
Glenn