A non-transitory machine readable medium storing program that when executed by at least one processor configures a network to forward communication between endpoint processing units (EPUs) that collectively execute a distributed application by performing computations for operations associated with the distributed application, the network comprising a plurality of forwarding elements, the program comprising sets of instructions for:
- receiving a plurality of API (application programming interface) commands related to computations assigned to a set of EPUs and a set of forwarding criteria specifying a manner for forwarding results of the assigned computations among the EPUs in the set, the API commands expressed in a first programming layer;
- generating, from the API commands, a set of network configuration data for configuring forwarding elements of a network to forward the results according to the specified set of forwarding criteria, the configuration data expressed in a second networking layer, said generating comprising translating programming layer identifiers of EPUs and forwarding operations to networking layer identifiers needed to forward the results to destinations in the network;
- distributing the generated configuration data to a plurality of forwarding elements that form a network to configure the forwarding elements to forward the results of the computations of the EPUs through the network.