4 ms·
> Also, a small plug for Sinatra, that app is perfect for it (or any other microframework). Why even use a framework at all? There's no interaction. Serving a
by apgwoz 18y ago
> Also, a small plug for Sinatra, that app is perfect for it (or any other microframework).
Why even use a framework at all? There's no interaction. Serving a page generated from a cron job would be the best way to do it.
- cschneid 18y agoTwitter moves fast enough that you probably want to re-fetch every time and display. But you're right, this is a very simple problem, just felt like rails was taking a sledge hammer to it. Not to say it isn't a cool idea, it is.
- apgwoz 18y agoWith a high traffic site, Twitter won't appreciate that sort of polling. Once every 45-60 seconds is probably suitable, wouldn't you think. Especially if you use a count=200 and a since_id. How often do people twhoops?
- elliottkember 18y agoSurprisingly often - a couple of times a minute. It polls every minute and that seems to be more than enough.
- ahoyhere 18y agoAgreed. My little project, Twistori (http://twistori.com/ http://twistori.com/), is served up as a static file, which is periodically compiled from a SQLite database of scraped tweets (which is in turn created by a Ruby cronjob). It took about 14 man-hours (1 working day x 2 people) from initial concept -> completion.
- elliottkember 18y agoOh, hey - I remember Twistori from when it first came out :) Great app, really like it. Twhoops works the same way - it's just that using Rails made a couple of things easier for me. It's not really an app at all - but if I did ever want to add serious functionality to it, all the fiddly bits are in place thanks to Rails.
- ahoyhere 18y agoGlad you like Twistori. But how can it act the same way? There's no web framework in our pipeline at all. It is literally a static HTML file on the server.
- elliottkember 18y agoOh, I meant in general, it works in the same way. A cron job handles the pulling, and putting the tweets into the SQLite file - but with Rails, instead of just Ruby. I was trying to say that Rails just sits on the cron job and made it easier to parse the API. Hope that makes a bit more sense.