all groups > sql server notification services > march 2007 >
You're in the

sql server notification services

group:

NS adding its own subscribers?



NS adding its own subscribers? Andy
3/26/2007 10:32:54 AM
sql server notification services: Hi,

My database has a flag that indicates if our customers would like to
receive notifications. Currently, our sales staff manages
subscriptions on behalf of our customers. The settings for all
customers is the same, so its only a matter of enabling or disabling a
subscription (or creating if it doesn't exist).

Currently, my application uses the NS API to update subscriber and
subscription information behind the scenes. The problem is that I
must deploy the NS client API to all users of my application and
register the instance on each workstation.

I was thinking that I could use NS to automatically update these
settings, maybe once a day by tracking the flag as it changes.

My question is, would this be a viable way to go, or am I twisting the
purpose of NS too much?

Thanks
Andy
Re: NS adding its own subscribers? Andy
3/26/2007 10:35:41 AM
[quoted text, click to view]

I should also add that I will need NS to send an email regarding
changes as well to another employee here.
Re: NS adding its own subscribers? Joe Webb
3/27/2007 6:17:44 AM
[quoted text, click to view]

Hi Andy -

You could create a web service wrapper for the NS API. Have the web
service run on the server that NS runs on. The clients could employ the
web service to manage the subscriptions. So, you wouldn't need to install
the NS client API on each workstation.

You could probably also create the web service so that it also manages the
other settings you've mentioned.

HTH...

Joe


--
Joe Webb
SQL Server MVP
http://www.sqlns.com



Re: NS adding its own subscribers? Andy
3/27/2007 12:32:37 PM
[quoted text, click to view]

Hey Joe,

Thanks, I actually thought of that, but I was hoping to devise another
way so that the client doesn't need to do anything other than update
the data. Part of my reason for doing this is to make the save on the
client quicker; the NS API is currently slowing things down because
its promoting my transaction to DTC. A web service may be quicker,
but there's a chance that the update call will fail for some reason
(we sometimes have network hiccups). If that happens, the save will
succeed, but the subscription won't be added.

My other reason is that I currently have two different places in the
application where I need to add a subscriber. Moving forward, there
may be more. While I've re-factored the code, I still have to
remember to include the call (which I almost forgot, actually).

Andy
AddThis Social Bookmark Button