0% found this document useful (0 votes)
17 views

Modul3 ch7

The document discusses developing applications using Aneka's task programming model, including defining task classes, configuring and executing applications, and managing task and file execution on distributed resources.

Uploaded by

Sheeba S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Modul3 ch7

The document discusses developing applications using Aneka's task programming model, including defining task classes, configuring and executing applications, and managing task and file execution on distributed resources.

Uploaded by

Sheeba S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

DEVELOPING APPLICATIONS WITH THE TASK MODEL  Execution of task-

based applications involves several components. The development of such


applications is limited to the following operations:  Defining classes
implementing the ITask interface  Creating a properly configured
AnekaApplication instance  Creating ITask instances and wrapping them
into AnekaTask instances  Executing the application and waiting for its
completion
Aneka task-based programming
• Aneka provides support for all the flavors of
task-based programming
• bag-of-tasks application
• Aneka.Tasks.ITask
• parameter sweep applications and workflows
have been integrated into the framework
Task programming model
DEVELOPING APPLICATIONS WITH THE TASK MODEL

Execution of task-based applications involves several components. The


development of such applications is limited to the following operations:

Defining classes implementing the ITask interface


Creating a properly configured AnekaApplication instance
Creating ITask instances and wrapping them into AnekaTask instances
Executing the application and waiting for its completion
ITask and
AnekaTask
• Aneka.Tasks namespace (Aneka.Tasks.dll)
• ITask interface
• ITask interface provides a programming
approach for developing native tasks
• .NET framework
• Visual Basic, C#, C++, Python, COBOL, Jscript, Eiffel, Java, Haskell, Pascal, ML, Ada,
APL, C, C++, Perl, SmallTalk, Oberon, Scheme, Mercury, Oz, RPG, Objective Camlto
name some of them

• need to be serializable
• Example: computes the Gaussian distribution
for a given point x
• ITask provides minimum restrictions on how
to implement a task class
• It is required for managing tasks within
Aneka
• Aneka.Entity.WorkUnit
• facilities for specifying input and output files
for the task
Controlling task
execution
• Task classes and AnekaTask define the
computation logic of a task-based application
• implementing the coordination logic of the
application.
• AnekaApplication<AnekaTask,
TaskManager>
• Static and dynamic task submission
• Application state and task state monitoring
• Event-based notification of task completion or
failure
• Static submission is a very common pattern in
the case of task-based applications, and it
involves the creation of all the tasks that need
to be executed in one loop and their
submission as a single bag
• Dynamic submission of tasks is a more
efficient technique and involves the
submission of tasks as a result of the event-
based notification mechanism implemented in
the AnekaApplication class
• a new task for the computation of an
intermediate value of the distribution is
submitted.
• WorkUnitFailed and WorkUnitFinished
File management
• files may constitute input data for tasks
• may contain the result of a computation
• may represent executable code or library
dependencies
• support for file transfers
• Aneka provides built-in capabilities for file
management in a distributed infrastructure
• WorkUnit and ApplicationBase classes
• ApplicationBase.SharedFiles
• WorkUnit.InputFiles
• WorkUnit.OutputFiles
• A fundamental component for the
management of files is the FileData class
• Aneka.Data.Entity namespace (Aneka.
Data.dll).
Task
libraries
• Aneka provides a set of ready-to-use tasks for
performing the most basic operations for
remote file management
• Aneka.Tasks.dll library
• File copy, Legacy application execution,
Substitute operation, File deletion, Timed
delay, Task composition
• File copy. The LocalCopyTask performs the copy of a file on the
remote node; it takes a file as input and produces a copy of it under a
different name or path
• Legacy application execution. The ExecuteTask allows executing
external and legacy applications by using the
System.Diagnostics.Process class.
Substitute operation. The SubstituteTask performs a search-and-replace operation
within a given file by saving the resulting file under a different name.

File deletion. The DeleteTask deletes a file that is accessible through the file system
on the remote node.
Timed delay. The WaitTask introduces a timed delay.

Task composition. The CompositeTask implements the composite pattern and allows
expressing a task as a composition of multiple tasks that are executed in sequence.
This task is very useful to perform complex tasks involving the combination of
operations implemented in other tasks
Web services integration
• Local file copy on the remote node
• File deletion
• Legacy application execution through the
common shell services
• Parameter substitution
Development and monitoring tools
• The core libraries allow developers to directly
program parameter sweep applications and
embed them into other applications
• Additional tools simplify design and development
of parameter sweep applications by providing
support for visual design of the applications and
interactive and noninteractive application
execution.
• Aneka Design Explorer and the Aneka PSM
Console.
Managing
workflows
• Support for workflow in Aneka is not native
but is obtained with plug-ins that allow client-
based workflow managers to submit tasks to
Aneka.
• two different workflow managers can leverage
Aneka for task execution: the Workflow
Engine and Offspring

You might also like