Re:Show HN: Hacker News Mobile - A fast and readable mobile ...
by genieyclo on Thursday September 15, 2011 @05:14PM
(#3002162)
Looks great, I'll try it out. I've been using iHackernews.com for awhile and to my knowledge pretty much every other hacker news app out there uses their api as well. They had a problem where they were always having 502 errors when you clicked on comments for a post for awhile, but this seems to have been fixed in the last couple of weeks or something.
[ Parent
| on HN ]
Re:Show HN: Hacker News Mobile - A fast and readable mobile ...
by KrisJordan on Thursday September 15, 2011 @05:26PM
(#3002208)
I wrote the server-side portion of this app. It's actually a tiny coffee script program that caches iHN.net's API calls in redis. We cache/proxy the successful responses and toss out the 500s. When a cached copy of the content is available it'll be served immediately from redis. We refresh the cache on-demand in the background. This allows us to buffer out delayed / erroneous 500 errors the iHN API sometimes responds with.
This is running on a 256mb Ubuntu virtual server and it's overkill for both processor and memory. Kind of neat watching the story climb HN (currently #4) and watching `top` without being able to tell anything is happening on the server at all: 0,0,0,0%user,100%idle -- a testament to the light weight beauty of node,redis,nginx.
Re:Show HN: Hacker News Mobile - A fast and readable mobile ...
by jrgifford on Thursday September 15, 2011 @06:07PM
(#3002324)
Impressive that it's not being overloaded.
Re:Show HN: Hacker News Mobile - A fast and readable mobile ...
by news-yc on Thursday September 15, 2011 @08:17PM
(#3002620)
I don't use the iHackerNews API for news:yc. It seemed too unreliable to use a third party service that seemed to keep having issues, and I didn't want user data to go through a third party. But I think it's cool to easily create a HN app without rewriting the scraping.
Re:Show HN: Hacker News Mobile - A fast and readable mobile ...
by genieyclo on Thursday September 15, 2011 @08:29PM
(#3002640)
Cool, do you scrape with your own tool then? If so, what do you use?
Re:Show HN: Hacker News Mobile - A fast and readable mobile ...
by news-yc on Thursday September 15, 2011 @10:58PM
(#3003013)
I scrape inside the app using a combination of libxml2, a custom XML wrapper for iOS, and then a horribly ugly (but pretty adaptable) chunk of objective-c to parse out the contents. This helps mostly for rate limiting issues: each device is rate limited as it should be.