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

Why would Erlang be good for SQL/relational databases?


The core strengths of Erlang: Erlang has built-in support for concurrency, distribution and fault tolerance. There's many languages I enjoy, Erlang I've never learned (syntax and nobody to pay me to work with it) it fully to it's potential. I would also love to see a full blown SQL relational database in Rust and D, and maybe a NoSQL one as well.

See:

http://erlang.org/faq/introduction.html


A long time ago, I took on a huge learning task to port the Erlang VM to another language I needed close binding to. The discovery on how the runtime is built and dependent on other libraries and over the years layered and spaghetti implementation provided me enough insight to decide that Erlang is not in itself the panacea of reliance and fault-tolerance that most people will value this runtime for.


Erlang has an amazing track record though. It's battle tested in telecom platforms and internet messaging.

Also, I poked around BEAM a fair bit and it seemed just fine to me. It's pretty clean and easy to understand for a fairly complex VM.


I don't quite get this, you are saying Erlang is fault tolerant? I'm confused here because fault tolerance is something that the application using a particular language needs to make sure right? Sorry if I mistaken your statement.


Erlang and especially OTP "forces" you to follow a standard that usually results in highly reliable service powered by concise easy to read and maintain code.


Erlang comes with a philosophy/style on error handling, and its libraries help a lot as well.

Here's a reasonable summary: https://stackoverflow.com/questions/3760881/how-is-erlang-fa...


ferd did a great write-up on how Erlang approaches reliability:

https://ferd.ca/the-zen-of-erlang.html

It's more about assuming things will fail by default with good ways of handling it built-in at the language level. A lot of people also find its inventor's thesis enlightening. Here it is:

http://ftp.nsysu.edu.tw/FreeBSD/ports/distfiles/erlang/armst...

And for those concerned, there's also at least one project to write the native functions in a safer language to reduce their bugs a bit:

https://github.com/hansihe/Rustler


A lot of these concepts have been carried forward to some popular frameworks and languages. Akka (or Akka.Net & Akkling), is a great example. Railway Oriented Programming (https://fsharpforfunandprofit.com/rop/), has gained some traction in the .net sphere and, along with F#'s Result<'success, 'failure> type, emphasizes structured and exception-less error handling.

It may be a poor mans Erlang, but better than nothing ;)


It's the whole ecosystem with Erlang, OTP (Open Telecom Platform) and how they work with supervisors and monitors etc.

Everything is built so that you can operate a telecom switch and never drop that emergency call.

Erlang (Ericson language) is not necessary, you can also program for this in Elixir, although personally I prefer Erlang.


Look up the OTP Supervision trees


Handling the concurrency and distributed processes are Erlang's forte. Whether ActorDB leverages Erlang's built-in Menesia (an ACID compliant distributed database), I am not sure. Erlang's Prolog-like syntax will help define the relational model.


They are Erlang's forte. But the common denominator is the current programmer assigned to the task. A 10x developer will invariably take any language and make it shine. Try that with Erlang on a team of Java developers and you are on for some crazy adventures.


The database itself is SQLite.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: