psugihara / pictochatty

GIF chat
1 stars 0 forks source link

Search for GIFS #6

Open psugihara opened 11 years ago

psugihara commented 11 years ago

How do we search tumblr on multiple tags?

http://www.tumblr.com/docs/en/api/v2#tagged-method

ashovlin commented 11 years ago

I talked to the tumblr dev at hackNY. He said there is no support for searching for multiple tags.

We'd have to search our intended tag, and then pull out the gifs. It might require multiple searches to get a decent amount, so we'd probably want to start caching results.

psugihara commented 11 years ago

Shit.

Does it violate Tumblr's TOS to just steal all of their images? Also, that sounds kind of expensive.

ashovlin commented 11 years ago

We could just cache links to the gifs. Caches can only be 3 days old as per:

Storage and Caching of Content. Under no circumstances shall Licensee store or cache Content received through the Tumblr API for longer than three (3) days; after three (3) days, Licensee shall re-request, through the Tumblr API, any such Content from Tumblr.

psugihara commented 11 years ago

Alright, should we do a DAO with a caching layer in it?

Also, it might make sense to send a bunch of the images on the first shot (in the template) and repopulate in the background as we go.

That way there can be pretty low latency.

ashovlin commented 11 years ago

Yeah, any preference for the database?

It looks like nodejitsu supports mongo, redis, and couch, but the whole thing is only free for 30 days. Should we move to Heroku or one of our servers?

psugihara commented 11 years ago

Ugh, yeah. I've hear heroku gets really expensive, IDK.

You have a server?

ashovlin commented 11 years ago

Yeah, I wouldn't actually use them, they just have a free plan with no time limit. It look likes nodjitsu's free plan is only good for 30 days.

I rent the cheapest Linode VPS, which is like 512mb ram, 20GB storage, 200GB transfer. AWS if free for the first year, if we want to try that.

psugihara commented 11 years ago

I just put it on appfog. They have a ridiculous free plan and it took like 1 minute to get it up and running. I'm actually really impressed. It's running there on a 1GB instance.

The annoying part is that they run an old version of node and there's some lag with the initial socket.io handshake I think. They bought nodester recently though so it's supposed to get upgraded soon.

Edit: Oh, damn, they don't even support websockets yet. I'm setting up a db right now.