I don't think you'd necessarily need to use celery/redis/etc for this.

No matter what you use to fetch the remote system data , you'll need
to implement a user pattern like this:

1. User loads the web page , which is 'blank' with a loading message
2. The web-page fires a javascript call to an API, which then returns
the relevant data and drops it on the page.

If you don't use an ajax solution like that... no matter what you do,
you'll still have people clicking 'reload' before the 10 seconds are
up.

My suggestion would be to add an animation like a  "loading %" gif to
the screen.  it can be complete BS -- you're not really showing the %
loaded, just that you're in a loading process.  make it a 30s gif to
reach 100%.

Then have your system call an API endpoint, which returns your data in
a json packet.  it can have the entire HTML you want to render via
mako/whatever templates.  just return it within a json wrapper for
easy placement.

then you can look into:
- integrating a local cache to check if your 3rd party request was
asked / filled yet.  this way , in case someone clicks 4 times, only
the first one generates a 3rd party call.  the second and third say
'busy' and the 4th reload has the data from the 1st call.
- offloading onto other systems.

i'm a huge fan of using redis / celery / even custom twisted daemons
to do background processing and tasks that are essentially queued for
'later'.  in your case though, your web content generation will 'hang'
on the third party no matter what you do.   the best way to meet your
goals is to change the user experience, not your platforms.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to