JavaScript framework for distributing and scheduling computations