Hey All,

I am creating a feed for work, similar to facebooks, that hits the database every 5 seconds to see if an update is made and if so returns the results to the feed. The problem I have is that we have over 35,000 users and if they each had the feed running that would mean a huge amount of overhead for our servers running our production databases.
Since 99% of the calls to check for updates will likely not return any data, I would like to implement another dedicated 'server like' object for handling these kinds of requests that will only then go on to hit our main database if an update has been made and data needs to be retrieved.

Current setup:
(every 5 seconds)
Client -------(Is there an update? )------> Production DB -------(Yes - return record / No - return nothing)------> Client

What I would like:
(every 2 seconds)
Client ----(Is there an update? )----> dedicated 'server like' object ----->
IF YES ---> Production DB -------(return record)------> Client
IF NO --- (return nothing)------> Client

In short; I would only like to query our main production database if an update is available. A trigger will be in place to let the dedicated 'server like' object know that it can now query the production database for records.

Besides creating another database server dedicated to handling these kinds of requests, does anyone know of any other technologies that can be used to create the effect that I am looking for?
An example: I guess like creating a FeedUpdate.txt file on our webserver that can be updated with a WaitingForUpdate = True by our production database if new feed item is available and then some javascript will execute a stored procedure on the production database to retreive the record and change the WaitingForUpdate = False.

I am not an expert (as you can probably gather) so I apologise if I have not been clear enough or if I am not using the correct lingo.

Thanks for any feedback

Hi there,

I'd use a webservice to handle that logic if possible. The web service can poll every 5 seconds and cache the results to answer the client requests. Is this possible in your situation?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.