Scopira  20080306
Agents Overview

Introduction

The Scopria Agent extension allows Scopira developers to write parallel procesing aware applications. It is a message based system and uses Scopira serialization-like primitives to package data for transport.

Developers simply implement task objects. Agents will instantiate them at various nodes, and run them. Between run calls, Agents may serialize a tasks state and move it to a different node. Tasks communicate with each other using packet-based serialization objects.

The complete system itself relies on code libraries and C++ objects. There are no seperate executables or deployment manament infrastructure utilities. The implementation is included in the developer's library itself, and thus is a natural part of the application.

Finally, developers can always be assured that the agent facilities are available. The actual back-end agent implementation will be chosen at run time, everytime the application launches. If the user does not specify any particular agent style (like the beowulf cluster agent), the default always works Level-0 agent will be used. This tiny agent does nothing but impement the agent interface within the executable, using threads (allowing for parallelism within one machine). This allows developers to write (possibly graphical) applications that instantly are able to utilize agent networks, if available.

Programmer API

For the developer, the agent API provides a straightforward object-oriented API. The user simply makes decendants of the agent_task_i interface, and implement's it's run method. The interact with the parallel system through the well defined and simplified task_context interface object.

All tasks and agents have a unique UUID (sometimes known as GUID) associated with them. This is a opaque, 128-bit integer that is unique within the universe. When a new UUID is needed, it is generated using some means that promotes this unqueness.

Tasks then, through their contexts send and receive messages to other tasks using their UUIDs. The messages them selves are packages (and unpackages) using the typical Scopira-esque flow API. Serializable objects therefor are istantly usable.

Engines

Scopira Agents includes two engines or agent implementation.

The "local_agent" implementation is always available, and chosen when no others are selected or available. It can never fail (as it is not networked in any way). It uses operating system threads to take advantage of parallelism. This allows it to use multiple processors in a single machine.

This "cluster_agent" implementation allows one to run a network of agents of a cluster of machines connected by a network. This allows task developers to utilize the computation powers of off-the-shelf Beowulf clusters.

This agent assumes that the machines and network are stable. Failures by nodes or the network during runs won't be handled gracefully. A Master admistrative node centralizes job decisions and routing. Worker nodes (and user clients) may attach anytime, and detach fromthe master when they are idle (not running any tasks).

The detaching facility is particular interesting, as it allows client agents to connect to a master, submit their tasks to the network and then detach. They may then reattach to the network and query their running tasks for progress reports. This can bring cluster computing to a whole new group of graphical application users. You may also mix platforms (for example, Windows GUI applications connecting to Linux clusters).