I have two minor comments: 1) Linking to the original HN hiring post is helpful, and 2) I'm on a poor internet connection now, and this page took about a minute to load. http://hnhiring.com/ and the original July 2015 thread ( https://news.ycombinator.com/item?id=9812245 ) load in ~5 seconds.
(1) is probably going to make it in at some point! Unfortunately, I need to make an HTTP request for every post (that's how the HN Firebase API works) and that gets pretty expensive on slow connections. :/
Show HN: Hackjob.io – HN job listings done a bit better
41–50 of 50 posts
Re: Show HN: Hackjob.io – HN job listings done a bit better
#42Re: Show HN: Hackjob.io – HN job listings done a bit better
#43Earlier quoted context omitted.
(1) is probably going to make it in at some point! Unfortunately, I need to make an HTTP request for every post (that's how the HN Firebase API works) and that gets pretty expensive on slow connections. :/
> Unfortunately, I need to make an HTTP request for every post (that's how the HN Firebase API works) What's the total size of the jobs data? Would it be possible to grab all the JSON from the API, concatenate it and then self-host it as a single file? I imagine a $5 DO droplet with nginx would suffice for that. It looks like firebase isn't even gzipping the JSON.
Re: Show HN: Hackjob.io – HN job listings done a bit better
#44I have two minor comments: 1) Linking to the original HN hiring post is helpful, and 2) I'm on a poor internet connection now, and this page took about a minute to load. http://hnhiring.com/ and the original July 2015 thread ( https://news.ycombinator.com/item?id=9812245 ) load in ~5 seconds.
(1) is probably going to make it in at some point! Unfortunately, I need to make an HTTP request for every post (that's how the HN Firebase API works) and that gets pretty expensive on slow connections. :/
replace lots of these:
return $http.get('https://hacker-news.firebaseio.com/v0/user/'+name+' + '/.json');
with return $q(function(resolve, reject){
new Firebase('https://hackernews.firebaseio.com/v0/user/').child(name).on('value', function(snap) {
resolve(snap.val());
}, /*error handler here too*/)
})
https://www.firebase.com/blog/2014-10-07-hacker-news-api-is-firebase.html
https://docs.angularjs.org/api/ng/service/$q
(yes the HN API design is a little funky though, but you can definitely improve the loading times with websockets)Re: Show HN: Hackjob.io – HN job listings done a bit better
#45Earlier quoted context omitted.
(1) is probably going to make it in at some point! Unfortunately, I need to make an HTTP request for every post (that's how the HN Firebase API works) and that gets pretty expensive on slow connections. :/
Firebase dev here, the websocket API would be much faster (less HTTP overhead and connection negotiation) and has the potential for more concurrent requests. replace lots of these: return $http.get('https://hacker-news.firebaseio.com/v0/user/'+name+' + '/.json'); with return $q(function(resolve, reject){ new Firebase('https://hackernews.firebaseio.com/v0/user/').child(name).on('value', function(snap) { resolve(snap.v…
Re: Show HN: Hackjob.io – HN job listings done a bit better
#46Re: Show HN: Hackjob.io – HN job listings done a bit better
#47Re: Show HN: Hackjob.io – HN job listings done a bit better
#48Re: Show HN: Hackjob.io – HN job listings done a bit better
#49Earlier quoted context omitted.
Firebase dev here, the websocket API would be much faster (less HTTP overhead and connection negotiation) and has the potential for more concurrent requests. replace lots of these: return $http.get('https://hacker-news.firebaseio.com/v0/user/'+name+' + '/.json'); with return $q(function(resolve, reject){ new Firebase('https://hackernews.firebaseio.com/v0/user/').child(name).on('value', function(snap) { resolve(snap.v…
Hey that IS awesome. I had no idea Firebase had a websocket API. Sweet!
The websocket API is the main selling point of Firebase, but I guess you were not actively looking to use Firebase in a product, rather, it was a necessity from HN API. Good luck! Don't hesitate to contact us.