The core of faast.js is the
FaastModuleProxy class, which implements the
FaastModule interface. This proxy class contains the local proxy functions and invokes the provider implementation to perform provider-specific work. In addition,
FaastModuleProxy contains the faast.js "runtime" which includes managing throttling and queues for outstanding invocations, statistics tracking, and acting as the controller by invoking the Provider API.
The Provider API is the interface between
FaastModuleProxy and provider-specific implementations:
Each provider implements the interface in provider.ts.
The cost analyzer takes a
Workload as input in addition to the User Module. The workload invokes the cloud functions, and is required because the Cost Analyzer creates multiple faast.js instances, one for each configuration.
Review the implementation for the AWS to understand the Provider API.