Decentralizing Workflow Management
Cedric Tedeschi et Matthieu Simonin
Many applications these days rely on the well-choreographed execution of thousands of tasks run concomitantly or sequentially. These workflows often spread over a large number of nodes. Hence the complexity and the need to organize them efficiently. Initiated at Inria research center in Rennes, Brittany, France, GinFlow is an innovative workflow execution manager that not only provides a mechanism for adapting workflows at runtime but also implements a technique for decentralizing the coordination of the execution, making it more fault tolerant.
“A workflow is a computation made of several tasks that are related one to another by dependies and thus must be executed in a certain order, sums up scientist Cédric Tedeschi. Typically, a task can't get started as long as it hasn't received as an input the result of another one. That's a data dependency. On the other hand, the many tasks that are not linked by such dependencies can be parallelized. And indeed, workflows are often widely distributed, be it on a cluster or a grid. ”
But for workflows to function properly, all the dependencies must be specified by the designer of the application. Not an easy job. And that's where GinFlow comes into play. Started in 2009 as a research prototype, this open source tool is meant to facilitate the management of workflows and help users take advantage of the latest innovations in the field.
From Cold to Hot Adaptiveness
A key ingredient when building a string of workflows is the ability to change the configuration easily and test a variety of options without too much of a hassle. “You might want to remove a task, or a group of tasks, and replace it by another one dynamically without having to start everything from scratch again, ” research engineer Matthieu Simonin observes.
“There are two ways to achieve this, Tedeschi explains. One is named cold adaptiveness. Imagine that while in the process of designing a workflow, the user is having doubts about one particular task that may or may not deliver the expected result. With this uncertainty in mind and before getting things started, the user will build an alternative task so as to have it available in case the first one do not work according to plan. And if, indeed, it doesn't work, returning for instance a data output outside of the specified range, then the workflow will automatically reconfigure itself and switch to the predefined alternative task. ”
GinFlow actually goes beyond that and introduces something called hot adaptiveness. “Every now and then, workflow designers hesitate over what to do for the simple reason that it depends on tasks yet to be performed and data yet to be computed. So GinFlow enables them to set a control point for a given task and pause the workflow there. They will then check the data, and based on this, decide whether or not to perform some changes before resuming the workflow. All of this at runtime.
A Decentralized Coordination Model
The second aspect of this research focuses on decentralizing not just the execution of workflows but also the coordination of such execution.“Once all those tasks are specified, one needs an orchestrator to run them in the proper order. Until now, this orchestrator was centralized and hosted on one sole machine. Not the best idea in terms of scalability and fault tolerance. Lose your orchestrator and everything is gone. So we thought we would try to come up with a decentralized coordination model. In the novel architecture that we propose, the machines –aka the workers― coordinate themselves directly. Each worker knows the local part of the workflow, i.e. the tasks to be run as well as their corresponding dependencies.”
The software has benefited from a two-year Inria Technological Action purposed to morph the prototype into a real-world user-friendly fully operational tool. “We kept the initial philosophy but rewrote most of the program,” Simonin sums up. Next step? “Getting the opportunity to work on a real case, Tedeschi answers. We think GinFlow will be of interest to scientific application designers. Ranging from meteorology to, say, cosmology, there are a lot of simulation tools that actually rely on workflows and for which this software could be of help.”
A Visual Representation
In GinFlow, the workflows are presented in form of a graph. “Nodes are tasks. Lines are dependencies. That's a natural way of representing workflows, Simonin says. Most of all, it is very handy for users. They can draw lines and immediately start specifying dependencies. The graph will also help pinpoint bottlenecks, showing for instance that a task hasn't started yet because it is unduly waiting for another one to finish. Of course, beyond a certain size, when dealing with thousands of tasks, such graphical representation becomes less practical. So GinFlow also features a definition langage meant to enable users to specify tasks and dependencies. We chose JSON, which happens to be easy to use and readable by human eye. ”
These articles could interest you:
Cédric Tedeschi and Matthieu Simonin are members of Myriads , a project-team common with Inria, Insa Rennes, ENS Rennes, université Rennes 1 and CNRS.