Cuttlepress

Blogging about Hacker School?

Day 34

More working on Twitter: I sent tweets and retweets from Node (after re-discovering that it is important to use the string version of a tweet’s id because there are so many tweets). I also did the necessary work to deploy to Heroku — Procfile and package.json and such — and set up another of Heroku’s MongoHQ databases before realizing that Heroku probably wasn’t actually the right thing for this project. I wanted to have a single, long-running process (that opens a stream and acts on incoming data, forever or something like it), but Heroku’s web processes go to sleep after an hour of inactivity. There are hacky ways to work around it, such as sending pings to keep the process awake, or having only a background worker instead of a web process, but they seemed inelegant. After asking around, I decided that the best way to proceed would be to use AWS, so I made a new MongoHQ database and started to set up my AWS [micro]instance.