Towards a foundational API for resilient distributed systems design