Websocket for Refresher #53

Closed
toxinu opened this Issue Mar 23, 2013 · 6 comments

Comments

Projects
None yet
3 participants
@toxinu
Owner

toxinu commented Mar 23, 2013

Actual refresh module is not very nice, this is the internal job:

  • Ajax send a request for each feed to Web server
  • Web server do all the job in a specific thread and response to request (seems legit)

But during this time, UI is frozen until all requests have it's response from web server.

I think, do all the job in async and leave the Web Ui waiting for webscocket response could increase user experience.

Any idea or comment ?

@danielmagnussons

This comment has been minimized.

Show comment Hide comment
@danielmagnussons

danielmagnussons Mar 23, 2013

Why is there a refresh button at all? Wouldn't it be better if there was a background job that kept all feeds refreshed all the time?

Been trying to figure out how things work, and I can't find a background job anywhere. ;p

How do leselys handle if I have not visited leselys for 2 days? Will the 2 days of feeds be missing?

A background job will solve those problems. And everything will be much easier if the web UI just shows what's in the database ;p

Why is there a refresh button at all? Wouldn't it be better if there was a background job that kept all feeds refreshed all the time?

Been trying to figure out how things work, and I can't find a background job anywhere. ;p

How do leselys handle if I have not visited leselys for 2 days? Will the 2 days of feeds be missing?

A background job will solve those problems. And everything will be much easier if the web UI just shows what's in the database ;p

@toxinu

This comment has been minimized.

Show comment Hide comment
@toxinu

toxinu Mar 23, 2013

Owner

That's a great point.
We can imagine no refresh button just a every 15/30 minutes background job which retrieve new feeds.

And has you ask if nobody click on refresh button during two days, some feeds will be missed and no chance to recover it.

Do you have any idea how to do background job on Heroku without paying for a worker dyno ?

Owner

toxinu commented Mar 23, 2013

That's a great point.
We can imagine no refresh button just a every 15/30 minutes background job which retrieve new feeds.

And has you ask if nobody click on refresh button during two days, some feeds will be missed and no chance to recover it.

Do you have any idea how to do background job on Heroku without paying for a worker dyno ?

@danielmagnussons

This comment has been minimized.

Show comment Hide comment
@danielmagnussons

danielmagnussons Mar 23, 2013

Create a "/api/refresh-all" api that can be called from anyone. And make http api return instant. Then its a quick background job and might be able to fit withing the 450 dyno worker hours per month. Found some info here.

Other ideas is having two heroku apps that call each other? ;p

Create a "/api/refresh-all" api that can be called from anyone. And make http api return instant. Then its a quick background job and might be able to fit withing the 450 dyno worker hours per month. Found some info here.

Other ideas is having two heroku apps that call each other? ;p

@toxinu

This comment has been minimized.

Show comment Hide comment
@toxinu

toxinu Mar 23, 2013

Owner

Ok so, I have a celery worker which refresh feeds every 10minutes right now.
But it's need two process.

  • web process
  • worker process

It's works great on a normal installation and on a two dynos Heroku app.
Next step, find a way to make Leselys works with background refresher on free Heroku installation.

I think, have two apps which call each other is not a proper solution.

Owner

toxinu commented Mar 23, 2013

Ok so, I have a celery worker which refresh feeds every 10minutes right now.
But it's need two process.

  • web process
  • worker process

It's works great on a normal installation and on a two dynos Heroku app.
Next step, find a way to make Leselys works with background refresher on free Heroku installation.

I think, have two apps which call each other is not a proper solution.

@jaramir

This comment has been minimized.

Show comment Hide comment
@jaramir

jaramir Mar 23, 2013

Why not use the Heroku Scheduler?
The basic plan is free and I think that web+scheduler should rarely overflow the free allowance

edit: https://addons.heroku.com/scheduler

jaramir commented Mar 23, 2013

Why not use the Heroku Scheduler?
The basic plan is free and I think that web+scheduler should rarely overflow the free allowance

edit: https://addons.heroku.com/scheduler

@toxinu

This comment has been minimized.

Show comment Hide comment
@toxinu

toxinu Mar 23, 2013

Owner

@jaramir Oh yeah, I haven't seen the Heroku Scheduler (shame on me) and it works great!
I have updated Heroku installation doc.

Owner

toxinu commented Mar 23, 2013

@jaramir Oh yeah, I haven't seen the Heroku Scheduler (shame on me) and it works great!
I have updated Heroku installation doc.

@toxinu toxinu closed this Mar 27, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment