Changes between Version 2 and Version 3 of S3/Notifications


Ignore:
Timestamp:
09/05/13 10:15:59 (8 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/Notifications

    v2 v3  
    2626A custom interface can be found in private/templates/DRMP/controllers.py. This interface manages a single subscription per user with multiple resources using a common filter.
    2727== Notifications ==
     28
     29=== Data Model ===
     30
     31Notifications build on the S3SubscriptionModel (see above) and the web2py Scheduler (for running tasks and logging).
     32
     33=== Process ===
     34
     35[[Image(notification_process.png)]]
     36
     371) A background task "check_subscriptions" (installed in zzz_1st_run.py) is run every 5 minutes to check for updates of resources which have subscriptions. The "check_subscriptions" task schedules a separate, asynchronous "notify_notify" task for each resource/subscription pair which has updates.
     382) Each "notify_notify" task generates a local HTTP POST request to the subscribed controller (request format "msg"), applying the subscription filters.
     393) This request is handled by the S3Notifications.send() method, impersonating the subscriber. The send() method extracts the new/updated records, and renders and sends the notification message(s) to the subscriber.
     404) Sending of the messages uses current.msg.send_by_pe_id(), which in turn uses the contact information of the subscriber stored in pr_contact.
     41
     42=== Framework ===
     43
     44Notifications require a scheduler worker process to run in the background.
     45
     46=== Configuration ===
     47
     48==== Per Deployment ====
     49
     50==== Per Resource ====
     51
     52==== Per Subscription ====
     53== Notifications ==