1.12k likes | 1.31k Views
Event-based Notification VL Web-basierte Informationssysteme. Annika Hinze Freie Universität Berlin hinze@inf.fu-berlin.de. Event Notification Service Motivation. you heard about: Information Retrieval : retrieval of text, images
E N D
Event-based NotificationVL Web-basierte Informationssysteme Annika Hinze Freie Universität Berlin hinze@inf.fu-berlin.de
Event Notification Service Motivation • you heard about: • Information Retrieval : retrieval of text, images • semistructured data (XML): retrieval, storage • Databases: SQL querying • considered Web-Actions: • storage and display of documents • search for documents
Event Notification Service Motivation • Scenarios: • Search for certain MP3 file -> not found -> repeat search • expect new book of author ‘King’-> search at Amazon -> not published yet -> repeat search • do we need to order items for the warehouse ? -> query stock-DB (#items in warehouse?) -> Order if #items <=100
New book ? Application ! Source Query Client Response Event Notification Service Motivation • Example: Amazon Webinterface DB DBMS • Drawback: • repeated search necessary • delivery of old and new content
new book Application Amazon Webinterface New Book! DB DBMS Event Notification Service Motivation • Idea: Event-Paradigm • Actions/Messages triggered by events • well-known from NSP (synch. of concurrent systems) • new for Web-based systems • Event examples: Message arrives, DB-state changed, new MP3-File available, new book published, 101st item sold, certain point in time, ....
Event Notification Service Client ENS Source Profile Query Response Response Event Notification Service Motivation • Event Notification Service • Examples: • E-Commerce, Stock ticker, News on Demand, • Data Update (z.B.web pages) • Digital Libraries (z.B. Springer Link Alert, Hermes-Project) • Remote Monitoring (Traffic, Buildings , Environment) • Replication • Communication in widely distributed systems, .....
Source Profile Query Response Response Source Source Source Client Client Client Client Client Client ENS ENS Profile Query Response Response Event Notification Service Introduction • Various Architectures (1): • solitary Service/Source z.B. Springer Link Alert Problems: different Interfaces different Languages no result merging • mediating Service e.g. Hermes-Service
Profile Response Source ENS Source Profile Source Client Client Client Client Client ENS ENS ENS Source Query Query Response Response Response Source Source Source Profile Profile Profile Profile Query Source Source Response Response Response Response Response Source Query Response Event Notification Service Introduction • Various Architectures(2): • Distributed Service z.B. Siena [car98] • Hierarchy/Network of Services z.B. Talarian Smartsockets [tal]
Notify me immediately if the temperature is more than 30°C and humidity less than 40% in house A at the same time. Attribute-Value-Pairs, Boolean Operators Tell me every Monday if there is a new article from colleague ABC and send me all new articles about my research topic Content-based search in documents similar to known IR methods Notify me immediately if the XYZ-shares are dropped by more then 20% or they did not change for 20 days after beginning of May. Consideration of external and/or historical information Profile Definition Language How to define a profile ? More parameters ... • Base: Profile Definition Language
Tell me every Monday if there is a new article from colleague ABC and send me all new articles about my research topic Notify me immediately if the temperature is more than 30°C and humidity less than 40% in house A at the same time. Notify me immediately if the XYZ-shares are dropped by more then 20% or they did not change for 20 days after beginning of May. Profile Definition Language What happened ? • Object Event Types: new Object changed Object deleted Object unchanged Object • Object Description before/after Event • Event Description
Event * 1 Time E. Object E. Event Pattern active passive Profile Definition Language Event Types • Active object event state change of object or repository, observer independent • Passive object event no state change for certain period of time, have to be observed • Time event clock times, dates, time interval • Event pattern (composite events) timely combinations of simple events
Profile Definition Language Object/Event Description Identification of Objects: • Strongly depends on application domain! • Similar to Query Languages • Examples: • Specification of name/value pairs and operators • Specification of object identifier • Specification of subject / Channel (hierarchy) • Giving similar objects, similar events • Information Retrieval Queries select greenhouse where temperature > 30 and humidity < 40 Subscribe to stock-channel
Tell me every Monday if there is a new article from colleague ABC and send me all new articles about my research topic Notify me immediately if the temperature is more than 30°C and humidity less than 40% in house A at the same time. Notify me immediately if the XYZ-shares are dropped by more then 20% or they did not change for 20 days after beginning of May. Profile Definition Language When did it happen ? • (implicitly) after the last notification • Before/after/at a certain date • Before/after/at the occurrence of another event
Tell me every Monday if there is a new article from colleague ABC and send me all new articles about my research topic Notify me immediately if the temperature is more than 30°C and humidity less than 40% in house A at the same time. Notify me immediately if the XYZ-shares are dropped by more then 20% or they did not change for 20 days after beginning of May. Profile Definition Language Where did it happen ? • Location of object • Origin of the message • Supplier
Tell me every Monday if there is a new article from colleague ABC and send me all new articles about my research topic Notify me immediately if the temperature is more than 30°C and humidity less than 40% in house A at the same time. Notify me immediately if the XYZ-shares are dropped by more then 20% or they did not change for 20 days after beginning of May. Profile Definition Language When to tell ? • At a certain time/time period • After n events • After/ at occurrence of another event
Tell me every Monday if there is a new article from colleague ABC and send me all new articles about my research topic Notify me immediately if the temperature is more than 30°C and humidity less than 40% in house A at the same time. Notify me immediately if the XYZ-shares are dropped by more then 20% or they did not change for 20 days after beginning of May. Profile Definition Language How to tell ? • Send message • Send object • Protocol/Format
Observation Specification Time/Schedule Observer Selection Additional Parameter, e.g time system accuracy, tolerances Profile Definition Language Components • Overview of Language Components: • not all Components supported by all ENS • Event Specification • Event/Object Description • Source Selection • Time Constrains • Notification Specification • Time/Schedule • Content • Format • Protocol
Profile Definition Language Example: Continual Queries <CQ> ::= <Query> <TriggerCond> <StopCond> <Query> ::= SELECT <SelectList> FROM <ObjectList> [WHERE <SearchCondition>] [GROUP BY <AttributeList>] [ORDER BY <SortSpecList>] <TriggerCond> ::= <TimeTriCond> | <ContentTriCond> <StopCond> ::= <Month> '-' <Day> '-' <Year> • Event Specification: • Based on object model • Attribute/value pairs • Active object events, time events, event patterns • Very complex profiles possible • Notification Spec.: • At n events • At certain time/period • At/after another event
Profile Definition Language Beispiel: Continual Queries • Example 1 (Time-based trigger): Notify if weather conditions change between Savannah(Georgia) and Ford Stewart Create CQ Savanna_wheather_watch as Query: SELECT * FROM www.wns.nova.gov WHERE location like%‘Savannah’ OR location like% ‘Fort Stewart’ ; Trigger: 20 minutes, Stop: 1 year (default). • Continual Query: Notification-Parameter not given here, partly implicit (z.B. Author of profile = Recipient of Message)
Profile Definition Language Beispiel: Continual Queries • Example 2 (Content Trigger): Notify, if number of items in warehouse minus number of ordered items falls below a given threshold Create CQ Inventory_monitoring as Query: SELECT item, num_stock, num_orders, threshold FROM item_inventory Trigger: num_stock + num_orders < threshold Stop: 6 month. • Continual Query:
Profile Definition Language Beispiel: Continual Queries • Example 3 (Content Trigger different sources): Observe weather conditions between Savannah(Georgia) and Ford Stewart and send alternative route plans if the weather changes. Create CQ Transportation Re-Planing as Query: SELECT plan_id, plan_desc, plan_alt_routes FROM Transportation_plan WHERE plan_route like ‘Savannah to Ford Stewart’ Trigger: FROM www.wns.nova.grg WHERE location like%‘Savannah’ OR location like% ‘Fort Stewart’ ; Stop: next 3 month. • Continual Query:
Event Notification Services • Application Domains of ENS • Architectures • Profile components • Interactions and Components of ENS • Application-dependent Requirements • Base technologies for Implementation
Source Profile Query Response Response Interactions: Passive Supplier Observe Filter Queue Transform Subscribe Interested Party Object of Interest Anything new? Notify Client ENS Unsubscribe Active Supplier Object of Interest Advertise Publish Unadvertise Roles: Supplier Broker Consumer/Client Event Notification Service Interactions
Event Notification Service Components ENS Supplier Consumer Repository Profile
Repository Profile Event Notification Service Components ENS Supplier Consumer Invoker Observer Repository Repository Information Object Event Message
Repository Repository Repository Profile Event Message Information Object Event Notification Service Components ENS Supplier Consumer Invoker Observer Filter
Repository Repository Repository Repository Profile Event Message Notification Information Object Event Notification Service Components ENS Supplier Consumer Invoker Observer Filter Notifier
Alerting Service Supplier Invoker Observer Filter Notifier Repository Repository Repository Repository Profile Event Message Notification Information Object Event Notification Service Components: Example Example: Continual Queries System [liu96]
Alerting Service Supplier Invoker Observer Filter Notifier Repository Repository Repository Repository Notification Profile Event Message Information Object Event Notification Service Components: Example Example: Continual Queries System [liu96] Profildefinition und Speicherung Observer Filter Notifier
Alerting Service Supplier Invoker Observer Filter Notifier Repository Repository Repository Repository Notification Profile Event Message Information Object Event Notification Service Components: Example Example: Continual Queries System [liu96] Profildefinition und Speicherung Observer Filter Notifier
Alerting Service Supplier Invoker Observer Filter Notifier Repository Repository Repository Repository Notification Profile Event Message Information Object Event Notification Service Components: Example Example: Continual Queries System [liu96] Profildefinition und Speicherung Observer Filter Notifier
Alerting Service Supplier Invoker Observer Filter Notifier Repository Repository Repository Repository Notification Profile Event Message Information Object Event Notification Service Components: Example Example: Continual Queries System [liu96] Profildefinition und Speicherung Observer Filter Notifier
Event Notification Service Requirements Different applications have different Requirements • Scalability regarding: • #Objects • #Events • Notification frequency and size: • Cardinality - 20,000 messages / second in stock market - a few per minute in a digital library context - many-to-one for remote monitoring and control - one-to-many for software update - many-to-many for digital library
Event Notification Service Requirements • Reliability of Connections • Guaranteed delivery • important for offline-Clients • Expressiveness of Filter Language • which events are supported, which language • .... - notification storage for digital library clients - weather channel broadcasts information - nested, semistructured objects - time-events - composite events - articles according to subject (e.g. data bases) - similar article - shares with value > 1000$ (content-based) - shares with value change > +10%
Event Notification Service Systems How to implement an ENS? Commercial system: Pointcast, EntryPoint, TIB/Rendezvous, ... Research Systems: Elvin[seg97], Siena[car98], OpenCQ[liu96], NiagaraCQ[che00], Gryphon[ban99], LeSubscribe[.], ... Problems....
Filter Notifier Repository Event Message Repository Repository Profile Notification Event Notification Service Systems • Often without active observation: • EntryPoint • Smartsockets • Rendezvous • Elvin • Exceptions: • OpenCQ • Hermes Only restricted usability for passive suppliers, that do not trigger the ENS Alerting Service Message
Filter Notifier Repository Event Message Repository Repository Profile Notification Event Notification Service Systems • Often only routing: Notification is copy of supplier-message • no persistent messages, best effort delivery Not appropriate for unreliable connections or offline clients Alerting Service Message
Event Notification Service Base Technologies How to implement an ENS?(2) ...or Implementation based on • Channel technology • Message-oriented Middleware: • Java Message Service (JMS) • Corba Event Service / Notification Service • Message Queuing Systems • Active Databases • ....
Bibliography [ban99] Banavar, G, et. Al: “An efficient multicast-protocoll for content-based publish-subscribe systems”, Conference on Distributed Systems, Texas 1999 [car98] Carzaniga,A., “Architectures for an Event Notification Service Scalable to Wide-area Networks, Politecnico di Milano, 1998, Milano, Italy [che00] Chen, J. et al: “NiagaraCQ: A scalable ContinousQuery System for Internet Databases”, SIGMOD 2000, Dallas, Texas, May 2000 [liu99] Liu,L.; C.Pu, W.Tang, “Supporting Internet Applications Beyond Browsing: Trigger Processing and Change Notification”, 5th International Computer Science Conference, ICSC´99, Hong Kong, China, December 1999 [seg96] Bill Segall and David Arnold “Elvin has left the building: A publish/subscribe notification service with quenching” Proceedings AUUG97, Brisbane, Australia, September 1997. [tal] Talarian Smartsockets Information Site: http://www.talarian.com/multicast_transport_protocol.html
Event Notification Services • Application Domains of ENS • Architectures • Profile components • Interactions and Components of ENS • Application-dependent Requirements • Base technologies for Implementation • Channels: CDF • Message-Oriented Middleware: JAVA Message Service • Active Databases
Base Technologies Channel-Technology • Channel: • Supplier publishes subject-based content • Consumer subscribes to subject-channel • Delivery of new content to consumer • Standardization Proposals : • CDF by Microsoft • NetCaster by Netscape channel Consumer Supplier channel Consumer Supplier channel
Base Technologies Channel-Technology: CDF • Channel Definition Format (CDF) • Open industry standard for data definition of content to be pushed over the internet • Application of XML • 1997 proposed by Microsoft to W3C [ell97] • Supported by several systems such as Internet Explorer 4.0+ and BackWeb • Appearance: • As web-channel • As screen-safer • For mobile clients • For software-download
subscribe cdf Base Technologies Channel-Technology: CDF • Channel setup • Channel content defined in CDF-file • Supplier provide CDF file on the web • Consumer subscribe via client-software • Initial download of the CDF file Supplier Consumer
cdf Base Technologies Channel-Technology: CDF • Notification sequence • Smart-pull: according to schedule download of the CDF-file • Offline mode: additionally download all new content • Notification of the consumer (e.g. icon or mail) • Presentation of the news as e.g. screensaver Supplier Consumer
Base Technologies Channel-Technology: CDF • Properties: • Scheduling options • Log file option <?XML VERSION="1.0" ENCODING="UTF-8"?> <CHANNEL HREF="ChannelPage.html” BASE="http://..../channel/"> <TITLE>Your Channel</TITLE> <ABSTRACT>....</ABSTRACT> <LOGO HREF=”try.ico" STYLE="ICON"/> <SCHEDULE STARTDATE=”2000-01-01"> <INTERVALTIME DAY="7" /> <EARLIESTTIME HOUR="0" /> <LATESTTIME HOUR="12" /> </SCHEDULE> ...
Base Technologies Channel-Technology: CDF • Properties: • Channels can be hierarchically ordered • Offline/online mode and precaching, crawling options • Various usage modes ... <ITEM HREF="page1.html" PRECACHE="YES” LEVEL="0” > <TITLE>Page 1</TITLE> <ABSTRACT>...</ABSTRACT> <LOGO HREF="your.ico" STYLE="ICON"/> </ITEM> <ITEM HREF="page2.html" PRECACHE="YES” > <TITLE>Page 2</TITLE> <USAGE VALUE="ScreenSaver"></USAGE> </ITEM> </CHANNEL>
Alerting Service Supplier X Invoker Observer Filter Notifier Repository Repository Repository Repository Information Object Event Message Profile Notification X X X Base Technologies Channel-Technology: CDF • Valuation: • Very easy to implement • True personalization hard to realize • Smart-pull causes unnecessary network load • Old and new content • Notification only • Functionality for ENS • CDF file as “object repository” • Implements simple form of AS • Recommendable for LAN-wide communication e.g. news-server within a company
Base TechnologiesMessage-Oriented Middleware • Message-Oriented Middleware: • Peer-to-peer distributed computing • Anonymity of communicating objects • Asynchronous messaging for applications • Decoupling of applications • Infrastructure for • reliable • scalable • performance-oriented distributed application networks in heterogeneous environment
Base TechnologiesJMS: Introduction • JMS Java Message Service: • Message-Oriented Middleware • Asynchronous communication btw. Enterprise applications • API Specification / Set of Interfaces • Vendors implement JMS (e.g. in BEA Weblogic, Oracle AQ, MQSeries IBM) • Clients (Supplier, Consumer) + Provider
deliver queue Consumer publish Point-to-Point Publish/Subscribe Supplier Destination Queue Topic queue Consumer Durability/Persistence implicit concept DurableSubscription One Many Consumers per message Supplier queue FIFO/Browsable Topic Hierarchy topic Consumer publish Supplier topic topic Consumer topic Supplier topic Base TechnologiesJMS: Domain Models • 2 Domains: Point-to-Point Publish/Subscribe deliver