Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Erlang, OTP, and the BEAM offer much more than just behaviours. The VM is similar to a virtual kernel with supervisor, isolated processes, and distributed mode that treats multiple (physical or virtual) machines as a single pool of resources. OTP provides numerous useful modes, such as Mnesia (database) and atomic counters/ETS tables (for caching), among others. The runtime also supports bytecode hot-reloading, a feature used to apply patches without any system downtime. While the syntax is not very screen reader-friendly, it is digestable.

Apache Mesos[1] is the only thing that comes to my mind as a similar platform to BEAM in its ability to treat multi-machine resources as a single pool.

Over a year ago, my private consulting company decided to adopt Erlang as our backend language. After some time, we started exploring BEAM's internals to, for example, replace the TCP-based stack with QUIC and integrate some Rust patches. A truly fantastic choice for lightweight and high-throughput systems that are only failing in case of kernel panic or power loss. We are currently working on very "busy", concurrent software like a film/game production tracker and pipeline manager, and are now also preparing R&D for a private hospital management services.

[1]: https://mesos.apache.org/



Before you ask, we're not going to ever fully adopt Elixir (or Gleam) as its ecosystem is built around Phoenix framework and external services/databases. We would have to maintain internal bindings/implementations of things that are unmaintained on Elixir's side. Also worth to mention that it has a large amount of syntax sugar and its users have that weird fetish for abstracting stuff into DSL interfaces.


Couldn't understand your comment well but I am making a SQLite library for Elixir (via Rust bindings) so that would be one less dependency on external systems. I happen to believe that most projects don't need a full-blown database server.


All the people from Elixir community I met, kept telling me "Mnesia sucks, use Postgres instead" through Ecto DSL of course. Same goes about pushing towards Redis and gRPC. Most of them will try to convince you to start using Phoenix instead... Also there are very little to no references on how to use e.g. Cowboy or Bandit without Plug DSL.


Bandit is coupled to Plug, so there isn't really a way to use it without Plug. But if you just don't want to use Plug.Router, you can always make your own router (with whatever perf implications that may or may not have). Plug.Router and Phoenix.Router are just middleware and Plug a middleware specification. You can do a case statement on `%Plug.Conn{}.request_path` or `.path_info`.

For Cowboy, what's wrong with the docs? Erlang translates to Elixir pretty cleanly (list comprehensions and records notwithstanding): prefix atoms with `:`, downcase variables, `%` maps, and `~c""` Erlang strings. If you're really itchy (as in the look of using atoms as modules makes you itchy), you can alias the Erlang modules as Elixir module atoms: `alias :cowboy_router, as: CowboyRouter`.


> All the people from Elixir community I met, kept telling me "Mnesia sucks, use Postgres instead" through Ecto DSL of course.

And using Postgres via Ecto is a bad thing, or? What was your point or a complaint?




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

Search: