Durability is not availability.
HN user
michaelfairley
michaelfairley@gmail.com
[ my public key: https://keybase.io/michaelfairley; my proof: https://keybase.io/michaelfairley/sigs/x20u7wynQvXsQ1nPkc0bf816WB13Uz5r0KbiIfOCCOc ]
baz(foo).expect(format!("Cannot do baz, foo={}", foo)).bar().expect("Cannot do bar");Goroutines are green threads[1], and thus are threads, just like Ruby 1.8s threads are threads.
Also, you can easily run 10s of thousands of kernel threads (provided you decrease the threads' stack size).
Venmo now has payout business accounts: https://venmo.com/payouts
The "backwards-incompatible change" was part of a security fix, not an unrelated non-security change.
Braintree.js cuts down PCI scope as much as tokenization. We've worked with banks and auditors to make sure that this doesn't add any headaches for our merchants.
We recommend that you don't store or log credit card data encrypted with Braintree.js.
As far as PCI compliance, Braintree.js minimizes your PCI scope as much as tokenization. As long as you serve your site over SSL and maintain adequate security around access to servers, administrative passwords, etc., when using Braintree.js, you'll fall under SAQ A (the lowest possible PCI scope for online merchants).
Closing the server is easy; making sure all in flight requests finish successfully, not so easy.
My favorite – the method that determines the size of the connection pool: http://golang.org/src/pkg/database/sql/sql.go#L227
I've run Go in production for a web application, and I'll say that Go is not a great choice for this task. The built in HTTP server doesn't have a way to shut down gracefully, there's not a good zero-downtime restart story, and the standard library SQL package (and abstractions on top of it) has some nasty warts that only show up under concurrent load.
If you build a webapp in Go, be prepared to spend a lot of time monkeying around with problems that are solved issues on most other platforms.
You can also follow the letter in C, Java, etc.:
a ^= b
b ^= a
a ^= bThere's another large issue with queueing requests on the dyno: when the app restarts, all the requests currently queued up on that dyno get dropped and the client receives a 503.
There's another fun issue that falls out of this: any requests sitting in the dyno queue when the app restarts get dropped with a 5xx error. https://github.com/michaelfairley/unicorn-heroku/issues/1#is...
Almost all Ruby web apps are deployed on top of Rack.
He wants "x is declared but never used" to be an error that halts compilation. Go's philosophy on this[1] is "if it's worth complaining about, it's worth fixing in the code."
1: http://golang.org/doc/go_faq.html#unused_variables_and_impor...
This affects all versions of Rails, not just 3.x.
This is a really, really bad hole, and you should patch or upgrade ASAP.
Not your typical book, but it's very good: http://designinghypermediaapis.com/
Any merchant that accepts credit card payments must be PCI compliant. Even if cardholder data never touches the merchant's servers, the merchant still falls under the scope of SAQ A[1].
1: https://www.pcisecuritystandards.org/documents/pci_saq_a_v2....
At Braintree, most new merchants are automatically approved to start processing without any human review. In some cases, an application will need an underwriter to take a look at it before it's fully approved. The advantage of this approach is that we won't tell you that you're good to go, but then shut you down a few weeks or months down the road after you've already started processing.
If your business accepts credit card payments, you must be PCI compliant.
Braintree: https://www.braintreepayments.com/tour/international
(Disclosure: I work at Braintree)
Dragonfly is quite nice, but we opted not to use it for a handful of reasons: ImageMagick itself is a actually a good bit slower for basic resizing/cropping/rotating than the library we're using in Photon; Photon is ~100 SLOC, Dragonfly is ~3500; Photos are the core of our business, so a generic solution is not likely to work 100% how we need it to (we have various legacy concerns that probably would've require more code to monkey patch Dragonfly than to just write it into Photon); Java is much better than Ruby for CPU and RAM bound tasks that need to execute in parallel.
All that said, Dragonfly is a great choice for most people.
For low volume sites, photon works well enough on a single Heroku dyno (especially if you put a cache in front of it).
Our webapp doesn't directly communicate with photon at all. The webapp sticks the photo in a certain bucket on S3 with, and then includes the path to that photo in the photon url that gets passed to the client.
On the read path, HTTP is really nice because browsers, caches, and CDNs all speak HTTP.
We do two layers of caching (CDN in front of Varnish in front of photon). The latency is annoying, but it's no worse than serving the files directly off of S3 (as we were doing previously).
In an ideal world, Photon would be running on boxes that store the files themselves, and some sort of intelligent load balancer would make sure that the requests get directed to the correct box.
We used to have a horizontal quilt[1]. We got rid of it both for design reasons, and because the math behind it is much trickier and limits the layout (e.g. you can't do arbitrary ordering of the photos).
1: http://www.iftf.org/system/files/images/Screen%20shot%202011...
# of low-quality support requests could work for that.
Have you ever A/B tested picodollar pricing agains full dollar pricing?