1 / 24

Notification Service

Notification Service. Outline Notification Service Event Service vs Notification Service Example. Shortcomings of Event Services. No filtering: all notifications sent to an event channel will be forwarded to all consumers

telyn
Download Presentation

Notification Service

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Notification Service • Outline • Notification Service • Event Service vs Notification Service • Example Notification Service

  2. Shortcomings of Event Services • No filtering: all notifications sent to an event channel will be forwarded to all consumers • No Concept of QoS: client cannot configure channels for their specific requirements • No information about required or supplied notifications: consumer doesn’t know about existing suppliers and the types of events they offer; vice versa • Unstructured event data: event data is wrapped into instances of the generic type Any Notification Service

  3. Notification Service Architecture Text book: figure 11.7 Notification Service

  4. Notification Service vs Event Service • Event types • Notification Service supports typed, any, structured and sequence of structured events • Event service only supports typed and any type event • Admin interface • Notification service allows multiple consumer admin interface and supplier admin interface • Event service only support single admin interface (ConsumerAdmin, SupplierAdmin) • Channel creation • Notification service defines a standard factory interface for event channels to allow clients to retrieve channels • Event service does not have the factory interface Notification Service

  5. Structured Event domain_name Fixed Header type_name event_name Event Header name value name value Variable Header … name value name value Filterable Body Fields … Event Body name value Remaining Body remainder_of_body Notification Service

  6. QoS Properties • EventReliability and ConnectionReliability • 0: best effort • 1: persistent, retransmit after recover • Priority • Default 0, could be positive, or negtive • StartTime, StopTime, Timeout • MaxEventsPerConsumer • OrderPrority • DiscardPolicy • MaximumBatchSize • PacingInterval • Text book Figure 11.9 Notification Service

  7. Filters • CosNotifyFilter::Filter • Decide when to forward the event consumer • CosNotifyFilter::MappingFilter • Affact how the QoS values are treated • Priority • Lifetime • For consumer only (ConsumerAdmin, or SupplierProxy) Notification Service

  8. CosNotifyChannelAdmin:Event Channel interface EventChannel : CosNotification::QoSAdmin, CosNotification::AdminPropertiesAdmin, CosEventChannelAdmin::EventChannel { readonly attribute EventChannelFactory MyFactory; readonly attribute ConsumerAdmin default_consumer_admin; readonly attribute SupplierAdmin default_supplier_admin; readonly attribute CosNotifyFilter::FilterFactory default_filter_factory; ConsumerAdmin new_for_consumers( in InterFilterGroupOperator op, out AdminID id ); SupplierAdmin new_for_suppliers( in InterFilterGroupOperator op, out AdminID id ); ConsumerAdmin get_consumeradmin ( in AdminID id ) raises (AdminNotFound); SupplierAdmin get_supplieradmin ( in AdminID id ) raises (AdminNotFound); AdminIDSeq get_all_consumeradmins(); AdminIDSeq get_all_supplieradmins(); }; // EventChannel Notification Service

  9. CosNotifyChannelAdmin:ConsumerAdmin interface ConsumerAdmin : CosNotification::QoSAdmin, CosNotifyComm::NotifySubscribe, CosNotifyFilter::FilterAdmin, CosEventChannelAdmin::ConsumerAdmin { readonly attribute AdminID MyID; readonly attribute EventChannel MyChannel; readonly attribute InterFilterGroupOperator MyOperator; attribute CosNotifyFilter::MappingFilter priority_filter; attribute CosNotifyFilter::MappingFilter lifetime_filter; readonly attribute ProxyIDSeq pull_suppliers; readonly attribute ProxyIDSeq push_suppliers; ProxySupplier get_proxy_supplier ( in ProxyID proxy_id ) raises ( ProxyNotFound ); ProxySupplier obtain_notification_pull_supplier ( in ClientType ctype, out ProxyID proxy_id) raises ( AdminLimitExceeded ); ProxySupplier obtain_notification_push_supplier ( in ClientType ctype, out ProxyID proxy_id) raises ( AdminLimitExceeded ); void destroy(); }; // ConsumerAdmin Notification Service

  10. CosNotifyChannelAdmin:SupplierAdmin interface SupplierAdmin : CosNotification::QoSAdmin, CosNotifyComm::NotifyPublish, CosNotifyFilter::FilterAdmin, CosEventChannelAdmin::SupplierAdmin { readonly attribute AdminID MyID; readonly attribute EventChannel MyChannel; readonly attribute InterFilterGroupOperator MyOperator; readonly attribute ProxyIDSeq pull_consumers; readonly attribute ProxyIDSeq push_consumers; ProxyConsumer get_proxy_consumer ( in ProxyID proxy_id ) raises ( ProxyNotFound ); ProxyConsumer obtain_notification_pull_consumer ( in ClientType ctype, out ProxyID proxy_id) raises ( AdminLimitExceeded ); ProxyConsumer obtain_notification_push_consumer ( in ClientType ctype, out ProxyID proxy_id) raises ( AdminLimitExceeded ); void destroy(); }; // SupplierAdmin Notification Service

  11. CosNotifyChannelAdmin:Event Channel Factory interface EventChannelFactory { EventChannel create_channel ( in CosNotification::QoSProperties initial_qos, in CosNotification::AdminProperties initial_admin, out ChannelID id) raises(CosNotification::UnsupportedQoS, CosNotification::UnsupportedAdmin ); ChannelIDSeq get_all_channels(); EventChannel get_event_channel ( in ChannelID id ) raises (ChannelNotFound); }; // EventChannelFactory Notification Service

  12. CosNotifyFilter:FilterAdmin interface FilterAdmin { FilterID add_filter ( in Filter new_filter ); void remove_filter ( in FilterID filter ) raises ( FilterNotFound ); Filter get_filter ( in FilterID filter ) raises ( FilterNotFound ); FilterIDSeq get_all_filters(); void remove_all_filters(); }; // FilterAdmin Notification Service

  13. CosNotifyFilter:Filter interface Filter { readonly attribute string constraint_grammar; ConstraintInfoSeq add_constraints ( in ConstraintExpSeq constraint_list) raises (InvalidConstraint); void modify_constraints ( in ConstraintIDSeq del_list, in ConstraintInfoSeq modify_list) raises (InvalidConstraint, ConstraintNotFound); ConstraintInfoSeq get_constraints( in ConstraintIDSeq id_list) raises (ConstraintNotFound); ConstraintInfoSeq get_all_constraints(); void remove_all_constraints(); void destroy(); boolean match ( in any filterable_data ) raises (UnsupportedFilterableData); boolean match_structured ( in CosNotification::StructuredEvent filterable_data ) raises (UnsupportedFilterableData); boolean match_typed ( in CosNotification::PropertySeq filterable_data ) raises (UnsupportedFilterableData); CallbackID attach_callback ( in CosNotifyComm::NotifySubscribe callback); void detach_callback ( in CallbackID callback) raises ( CallbackNotFound ); CallbackIDSeq get_callbacks(); }; // Filter Notification Service

  14. CosNotifyFilter:FilterFactory interface FilterFactory { Filter create_filter ( in string constraint_grammar) raises (InvalidGrammar); MappingFilter create_mapping_filter ( in string constraint_grammar, in any default_value) raises(InvalidGrammar); }; // FilterFactory Notification Service

  15. CosNotification module CosNotification { typedef string Istring; typedef Istring PropertyName; typedef any PropertyValue; struct Property { PropertyName name; PropertyValue value; }; typedef sequence<Property> PropertySeq; typedef PropertySeq OptionalHeaderFields; typedef PropertySeq FilterableEventBody; typedef PropertySeq QoSProperties; typedef PropertySeq AdminProperties; struct EventType{ string domain_name; string type_name; }; typedef sequence<EventType> EventTypeSeq; }; Notification Service

  16. CosNotification module CosNotification { struct FixedEventHeader { EventType event_type; string event_name; }; struct EventHeader { FixedEventHeader fixed_header; OptionalHeaderFields variable_header; }; struct StructuredEvent { EventHeader header; FilterableEventBody filterable_data; any remainder_of_body; }; typedef sequence<StructuredEvent> EventBatch; }; Notification Service

  17. QoS Admin module CosNotification { interface QoSAdmin { QoSProperties get_qos(); void set_qos ( in QoSProperties qos) raises ( UnsupportedQoS ); void validate_qos ( in QoSProperties required_qos, out NamedPropertyRangeSeq available_qos ) raises ( UnsupportedQoS ); }; // QosAdmin const string MaxQueueLength = "MaxQueueLength"; const string MaxConsumers = "MaxConsumers"; const string MaxSuppliers = "MaxSuppliers"; const string RejectNewEvents = "RejectNewEvents"; }; Notification Service

  18. AdminPropertiesAdmin module CosNotification { interface AdminPropertiesAdmin { AdminProperties get_admin(); void set_admin (in AdminProperties admin) raises ( UnsupportedAdmin ); }; }; // CosNotification Notification Service

  19. Notification Interface module CosNotifyComm { exception InvalidEventType { CosNotification::EventType type; }; interface NotifyPublish { void offer_change ( in CosNotification::EventTypeSeq added, in CosNotification::EventTypeSeq removed ) raises ( InvalidEventType ); }; // NotifyPublish interface NotifySubscribe { void subscription_change( in CosNotification::EventTypeSeq added, in CosNotification::EventTypeSeq removed ) raises ( InvalidEventType ); }; // NotifySubscribe }; Notification Service

  20. Consumer and Supplier module CosNotifyComm { interface PushConsumer : NotifyPublish, CosEventComm::PushConsumer { }; // PushConsumer interface PullConsumer : NotifyPublish, CosEventComm::PullConsumer { }; // PullConsumer interface PullSupplier : NotifySubscribe, CosEventComm::PullSupplier { }; // PullSupplier interface PushSupplier : NotifySubscribe, CosEventComm::PushSupplier { }; }; Notification Service

  21. Structured Consumer module CosNotifyComm { interface StructuredPushConsumer : NotifyPublish { void push_structured_event( in CosNotification::StructuredEvent notification) raises(CosEventComm::Disconnected); void disconnect_structured_push_consumer(); }; // StructuredPushConsumer interface StructuredPullConsumer : NotifyPublish { void disconnect_structured_pull_consumer(); }; // StructuredPullConsumer }; Notification Service

  22. Structured Supplier module CosNotifyComm { interface StructuredPullSupplier : NotifySubscribe { CosNotification::StructuredEvent pull_structured_event() raises(CosEventComm::Disconnected); CosNotification::StructuredEvent try_pull_structured_event( out boolean has_event) raises(CosEventComm::Disconnected); void disconnect_structured_pull_supplier(); }; // StructuredPullSupplier interface StructuredPushSupplier : NotifySubscribe { void disconnect_structured_push_supplier(); }; // StructuredPushSupplier }; Notification Service

  23. Sequence Consumer module CosNotifyComm { interface SequencePushConsumer : NotifyPublish { void push_structured_events( in CosNotification::EventBatch notifications) raises(CosEventComm::Disconnected); void disconnect_sequence_push_consumer(); }; // SequencePushConsumer interface SequencePullConsumer : NotifyPublish { void disconnect_sequence_pull_consumer(); }; // SequencePullConsumer }; Notification Service

  24. Sequence Supplier module CosNotifyComm { interface SequencePullSupplier : NotifySubscribe { CosNotification::EventBatch pull_structured_events( in long max_number ) raises(CosEventComm::Disconnected); CosNotification::EventBatch try_pull_structured_events( in long max_number, out boolean has_event) raises(CosEventComm::Disconnected); void disconnect_sequence_pull_supplier(); }; // SequencePullSupplier interface SequencePushSupplier : NotifySubscribe { void disconnect_sequence_push_supplier(); }; // SequencePushSupplier }; Notification Service

More Related