Partial Page Refresh on threads

  • Welcome to "The New" Wrestling Smarks Forum!

    I see that you are not currently registered on our forum. It only takes a second, and you can even login with your Facebook! If you would like to register now, pease click here: Register

    Once registered please introduce yourself in our introduction thread which can be found here: Introduction Board


Tzesi

The Artiste
Joined
Dec 18, 2011
Messages
753
Reaction score
14
Points
0
Make the threads to refresh automatically like every 5 seconds.
See more: http://blog.mediasoft.be/partial-page-refresh-with-ajax-and-jquery/
 

Tzesi

The Artiste
Joined
Dec 18, 2011
Messages
753
Reaction score
14
Points
0
Lith said:
Pretty simple, it would basically be like a shoutbox.

Check the astropid.com forums.
It isn't like a shoutbox :)
 

Crayo

The Boss
Joined
Dec 16, 2011
Messages
63,815
Reaction score
6,080
Points
1
Location
United Kingdom of Ambrose
Website
wweforums.net
Thing is, most wrestling sites host a lot of images. Including lots of .gif images, I wouldn't want any unnecessary stress added to the server, especially on shared. Last thing we need is problems there. Would probably think about it more if there were less images and big potential threads like discussion threads. Believe it or not, wrestling forums are different from most :).
 

Anonymous

The Artiste
Joined
Dec 16, 2011
Messages
326
Reaction score
22
Points
0
Crayo said:
Wouldn't it be a stress on the server having this?

This would be a lot less stressful on the server than people refreshing the page every few seconds, since this would be passing the raw data for only the newest replies, as opposed to having to pass entire templates and the entire thread data to the user.

I can agree that 5 seconds could be a little quick, seeing as people rarely reply in seconds. However that could be upped to about 30 seconds (to a minute) and have a manual 'load new posts' button.
 

Tzesi

The Artiste
Joined
Dec 18, 2011
Messages
753
Reaction score
14
Points
0
Anonymous said:
This would be a lot less stressful on the server than people refreshing the page every few seconds, since this would be passing the raw data for only the newest replies, as opposed to having to pass entire templates and the entire thread data to the user.

I can agree that 5 seconds could be a little quick, seeing as people rarely reply in seconds. However that could be upped to about 30 seconds (to a minute) and have a manual 'load new posts' button.

5 seconds was just an example.
I don't really know if it would stress the server though..
 

Crayo

The Boss
Joined
Dec 16, 2011
Messages
63,815
Reaction score
6,080
Points
1
Location
United Kingdom of Ambrose
Website
wweforums.net
5 seconds would, definitely. Imagine it this way:

10 people taking part in a discussion thread. People post in these threads every time something interesting happens on RAW.

Every 5 seconds it refreshes for those 10 people, 50 refreshes every 5 seconds. 200 refreshes every 20 seconds. 500 refreshes every 50 seconds.

Server would be in tears.
 

Anonymous

The Artiste
Joined
Dec 16, 2011
Messages
326
Reaction score
22
Points
0
Crayo said:
5 seconds would, definitely. Imagine it this way:

10 people taking part in a discussion thread. People post in these threads every time something interesting happens on RAW.

Every 5 seconds it refreshes for those 10 people, 50 refreshes every 5 seconds. 200 refreshes every 20 seconds. 500 refreshes every 50 seconds.

Server would be in tears.

You're taking the word 'refresh' too literally, at most, the only thing that the server will be passing back to the browser is a little bit of text. I'm on a phone, so I can't really give an example of what would be passed.

500 requests in under a minute is expected of any forum, and requests for small chunks of data, as I mentioned, is a lot less stressful than having to reload every single image with the page.

You're under-estimating the power of a server.
 

Crayo

The Boss
Joined
Dec 16, 2011
Messages
63,815
Reaction score
6,080
Points
1
Location
United Kingdom of Ambrose
Website
wweforums.net
Not under-estimating the power of a shared server. We're not on a VPS or dedi here, we're using a cheap plan on a shared server. Adding those 500 requests to the normal requests us users create is unnecessary pressure isn't it?
 

Solidus1

eXit
Joined
Dec 25, 2011
Messages
15,712
Reaction score
4,672
Points
0
This is ajax and jquery, it's not going to be lightweight at all. Plus you'll have to query the posts table every single refresh, usually you can fetch from a cache but that can't be done here
So, 10 people viewing a thread for one minute = 100 queries. That's insanity.
 
Joined
Dec 25, 2011
Messages
4
Reaction score
0
Points
0
Solidus: the server wouldn't need to query the database for every user, once a request has been made and the database has been queried, that new data will be stored seperately and read from, the database wouldnt be queried again until the time limit (the minute) has passed.

Granted for that to work the reload now button would become obselete.

I once read somewhere that it's easier to hold confidence in one's own opinion, when their knowledge of the subject is lacking. With that I ask why you believe jQuery is a burden; is requesting a php file through javascript any different than requesting it through the browser? Obviously, seeing as it's this late, I couldn't care less about being right, but this thread has simply turned into a competition over who can seem the most confident in their opinions without providing factual evidence.

Crayo: if the thread is under enough demand, you're going to have people refeshing it manually anyway.

Bed time.
 

Jonathan

Champion
Joined
Dec 19, 2011
Messages
17,016
Reaction score
2,957
Points
0
This would cause mass strain on the server because it's constantly fetching new posts, @[Crayo] - Not recommended.
 

Solidus1

eXit
Joined
Dec 25, 2011
Messages
15,712
Reaction score
4,672
Points
0
Liked_WWF_Better said:
Solidus: the server wouldn't need to query the database for every user, once a request has been made and the database has been queried, that new data will be stored seperately and read from, the database wouldnt be queried again until the time limit (the minute) has passed.

Granted for that to work the reload now button would become obselete.

I once read somewhere that it's easier to hold confidence in one's own opinion, when their knowledge of the subject is lacking. With that I ask why you believe jQuery is a burden; is requesting a php file through javascript any different than requesting it through the browser? Obviously, seeing as it's this late, I couldn't care less about being right, but this thread has simply turned into a competition over who can seem the most confident in their opinions without providing factual evidence.

Crayo: if the thread is under enough demand, you're going to have people refeshing it manually anyway.

Bed time.

You've just said the data will be stored separately, I.E, in its own table. The mybb_posts table is already the largest without duplicating it.

I also meant 10 people reading 10 different threads. It is 100 queries per minute, like I said.

jQuery being a burden is my opinion, and the opinion of many others. I'm not stating facts here.
Oh, and this is not a competition. Don't insult me, I have nothing to prove. This is merely differences of opinion, I've said it is feature that will be harsh on the database server, and you challenged that with some incorrect information.
 

Crayo

The Boss
Joined
Dec 16, 2011
Messages
63,815
Reaction score
6,080
Points
1
Location
United Kingdom of Ambrose
Website
wweforums.net
Not a competition, just debating what's right really. I don't think anyone cares if they're wrong. I do know most established and experienced web-masters would agree and say it's something not needed and will put strain on the server. Perhaps if we did control our own server then it's not an issue, but people seem to forget we are on shared hosting here with a specific amount of resources we can use. If having this ruins our chances of let's say the notifications plugin, then which would you prefer to have?
 

Tzesi

The Artiste
Joined
Dec 18, 2011
Messages
753
Reaction score
14
Points
0
Crayo said:
Not a competition, just debating what's right really. I don't think anyone cares if they're wrong. I do know most established and experienced web-masters would agree and say it's something not needed and will put strain on the server. Perhaps if we did control our own server then it's not an issue, but people seem to forget we are on shared hosting here with a specific amount of resources we can use. If having this ruins our chances of let's say the notifications plugin, then which would you prefer to have?

Let's burry this thread for now, since it's a unnecessary feature.
It would be awesome to have this when you get a new server though.
 

Anonymous

The Artiste
Joined
Dec 16, 2011
Messages
326
Reaction score
22
Points
0
Solidus said:
You've just said the data will be stored separately, I.E, in its own table. The mybb_posts table is already the largest without duplicating it.

How would this be duplicating it? The new posts would only be temporarily stored until everyone has left that thread. If noone is viewing the thread anymore and the time passes, the posts will be cleared.

Solidus said:
I also meant 10 people reading 10 different threads. It is 100 queries per minute, like I said.

I'll forgive your grammatical error.

Solidus said:
jQuery being a burden is my opinion, and the opinion of many others. I'm not stating facts here.
Oh, and this is not a competition. Don't insult me, I have nothing to prove. This is merely differences of opinion, I've said it is feature that will be harsh on the database server, and you challenged that with some incorrect information.

There's hardly any reason to be so high strung, the statement i mentioned on being overly confident in unfamiliar subjects is the overconfidence bias, and also applies to me. No reason to take it so personally.

Maybe I'm just used to debating to people with more back-bone.