  Cloud-edge serverless applications or serverless deployments spanning
multiple regions introduce the need to govern the scheduling of functions to
satisfy their functional constraints or avoid performance degradation. For
instance, functions may require to be allocated to specific private (edge)
nodes that have access to specialised resources or to nodes with low latency to
access a certain database to decrease the overall latency of the application.
State-of-the-art serverless platforms do not support directly the
implementation of topological constraints on the scheduling of functions. We
address this problem by presenting a declarative language for defining
topology-aware, function-specific serverless scheduling policies, called tAPP.
Given a tAPP script, a compatible serverless scheduler can enforce different,
co-existing topological constraints without requiring ad-hoc platform
deployments. We prove our approach feasible by implementing a tAPP-based
serverless platform as an extension of the Apache OpenWhisk serverless
platform. We show that, compared to vanilla OpenWhisk, our extension does not
negatively impact the performance of generic, non-topology-bound serverless
scenarios, while it increases the performance of topology-bound ones.
