Hacker News new | past | comments | ask | show | jobs | submit | michaelfairley's comments login

Durability is not availability.


  baz(foo).expect(format!("Cannot do baz, foo={}", foo)).bar().expect("Cannot do bar");


Where you found this expect() function and how it will receive error, generated by baz? I read Rust documentation about error handling multiple times, but newer saw adequate error handling.

The best solution I know is error-chain library:

    use errors::ChainErr;
    try!(do_something().chain_err(|| "Something went wrong"));



Panic will stop program at place of error, while I want nicely stacked error message list:

    [reports.rs:25] ERROR: Cannot write report "Foo" to file "foo.xml".
    [templates.rs:125] ERROR: Cannot process template "header". Check is template file exists and readable.
    [fileio.rs:45] ERROR: Cannot open file "/usr/share/foo/templates/header.tmpl": unable to enter directory "/usr/share/foo". Check directory permissions.
Instead of

   writing report cannot open file done
It saves lot of time(money) in production.


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).

1: http://en.wikipedia.org/wiki/Green_threads


Venmo now has payout business accounts: https://venmo.com/payouts


There is not much information on their sites. In what country does it operate ?



The "backwards-incompatible change" was part of a security fix, not an unrelated non-security change.


Github's code doesn't rely on the security flaw to function. Their code should keep working after the security fix.

Anyone who has ever consumed an API to build something they don't want to break understands this.


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.


What canadian merchant does stripe use? I was very close to using Stripe, but active merchant didn't provide what we needed through your API (pre-auth/settlement). I hope to use Stripe for other things down the road though.


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).


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.


Could you share some information about the SQL warts you found under concurrent load?


My favorite – the method that determines the size of the connection pool: http://golang.org/src/pkg/database/sql/sql.go#L227


That does look pretty gross, thanks for sharing. Any other ones stick out in your mind? I've been happy using Go against postgres, but haven't had a significant enough load to run into real problems yet.


There are a few bumps and warts. The server close issue was one that made wonder if they ever tested, but I eventually discovered you can close down a server:

lis, err := net.Listen("tcp","127.0.0.1:80")

go http.Serve(lis, router)

lis.Close()


Closing the server is easy; making sure all in flight requests finish successfully, not so easy.


You can also follow the letter in C, Java, etc.:

  a ^= b
  b ^= a
  a ^= b


What does that do?



Thanks for the pointer.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: