4 ms·
So if I wanted to build a app that delivers customized news, I create a user account + save their preferences. Then when they authenticate, the app only uses a
by LAMike 14y ago
So if I wanted to build a app that delivers customized news, I create a user account + save their preferences.
Then when they authenticate, the app only uses a GET request to fetch those certain feeds specified in their preferences?
Thanks for all the info, streamjoy looks pretty sweet btw
- willholloway 14y agoYes, definitely. You still need a server, but instead of your server generating the full html for each request, it only needs to generate a json response for some percentage of total page views. This is just lighter weight, and the architectural approach we are heading to with backbone.js et al... Basically you offload as much of the computational load to the client side AND the batch rendering process as possible. One reason this was important for my purposes with streamjoy is that even though 92000 movies isn't Big Data, it still takes a long time when you have to run 10 kinds of algorithms on 92000 items AND deal with the restricted API limits of a big API like Amazon (about one request per 1.8 seconds unless you get special permission or are doing a lot of revenue) So for streamJoy I had to do a lot of computation and network queries, and I had to respect the 24 hour period that Amazon wants for data freshness. So the batch jobs I had to run had to be as fast as possible, and that means the fastest CPU + SSDs + ample RAM. A dedicated i7 server with 32gb of ram and SSDs is $180 at the cheapest data center I could find. Thats way too much for a portfolio piece! So I offloaded all the batch computation to my own local workstation and then just push the rendered results to the cloud. Thats one of the big benefits of the flat file approach. Thanks for the compliment!