Notification Service 1  Outline  Notification Service  Event Service vs Notification Service  Example

  • View
    212

  • Download
    0

Embed Size (px)

Transcript

  • Slide 1
  • Notification Service 1 Outline Notification Service Event Service vs Notification Service Example
  • Slide 2
  • 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 doesnt 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
  • Slide 3
  • Notification Service 3 Notification Service Architecture Text book: figure 11.7
  • Slide 4
  • 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
  • Slide 5
  • Notification Service 5 Structured Event domain_name type_name event_name namevalue namevalue namevalue namevalue namevalue remainder_of_body Event Header Event Body Fixed Header Variable Header Filterable Body Fields Remaining Body
  • Slide 6
  • 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
  • Slide 7
  • 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)
  • Slide 8
  • 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
  • Slide 9
  • 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
  • Slide 10
  • 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
  • Slide 11
  • 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
  • Slide 12
  • 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
  • Slide 13
  • 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
  • Slide 14
  • 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
  • Slide 15
  • Notification Service 15 CosNotification module CosNotification { typedef string Istring; typedef Istring PropertyName; typedef any PropertyValue; struct Property { PropertyName name; PropertyValue value; }; typedef sequence PropertySeq; typedef PropertySeq OptionalHeaderFields; typedef PropertySeq FilterableEventBody; typedef PropertySeq QoSProperties; typedef PropertySeq AdminProperties; struct EventType{ string domain_name; string type_name; }; typedef sequence EventTypeSeq; };
  • Slide 16
  • 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 EventBatch; };
  • Slide 17
  • 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"; };
  • Slide 18
  • Notification Service 18 AdminPropertiesAdmin module CosNotification { interface AdminPropertiesAdmin { AdminProperties get_admin(); void set_admin (in AdminProperties admin) raises ( UnsupportedAdmin ); }; }; // CosNotification
  • Slide 19
  • 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 };
  • Slide 20
  • 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 i