Difference between revisions of "ESN"
Foxfirefey (Talk | contribs) (Created page with 'ESN stands for Event-Subscription-Notification. This document is meant to outline the system and its parts. Category: Development') |
(Flesh out page, part 1: events and subscriptions) |
||
Line 1: | Line 1: | ||
− | ESN stands for Event-Subscription-Notification. | + | ESN stands for Event-Subscription-Notification. This is a complex system, and this page only scratches the surface. You should be prepared to do some digging on your own or ask questions. If you do, please think of the next person having the same question and revise this to include the information you were looking for. |
+ | == Events == | ||
+ | |||
+ | An event is anything happening on Dreamwidth that a user may want to be notified of when it happens, like "someone replied to a comment I wrote" or "there's a new entry posted in (journal)". | ||
+ | |||
+ | Events are defined in [http://hg.dwscoalition.org/dw-free/file/tip/cgi-bin/LJ/Event.pm LJ::Event] (base class) and [http://hg.dwscoalition.org/dw-free/file/tip/cgi-bin/LJ/Event LJ::Event::*] (subclasses for specific event types). They have some data attached, including the journal the event is about and up to 2 additional numeric arguments. See the comments at the beginning of [http://hg.dwscoalition.org/dw-free/file/tip/cgi-bin/LJ/Event.pm LJ::Event] for more on event types, subclasses, and what the journal and additional arguments are used for. | ||
+ | |||
+ | == Subscriptions == | ||
+ | |||
+ | Subscriptions are how someone tells Dreamwidth which events they're interested in. Which events or event types a user may subscribe to may be restricted by the user's account level, but beyond that, any user can subscribe to any available event if they have access to the relevant data (eg, can view the journal/entry/birthdate/etc...). | ||
+ | |||
+ | Subscriptions are defined in [http://hg.dwscoalition.org/dw-free/file/tip/cgi-bin/LJ/Subscription.pm LJ::Subscription] (base class) and [http://hg.dwscoalition.org/dw-free/file/tip/cgi-bin/LJ/Subscription/Pending.pm LJ::Subscription::Pending] (used by the user interface for things the user hasn't (yet) subscribed to). Unlike for events, there are no subclasses for different things subscribed to. Data for each subscription includes the journal of interest, the type of event, the notification method (see below), and 2 additional (numerical) arguments, which aren't necessarily equal or even related to the ones for events that may match the suggestion. | ||
+ | |||
+ | == Notification methods == | ||
+ | |||
+ | == Firing events and delivering notifications == | ||
[[Category: Development]] | [[Category: Development]] |
Revision as of 19:52, 14 September 2011
ESN stands for Event-Subscription-Notification. This is a complex system, and this page only scratches the surface. You should be prepared to do some digging on your own or ask questions. If you do, please think of the next person having the same question and revise this to include the information you were looking for.
Contents
Events
An event is anything happening on Dreamwidth that a user may want to be notified of when it happens, like "someone replied to a comment I wrote" or "there's a new entry posted in (journal)".
Events are defined in LJ::Event (base class) and LJ::Event::* (subclasses for specific event types). They have some data attached, including the journal the event is about and up to 2 additional numeric arguments. See the comments at the beginning of LJ::Event for more on event types, subclasses, and what the journal and additional arguments are used for.
Subscriptions
Subscriptions are how someone tells Dreamwidth which events they're interested in. Which events or event types a user may subscribe to may be restricted by the user's account level, but beyond that, any user can subscribe to any available event if they have access to the relevant data (eg, can view the journal/entry/birthdate/etc...).
Subscriptions are defined in LJ::Subscription (base class) and LJ::Subscription::Pending (used by the user interface for things the user hasn't (yet) subscribed to). Unlike for events, there are no subclasses for different things subscribed to. Data for each subscription includes the journal of interest, the type of event, the notification method (see below), and 2 additional (numerical) arguments, which aren't necessarily equal or even related to the ones for events that may match the suggestion.