






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







2
3
An Introduction to IBM’s, Microsoft’s and Oracle’s solutions to a growing demand for interconnecting information providers and subscribers in a distributed system
10-05-
Producers publish messages with a pre- defined subject or group. e.g., cs department activity announcements System delivers messages to all consumers subscribing to pre-defined subject, or group members Easily implemented via tables which match subject categories to consumers, but… Not very flexible and each subscriber must do its own filtering
Messages are routed on basis of content , not category. e.g., activity announcements where activity.date < today+7 and location = ‘LSRC’ A different kind of paradigm, each subscription is equivalent to a predicate which tests an event’s attributes. Much more flexible than group-based pub/sub, but scalability and reliability become much more difficult
Exactly Once Delivery (cont’d)
Exactly-Once: Terminology
Terminology
Knowledge Graph inside SHB
SHB = S ubscriber H osting B roker Event Retention/Release Protocol:
Outline
Oracle Publish / Subscribe
Expressions
Examples of Expressions
Model, Price, Mileage, Year and Color are all columns in a Car Table EX1: Model = ‘Taurus’ and Price < 15000 and Mileage < 2500 EX2: Model = ‘Mustang’ and Year > 1999 and Price < 20000 Ex3: Price < 15000 and Color = ‘Red’
Can also include functions Horsepower(Model, Year) gives the horsepower for a car with the given model and year EX4: Horsepower(Model, Year) > 200 and Price < 25000
How to Set Up Expressions
Index Processing
Using Expressions for Publish / Subscribe
Publishing
We can use Triggers that will check every time new data comes in if it meets a user’s interest. We can then notify such users or publish the information to them. EX: CREATE TRIGGER activechk AFTER insert OR update ON Car FOR EACH ROW DECLARE cursor c1 (ditem VARCHAR2) is SELECT c.cid, FROM Consumer c WHERE EVALUATE (c.Interest, ditem) = 1; ditem VARCHAR2(200); BEGIN ditem := Car.getVarchar ( :new.Model, :new.Year :new.Price, :new.Mileage); for cur in c1(ditem) loop notify(CID); // notify users end loop; END
Summary
Microsoft Notification Services
Who Can Use Microsoft Notification Services?
Consumer Applications: stock info, financial institution send account balances and overdraft notifications, airline flight arrivals
Operational Applications: Machine is down, manager notified
Business Intelligence: inventory low, send more
Employee Communication: when files updated, when new reports are available
Developers build an Application Definition File that contains central logic for sending notifications
Integrated with Visual Studio .NET – don’t need to learn new tools
Although the tools are familiar, you will see the Application Developer bears a great burden for making MSNS powerful
In this file the developer defines:
All Events and Event Providers your application deals with must be specified
All of the rules that a subscription can follow: Can a User compare new events with past notifications? Can you show the highest stock price of the past day?
MSNS is very powerful but is heavily dependent on the developer
Collecting Events:
Events Chronicle (EC) ArticleId Headline
Events ArticleId 123 152
EventId Headline Microsoft SQL Server Notification Services passes the $500M mark in Q3 sales 124 76 Microsoft Xbox Live network to open in Europe on March ‘ 125 598 Microsoft SQL Notification Services adopted by AOL internal groups.
Events History ArticleId Headline
Events Chronicle Rule
Events History (EH) ArticleId 152
Headline Microsoft SQL Server Notification Services passes the $500M mark in Q3 sales 76 Microsoft Xbox Live network to open in Europe on March ‘ 598 Microsoft SQL Notification Services adopted by AOL internal groups.
GR: updates the EH with new events
152 Microsoft SQL Server Notification Services passes the $500M mark in Q3 sales 76 Microsoft Xbox Live network to open in Europe on March ‘ 598 Microsoft SQL Notification Services adopted by AOL internal groups.
First pass: events arrive in the system
ECR: adds new articles to EC
Events History (EH) ArticleId 152
Headline Microsoft SQL Server Notification Services passes the $500M mark in Q3 sales 76 Microsoft Xbox Live network to open in Europe on March ‘ 598 Microsoft SQL Notification Services adopted by AOL internal groups.
Events
ArticleID: Headline: (^152) Microsoft SQL Server Notification Services passes the $500M mark in Q3 sales ArticleID: Headline: (^65) Windows .NET Server and Yukon Beta1 get top spot on TPC benchmark ArticleID: Headline: (^178) Microsoft announces add-on pack for Microsoft SQL Server Notification Services
Events Chronicle Rule
Events History (EH) ArticleId 152
Headline Microsoft SQL Server Notification Services passes the $500M mark in Q3 sales 76 Microsoft Xbox Live network to open in Europe on March ‘ 598 Microsoft SQL Notification Services adopted by AOL internal groups. 65 Windows .NET Server and Yukon Beta1 get top spot on TPC benchmark 178 Microsoft announces add-on pack for Microsoft SQL Server Notification Services
ECR adds new articles to EC
GR: updates the EH with new events
Second pass: new batch with duplicate article
65 Windows .NET Server and Yukon Beta1 get top spot on TPC benchmark 178 Microsoft announces add-on pack for Microsoft SQL Server Notification Services
152 Microsoft SQL Server Notification Services passes the $500M mark in Q3 sales
Events Chronicle (EC) ArticleId Headline 76 Microsoft Xbox Live network to open in Europe on March ‘ 598 Microsoft SQL Notification Services adopted by AOL internal groups.
EC Table
Implementing History
Example: Notify me only if the stock value is higher than the last time I was notified (for that stock) Example: ExpirationDate per subscription
Example: recent alerts
Example: Send an SMS if number of allowed SMS has not been exceeded
Dealing with ANDs and Ors : The User could specify tons of predicates “Alert me with This AND That AND Those OR the Other Thing”
You want to handle an arbitrary number of predicates and use the power of set oriented operations (this is what SQL does)
So you break down each predicate into its own subscription row
HUGE Optimization and flexibility by having each subscription take up many rows in the subscriptions table
Events Param 246 Sugar
LabOrderID
246 Cholesterol
Value
Low 0 0
High 50 25 246 Iron 55 0 50
PredicateCount = 3
Predicates
Alert me if Sugar level is out of range AND Cholesterol level is out of range AND Iron level is out of range AND ...
Predicate 1 Predicate 2 Predicate 3
Subscriptions
LabOrderId
246
SubscriberId
patricet
Param
Sugar patricet 246 Cholesterol patricet 246 Iron
Predicate Count 3 3 3
Sugar, Cholesterol and Iron are out of range!
Out of Range?
PredicateCountMatch = 3
Microsoft has provided numerous features and the ability to create notifications on extremely complex criteria.
MSNS is very scalable but they do not provide much for notification delivery.
MSNS puts power with the developer. The Application Developer must develop all the matching rules, history rules, even provider logic, data organization, and notification formatting.
Requires application developer skilled with all aspects of process: XML, SQL, Microsoft Visual Studio .NET, XSLT and preferably delivery methods.