Implementation of Marketplace/Network Calculus in Javascript