WebCL Brings Parallelism to the Browser

by Abel Avram on Jul 08, 2011 |

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


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

General Feedback
Marketing and all content copyright © 2006-2016 C4Media Inc. hosted at Contegix, the best ISP we've ever worked with.
Privacy policy

We notice you're using an ad blocker

We understand why you use ad blockers. However to keep InfoQ free we need your support. InfoQ will not provide your data to third parties without individual opt-in consent. We only work with advertisers relevant to our readers. Please consider whitelisting us.