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

I think erlangs strength is also it's weakness: structuring everything around messages instead of having complex memory model and concurrency.

I always post these quotes until someone comes across that can explain them, so far 2 years later nobody have been able to:

"While I'm on the topic of concurrency I should mention my far too brief chat with Doug Lea. He commented that multi-threaded Java these days far outperforms C, due to the memory management and a garbage collector. If I recall correctly he said "only 12 times faster than C means you haven't started optimizing"." - Martin Fowler https://martinfowler.com/bliki/OOPSLA2005.html

"Many lock-free structures offer atomic-free read paths, notably concurrent containers in garbage collected languages, such as ConcurrentHashMap in Java. Languages without garbage collection have fewer straightforward options, mostly because safe memory reclamation is a hard problem..." - Travis Downs https://travisdowns.github.io/blog/2020/07/06/concurrency-co...



And erlang outperforms multi-threaded java single-handedly. I've made a system in java, which caps at about 6k threads, server starts to slow to a crawl. Similar system in erlang (newer version of server doing essentially the same tasks) is currently also servicing about 6k connections, but cpu utilisation is about 10%. Yeah, we could rewrite that old system to use some async library, but that's not multi threaded, just scheduled (like in erlang).


You need non-blocking IO, if you have more threads than cores you are doing it wrong.

You cannot build a MMO server with erlang.


People were doing in 2009 and posting it here [1] (project link is dead though).

The massively multiplayer online part would be clearly in favor of Erlang; although the RPG part maybe not so much. It would depend in my mind on how you model the environment and the game objects in it and their interactions. I think there would need to be too much communication to model game objects as processes, you'd need to make a simulation zone a process, and the game objects data for the simulation processes, and immutability makes that not a whole lot of fun probably.

https://qht.co/item?id=981597


Game objects can be simple state machines. Also, you have ets for "mutable" storage.


Why not? I have such server in plans, but that won't be soon (due to lack of time). If you have only as many threads as cores, that's not very MULTI threading, that's avoiding threads because of performance reasons.


I forgot to mention _Action_ MMO server... you can probably make a slow paced MMO with Erlang...




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

Search: