Smart executionmulti-threading, saving partials on leave, Round-robin scheduling |
No damage to UXestimates current, maximal CPU load and adjusts computation |
Flexible & secure.Your DOM is not exposedSandboxed environmentharmful code is disabled, loopy code is promptly killed.For scientists - very simple apiProtected against malicious code hijacking |
Consumer CPUs are underutilized - CPU cycles are wasted, but users don't want to install anything new. JsDist can seamlessly utilize virtually petaflops of power by bringing computation into web browser.
Execution can be initiated by simply including one javascript file into websites (just like ads). While visitor is browsing your page, his unused CPU power helps solve scientific problems. It's a supercomputer with browsers being nodes.
By running various amounts of parallel webworkers we can estimate amount of cores (threads) user's CPU provides.
By benchmarking the CPU and extrapolating result. After that, current user's cpu load is periodically reevaluated - shrinking our CPU demand (on top of OS/browser scheduler) when user needs the power most.
In era of single-paged ajax-powered websites, users often spends a lot of time without leaving page.
Using localStorage we freeze and save unfinished computation just before user leaves page distributing our system. We continue whenever user visits any other website distributing our project (localStorage access is linked to JsDist domain). Combined with optimal task granularity, this ensures minimal CPU power waste.
All non-essential javascript is executed in iframe and isolated from your DOM. Scientific (3rd party, possibly untrusted) code is executed inside webworker in special design - disabling taking over control of program flow and scheduler.
Current optimization (pre-compiled, V8) allows javascript to be closer to
ferrari than to a bicycle.
How fast is the distributed code executed depends on our scheduler (amount of function calls). If the scheduler can't
response to a security challenge (evidence of tampering), respective webworker is terminated from execution verification
kernel.
JsDist also creates gobal localStorage locks to prevent execution of multiple instances.
Scientists can use global variables, multiple functions, but they don't have access to secured storage or possibly harmful functions (such as alert)
Same as any computing on untrusted devices, results need to be verified. You can merge tasks and verify them inside the network, allowing very low failure probabilities while minimizing the overhead.
Checkout Github repository, read the paper or send an e-mail