Abstract

This paper presents a Petri net-based model for cloud workflow which plays a key role in industry. Three kinds of parallelisms in cloud workflow are characterized and modeled. Based on the analysis of the modeling, a cloud workflow engine is designed and implemented in Aneka cloud environment. The experimental results validate the effectiveness of our approach of modeling, design, and implementation of cloud workflow.

1. Introduction

With the successful cases of the world’s leading companies, for example, Amazon and Google, cloud computing has become a hot topic in both industrial and academic areas. It embraces WEB 2.0, middleware, virtualization, and other technologies and also develops upon grid computing, distributed computing, parallel computing, and utility computing, and so forth [1]. Comparing with classic computing paradigms, cloud computing provides “a pool of abstracted, virtualized, dynamically scalable, managed computing power, storage, platforms, and services are delivered on demand to external customers over the Internet” [2]. It can provide scalable resources conveniently, on demand to different system requirements. According to features of services mainly delivered by the established cloud infrastructures, researchers separated the services into three levels, which are infrastructure as a service (IaaS), platform as a service (PaaS), and software as a service (SaaS). IaaS offers hardware resources and computing power, such as Amazon S3 for storage and EC2 for computing power. PaaS targets providing entire facilities including hardware and the application development environment, such as Microsoft Azure Services platform and Google App Engine. SaaS refers to those software applications offered as services in cloud environments.

However, along with the development of cloud computing, corresponding issues are also arising in both theoretical and technical aspects. One of the most prominent problems is how to minimize running costs and maximize revenues on the premise of maintaining or even improving the quality of service (QoS) [3]. Workflow technology can be regarded as one of the solutions [24]. A workflow is defined as “the automation of a business process, in whole or part, during which documents, information, or tasks are passed from one participant to another for action, according to a set of procedural rules” by the workflow management coalition (WFMC) [5]. Workflow management system (WFMS) is a system for defining, implementing, and managing the workflows, in which workflow engine is the most significant component for task scheduling, data movement, and exception handling.

Cloud workflow, also called cloud-based workflow [1] or cloud computing-oriented workflow [3], is a new application mode of workflow management system in the cloud environment, whose goal is to optimize the system performance, guarantee the QoS, and reduce running cost. It integrates workflow with cloud computing, which combined the advantages of both sides. Cloud workflow technology can be used in two levels [3]; from the cloud users’ view, it supports process definitions of cloud applications and enables flexible configuration and automated operation of the processes. This kind of cloud workflow is regarded as “above-the-cloud,” such as Microsoft Biztalk workflow service and IBM Lotuslive. From the cloud service providers' view, cloud workflow offers automatic task scheduling and resource management of cloud computing environment. This category is referred to as “in-the-cloud,” for example, Cordys Process Factory (for Google APPs).

There is still much timely and worthwhile work to do in the field of cloud workflow, for example, scalability and load balance of above-the-cloud workflow, optimization and integration of in-the-cloud workflow, and so on. The goal of our work in this paper is to design an above-the-cloud workflow engine based on Aneka cloud platform [6], considering scalability and load balance. The remainder of the paper is organized as follows. Related work about workflow, grid workflow, and cloud workflow is given in Section 2. The core part is given in Section 3, including formal modeling of workflow processes and design of the Aneka-based cloud workflow engine. Then, the implementation and experiments are presented in Section 4. Effectiveness and correctness of the novel workflow engine are shown by analysis results. Finally, in Section 5, the main results of the paper are summarized.

From the mid-1990s to around 2000, business process management and workflow technology were developed rapidly, and many valuable results and products were gained. The detailed surveys can be found in [79]. Besides, flexibility, adaptability, dynamic changes, and exception handling of workflow have also been focused on and taken progress in the next few years [1013]. Thus, from the modeling and verification of workflow process, to the design and implementation of workflow engine, to the building and practice of workflow management system, a series of results have made workflow technology play a more and more important role in social life.

In the next ten years or so, with the emergence of new computer technologies and computing paradigms, for example, web services, P2P, and grid computing, workflow can be developed in two aspects. On the one hand, the existing workflows can be transferred to new computing paradigms. On the other hand, adapting to new features of technologies and paradigms, workflow technology should make a progress. Grid workflow can be classed into two categories, above-the-grid and in-the-grid, as the discussion of cloud workflow in the above section. The goal of in-the-grid workflow is integration, composition, and orchestration of grid services in the grid environment, considering peer-to-peer service interaction and complicated lifecycle management of grid services [14]. In regard to above-the-grid workflow, transformation of traditional business workflow systems is the part of the work, and many researches and practices have been done concerning distributed and parallel features of grid [15, 16], covering modeling, verification, scheduling problems, and so on [1721].

Comparing cloud computing emerging in 2007 with grid computing [2], it can be seen that their visions are the same; meanwhile, there are both similarities and differences between them, from architecture, security model, business model, and computing model to provenance and applications. Based on the analysis of workflows running in these two kinds of infrastructure, similarities and differences are also found [3, 22]. There are many workflow studies on different levels of cloud services. Research of workflows building on IaaS focuses on dynamical deployment and monitoring in cloud nodes, which is used in large-scale data intensive computing [23, 24]. Some researchers use cloud workflows in community team working among multiple processes [25]. Otherwise, many workflow studies in PaaS pay attention to the integration of cloud and workflow. It is concerned with recognition and execution of workflow tasks in cloud environment [26, 27]. Today, there are also many studies on scientific and commercial cloud workflows. Yuan et al. studied data dependency and storage on scientific cloud workflows [28, 29]. Wu et al. carried out researches on hierarchical scheduling strategy in commercial cloud workflows [30].

According to our analysis, three kinds of differences or improvements can be concluded. Firstly, cloud workflow technology research is always carried out joint with multiple technologies and computing paradigms, such as web services, P2P, and grid computing. Secondly, cloud workflow concentrates more on data and resources and not just the control flow. Thirdly, performance of cloud workflow is paid more attention than functionalities [3133].

3. Modeling and Design of Aneka-Based Cloud Workflow Engine

Our Aneka-based cloud workflow engine will be given in this section. To improve scalability, the cloud workflow engine will be designed to support different parallelism levels of workflow processes. And to clarify these parallelisms, the formal modeling technique for processes is given firstly.

3.1. Preliminaries

Workflow management system completely or partly supports automation of workflow schema. And workflow schema models business processes; it is characterized by the decomposition into subflows and atomic activities, the control flow between activities (subflows), data flow and data, and the assignment of resources (including human resources and equipment resources) to each activity [5]. That is, workflow schema is a combination of three essential dimensions: control flow, data flow, and resource flow.

Petri net is a simple, graphical, yet rigorous, mathematical formalism, which has been used to model workflow processes [34]. However, the usage of Petri net is always limited to model control flow, which is not enough for describing the above three dimensions of workflow. An advanced model founded on the basic Petri net has been developed in our previous paper [35], called 3DWFN. Its definition is given as follows, which is suitable for describing cloud workflow.

Definition 1. Three-Dimension WorkFlow Net, 3DWFN.
Let , , and be finite alphabet sets of activity names, data names, and resource names, respectively. A three-dimension workflow net over them is a system , where we have the following:  (i)finite sets of places and of transitions: , , and , where is a set of atomic transitions, is a set of subnet transitions, and is a set of internal transitions;(ii) is a set of arcs, especially, including the set of inhibitor arcs: ;(iii) is a finite and nonempty color set including types of tokens and the default is denoted by a black dot, “;” (iv) Lab: is a labeling function;(v) Exp: is an arc expression function, where denotes the set of natural numbers and is a set of expressions of numeric computation or logic computation;(vi) is the initial marking of the net, where is the multiset over .In view of defining transition rule of 3DWFN, some notations are introduced beforehand.

Definition 2. (i) Projection. Suppose represents ’s projection on , and or .
(ii) Variables Replacement. Let “” represent is a variable of set . Variable may be replaced by any element in .
Then the transition rule is given.

Definition 3. Transition Rule of 3DWFN.(i)Preconditions about a transition are denoted as for all , , and for all .(ii)Postcondition about a transition is denoted as for all .(iii)A transition is enabled under a marking if and only if .(iv)A new marking is produced after an enabled transition fires: denoting as or .

3.2. Modeling and Analysis of Workflow Process

With detailed analysis of generalized cloud workflow systems, it is really indispensable to discriminate different parallelisms of workflow processes for adopting cloud technologies to promote its execution efficiency. Therefore, we divide the execution of multiple tasks in a cloud workflow system into three levels according to different parallelisms, that is, process level execution, task level execution, and application level execution.

As shown in Figure 1 by 3DWFN, there are two parallel processes, named S1 and S2. S1 shows a sequential process and S2 shows a process including parallel tasks. and are colored sets. represents the set of users, while represents the set of resources. As a result, execution of a 3DWFN looks like a user acting, as some role carries some kind of data or uses some kind of resources to “walk” through a certain path of the net.

These two processes could be performed in parallel at different computing node in cloud environment, which illustrates the parallelism of process level execution in the cloud workflow system.

When the workflow system enter state S2.2, S2.3, and S2.4 after transition S2.t1 fired, three tasks that are represented by S2.t2, S2.t3, and S2.t4 are enabled to be carried out in parallel at different computing node in cloud environment controlled by a single user or multiple users. Then, the joint task S2.t5 could be triggered to be executed only if resources in S2.5, S2.6, S2.7, and S2.10 are all available. This scenario illustrates the parallelism of task level execution in the cloud workflow system.

Finally, if a single task is intensive computing, such as the task execution between S1.2 and S1.3, it could be divided into more fine-grained subtasks and carried out in parallel at different computing node in cloud environment controlled by a single user. This scenario shows the parallelism in application level.

3.3. Architecture of Cloud Workflow

According to the above-mentioned analysis, the integrated framework of Aneka-based cloud workflow engine is presented. There are three parts, environment, applications, and control parts, which can solve the analyzed parallelisms problems in the three levels and achieve extensibility and reusability of workflow. Details are presented in Figure 2.

3.3.1. Cloud Workflow Environment

There are three executing models in the Aneka cloud environment, Task Model, MapReduce Model, and Thread Model. In the remainder of this paper, all experiments are run with Task Model.

3.3.2. Cloud Workflow Applications

The cloud workflow applications contain all instances of workflow processes.

3.3.3. Cloud Workflow Control

The cloud workflow control part contains the workflow engine and host application. The cloud workflow engine is in charge of running workflow instances, and the host application is in charge of defining workflow processes and monitoring workflow process executions.

3.4. Design of Cloud Workflow
3.4.1. Design of Workflow Runtime Environment

A lightweight cloud workflow engine is designed, whose functions include starting process execution, scheduling processes, and tasks based on preestablished rules. The workflow runtime environment is shown in Figure 3, which is composed of three parts, host application, workflow instances, and runtime engine.

Then, Figure 4 shows all service classes design of the workflow engine. The class “WorkflowRuntimeService” is the base class and the others are the derived classes.

3.4.2. Design of Cloud Workflow Execution Process

After a process is started, each task will be executed following the control flow when requirements of data flow and resource flow are met. When a task is enabled, the task executor will send its execution request to workflow engine. Then, the workflow engine will instantiate the ready task. If the task is not intensive computing, then it will be executed locally. Otherwise, if the task is intensive computing, it will be submitted to the cloud. The execution process of cloud workflow is depicted as in Figure 5.

3.4.3. Design of Task Model Submission Process

Next, the submission process of task is designed. As mentioned above, Task Model is chosen. In Aneka cloud environment, Task Model is used not only to solve the distributed applications which are composed of single tasks, but also to execute the correlating tasks of these applications. Once users submit their sequence of tasks with rules, the results will be returned by Aneka after a while.

Aneka Task Model is composed of the class AnekaTask, the interface ITask, and the class AnekaApplication. The task submission process in Aneka Task Model is as follows: firstly, to define a class “UserTask,” which inherits class “AnekaTask” in Aneka Task Model; secondly, to create an instance of UserTask for the application program; and thirdly, to package class “UserTask” instance to class “AnekaTask” and submit it to Aneka cloud by class “AnekaApplication.” The sequence diagram of the above process is shown in Figure 6.

Then, the implementation of workflow tasks is presented in Figure 6. Firstly, the implementation manager submits tasks to the workflow runtime engine. Then, the workflow runtime engine selects a custom made operation flow and creates its workflow instance and then runs it at the same time.

4. Implementation and Experiment

4.1. Building Aneka Cloud Environment

Our experimental cloud environment includes a server as a master node, some common PCs as the worker nodes, and a manager node. In this paper, the detailed hardware configuration is presented in Table 1.

Then, the cloud nodes are pretreated according to the following steps before installing Aneka.(a)Install FTP server on the master node and worker nodes.(b)Offer access authority for the manager node to the master node and worker nodes.

After pretreatment, Aneka cloud management platform is installed in the manager node. Then, we use remote access to install and configure the master node and worker nodes.

4.2. Workflow Process of an Example

Our example is to compute definite integral by a probabilistic method. The workflow process is composed of four steps: “generations of random number,” “computing -axis,” “computing -axis,” and “computation of final result.”

In this processing, there are three correlating tasks, which are “generation of random numbers”, “computation of -axis ” and “computation of -axis .” We use the task “generation of random numbers” to compute real and imaginary axes. Then, we match and combine values of to a . Admittedly, the combinational step is next to the computational step of , and the steps are in one task. In this case, we divide the position relations of all points into two cases. When a is between and , we let the count increase by . In contrary, count is not changed. Then, letting the number of all points be equal to number , we use to estimate . The operation flow is present in Figure 7.

4.3. Implementation Methods

The task of computing axes is intensive computing and will be submitted to the Aneka cloud in Task Model. The execution function under the interface ITask is presented in Algorithm 1. Then, the task is packaged and submitted to the cloud by the above mentioned class AnekaApplication. The core implementation is configured in Algorithm 2.

public void Execute ()
{
this.result = (this.   * this. ) * this.rd;.
}
public void Execute ()
{
    this.result = this.  + (this.  − this. ) * this.rd:
}

private static AnekaApplication < AnekaTask, TaskManager > Setup (string args)
  {
   Configuration conf = Configuration.GetConfiguration (“configuration file”);
   // ensure that SingleSubmission is set to false
   // and that ResubmitMode to MANUAL.
   conf.SingleSubmission = false;
   conf.ResubmitMode = ResubmitMode.MANUAL;
   conf.UserCredential = new Aneka.Security.UserCredentials(“administrator”, “”);
   AnekaApplication < AnekaTask, TaskManager > app =
     new AnekaApplication < AnekaTask, TaskManager > (“Workflow1”, conf);
   // ensure that SingleSubmission is set to false
   if (args.Length = = 1)
   {
   bLogOnly = (args = = “LogOnly”? true: false);
   }
   return app;
   }

4.4. Results Analysis

Based on the above experiments, running results and workflow logs are analyzed. Three analysis conclusions are given as follows. Firstly, as shown in Table 2, the results of definite integral workflow are presented with different number of points. It shows that the degree of accuracy increases along with the increase of task’s number. It accords with the mathematical regular rule. It is indicated that the functionality of our cloud workflow engine is normal.

Secondly, the intensive computing tasks submitted to the Aneka cloud are executed in parallel by different workers. As shown in Figure 8, the screenshot of workflow log, tasks A and B represent, respectively, the two intensive computing tasks, “computing X-axis” and “computing Y-axis.” It is indicated that our cloud workflow engine is effective and efficient.

Thirdly, the running time of the whole workflow completion is not simple linear growth with the number of points used in definite integral. The screenshot of workflow log shown in Table 3 presents the time table of 10 tasks for their execution time, waiting time, and total time. Mean execution time is about 2.6 seconds, and mean waiting time is about 1 second except the last task. The waiting time of the last task is so long that it is nearly equal to the sum time of the other 9 tasks. In this case, if the number of used points is increased in the next experiment, the total time might not be increased but decreased, because the cloud might assign more workers (resources) to execute them to save time. It is indicated that the cloud workflow engine is scalable, which will not spend an impossible large amount of time when a lot of tasks and processes run in parallel.

5. Conclusion

The work in this paper can be concluded as follows. A Petri net-based model called 3DWFN is given firstly, which can describe three dimensions of a workflow, that is, control flow, data flow, and resource flow. According to the analysis of the existing workflow systems, it is found that cloud workflow pays more attention to data, resources, and performance than control flow and functionality researched commonly in traditional workflow. Thus, 3DWFN is suitable for modeling of cloud workflow processes. Through analysis of the features of workflow processes executed potentially in cloud environment, three kinds of parallelisms are recognized as process level, task level, and application level and then modeled specifically by 3DWFN. The goal of the following design of cloud workflow engine is to support these parallelisms to improve scalability by using resources as far as in parallel.

Then, the architecture of the Aneka cloud based workflow engine is designed. The workflow runtime environment and execution process are stated, and the process of packaging and submitting an intensive computing task to Aneka is explained. After the engine is implemented, a definite integral process is used as an example. By different numbers of points used to definite integral, the functionality and effectivity of the cloud workflow engine are shown. Based on the analysis of running results and workflow logs, the scalability and efficiency of the cloud workflow engine are given.

In the future, the research can be improved in following directions. First, more practical workflow processes will be designed using powerful expression of 3DWFN. Second, novel cloud workflow engine will be built, which has dynamic scheduling and handling functions with complicated process.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgments

This work is supported by Grants of the National Natural Science Foundation of China [nos. 61262082 and 61261019], Key Project of Chinese Ministry of Education [no. 212025], and Inner Mongolia Science Foundation for Distinguished Young Scholars [2012JQ03]. The authors wish to thank the anonymous reviewers for their helpful comments in reviewing this paper.