RFC Name : Task Management

Editor(s): Scooter Morris

Date: 10/17/2007

Status: In progress

<<TableOfContents: execution failed [Argument "maxdepth" must be an integer value, not "[2]"] (see also the log)>>

Proposal

This proposal, part of the Cytoscape 3.0 project, is to redesign and refactor the task management and monitoring capabilities within cytoscape to provide a more robust task management and task monitoring system.

Background

Cytoscape's current Task, Haltable, and TaskMonitor interfaces have provided useful hooks to monitor, and to a limited extent manage, Cytoscape tasks. Using Cytoscape's task system handles much of the detail of setting up the progress bar, etc. Unfortunately, for a number of reasons, using Cytoscape's task system can lead to significant complexity since it is currently designed to monitor/manage only one task. In addition, many of the current tasks are not coded to be canceled, and with the deprecation of Thread.stop code that is running within a task needs to be coded to specifically monitor a volatile variable to signal task cancellation or catch InterruptedException.

Use Cases

  1. When reading an XGMML formatted file from a web site, there are several tasks that much be accomplished. First, the exchange with the website needs to be handled, this would include the initial query, plus any responses from the query. In some cases, the initial response might take an indeterminate amount of time. Second, the stream needs to be read from the website and parsed, and finally, the network view needs to be created, which includes calling the reader to instantiate all of the visual attributes of the network. There are at least two separate tasks that could be created to handle this use case: an HTTP reader task, which includes the initial handshake; and the parser task, which might include the network view creation. Currently, this is handled through a complicated process of handing around (possibly null) TaskMonitor objects and there is no easy way to have more than one task monitored simultaneously.

  2. When reading in sessions, we handle several different pieces of information, some of which are independent. Currently, these are all handled sequentially. If we were to parallelize this process, we would need some mechanism to monitor and manage the overall progress.
  3. Some plugins take advantage of existing Cytoscape services and combine them in important ways to achieve a desired result. For example, a plugin that downloads information from a website, performs some filtering or analysis on the downloaded network, then performs a layout and/or application of a visual style would currently need to manage each of these tasks independently, some of which might not be easily canceled.

Implementation Plan

The basic idea is to replace the cytoscape.task package with a more robust mechanism that handles the management of multiple tasks, task groups (multiple tasks that should use a single progress monitor), headless management of tasks, and user-initiated task cancellation. Some of this will depend heavily on the Cytoscape3.0 logging/error handling capabilities. In order to support good separation of concerns, a Cytoscape Task must be independent of the TaskMonitor. There will need to be a TaskManager object that will manage all Cytoscape tasks. When a Task is initiated by a call to create a new cytoscape.task.Task (or perhaps the run method of a cytoscape.task.Task object?) it will register itself with the TaskManager, along with a label or task group. The TaskManager will be responsible to providing task monitoring services (if required) as well as rudimentary task logging services (using the 3.0 logging/error handling capabilities).

Project Management

Project Timeline

TaskManagementPlan.gif

Tasks and Milestones

Outline the major milestones and tasks involved in implementation.

  1. Milestone 1: TaskManager

    1. Task 1: Design Initial TaskManager API

    2. Task 2: Prototype
  2. Milestone 2: Task

    1. Task 1: Design Task API
    2. Task 2: Implement prototype AbstractTask utility class

    3. Task 3: Iterate TaskManager API and implementation, as needed

  3. Milestone 3: Task Monitoring

    1. Task 1: Implement TaskMonitor for GUI

    2. Task 2: Iterate on TaskManager API, as needed

    3. Task 3: Iterate on Task API, as needed
    4. Task 4: Implement TaskMonitor for headless mode

  4. Milestone 4: Cytoscape 2.7 Test Integration

    1. Task 1: Prototype integration with Cytoscape 2.7 (not for release)
    2. Task 2: Iterate on design, as necessary
  5. Milestone 4: Cytoscape 3.0 Integration

    1. Task 1: Hook task capabilities into Cytoscape logging and error handling features

Project Dependencies

This project depends, in part, on the Cytoscape 3.0 relayering and on the Cytoscape 3.0 logging and error handling capabilities.

Link to other related RFCs

Issues

List any issues, conflict, or dependencies raised by this proposal

Comments

How to Comment

Edit the page and add your comments under the provided header. By adding your ideas to the Wiki directly, we can more easily organize everyone's ideas, and keep clear records. Be sure to include today's date and your name for each comment. Try to keep your comments as concrete and constructive as possible. For example, if you find a part of the RFC makes no sense, please say so, but don't stop there. Take the extra step and propose alternatives.

TaskManagement (last edited 2009-02-12 01:03:49 by localhost)

Funding for Cytoscape is provided by a federal grant from the U.S. National Institute of General Medical Sciences (NIGMS) of the Na tional Institutes of Health (NIH) under award number GM070743-01. Corporate funding is provided through a contract from Unilever PLC.

MoinMoin Appliance - Powered by TurnKey Linux