Changes between Version 2 and Version 3 of BluePrint/CAPBroker


Ignore:
Timestamp:
06/07/12 07:35:20 (9 years ago)
Author:
g0wda
Comment:

Wrote down blueprint

Legend:

Unmodified
Added
Removed
Modified
  • BluePrint/CAPBroker

    v2 v3  
    1 Models go in modules/eden/msg.py
     1= !BluePrint: CAPBroker =
     2[[TOC]]
    23
    3 * Profile
    4   * type: numeric,string
    5   * constraint_type:
    6 * Template
    7   * has many Info (one for each language) -- does this need a separate table?
    8 * Alert
    9   * has one or more Info (one for each language)
    10   * references one template
    11 * Info
    12 * Profile_Info 
     4== Introduction ==
     5Common Alerting Protocol defines a data format for sending out alerts (and re-relaying) over various broadcasting channels. This project aims to implement core CAP features into Eden and provide usable UI elements for generating CAP alerts manually.
    136
    14 As seen in the [http://docs.oasis-open.org/emergency/cap/v1.2/CAP-v1.2-os.pdf CAP 1.2 Specification] these are the acceptable values that may be populated in the element indicated in parens. (Only enum types are shown here)
    15 (The S3CAPModel already contains data-structures with information for some of these)
     7A Sahana Eden instance that has subscribed to available broadcasters will (e.g. USGS or GDACS CAP feeds) then recieve the alert. Thereafter, an authorized Sahana Eden user can amend the content and relay that message to recipients registered in the Sahana Eden instance. They could be human subscribers or other systems linked to Sahana Eden, thus alerting them of an imminent tsunami, for example.
    168
    17 CAP alert Status Codes (alert/status)
    18 * '''Actual''': Actionable by all targeted recipients
    19 * '''Exercise''': Actionable only by designated exercise participants; exercise identifier SHOULD appear in <note>
    20 * '''System''': For messages that support alert network internal functions
    21 * '''Test''': Technical testing only, all recipients disregard
    22 * '''Draft''': preliminary template or draft, not actionable in its current form
     9Similarly, a manually recorded landslide can be broadcast by an Eden server which will be sent out to the traffic control system, for example, which will allow it to automatically determine a custom traffic routing.
    2310
    24 CAP alert Message Types (alert/msgType)
    25 * '''Alert''': Initial information requiring attention by targeted recipients
    26 * '''Update''': Updates and supercedes the earlier message(s) identified in <references>
    27 * '''Cancel''': Cancels the earlier message(s) identified in <references>
    28 * '''Ack''': Acknowledges receipt and acceptance of the message(s) identified in <references>
    29 * '''Error''': - Indicates rejection of the message(s) identified in <references>; explanation SHOULD appear in <note>
     11== Description ==
     12User story:
     13* A an emergency response agency learns of an imminent disaster say a Tsunami, and the following are the steps they take up:
     14* In Eden's CAP interface the operator chooses the CAP Profile for their region
     15* He then chooses a CAP Template specific for Tsunami
     16* He then edits the blanked out fields in the template (for example, area description, severity) and also sets a few flags (these are provided as per the CAP 1.2 specification)
     17* He will then optionally attach files (eg. containing pre-decided evacuation instructions etc) and also add a few more language templates and edit them
     18* He then sends the CAP Alert as a "Public" alert which everyone subscribed or added in the contacts is notified about
     19* Since CAP is an XML standard it can be easily picked up by automated systems and required actions maybe performed (eg. Sirens)
    3020
    31 CAP alert scope (alert/scope)
    32 * '''Public''': For general dissemination to unrestricted audiences
    33 * '''Restricted''': For dissemination only to users with a known operational requirement (needs specification of <restriction>)
    34 * '''Private''': For dissemination only to specified addresses (needs specification of <addresses>)
     21Sahana Agasti has a CAP broker implementation
    3522
    36 CAP info Event Categories (info/category)
    37 * '''Geo''': Geophysical (inc. landslide)
    38 * '''Met''': Meteorological (inc. flood)
    39 * '''Safety''': General emergency and public safety
    40 * '''Security''': Law enforcement, military, homeland and local/private security
    41 * '''Rescue''': Rescue and recovery
    42 * '''Fire''': Fire suppression and rescue
    43 * '''Health''': Medical and public health
    44 * '''Env''': Pollution and other environmental
    45 * '''Transport''': Public and private transportation
    46 * '''Infra''': Utility, telecommunication, other non-transport infrastructure
    47 * '''CBRNE''': Chemical, Biological, Radiological, Nuclear or High-Yield Explosive threat or attack
    48 * '''Other''': Other events
     23== Requirements ==
     24* Functional:
     25  * CAP Profiles and CAP Templates: Data model and user interface assisting easy and correct implementation of CAP profiles and create/edit of CAP templates
     26  * CAP Editing:  Data model and user interface for creation of CAP alerts compliant with the EDXL-CAP 1.2 standard.
     27  * CAP subscriber: data model and GUIs to manage intended users and groups when disseminating alerts via SMS and Email. (we can use s3msg module here)
     28* Interoperability:
     29  * CAP Broadcasting: Use XSL and XSLT to generate text suitable for distribution. Generate broadcast events, broadcast media can be added by hooking up to these events generated in the system: tap in to s3msg module
     30  * CAP Reception: Expose a PuSH end point and allow Eden instances to subscribe to each other. Handling cancellation and update alerts gracefully.
     31  * Import and Export facility for CAP and CAP Profiles: Enable importing of CAP Alerts from XML files with CAP Alert elements. Allow Exporting. Use the Survey module as a reference here. Also these should be implemented inside the s3export module.
    4932
    50 CAP info Response Type (info/responseType)
    51 * '''Shelter''': Take shelter in place or per <instruction>
    52 * '''Evacuate''': Relocate as instructed in the <instruction>
    53 * '''Prepare''': Make preparations per the <instruction>
    54 * '''Execute''': Execute a pre-planned activity identified in <instruction>
    55 * '''Avoid''': Avoid the subject event as per the <instruction>
    56 * '''Monitor''': Attend to information sources as described in <instruction>
    57 * '''Assess''': Evaluate the information in this message.  (This value SHOULD NOT be used in public warning applications.)
    58 * '''AllClear''': The subject event no longer poses a threat or concern and any follow on action is described in <instruction>
    59 * '''None''': No action recommended
     33== Use-Cases ==
     34||=Actor                     =||=       Use-case   ||=         Description       =||
     35||CAP profile implementer     || Implement CAP profile || CAP Profile defines a class of CAP alerts which may provide a structure to the CAP alert and speed up the creation of CAP Alerts and templates, for example a Profile may specify a region, a set of languages and generic templates in each language. This can be used during CAP alert creation for centering the map for example and for fast creation of alert messages ||
     36||CAP template implementer || Implements CAP templates || CAP templates are Abstract CAP alerts with blanks that need to can be filled really fast in case of an imminent disaster to produce a CAP alert, for example a Tsunami CAP template might be of help in a coastal area, hence an implementer will create the same ||
     37||CAP message editor       || Send a CAP alert || a message editor can pick a CAP template and fill the blanks in it to send out a CAP alert (user story in description) ||
     38||CAP alert subscriber     || Subscribes to CAP Alerts || when a CAP alert is created and the subscriber is in the audience, a notification will be issued via modes prescribed by the subscriber ||
     39== Design ==
     40* The Models: The table definitions go are in modules/eden/cap.py. Place some functions which will help in the creation, sending and receiving of CAP XML files in s3msg module where it might best fit.
     41  * A detailed description of the data model is here: https://docs.google.com/spreadsheet/ccc?key=0AiLVG3CYfknsdGljMXNQejNWSURnVHZYYnMySERzdHc
     42* The GUI
     43  * index: A map and a table of alerts sortable by the various fields of an alert. Clicking on a row on the table centers the map to the <Area> associated with the alert.
     44  * profiles:
     45    * index: View a listing of templates (We should ship some country-specific profiles by default in Eden since this is recommended)
     46    * edit & create: Editing / creating a profile. This should allow for specification of constraints for each field of the cap message.
     47  * templates:
     48    * index: View a listing of all templates grouped by their pertinent profiles.
     49    * edit & create: Allow users to create templates: This will allow for creating multiple <info> elements with placeholders for canned inputs such as [AREA] [SEVERITY] etc.which will then be substituted to produce text consumable via various media like SMS and IVR
     50  * create alert: A map with ability for easy input of polygons and circles, A drop-down for picking profiles and templates to use. A way to specify recipients for restricted alerts.
     51  * Reference and mockups: http://eden.sahanafoundation.org/ticket/1026
     52
     53== Implementation ==
     54* In progress: http://github.com/shashi/eden/tree/cap
     55* Demo instance: http://106.187.91.158:8000/
     56
     57== References ==
     58* [http://docs.oasis-open.org/emergency/cap/v1.2/CAP-v1.2-os.pdf CAP 1.2 Specification]
     59
     60
     61----
     62BluePrints