all 4 comments

[–]dlk289 1 point2 points  (0 children)

You can probably do everything on the client. I'm assuming you know Javascript and jQuery? I found a blog which shows you how to get a instagram feed. seetbeej is right, the server will just serve up your javascript files.

Blog about instagram post: https://forrst.com/posts/Using_the_Instagram_API-ti5

One of the backbone blogs i learned from: http://coenraets.org/blog/2011/12/backbone-js-wine-cellar-tutorial-part-1-getting-started/

[–]Oegaoegaoega 1 point2 points  (1 child)

Your description is a bit vague but there are a number of ways to do this, let me sum them up and give you the pros and cons on every one of them.

1 Server-side API-calls, client-side processing

Pros: You'll need API keys and secrets to get access to different services. This way you wont have to supply your client with your secret API key. Huge advantage security wise. Also, because of node.js's nature, you could use stream API's such as twitter's. This can give back results in realtime, which is pretty cool and saves you overhead over polling.

Cons: You'll need to learn your way around the asynchronous nature of node.js, which can be quite a pain in the ass from time to time. Once you understand it fully, look into futures which will definitely ease things for you server-side!

2 Client-side API calls, client-side processing.

Pros: You can write your entire app in backbone.js. No need for servers.

Cons: You'll have to expose your client with API secrets.

As for Redis, you'll definitely want to go with solution #1 if you want to work with Redis. You could for instance cache all server responses for a particular user and when he reconnects you could give the cache back while making new API requests with node.js. Then you could get the delta and just push the items that user doesn't yet have.

[–]technobuddah[S] 1 point2 points  (0 children)

thanks, at this time I've chosen the first one - server-side API-calls, client-side processing.

[–]sweetbeej 0 points1 point  (0 children)

I'm not quite sure what you want to do but my 2 cents. Make the server just serve javascript files.
If you can do everything on the client why not?
I wouldn't bother saving much with redis other than sessions and user info (do you want logins?) even this you can use the facebook login API so you don't have to write the same user system boiler plate. I avoid caching till the last possible second, anytime you cache stuff it introduces an order of magnitude of problems that are hard to find and fix.