sql server notification services:
As happy as I am with notificaiton services, one of the big lacks I've
found is in the tools available to integrate it with existing
applications. Specifically, the XML and dynamic table approach is
great for creating applications, subscriptions, and events... but
there's no real way to manage those in an application-centric way once
the whole show is on the road.
To use a specific example, I'm working on a notification app for a
classic ASP based forum that's derived from the popular Snitz forum
package. So it's natural to have a "new post" event with the fields
"Forum_ID" and "Topic_ID", among others. Users who've subscribed to
notifications for new posts in a particular forum get matched with a
rule that checks Forum_ID against their subscription parameter.
So far, so good. That works beautifully. Now, what happens if we
delete a forum? Certainly all subscriptions that reference the forum
should go, too. So far, I haven't found a way to do that cleanly
through the NS interface other than literally iterating through every
subscription in the entire application looking for
GetFieldValue("Forum_ID").
In my application, that's brutal. First, there will be tens to
hundreds of thousands of subscriptions, so it's like a table scan, but
worse since it's done in the app. Worse, that process needs to be
done synchronously in the app with the delete, so the app's going to
sit there and be unresponsive for a while.
Now, I can cheat and access the tables directly and do the job more or
less instantly (since I defined an index on the Forum_ID column of the
subscription class) by just doing a "delete from
InstanceApp.dbo.NSSubClassSubscriptions where forum_id=XX" -- it's a
lot less code for me to write, and the performance will be
dramatically better. Of course, it's breaking the rules.
Anyways, I'd love to hear if I'm missing something here (the classic
two-line response to an 80 line message). If I'm not missing
something, I'd just like for the issue to be noted, and more utility
SP's provided in future versions that allow for more flexible
management and application integration.
Cheers