Explain Aneka Task Programming Model in detail.
ANEKA TASK-BASED PROGRAMMING
Aneka supports different task-based programming via its Task Programming Model, which is the Aneka framework's core foundation for enabling the execution of bag-of-tasks applications. The Aneka abstraction is used to realize task programming. Task programming is accomplished through the abstraction of the Aneka.Tasks.ITask. Using this abstraction as a foundation, support for legacy application execution, parameter sweep apps, and workflows have been implemented into the framework.
Aneka Task Programming Model
- The Task Programming Model provides an easy-to-use framework for rapidly constructing distributed applications on top of Aneka. It provides a minimal set of APIs, most of which are centered on the Aneka.Tasks.ITask interface. Interface, together with the services facilitates task execution in the middleware.
- Distributed applications are created as ITask instances, and the combined execution of these instances forms a running application. The tasks and numerous required dependencies, such as data files and libraries, are gathered and handled by the Aneka Application class, which supports task execution. The client-side view of a task-based application is made up of two additional components: Aneka Task and TaskManager. AnekaTask is the runtime wrapper that Aneka uses to represent a task within the middleware; and the TaskManager is the underlying component that communicates with Aneka, submits tasks, monitors their execution, and gathers results.
- Four services in the middleware coordinate their actions to perform task-based applications.MembershipCatalogue, TaskScheduler, ExecutionService, and StorageService are examples.
- MembershipCatalogue is the cloud's primary access point, and it serves as a service directory for locating the TaskScheduler service, which is in charge of controlling the execution of task-based applications. Its primary role is to assign task instances to resources that use the ExecutionService for task execution and task state monitoring. If the application needs data transfer support in the form of data files, input files, or output files, an accessible StorageService will be used as a staging facility.
Developing applications with the task model:-
- Defining classes implementing the ITask interface
- Creating a properly configured AnekaApplication instance
- Creating ITask instances and wrapping them into Aneka Task instances
- Executing the application and waiting for its completion
- The Aneka Tasks namespace contains almost all of the client-side functionalities required for developing task-based applications. The ITask interface, which exposes only one method: Execute, is the most fundamental component for building tasks. The method is invoked to have the job executed on the remote node.
ITask interface
namespace Aneka.Tasks
{
/// <summary> ///Interface ITask. Defines the interface for implementing a task.
///</summary>
public interface ITask
{
/// <summary>
///Executes the sine function.
///</summary> public void Execute():
}
}
Comments
Post a Comment