Refreshing demo website data for different timezone? - database

I have a demo site which is open for public access to login, view, and try out our website.
The data is editable for public so I am refreshing the database of this demo site every midnight local time. Refreshing here means dropping the entire database and then re-importing a template database. The database I'm running is MySQL 5.7.
The problem is that there is a 3-5 minutes downtime when my script is refreshing the database.
This is not an issue for the clients on my timezone as it's midnight here but on the other side of the world, customers are complaining as they think that the demo site is down for some reason.
How do you approach this issue? I believe a lot of sites provide demo sites and they should refresh their data on a constant basis too (daily in my case).
Thank you!

Related

How to add a banner with a message to Report Server Web Portal?

I have an SSRS Report Server web portal running which houses a few hundred reports, my users rely on this data being up to date to do their jobs.
Occasionally my overnight update process will fail, and reports will be updated during the working day, which takes a few hours.
During this time, I want to display a banner on the report server web portal, something like “all reports are being updated, ETA 3pm”.
Is there any way for me to modify the report server html to do that? It doesn’t have to look pretty, I just want to try and avoid all my users calling at once when their reports haven’t updated.
A nice simple way would be to just change the site name at the start and end of your job that refreshes the report data.
Use something like
UPDATE ReportServer.dbo.ConfigurationInfo
SET Value = 'My Company - REFRESH IN PROGRESS ETA 3PM'
WHERE [Name] = 'SiteName'
and then update again at the end of the job.
As this is simple to automate you could leave it in place in the refresh job.

Will the Database hustles if I update a field every 5 seconds?

I am developing a web app which needs to check the internet if got connection or not.
If got connection, it will update a field in the db every 5 seconds.
Basically, it's a chat-like web app wherein it will update a field for datetime last seen online.
So that it will show on the other users who is currently online/logged in.
I will implement the snipplet in all the pages so that it will update the DB while you navigating the pages.
Cheers!
No self respecting database should have an issue with that.

Update Whole Table every 5 minutes

We currently develop a portal in asp.net mvc2 with fluent nhibernate on amazon cloud servers which have lots of user which buying or selling shares. Also they comment every where and make other activities.
Portal is actually behave like multiple portals which we called Community. Our basic statistics based on users activity (buy,sell, comment etc). We have a basic structure called TopUsers. Which we show top user home page for all topics for loggedin community. On topic page we show top users for current topic etc.
Because of a lot of calculation I want to make a top users table. I am waiting for recommentations for this?
Your approach (separate table that gets periodically repopulated) is correct, except for the interval: your users will not be fanatically clicking on your site every minute to see updated stats, so after a certain threshold of data there isn't much point in refreshing your top users this often. Doing it once per day will usually be good enough.

MVC Logon just refreshes page - doesn't log on

Hi
I have 2 MVC sites on a shared hosting environment. The first one works fine and I can log on and use the membership provider etc.. no problems. A second site can see the database and retrieve other (site specific) data on its pages. However when I try to log in I simply get a page refresh - no error messages with invalid UC/PW, and no succesful log on with good credentials, for example.
One further piece of info (may be a red herring) is that the first domain has the database declared within its control panel (using Plesk) - but the second one has no reference to it within the domain - however the hosting company have assured me that simply using the same connection string will work. And it does to retreive the site-specific data.
cheers
tm, Leeds UK
For anyones interest . .
It seems that because the site was still in preview, forms don't work until you actually put live.
Hosting is with Storm Internet

Pulling facebook and twitter status updates into a SQL database via Coldfusion Page

I'd like to set up a coldfusion page that will pull the status updates from my own facebook account and twitter accounts and put them in a SQL database along with their timestamps. Whenever I run this page it should only grab information after the most recent time stamp it already has within the database.
I'm hoping this won't be too bad because all I'm interested in is just status updates and their time stamps. Eventually I'd like to pull other things like images and such, but for a first test just status updates is fine. Does anyone have sample code and/or pointers that could assist me in this endeavor?
I'd like it if any information relates to the current version of the apis (twitter with oAuth and facebook open graph) if they are necessary. Some solutions I've seen involve the creation of a twitter application and facebook application to interact with the APIs; is that necessary if all I want to do is access a subset of my own account information? Thanks in advance!
I would read the max(insertDate) from the database and if the API allows you, only request updates since that date. Then insert those updates. The next time you run you'll just need to get the max() of the last bunch of updates before calling for the next bunch.
You could run it every 5 minutes using a ColdFusion scheduled task.
How you communicate with the API is usually using <cfhttp />. One thing I always do is log every request and response, either in a text file, or in a database. That's can be invaluable when troubleshooting.
Hope that helps.
Use the cffeed tag to pull RSS feeds from Twitter and Facebook. Retain the date of the last feed scan somewhere (application variable or database) and loop over the feed entries. Any entry older than last scan is ignored, everything else gets committed. Make sure to wrap cffeed in a try/catch, as it will throw errors if the service is down (ahem, twitter) As mentioned in other answers, set it up as a scheduled task.
<cffeed action="read" properties="feedMetadata" query="feedQuery"
source="http://search.twitter.com/search.atom?q=+from:mytwitteraccount" />
Different approach than what you're suggesting, but it worked for us. We had two live events, where we asked people to post to a bespoke Facebook fan page, or to Twitter with a hashtag we endorsed for the event in realtime. Then we just fetched and parsed the RSS feeds of the FB page, and the Twitter search results, extracting what was new, on a short interval... I think it was approximately every three minutes. CFFEED was a little error-prone and wonky, just doing a CFHTTP get of the RSS feeds, and then processing the CFHTTP.filecontent struct item as XML worked fine
.LAG

Resources