4 ms·
My spidey sense is telling me that this could have been achieved with a few Erlang VMs and a lot less moving parts. It's a supervisor (Director) with a bunch o
by whalesalad 8y ago
My spidey sense is telling me that this could have been achieved with a few Erlang VMs and a lot less moving parts.
It's a supervisor (Director) with a bunch of actors communicating with different 3rd party API's. The state mechanism could ostensibly get abstracted away so the underlying DB is irrelevant.
- otterley 8y agoOne of the challenges for us is that our downstream API integrations are almost all Javascript (and often provided by the integration vendors themselves). Rewriting the hundreds of integrations we provide into Erlang wasn't a viable option for us.
- whalesalad 8y agoInteresting. How does the Go code interface with that?
- otterley 8y agoThe integrations gateways are built into HTTP services, so the Director is an HTTP client to those gateways. (The image under "All Together Now" omitted our integrations gateways -- architecturally, they lie between the Director and the actual third-party API endpoints.)
- qop 8y agoJust because you read it in a HN comment doesn't mean it works in the real world. It has to deal with lots of third party interfaces, websockets, webhooks, etc. Erlang is notoriously bad for modern web stuff, with elixir making the ecosystem more brittle and lower quality. If you're building a system that needs to do a lot of back-and-forth, go is a much more usable tool. Have you ever tried to debug a giant erlang clusterfuck, calling out to a dozen different service gateways, varying tuple msging nonsense all over the place, jankedy ass comment annotations that aren't even accurate half the time, and all the while trying to fix things with hot swaps? It all sounds very good when Joe writes those weird little lewis carroll love letters about how magical erlang is, but I've worked on a system like that and I'll never touch erlang again except for small single-shot services. It's completely cancerous as a language ideology. Not that go is all that much a panacea, but it's definitely the perfect fit for this sort of thing. Hope this doesn't come across as too harsh, but what you're describing is a rabbit hellhole I've already crawled through. Also, with projects this size, abstracting db details isn't wise. This kind of scale necessitates more precision in what schemas you choose and what configuration your dbms has. Crap like ecto will ultimately cost you in efficiency. Elixir can get away with it because beam works hard to do supervision thoroughly, but there are multiple performance penalties that beam imposes on itself by choosing abstraction instead of specialization, and again, this problem would demand a specialiZed approach to be efficient as it scales up.
- vimal7370 8y ago"Erlang is notoriously bad for modern web stuff" Care to put some stats? Having used Erlang/OTP for several years, I find this very silly.
- qop 8y agoI'm not an evangelist, so no. I don't particularly care what you think about what I've experienced firsthand. Erlang is a language that doesn't have strings, for fucks sake. I'm sure something simple like parsing json is way easier and more convenient when dealing with lists of chars /s Honestly! BEAM is cool. I'll concede that point any day of the week. But a person who says erlang is suitable for modern web development is not living in the real world. An axe can be sharpened enough to shave with, but should an axe really be that close to your face? Edit: I did find an erlang lib called jiffy that has NIFs for pasting json. That's probably the least obnoxious solution to that particular issue, but my point stands that modern web demands a different model of problem solving than let-it-crash 90s telecom hackery provides