BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News WebCL Brings Parallelism to the Browser

WebCL Brings Parallelism to the Browser

This item in japanese

Bookmarks

WebCL brings parallelism support to the browser, enabling JavaScript developers to write data intensive web applications. Nokia has a prototype for Firefox while Samsung has one for WebKit browsers.

WebCL is a JavaScript binding to OpenCL (Open Computing Language) enabling developers to write computational-heavy parallel programs for the browser and executed on heterogeneous environments consisting of OpenCL-enabled GPUs and CPUs. OpenCL was initially developed by Apple but later taken under the Khronos umbrella, a non-profit group managing several standards including OpenGL and WebGL. OpenCL is supported by both AMD/ATI via FireStream and NVIDIA, having some similarities with NVIDIA’s CUDA and Microsoft’s DirectCompute. While OpenCL makes good use of parallel computation support in latest graphics cards, it can run on OpenCL-enabled CPUs such as AMD ones with APP (Accelerated Parallel Processing) support installed.

There are two implementations of WebCL, as far as we know. One is Nokia’s research implementation for Firefox 4 on 32-bit Windows and Linux machines, and the other is Samsung’s prototype implementation for WebKit browsers running on Mac OS X and NVIDIA GPUs. Nokia provides an XPI add-on for Firefox, and the source code is made available under GNU Lesser General Public License version 2.1, according to the documentation. A Nokia demo shows how WebCL is used to convert color to gray, while a video shows how to paint with the browser.

Samsung Research has published two videos showing the gravitational interaction between N bodies and simulating a deformation of a body, comparing the results running the code in pure JavaScript versus JavaScript on WebCL. WebCL offers a 100x performance increase, according to the researchers. The source code is available on under the New BSD License.

While there are recent technologies enabling parallel computing on GPUs, such as Microsoft’s announced C++ AMP which promises massive parallelism across millions of cores, WebCL has the advantage of bringing parallelism to the browsers, allowing developers to write complex and/or data intensive web applications.

Rate this Article

Adoption
Style

BT