Martin Kruliš by Martin Kruliš (v1.1)1
Massively Distributed Systems ◦ Computing grids using Internet (e.g., BOINC) ◦ Millions of PCs offering their computational power Major Issues ◦ Security Implicit trust in the code the clients are running Vulnerable to sabotage ◦ Accessibility (complexity of client installation) ◦ Works for specific problems only With heavy computations and small data transfers by Martin Kruliš (v1.1)2
Web Browser as a Computing Platform ◦ Recent development in web technologies JavaScript and new HTML5 features Parallel execution (web workers, webCL) Communication (Asynchronous HTTP, WebSockets) Advantages ◦ Trivial usage, no (additional) installation required Everyone has/uses web browser these days ◦ Implicit security provided by the browser Disadvantages ◦ Potential for parasitic computing systems by Martin Kruliš (v1.1)3
Web Workers ◦ API, which is part of new HTML5 technologies ◦ Worker represents separate computing thread The code of the worker is sandboxed API for bidirectional communication with main thread Workers may spawn sub-workers ◦ API Worker(url) – constructing function Worker.postMessage(msg) – send message to the peer Worker.onmessage – receiving message event handler Worker.terminate() – kill the worker thread by Martin Kruliš (v1.1)4 Example 1
WebCL ◦ JavaScript binding for OpenCL API Allows access to multicore CPUs and GPUs Implemented in window.WebCL interface ◦ Currently no browser natively implements WebCL Plugins exist for majority of browsers ◦ Important issues OpenCL device/host synchronization is often performed by blocking operations Callbacks should be used in WebCL instead Explicit object releasing is required due to dynamic nature of JS (managed memory and garbage collector) by Martin Kruliš (v1.1)5 Example 2
by Martin Kruliš (v1.1)6