Streetread, the innovative financial news and data aggregator (jQuery-powered), has launched a complete drupal-based mobile version.

To read more about the mobile version and try an interactive demo visit:

http://www.streetread.com/blog/streetread-mobile-officially-launches

To directly access the mobile version:

http://www.streetread.com/m

To read more about Streetread itself:

http://startupmeme.com/streetread-have-all-your-financial-news-on-one-page/

And to try Streetread (free):

http://www.streetread.com

----------------------------------------

Any questions, especially developmental questions, I'd love to answer.

Thanks

Comments

Markoi’s picture

Nice work and great Drupal example.

mstef’s picture

Thank you.

bflora’s picture

So I love the basic gist of the idea: list of sources across top, click on one and jquery loads up the latest headlines. Boom.

That's a great idea. How'd you do that bit? Feedapi + views + jquery?

mstef’s picture

Thank you.

Check out this pretty extensive post I made about the development - it goes into good detail about most of the techniques used to development the main version. If you have any more questions or anything else you'd like to discuss, feel free to post away.

http://www.streetread.com/blog/how-streetread-was-developed

bflora’s picture

Mike,

I read through your (excellent) writeup. I hang out on Hacker News so I've seen StreetRead before, when you showed it there.

I'm also interested in doing cool stuff with the aggregator module, you seem to have solved a HUGE problem with it for StreetRead and I was wondering if you could explain how you did it or share the patch here.

Here's the part in particular;

"A configurable option was implemented to update X% of feeds every X minutes. Currently, 25% of the feeds update every 15 minutes - ending up with all feeds updating hourly. And second, the module originally determines feed item deletion based on how old the item is. With popular stocks and sites receiving 30-50 headlines a day, I thought the database would load up way too quick with this system in place. Also, with less popular stocks, there would only be a few headlines left to read. To solve this problem, feeds are given a configurable maximum amount of items, irregardless to age, which will be discussed next with the caching mechanism."

I'm developing a site that will track about 700 feeds. Not as many as your site tracks, but still a lot. I'd love to be able to set the controls that you created for StreetRead to boost performance across it.

mstef’s picture

Glad to help..I'll explain: (sorry for the delay - didn't see your comment up here)

To have cron update feeds based on a percentage you have to alter aggregator.module's aggregator_cron(). I organized to code as follows:

if(module_exists('your module')) {
  //special code
}
else {
 //what was originally inside aggregator_cron()
}

Inside the 'special code' you want to first gather all of the available feeds from the DB, determine the amount that need to be updated, then simply update them

//Gather feeds - least updated first
$result = db_query('SELECT * FROM {aggregator_feed} ORDER BY checked');
//Determine the update amount - divides the total amount of feeds by a certain number that you can have configurable via the admin settings. The 4 represents 1/4, or 25%.
$update_amt = ceil(db_num_rows($result)/variable_get('your-modules-update-amount-setting', 4));
//Then simple iterate the feeds $update_amt times, updating the feeds via aggregator_refresh()

------------

To delete any items exceeding a certain number, can be done a number of ways. Basically after each feed is refreshed (the end of aggregator_refresh()), you should gather all of that feeds items from the DB ( {aggregator_item} ). You could gather them in order from oldest to youngest - check how many items there are - and if they exceed how many you want, gather all of the iid's into an array and use one DB call to remove all of them. Like I said, it can be done a number of ways depending on any other needs you have. I hope that explained it well. Let me know if you need any help with it, other options, more explaining, etc...

Does that help??

chaldar’s picture

Great site and great blog post on the development.
Have you thought about ways of sensing the access device and switching theme automatically instead of a special mobile url?

mstef’s picture

Yes, I'm considering it. Thanks.

Super Druper’s picture

Mike, thanks for taking the time to put together the detailed write up, it was very informative. Congrats on an excellent site!

mstef’s picture

Hey thanks - glad to offer help. Let me know if you have any other questions I can answer.