Skip to content

Introduction

Today, a general-purpose language, like Python, Javascript, or plain old shell scripts, is the tool of choice for automation. These scripts are invariably hard to create and maintain. The developer is responsible for complex error checking, retries, and state management. Even then, the resulting apps are stateless and non-fault tolerant. Depending on the organizational policies and language choices, each team may adopt a different language, further complicating the automation environment with the proliferation of languages and packages, resulting in a maintenance nightmare for the Ops team on the front lines.

Mpl (Maira playbook language) is a Domain Specific Language purpose-built to help Ops quickly build automated workflows and micro applications. MPL largely retains the Python syntax, enabling the ops team to rapidly develop stateful workflows orchestrated in Maira. Unlike other products that use YAML or complex DAGs representation for workflows, MPL is simple, maintainable code with a low learning curve. Mpl's core mission is to reduce code bloat for ops engineers while maintaining the flexibility and familiarity of a language like Python. One can execute these Mpl apps independently in Repl or through the Maira orchestration platform. The developer writes simple monolith imperative code in MPL and gets stateful, fault-tolerant execution with the Maira orchestrator built on Temporal, the industry-leading workflow platform.

Cloud operators realize that automated workflows developed in languages like Python quickly become code bloat. While choosing a dev environment for automation, 'less is more.' Package bloats and dependency proliferation are unnecessary burden. Mpl is a Python-like language designed to power 'low code' automated workflows. Language has everything built-in to create automation. These workflows can also be created and visualized in UI, enabling even non-programmers to develop their workflows independently. Mpl combines the power of the command-line interface (CLI) with an easy language to stitch these commands into a workflow. CLIs let users try steps in a Repl and use the same steps and the business logic in the workflow. These CLIs outputs in user friendly tabular format. Unlike a general-purpose language case, automation is not a separate effort in Mpl. Developers do not need to undertake an independent project to convert the CLIs and business logic that worked in a manual debug session to Python for automation to work. With Mpl, the final workflow is the CLIs and the transformation logic you tried in Repl. Mpl enables the entire team to work in a minimal environment avoiding code bloat and high maintenance cost.

Mpl is designed to be independent of the target application. Developers can use Mpl to create workflows for employee onboarding to vendor management. The only dependency is the integration commands available in Maira. MPL has follwoing benefits. (For details, check this blog post).

  • Stateful exeution of Monolith Python like code. Easily create human-in-loop automation. In memory data is automatically persisted in real time. No need to store state in external db.

  • Practically no error checking needed in code as orchestrator has retries built in. Workflows can be resumed in case of failures.

  • No need to worry about steps or data sharing between steps. Just write simple monolith script. The platform takes care of stateful executition.

  • Everything needed to transform data like JSON filtering, comprehension, time etc is supported in the DSL.

  • Use integration CLIs in MPL as is. Better readability and reusability while troubleshooting. CLI command completion.

  • 2 way translation from visual code block to MPL code. Best of both the worlds. Empower expert developers to non-coders.

  • Retrospective troubleshooting. Inspect each variable (just like in gdb) of any workflow run of the past.

  • Python like repl shell with cloud backed sessions which can be resumed/shared.

  • Deep audit of all actions.

  • Rbac at each CLI and resource level.

  • Bring your own integration CLIs. Any mission critical script can be easily resued in Maira.