Google Chrome shifts architects' equations as V8 powers the browser

The V8 JavaScript engine in Google's Chrome browser offers the enterprise architect new options for moving server-side functionality to the Web client. If it succeeds, it may give JavaScript a further lease on life.

A potent new JavaScript engine in Google's Chrome browser offers the enterprise architect new options for moving server-side functionality to the Web client. The name 'Google' ignites initial interest, while the underlying technology of Chrome ensures it will get a second-and third-look as well.

With the release of Chrome into beta this week, JavaScript is again being propelled to the forefront as a language for RIA development, say several industry viewers.

And, as architects move more and more work to the client side, a boost for JavaScript - the open source scripting language represented by the 'j' in Ajax - may be arriving just in time.

"I believe we will witness the emergence of JavaScript as the dominant language of computing, as it sweeps the client side and starts encroaching on the server," said Sridhar Vembu, CEO of Zoho, a vendor of browser-based Software as a Service (SaaS) business applications, in a blog earlier this week.

Vembu acknowledged to that his take on the future of JavaScript was speculative on his part and "not a done deal yet."

He said SOA environments now are either based on Java or .NET with competing languages including C#, Python and Ruby. But JavaScript gets a boost from having its own 'VM' via V8 in Chrome, and from being vendor neutral unlike its big brother, Java, which was developed by Sun Microsystems Inc. [JavaScript was originally developed by early Web browser power house Netscape.]

Boost to JavaScript development
Ben Goodger, tech lead for Chrome development at Google, also sees Chrome as a plus for JavaScript development.

"JavaScript is basically the scripting language for the Web," the Google tech lead said. "People use a whole range of technologies on the server side to build their application. We're hoping that people will be able to write more of their application logic in JavaScript."

The power of the V8 technology comes from being native machine code that is not interpreted, with the addition of superior garbage collection, Goodger explained.

"It's a completely new approach to the JavaScript engine," the tech lead for Chrome said. "It generates native machine code that runs on your machine in the same way that compiled code runs natively on your computer. The code is not interpreted. There is no intermediate representation, so it runs at greater speed."

Inside V8 JavaScript Engine
Ever innovative, Google has described the background of Chrome in a comic book created by noted graphic artist Scott McCloud. According to "Google Chrome," the company' s Google Gears' developers decided a while ago that the problem with existing browsers was that they were inherently single threaded. That 'single threadedness' caused architects to create APIs that were asynchronous, and this in turn led to complex loading of various JavaScript elements before pages could be deemed fully rendered.

As a result, Chrome includes a Chrome Process Manager which manages multiple processes, and tries to take on some of the traits usually associated with operating systems. And, Chrome includes a JavaScript engine, known as V8.

V8 applies dynamic optimization by introducing hidden class transitions. Via this scheme, JavaScript 'objects' with similar properties are assigned to classes which can be handled more speedily.

Clearly, speed was a major objective of Chrome. Java, JVM, and advanced garbage collection techniques are employed in this quest.

As with a virtual machine, V8 takes JavaScript source code and generates machine code to turbo charge rendering. The JavaScript is not interpreted. V8 is said to use precise garage collection in order to better more general garbage collection techniques used in existing JavaScript engines. Google says that V8 can be used separately from Chrome.

Speed advances should be a major objective of Chrome. Non-JavaScript, non-Ajax Flash and Silverlight applications constantly threaten Ajax as an alternative for Rich Internet Applications. While it appears to be speedy, Chrome also appears to go beyond the 'Internet.' As Google Gears is embedded in this new age browser, it is able to exploit a client-side database and file system to great effect.

"The precision approach to garbage collection that makes memory management a lot easier," said Google's Goodger, "means, when you write large applications that generate huge amounts of objects, the application doesn't slow down periodically as it collects, so the system works more efficiently."

Jason Bloomberg, senior analyst with ZapThink LLC., is skeptical that JavaScript will diminish the role of Adobe Flash technology for RIA development, which is one of Zoho's Vembu's predictions. Bloomberg said it is a case of the right tool for the job and doubts Flash will lose its status as a tool for applications incorporating video and animation.

"In many ways, JavaScript is already the premier language for client-side development, because of its broad acceptance, versatility, and maturity," Bloomberg said. "Flash, however, has its strengths as well, and even though Chrome will likely encourage better video support in JavaScript, Flash is good at many things JavaScript isn't good at, and vice versa."

With the more powerful virtual machine in Google's V8, Zoho's Vembu foresees JavaScript developers moving more and more application logic from the server to the browser as heavy lifting can now be done on the client.

Ben Goodger, too, sees V8 power as a plus for SOA and RIA developers. In the Google view, servers will be as important as ever.

"We see speed as a feature of the product," Goodger said. "We're really hoping that people will use this to create a new generation of rich Web experiences for people, with more of the application logic online.

The desktop meets the Webtop
The early benchmarks indicate the V8 engine is 'very performant,' said Imad Mouline, CTO at Web application management services firm Gomez Inc. Moreover, he said, Chrome's Google Gears' capability will help applications running outside the realm of the Web.

"The Google Gears framework allows for applications, when developed the right way, to be used in an offline fashion," he said.

All of this plays as part of several emerging trends.

"We are seeing more applications where a bigger chunk of the response time [for example, DOM parsing and JavaScript parsing] is occurring on the client," said Mouline.

"Part of what is happening now is that people are struggling to keep up with each other in developing richer and richer applications. They are almost breaking the age-old paradigm of 'request-response' on the Web.

With Ajax, a lot of the Web applications are beginning to appear more like desktop applications, Mouline said.

The trends have further ramifications. "One of the big things we are seeing as applications are becoming composite is that the Web application is no longer what the developer really builds. It is what the end user sees." His firm, Gomez, has just announced the availability of cross-browser testing for Chrome and Microsoft's Internet Explorer (IE) 8 beta 2.

Dig Deeper on Topics Archive