TNL.net is designed for modern browsers but the content is still readable in older ones. If you want to ensure the best experience, please install a browser that was developed after 2009.

tnl.net

WebGL and the future of the web

At the recent Web 2.0 Expo New York, Google unveiled MapGL, a ver­sion of their pop­u­lar maps prod­uct which uses WebGL, the new Web Based Graph­ics Library Stan­dard. With this effort, Google is work­ing on main­stream­ing a tech­nol­ogy that may be key to the future of web applications.

What is WebGL?

At its most basic level, WebGL rep­re­sents a set of exten­sions to JavaScript that allows devel­op­ers to write code that can use the pro­cess­ing power of a user’s com­puter to cre­ate 3D graph­ics that update in real time. The stan­dard is sup­ported by Apple, Google and the Mozilla foun­da­tion but Microsoft has not yet lent its sup­port to the nascent stan­dard (I sus­pect it’s only a ques­tion of time as most of the browser world has announced sup­port for the for­mat). Today, you need a fairly recent com­puter and the lat­est ver­sion of either the Chrome, Mozilla, or Opera web browser.

The appli­ca­tions can now run and mod­ify fairly com­plex 3D web-based appli­ca­tions. This is going to be a huge boon for online games, as can be wit­nessed from early exam­ples like the recent imple­men­ta­tions of web-based ver­sions of Quake and X-wing, and also have sub­stan­tial other uses. For exam­ple, the Google body browser allows users to get a bet­ter sense of how the human body works and some­one put together a very con­vinc­ing webgl photo edi­tor that can han­dle a sub­stan­tial amount of the basic image edit­ing needs most peo­ple have. In sci­ence, a lot of rep­re­sen­ta­tion can now be fred so sci­en­tist can exper­i­ment with dif­fer­ent views of the data on an experiment.

In the future, one could see a lot of data set being pre­sented in 3D using this tech­nol­ogy, with the abil­ity to access and manip­u­late data in real-time and see rich rep­re­sen­ta­tions of that data immediately.

The big­ger picture

For a long time, web appli­ca­tions have been lim­ited to run­ning within the con­text of a browser and thus sand­boxed away from the rest of the oper­at­ing sys­tem. With WebGL, we’re see­ing that bar­rier bro­ken down for the first time and is cre­at­ing a prece­dent for the future growth of web applications.

In a way, this is an inter­est­ing return to ideas that existed almost 15 years ago. Back then, Microsoft was inter­ested in merg­ing their browser with the oper­at­ing sys­tem. Early alpha ver­sions of IE 7.0 actu­ally had a deeper level of inte­gra­tion with Win­dows but fears around anti-trust reg­u­la­tions led the com­pany to pull those exten­sions out.

To open up the web to deeper level of inte­gra­tions with lower level processes could mean a vari­ety of new pos­si­bil­i­ties. While web appli­ca­tions have long been lim­ited by the browser sand­box, webGL now opens the door for a sub­stan­tially improved expe­ri­ence as it gives the web access to a lot of the power that has been res­i­dent on users’ desk­tops. For a cou­ple of decades, the web has been sip­ping that power through a straw but with WebGL, it’s as if the straw had been replaced by a fire­hose when it comes to graphic pro­cess­ing power.

For almost two decades now, many peo­ple have tried to make 3D on the web a real­ity (a lit­tle known fact, for exam­ple, is that Mike McCue, the man behind TellMe and now Flip­board, got his web start with a plu­gin that allowed the Netscape browser to dis­play com­plex 3-D mod­els) but many of those effort failed. A large rea­son for those early fail­ure was that the dif­fer­ent solu­tions pre­sented were often lim­ited to what the web browser could han­dle and until recently, it was con­sid­ered a big no-no for the browser to access any low level processes.

But a few entre­pre­neurs had a more long term vision. In the 1990s, Marc Andreessen quipped that his browser would reduce the Win­dows oper­at­ing sys­tem to “a set of poorly debugged device dri­vers”. While many have laughed this off as bravura on the part of a young man (he was in his 20s then), the con­cept of the web browser as cen­tral to com­put­ing expe­ri­ence is no laugh­ing mat­ter and it appears that the browser is now get­ting to that point where it could truly reduce oper­at­ing sys­tems to what he had envi­sioned in the 90s.

While 3D pro­cess­ing is but one fron­tier being bro­ken by WebGL, it is an impor­tant one because, for the first time, web browsers are given access to low level pro­cess­ing with­out requir­ing plug-ins or autho­riza­tion from the end-user. This will, of course, rep­re­sent a set of new secu­rity chal­lenges as code that is inter­preted by 3D ren­der­ing engine gets pretty close to the heart of the machine (and tra­di­tion­ally, the code that has been allowed this priv­i­lege has been tightly con­trolled at the dis­tri­b­u­tion chan­nel level, with 3D gam­ing being mostly man­u­fac­tured and dis­trib­uted by a few peo­ple. By con­trast, the whole web is mostly open to every­one with few or no lim­i­ta­tions, open­ing it up as a poten­tial attack vector).

Now that this fron­tier has been bro­ken (and one could say that the door was ini­tially opened when HTML5 was allowed to do geolo­ca­tion), imag­ine what some of the next offer­ings that will build on this prece­dent could bring: in the future, we could see web appli­ca­tions being allowed to access cam­eras, micro­phones, accelerom­e­ters, and other parts of elec­tronic devices across all web browsers. This could mean that appli­ca­tions that now run on your desk­top could truly break free from that for­mat and run exclu­sively from the web.

In the past few years, the idea of break­ing down appli­ca­tions into smaller and smaller com­po­nents to be dis­trib­uted through an app store has taken hold of the com­put­ing indus­try, poten­tially chal­leng­ing the idea of appli­ca­tions run­ning from the web itself. With the rise of WebGL, the graphic ren­der­ing por­tion of those appli­ca­tions is some­thing that now has accom­plished fea­ture par­ity. Sound will be next and access to device com­po­nents will prob­a­bly follow.

Web appli­ca­tions’ future has been chal­lenged by apps and the web has answered the chal­lenge, allow­ing for a set of offer­ings that will be richer and will present them­selves in a way that will make it hard to dif­fer­en­ti­ate between a native and a web appli­ca­tion, Even­tu­ally, we will see WebGL being imple­mented on mobile devices browsers (the pro­cess­ing power is there and I sus­pect it’s some­thing we will see appear­ing within a cou­ple of years), rad­i­cally reshap­ing the web app vs. store app debate.

With WebGL, we’re see­ing a future that ren­ders the web excit­ing again. It’s a tech­nol­ogy worth keep­ing and eye on. Now may not be the time to develop on it (unless you’re devel­op­ing web-based games for com­put­ers) but within the next 12–24 months, it is a skill that will be required of most Javascript developers.

 

Originally published on October 23, 2011 in Technology . You may find related thoughts pieces under the following terms: , , , , , , , , , , , , , , ,