CSC/ECE 517 Fall 2014/OSS S1454 ccc

From Expertiza_Wiki
Revision as of 03:15, 29 October 2014 by Cehaith2 (talk | contribs) (Created page with "= Sahana Eden: Extract The Progress Details = == Introduction to Sahana Eden == Sahana is a software foundation with the express intent of “saving lives by providing informati...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Sahana Eden: Extract The Progress Details

Introduction to Sahana Eden

Sahana is a software foundation with the express intent of “saving lives by providing information management solutions that enable organizations and communities to better prepare for and respond to disasters.” [1] This is achieved by developing free and open source software to make disaster response coordination more efficient. Eden (or Emergency Development ENvironment for Rapid Deployment Humanitarian Response Management), one of their main products is a feature-rich and rapidly customizable humanitarian platform that allows its modules to be specialized for particular organizations and management needs. Eden has been used to help address the wildfires in Chile, earthquakes and tsunamis in Japan, flooding in Colombia, flooding in Venezuela, flooding in Pakistan, and hurricane in Veracruz, Mexico [2]. The idea is to mix and match several modules that Eden has to best suit the needs and context of an organization. The main modules are an Organization Registry, which can create databases of organizations to help facilitate coordination; Project Tracking, which tells who is doing what where and when and can tell who is working on similar projects to help facilitate collaboration; Human Resources, a tool that helps track and manage the people involved including what skills those people have; Inventory Management, which allows for recording and automating shipments and deliveries of supplies; Asset Management, which helps facilitate management of assets like vehicles, communication equipment, and generators as well as tell to whom each are assigned; Assessments, which can be used to collect and analyze information; Shelter Management, which helps facilitate the management of temporary shelters including required resources, staff and volunteer assignments, and check-in/check-out systems; Scenario and Event planning, which helps facilitate planning for various emergency scenarios; Mapping, which enables location-based visualization on maps; and Messaging, which facilitates communications over various protocol and social media mediums. Eden’s WebSetup is the tool that facilitates the setup process of a new Eden tool. The process of setting up a new Eden project entails many moving parts, so detecting bugs and troubleshooting issues in the process can be tricky. A developer created a New Enhancement ticket that requested work on being able to extract the progress details of the setup into a single local file, not dissimilar to a log file. [3]

Web2Py Tasks and Task Scheduler

Sahana Eden uses the Web2Py; an application development framework written in Python that uses a typical MVC pattern. In order to best manage work on large and complicated functionality in the background, Web2Py implemented a scheduler that allows control over processes. A task is a function defined in a model:

def task_getParity(i):
    if i % 2 == 0:
        return “even”
    return “odd”

Tasks can then be queued up with additional meta-parameters for running the function, such as when the task should die, how long can the process run until timeout occurs, how many times to repeat the function, what parameters to send to the task (if applicable), et cetera.

scheduler.queue_task(‘task_getParity’, [8], …)

The scheduler is the manager for the tasks and workers. Creating a scheduler requires a database at the least in order to store the states of tasks. However, the scheduler can be instantiated with additional parameters that allow specifications for the time between each check of the queue, specific names of functions to queue, the amount of times the queue is checked before a worker must be terminated, et cetera.

from gluon.scheduler import Scheduler
scheduler = Scheduler(database [,…])