Cameron,

Thank you for your response and suggestions. I am sorry for the delay in 
replying.
I will make the feed loading a scheduled task and have to call it in the 
Application.cfm(I know most people have already moved to Application.cfc) and 
if no response is used, use the previous feed obtained from the past successful 
fetch.

Would the following code http://collabedit.com/tmjwj function as expected in an 
environment with less users than actual production? 

If the newswebsite is suspended because it is using too many resources on 
shared hosting, the thread reading the feed will timeout in 30 seconds, so 
there will be no results. Will "News feed not available" be shown"?

Or, since the variable #feedResult.entriesNews# had a value from the last 
successful read, those results will be displayed?

I appreciate your assistance and time.


________________________________
 From: Cameron Childress <camer...@gmail.com>
To: discussion@acfug.org; Chris <h_chris...@yahoo.com> 
Sent: Monday, September 29, 2014 10:26 AM
Subject: Re: [ACFUG Discuss] Using caching and threading to load a page quickly
 


I'd load the RSS feed via a scheduled task and save it someplace like the 
application scope or a database table. Don't make your homepage do any of that 
work. 


-Cameron


On Mon, Sep 29, 2014 at 1:34 AM, Chris <h_chris...@yahoo.com> wrote:

Hi All,
>
>
>I have a main index page which is in ColdFusion which gets a RSS feed from 
>another website(Newswebsite which is a WordPress 3.9.2 website running on 
>shared hosting). The Newswebsite is on shared hosting so takes about 7 seconds 
>to load(a little slow, I know, but the decision to go with a shared hosting 
>was done to save on costs by the purchasing people).
>
>
>Now, people don't want the main index page to take 7 seconds to load. I 
>estimate using caching of the RSS feed so that updates are retrieved from the 
>feed only every 2 minutes and having a thread so that the main index page 
>loads(in 2 seconds or less) without waiting for the RSS feed can alleviate the 
>issue. The thread which fetches the data from RSS feed can display the feeds 
>on the main index page after the data is retrieved.
>
>
>1. If the idea is on the right track, would something like the below work?
>
>
>-----------------------------------------------------------------------------------------------------------------------------
>
>
>The full implementation is at http://collabedit.com/dgraj/history
>    
><!--- Caching the RSS feed from newssite so that it is checked every 2 minutes 
>only--->
>
>    
><!--- Start a thread and wait for it to read the RSS feed from newssite --->
>
>
>
><!--- Wait for the thread for 7 seconds--->
>
>     
>       
><!--- Check if there are any entries from RSS feed of newswebsite and display 
>the feed information on main index page if it was obtained in 7 seconds --->   
>                   
>
>
>
>----------------------------------------------------------------------------------------------------------------------------
>
>
>2. Are there other better ways to tackle the issue?
>
>
>I want the other parts of the main index page which is in ColdFusion to load 
>quickly and not get delayed because getting data from the RSS feed of news 
>website takes 7 seconds.
>
>
>Any suggestions would be appreciated.
>
>
>Thanks
>
>
>P.S. I used ColdFusion code and Yahoo e-mail did not allow me to send it. I 
>heard Yahoo Mail flags messages containing code as spam so does not allow such 
>messages. So, just had to explain it in text and provide a link to Collabedit.
>


-- 
Cameron Childress
--
p:   678.637.5072
im: cameroncf

facebook | twitter | google+

Reply via email to