Pondo
Is Elixir suited for a performance game server?
Hello to you
I create a private server for World of warcraft, is Elixir a powerful enough language for this kind of project?
Most Liked
rvirding
You might checkout the Battlestar Galactica Online game which is written in Erlang. At this level of discussion Erlang and Elixir are equivalent. It definitely shows that implementing a game in Erlang is definitely feasible to do.
sarat1669
yawaramin
I’m not familiar with World of Warcraft servers, can you explain a bit more what kind of server this is? What does it do mostly? What kind of traffic are you expecting? I/O bound or CPU bound? Etc.
Cochonours
game servers don’t perform a lot of computation usually. Most of the time it’s about receiving new coordinates and sending that data to the other players in the same zone, send data about the movement of fauna and NPC (and this could be computed on the client as well if we just send the paths they are supposed to take), and less often sending info about other actions like fighting and etc. Aside from message passing, it stores every meaningful actions in logs/DB/whatever and that’s it, so the computation can really be minimal (depending on the game most things could be done on the clients, with the server only arbitering the results).
The server has to check the players are not cheating of course, but that can be done in another program which analyses the logs output by the elixir server. Or at least that’s how I would do it, except for really important stuff related to money which would be computed on the main server.
adrianrl
I think they are, not because the type of game, but the number of players connected simultaneously, since those kind of games have a multiple servers available and limited to X number of players. Riot blogs about its infrastructure and other things, so their engineering blog should be a very valuable resource for you: https://technology.riotgames.com/. Let me highlight a piece of this article:
We write Riot chat servers primarily in Erlang (check out this video if you’re curious about the language), although we use C for bindings to certain lower-level operations such as XML parsing, SSL handling, and string manipulation. 10% of our chat server codebase is written in C while 90% is pure Erlang (ignoring external libraries and the Erlang VM itself).
Replace Erlang by Elixir and you have a nice use-case for using it in a professional game, they also use Electron as its GUI client. The key takeaway here is “use the right tool for the job”, a complete game like WoW, LoL, CS… requires a stack of many technologies playing together, for example:
Game: C / C++ / Rust / C# / Java
Game server: C / C++ / Rust
AI: Lua / Python / JavaScript
Chat system: Elixir / Erlang
GUI client: Electron / C# / Java
Of course some parts are redundant, for simple games you implement multiple things with the same language, this is just to illustrate a very complex and professional stack, and it’s not viable to do something like this alone. However when it comes to experimenting, prototypes and so on, you can ignore the initial step of valuating technologies in search of the best performance, sometimes the initial result is better than you would expect.
This is not about gaming but online servers, an interesting article of how Figma started with a pure TypeScript stack before migrating to Rust: How Mozilla’s Rust dramatically improved our server-side performance | Figma Blog.
The multiplayer server we launched with two years ago is written in TypeScript and has served us surprisingly well, but Figma is rapidly growing more popular and that server isn’t going to be able to keep up. We decided to fix this by rewriting it in Rust.
As you can see, the initial implementation were not that bad, and it was pure JavaScript at the end of the day, something like Elixir should have played better than this.








