logoalt Hacker News

ramchiptoday at 9:37 AM2 repliesview on HN

I love the BEAM and programmed on it for many years, but it really does not provide anything like durable objects.

1) It's very difficult to ensure globally serialized ownership with strong consistency in a distributed Erlang cluster when nodes are allowed to fail. Stuff like Horde will let you do some rough "run an instance of this process somewhere in the cluster", but it's eventually consistent (you may have multiple instances at times) and doesn't deal with netsplits well.

2) Mnesia is fine to replicate state within a network switch or very reliable LAN, but not over WLAN/Internet. It can enter split brain conditions and require external reconciliation. RabbitMQ suffered from Mnesia problems for many years and ended up replacing it with their own DB implementation using the Raft protocol.


Replies

petejodotoday at 12:02 PM

Chris McCord just recently released a library trying to solve for this https://github.com/phoenixframework/durable_server

calflegaltoday at 11:13 AM

See these are things I did not know. This is why I said I was 'not qualified', in the post, haha. I do use Horde for the matchmaking. I have 2 hosts in the cluster.