Authors>
Alex MacCaw

Posts by Alex MacCaw

Create your own Heroku on EC2 with Vagrant, Docker, and Dokku

Engineeringby Alex MacCaw on September 25, 2014

Heroku [http://heroku.com] is an awesome component to the developer toolchain and lets you get something up and running easily. For me at least, it's transformed how I think about and architect applications. However, there are also a lot of reasons why you might choose an alternative. Maybe it's speed, control, or maybe you just like tinkering. For us, the reason was cost--pure and simple. Clearbit has a huge cluster of machines crawling the web, and Heroku would have been prohibitively expensi

Poor man's realtime

Engineeringby Alex MacCaw on September 24, 2014

Streaming to browsers has got a lot easier with the advent of APIs like WebSockets [https://developer.mozilla.org/en-US/docs/WebSockets] and Server-sent Events [https://developer.mozilla.org/en-US/docs/Server-sent_events/Using_server-sent_events] . However the server-side aspect is often trickier to setup--many servers and runtimes are not tuned for long-lived requests. There's a much simpler approach to 'realtime' updates which can be applicable in some situations; polling the page's endpoin

PostgreSQL offsets and pagination performance

Engineeringby Alex MacCaw on September 23, 2014

PostgreSQL is notoriously bad at performing well with high offsets, mainly because it needs to do a full table scan and count all the rows up to the offset. This can be a problem is you want to paginate over a full table without holding all the rows in memory. On the surface of it PostgreSQL Cursors [http://www.postgresql.org/docs/9.2/static/plpgsql-cursors.html] may seem like a good solution to this problem--rather than executing a whole query at once a cursor encapsulates the query allowing y

Rack, CSV streaming, and Ruby's Enumerator

Engineeringby Alex MacCaw on September 22, 2014

When a response body to a HTTP request gets big it's a good idea to stream it. A classic example of this is a CSV download--while you might get away without streaming for smaller response bodies as soon as the CSV file size is over a few megabytes you're going to see timeouts and performance issues. We saw some of these issues with Mailmatch [http://mailmatch.io], and I'm going to take you through how we solved these by adding streaming support to our CSV downloads. Note that this tutorial is f

Announcing Mailmatch

Featuresby Alex MacCaw on September 21, 2014

We're excited to announce Mailmatch [https://mailmatch.io], a service for getting social data from your email lists. Simply upload an email list, either by pasting a bunch of emails or by using our Mailchimp integration, and we'll search publicly available information from all over the social web to augment your email marketing list with Facebook handles, Twitter followers and much more. [https://mailmatch.io] As well as the information below, we also offer a CSV download containing many mor

Join our newsletter

Engaging stories and exclusive data, designed for our best customers. One useful issue each month.