Log in

View Full Version : Major Upgrades Coming This Weekend


Jason Dunn
03-28-2003, 11:02 PM
Over the weekend, we're going to be implementing some major changes in the back-end systems on our site. Among other things like upgrading to the latest edition of phpBB (2.0.4), and doing private testing of the mobile forums and subscriber services, our lead developer Fabrizio has come up with a much-needed database caching system. You might not notice, but our Web site has service restarts at least once a day due to the server load. In short, we've maxed out our hardware and need to move to something better. Until that happens (and we have the funding to do so) we have to make the best of what we have now.<br /><br />Most of you probably don't realize this, but our front page is very dynamic, created from database content. Each story in the middle column represents one entry in the phpBB database, with the forum formatting stripped off. Our side columns are also database elements, as are all ads. This means that every time you visit the front page, there are around 30 database queries in addition to HTTP requests to download every image. The net result is heavy load on our server. The beauty of this new caching system is that instead of the middle column triggering 20+ database requests, it will only trigger one. This will result in a faster, more responsive server with far less load.<br /><br />Now here's the downside: in order to make it work, we had to eliminate the custom time zone setting. By Monday, when you check the site, the news will be stamped with the server time (MST) rather than your preferred time. There was no way to avoid this, so while I loathe ever taking away services from this site, the benefits far outweigh the costs. I think once you see this in action, you'll agree!<br /><br /><b>UPDATE:</b> I should point out that the time in the forums will still be based on your preferences. It's only the front page that will be locked into Mountain Time (+1 hour past Pacific Time).

pocketpcdude1024
03-28-2003, 11:26 PM
What time zone is MST? :?

Vincent M Ferrari
03-28-2003, 11:34 PM
Now here's the downside: in order to make it work, we had to eliminate the custom time zone setting. By Monday, when you check the site, the news will be stamped with the server time (MST) rather than your preferred time. There was no way to avoid this, so while I loathe ever taking away services from this site, the benefits far outweigh the costs. I think once you see this in action, you'll agree!

Okay, that's it. I'm so done with this site. Mountain Time?!? What the hell good is that! I want my money back!

Oh wait... I'm not paying for anything here...

OK, carry on! :D

Jason Dunn
03-28-2003, 11:38 PM
What time zone is MST? :?

Mountain Standard Time. It's +1 hour over Pacific Standard Time. Next time try :google: :lol:

bleeman
03-28-2003, 11:58 PM
Being a former Arizonan I have to throw this out. I just checked :google: and based on what I found I assume you'll be switching to Mountain Daylight Time on April 6th rather than remaining on Mountain Standard Time?

Duncan
03-29-2003, 12:03 AM
Mountain Standard Time. It's +1 hour over Pacific Standard Time.

Or double click the time on your PC's taskbar and select Time Zone!

MST is:

GMT - 7 hours
Atlantic - 3 hours
Eastern - 2
Central - 1
Pacific + 1

...and I can't be bothered to go the other direction...

revjon
03-29-2003, 12:06 AM
If localized time is a huge deal to everyone, it wouldn't be too terribly difficult to have the times dynamically written by JavaScript...

John

BugDude10
03-29-2003, 12:09 AM
MST sucks! EST rules!

I quit. I'm gone. I'm outta here. I'm in the archives. If your site can't tell me what time it is where I am, then what am I supposed to do -- get some kinda portable computer thingy with a clock or calculator in it?!?

:)

pocketpcdude1024
03-29-2003, 12:10 AM
What time zone is MST? :?

Mountain Standard Time. It's +1 hour over Pacific Standard Time. Next time try :google: :lol:

I could, or I could increase my post count by 2 while letting you guys deliven custom information pertaining to my query! :D

Jason Dunn
03-29-2003, 12:14 AM
Being a former Arizonan I have to throw this out. I just checked :google: and based on what I found I assume you'll be switching to Mountain Daylight Time on April 6th rather than remaining on Mountain Standard Time?

Yes, that's correct. There's "Pacific Time", "Mountain Time", "Eastern Time", etc. I guess I just made MST up. :lol:

Don Tolson
03-29-2003, 12:19 AM
I can't believe that this one item has generated so many replies...Thank goodness most of them are good-natured gests... They are, right???

How about moving to GMT or UCT instead??? :roll:

bleeman
03-29-2003, 12:46 AM
I was just in a goofy mood Don, being Friday afternoon and all, hence my post. :lol:

As for Mountain Standard Time Jason, no problem here. That's what we always referred to it by in Tucson. That's one of the things I miss about Arizona. I always liked the fact that we never switched as I've never been that enamored with Daylight Savings Time anyway. I'm not looking forward to the switch next week as I'm a night owl and now my poor old tired body will be screaming in protest that it has to wake up an hour earlier in the morning :cry:

griph
03-29-2003, 02:40 AM
How about moving to GMT or UCT instead??? :roll:
I'll second the GMT option - I mean atleast everyone knows what GMT is - thanks be that we don't have to worry about multiple time zones here! ;-)

bdegroodt
03-29-2003, 02:59 AM
How about moving to GMT or UCT instead??? :roll:

Hmmm...that's not a bad idea and is in line with the Thoughts post a few weeks ago about having so many members from outside the U.S.

-5:00 GMT :D

dean_shan
03-29-2003, 03:18 AM
MST sucks! EST rules

No, Alaska Standard Rules!

kettle
03-29-2003, 04:10 AM
I guess there's no possible way to get in as a tester for the mobile forum? :cry:

Paragon
03-29-2003, 05:27 AM
What if you are from Newfoundland? :)

Dave

/dev/niall
03-29-2003, 06:03 AM
If localized time is a huge deal to everyone, it wouldn't be too terribly difficult to have the times dynamically written by JavaScript...

John

I was going to suggest the same thing.

Untested code off the top of my head that should work with compliant browsers:

Stick all times in a &lt;span id="idTimeXX>[time]&lt;/span>. Increment the XX.

Add a global var to the page with the user's preferered time zone offset.

Call localizeTimes() in the page's onload() event.



// example for EST, offset X 60min X 60sec X 1000msec
var userOffset = -2 * 60 * 60 * 1000;

function localizeTimes() {

timeElements = document.getElementByTagName("SPAN");

for (var n=0; n &lt; timeElements.length; n++ ) {

var sysTimeStr = new String(timeElements[n].innerHTML);

var sysTimeSplit = sysTimeStr.split(":");

var sysHour = new Number(sysTimeSplit[0]);
var tempArr = new String(sysTimeSplit[1]);

var sysMin = new Number(tempArr[0]);

if (tempArr[1] == "PM") {
sysHour += 12;
}

var sysTime = new Date(2003, 3, 28, sysHour, sysMin, 0);

var sysTimeMS = Date.Parse(sysTime.toString());

var userTimeMS = sysTimeMS + userOffset;

var userTime = new Date(userTimeMS);

var userHours = new Number(userTime.getHours());
var userAMPM = "AM";
if (userHours > 11) {
userAMPM = "PM";
}
if (userHours > 12) {
userHours -= 12;
}
var userMins = new Number(userTime.getMinutes());

timeElements[n].innerHTML = userHours + ":" + userMinsStr + " " + userAMPM;
} // wh00ps. forget this first time.

}


Yuk. Be much cleaner if you relied on the browser's time zone instead of a server side value. ;) It also doesn't help that I've been up for 22 hours.

Another idea would be to put the number of milliseconds in a hidden &lt;span style="display: none;" id="idTimeRawXX">&lt;/span>. Much easier to reformat.

ctmagnus
03-29-2003, 06:07 AM
By Monday, when you check the site, the news will be stamped with the server time (MST) rather than your preferred time.

Works for me :wink: .

/dev/niall
03-29-2003, 06:13 AM
This means that every time you visit the front page, there are around 30 database queries in addition to HTTP requests to download every image.

I'm curious: Why so many database queries? I count:

1 to get the news
1 to get the top stories
1 to get latest articles
1 for last 10 posts

... for a total of 4. Assuming that the ads (I count 4) and user preferences also count, I get a new total of 9. What am I missing?

I can't remember - are you using MySQL or PostgreSQL as a backend?

Pony99CA
03-29-2003, 08:14 AM
How about moving to GMT or UCT instead??? :roll:
I'll second the GMT option - I mean atleast everyone knows what GMT is - thanks be that we don't have to worry about multiple time zones here! ;-)
Actually, you might know GMT living in London, but I'd wager many people in the U.S. (and Canada?) don't know the conversion.

I know that it's 8 hours ahead of Pacific time, but I don't know if that applies during the Daylight Saving Time period or not. I don't know if GMT has a Daylight Time provision, and, if it does, I don't know if it follows the same rules as the U.S. -- nor do I really want to find out. :-)

Steve

Pony99CA
03-29-2003, 08:30 AM
This means that every time you visit the front page, there are around 30 database queries in addition to HTTP requests to download every image.

I'm curious: Why so many database queries? I count:

1 to get the news
1 to get the top stories
1 to get latest articles
1 for last 10 posts

... for a total of 4. Assuming that the ads (I count 4) and user preferences also count, I get a new total of 9. What am I missing?

I can't remember - are you using MySQL or PostgreSQL as a backend?
How about this? One query to get the list of stories to display, one to get the text for each story and, with customized times, one query to get the user's time zone and one query per story in order to get the story's time to adjust it for the user's time zone. (Perhaps some of those aren't "queries" in the SQL sense, but I'm not a database person.)

Not having seen the database design, that's just a guess, of course. :-)

Steve

Jason Dunn
03-29-2003, 08:39 AM
What am I missing?

Remember it's all custom coding that polls the various front-page forums and asssembles the centre news page on the fly - there's no magical phpBB function that builds the page. Each news posting is a separate MySQL query, so if we have 15 items in the center column, that's 15 queries. You also forgot the articles zone, the query for the login, etc. Trust me, there are more than four. :wink:

Weyoun6
03-29-2003, 09:00 AM
Why not switch the entire site on to swatch beat time? :lol:

note: this message was written at @377 swatch beat / "internet time"

FredMurphy
03-29-2003, 09:56 AM
What am I missing?

Remember it's all custom coding that polls the various front-page forums and asssembles the centre news page on the fly - there's no magical phpBB function that builds the page. Each news posting is a separate MySQL query, so if we have 15 items in the center column, that's 15 queries. You also forgot the articles zone, the query for the login, etc. Trust me, there are more than four. :wink:
Much as I am reluctant to drag the topic back from time zones (GMT is the only way, obviously ;)), there is another potential option for generating the front page. I could well be suggesting something you have already considered and dismissed, but probably worth mentioning.

Rather than dynamically generating the front page every time it is requested, how about recreating a static HTML page every 30 seconds or so? Serve that up as often as required with no database hit. A good solution if you've got lots of requests and content that changes a little more slowly.

FredMurphy
03-29-2003, 10:08 AM
I was going to hijack a thread on "when will we see an update for the Pocket PC OS" but this one will just have to do.....

When will we get "Pocket PC Thoughts 2003"? I've heard rumours that there will be a mobile version of the forum and it will be free from ads! :D I've also heard scandalous rumours that we'll have to reach for our wallets to so Jason can start www.WeCanReadYourThoughts.com™ and take over the world.

Has anyone (who's not under NDA) got an idea of when this might happen?

Jonathon Watkins
03-29-2003, 10:35 AM
Yes, that's correct. There's "Pacific Time", "Mountain Time", "Eastern Time", etc. I guess I just made MST up. :lol:

8O Surely not! 8O We come here for the hard facts. :hippy:

How about a poll what time most people would like the front page to be set to? Personally GMT seems logical, but then again so is setting the time so it matches your watch where you are in sunny Canada. 8)

Taking a small thing away for bigger benefits in the future seems very fair. We get so much here already. Cheers. :D

griph
03-29-2003, 12:51 PM
We have GMT in winter and BST in summer (British Summer Time) - but as international time is either based on (+) or (-) GMT or Astronomically UCT I felt that it would be simpler for International Members of this site (eg not just Americans) to have an understanding of when a message was posted - without having to resort to Atlas to work out what MST is. I can't believe anyone here does not know the time difference between GMT and their own time zone (and if they dont they must live under a rock (fx:ducks ready for flaming). From post within this forum it appears that there is some uncertainty among US members too! ;-) Still I'm happy to go with the flow! :-)

pocketpcdude1024
03-29-2003, 01:06 PM
According to their information, both Janak Parekh and Steven Cedrone live in EST (GMT-5), and Ed Hansberry doesn't live too far from the border of EST. In my opinion, the site would be best served to be set in EST.

Arne Hess
03-29-2003, 02:38 PM
I'm voting for the Swatch Internet @ time (http://www.swatch.ch/internettime/home_flash.php) 8) Kidding... :wink:
Jason, go for the changes, I can understand why you have to optimize the PHP code so don't worry about the timezones (even if I don't understand MST today but will try to learn).
Regarding the other changes, can' await what you guys are planning in addition! Good luck for the changes and keep Thoughts rocking! :D

Janak Parekh
03-29-2003, 05:02 PM
According to their information, both Janak Parekh and Steven Cedrone live in EST (GMT-5), and Ed Hansberry doesn't live too far from the border of EST. In my opinion, the site would be best served to be set in EST.
Nah, Jason owns the server, it's his timezone. :)

I do like the JavaScript idea, though, and if I have time I'll look into it...

--janak

Jason Dunn
03-29-2003, 07:36 PM
Rather than dynamically generating the front page every time it is requested, how about recreating a static HTML page every 30 seconds or so?

That's exactly what our new system does. Wasn't that clear in my initial post? 8)

Steven Cedrone
03-29-2003, 08:25 PM
According to their information, both Janak Parekh and Steven Cedrone live in EST (GMT-5), and Ed Hansberry doesn't live too far from the border of EST. In my opinion, the site would be best served to be set in EST.

And while we're at it, we'll change the name to "Janak, Steve and almost-Ed's Pocket PC Thoughts". :lol:

Steve

ctmagnus
03-29-2003, 10:51 PM
And while we're at it, we'll change the name to "Janak, Steve and almost-Ed's Pocket PC Thoughts". :lol:

Steve

No! Set it up so the site dips into the registry and pulls out the registered username, so the titlebar says [Window's Registered Username]'s Pocket PC Thoughts

:lol:

Pony99CA
03-30-2003, 12:19 AM
Rather than dynamically generating the front page every time it is requested, how about recreating a static HTML page every 30 seconds or so?
That's exactly what our new system does. Wasn't that clear in my initial post? 8)
Will home page filtering still be supported? The filter is obviously a user-specific setting, and it appears to be sticky from session to session.

Steve

Jason Dunn
03-30-2003, 12:51 AM
Rather than dynamically generating the front page every time it is requested, how about recreating a static HTML page every 30 seconds or so?
That's exactly what our new system does. Wasn't that clear in my initial post? 8)
Will home page filtering still be supported? The filter is obviously a user-specific setting, and it appears to be sticky from session to session.

Yes, the filtering will be permanent and attached to the user's profile. One of the many things we're doing... :wink:

Ed Hansberry
03-31-2003, 12:40 AM
Kewl.... I'm liking what I'm seeing... :mrgreen: :wink:

Jason Dunn
03-31-2003, 12:45 AM
Kewl.... I'm liking what I'm seeing... :mrgreen: :wink:

Shh...only admins can see it right now...we don't want to make everyone green with envy! :mrgreen:

We're going to be testing & tweaking over the next 1-2 weeks, and will hopefully be able to launch full force mid-April. :way to go:

Ed Hansberry
03-31-2003, 12:51 AM
Kewl.... I'm liking what I'm seeing... :mrgreen: :wink:

Shh...only admins can see it right now...we don't want to make everyone green with envy! :mrgreen:
Heh heh. I knew that. Just whetting their appitites.

Jonathon Watkins
03-31-2003, 11:00 PM
You teasers! 8)

Looking forward to it guys. :mrgreen: