Hacker Newsnew | past | comments | ask | show | jobs | submit | Zarathu's commentslogin

Out of curiosity, what would an "OTP-first" design look like?

ETS is built into OTP, so how is using ETS not "OTP-first"? What's wrong with using ETS? It's just an in-memory store.

I looked through the code and didn't find it to be anywhere close to procedural in style.


I really feel for the author. We had once decided to participate in Stripe's Identity Verification beta. After submitting the form to request participation, Stripe's system locked our account pending verification.

We were fortunate in that we had a backup payment gateway integration "just in case", because otherwise we would have been completely unable to accept any payments at all for a full week.

That week was still extremely stressful. They offered no explanation or reason for putting our entire business on hold.


>We were fortunate in that we had a backup payment gateway integration "just in case"

This seems like the key point here. I'm not a software guy or even a payments guy, I'm a network infrastructure engineer.

For anything that we want more than 99% uptime, we put in two of everything, sometimes more. Two separate service providers, ideally coming down different physical paths where practical.


"Treat infrastructure as possible failure points and prepare accordingly" holds just as well for the payment infrastructure. Interesting and fresh perspective, thank you for sharing.


It's not possible to increase availability with redundancy in all cases, because not all financial actions are idempotent.

For example, sending money via a banking wire. If the bank goes down, you can't send a second wire through another bank without loss because the first wire is not retractable.


Great practice, specifically determining how much redundancy you need, and making sure it is available. The theme also goes with your acct name quite nicely!


That is a scary trust violation... Good for you that you went the extra mile in advance and not in hindsight.


Could you email me at [email protected] and I can dig into what happened here?


Hey, I sent you an email about this but never heard back.


> In particular, I was itching to learn more about handling concurrency in Elixir. This, of course, led me to GenServers.

Might be a nitpicking here, but GenServers aren't useful for concurrency. They just manage state, and only process one message at a time. If you're using this as a cache, your reads will be bottlenecked by however quickly the GenServer can handle the read requests.


If you've got 5 gen_servers and you cast each one a message then that is concurrency. The whole point of a gen_server is that it's a separate process doing it's own thing.

I can dump 1000s of things into its message queue and then do something else. It'll keep working away.

It's like saying threads aren't useful for concurrency because they can only do one thing at a time.


I would advise to not rely on casting too much because it lacks backpressure.


> GenServers aren't useful for concurrency.

Sure, maybe not by themselves but typically you would run many GenServers concurrently in your application as part of a supervision tree. Libraries like Broadway (and the underlying GenStage) are essentially just leveraging GenServer to make it easier to orchestrate concurrency and state synchronization across multiple processes in your application. But you could build a comparable system on your own just using GenServer and a dynamic supervisor.


B-natural is missing.


Yeah lol. A# is not the same thing as B. It's the same as Bb though.

Also, how do you answer sharps or flats? It just has the natural notes as answers.


I will add buttons, which accesscodes would you recommend?


ctrl shift for # and ctrl alt for b?


I've thought of separate names "A z B C u D v E F w G" (from the end of the alphabet). Your approach looks more practical, have to ditch accesskey though.


Done, with Shift, with Alt.


Thank you! Fixed.


Jean Rondeau is great on harpsichord (Goldberg Variations): https://www.youtube.com/watch?v=1AtOPiG5jyk



Hi, I'm a sledgehammer. Your head looks attractive.


The business is the website.


The website isn't the business; the product is the business.

Look - I'm in the same boat; my business is solely run through my website (http://www.learnitfirst.com/).

I like the design of "Lice Ad" well enough - it will make you money. I would accept it and move on to the next problem. I started LearnItFirst with a #%&^*( looking website and I was fine.


Your site similarly looks like garbage. :(


WTF, man? What kind of bullshit comment is that? You come here asking for advice and I post what I thought was an attempt at helping and you shit on my business? That is low class.


He's being irrational because it involves his brother's work, and HN usually offers sound advice.

I don't care what happens, as long as it's best for the company.


Yes. Very solid yes.

You don't see much of this in the media, but Iraq is a stunningly beautiful country. There's a lot that you can learn from the people there (and certainly much they could learn from you), and the Arabic language is nothing short of remarkable.

Diving head-first into another culture is one of the few educations that the Internet and college cannot fully convey via text. You won't regret it.


The only culture he would be 'diving head-first into' is the US military culture; my guess is that his contact with the country would be somewhat limited, for obvious reasons. If you want to really experience a local culture, there are probably better countries for that, where you can concentrate on getting to know the people and culture and not worrying.


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

Search: