Author |
Topic |
X002548
Not Just a Number
15586 Posts |
Posted - 2012-03-01 : 14:30:15
|
"I know NOTHING" -- SchulzieAbout the application.I do know that someone opens a session and logs in to the application, it stays openWhen they open up a session they call a sproc to see if they have a message in a sql server tableWhether the do or don't, I log the callAfter every 3 minutes..whether there is activity or not, the session calls the sproc to look for a messageNow I think that is a bad designI got about 500 Users right now, making about 30,000 calls a dayIF they open the flood gates and roll it out to lets say 50,000 users, that will be 3 million calls a day for that 1 sprocTHAT'S JUST ONE FREAKING SPROCHow would you architect that? Can the application server poll to see who has messages and update the session for those that ONLY have a message?It's like they built this backwardBrett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxWant to help yourself?http://msdn.microsoft.com/en-us/library/ms130214.aspxhttp://weblogs.sqlteam.com/brettk/http://brettkaiser.blogspot.com/ |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2012-03-01 : 15:57:36
|
3 million isn't so many that I'd worry about it unless it does a lot of reads. So the proc is something like this right?SELECT messageIdFROM messageQueueWHERE userId = @userId probably does less than 10 reads. This is how outlook talks to exchange, and how lots of other messaging applications work. You can use a message queueing system, but it just shifts the load, doesn't reduce it. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
X002548
Not Just a Number
15586 Posts |
|
X002548
Not Just a Number
15586 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
X002548
Not Just a Number
15586 Posts |
|
russell
Pyro-ma-ni-yak
5072 Posts |
|
TimSman
Posting Yak Master
127 Posts |
Posted - 2012-03-07 : 15:22:59
|
What kind of application is this? |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2012-03-07 : 15:34:30
|
It's part of IBM Connections. They Poll a database that is setup to store messages sent to users. The session looks to see if the user that's logged in has an messages in the User_Message Table..every 3 minutes.I would have though that they could have done server side processing to check for all messages and update ONLY the sessions that have messages. As it stands, every users session calls the Database Sproc. so it could be 60,000 calss every 3 minutes.As compared to a server side call to the database, once every 3 minutes, and then update the sessions.I wonder if there is anyway from the database side to "talk" out to the sessions..not my gig..I have no ideaBrett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxWant to help yourself?http://msdn.microsoft.com/en-us/library/ms130214.aspxhttp://weblogs.sqlteam.com/brettk/http://brettkaiser.blogspot.com/ |
|
|
X002548
Not Just a Number
15586 Posts |
|
|