![]() However, instead of jumping headfirst into the multiplayer server, he decided to give Elixir a try on a smaller problem. He explains: “while the introductory guide covers the language constructs, the advanced guide on the website has you build an actual project with TCP connections, with the basic architectural patterns we would use in production.” Ready to give Elixir a try, Tyler picked up a couple books but soon realized the language’s Getting Started guide provided the background he needed. ![]() Saša Jurić’s talk, the Soul of Erlang and Elixir, showed us that the concurrency model, process isolation, and partial restarts provided by the platform were the abstractions we were looking for.” Modeling multiplayer with Elixir We would rather run a 64-core machine than dozens of 4-core VMs. Tyler Young, X-Plane’s engineer leading this implementation, highlights: “We wanted a stack that could max server capacity. Both are built into the very core of the Erlang Virtual Machine - the robust platform that Elixir runs on. Elixir took the edge thanks to two exclusive features: fault tolerance and predictable latency. They eventually settled on three top contenders: Rust, Go, and Elixir. It was essential to avoid synchronizing state across multiple machines, which requires more development time and worsens the user experience due to the increased latency. The need for speed and vertical scalability excluded many modern web languages, such as Ruby and Python, where the model for scaling up is generally throwing more servers at it. Quantitatively, this means the 99th percentile response times matter a lot more than the mean or median.įrom those requirements, the need for stability and fast iteration ruled out low-level languages, even the ones in which they had plenty of in-house experience. Multiplayer has a “soft real-time” constraint, and they need to service all clients consistently and on time. ![]() This would allow users to begin flying in groups immediately and serve as a platform to gauge interest in further feature development. To iterate quickly: because this was the first time the Laminar Research team offered a hosted multiplayer environment, they wanted to move quickly to ship this system. ![]() To implement a single shared world that can scale to tens of thousands of concurrent pilots. For example, an exception during a client update should not bring the whole server down. To build a rock-solid server with error isolation. According to their blog post, their goals were: This was a new journey for them and they had complete freedom to pick the technology stack. ![]() The X-Plane team has offered peer-to-peer multiplayer in the simulator for a long time but never server-hosted multiplayer. The overall solution features a brand new open-source implementation of the RakNet communication protocol in Elixir and overperforms the original requirements when put under unexpected load. This article explores why they chose Elixir and how a team of one developer - without prior language experience - learned the language and deployed a well-received multiplayer experience in 6 months. Recently, the X-Plane team took on the challenge of adding a multiplayer experience with the goal of hosting north of 10000 users in the same session. The X-Plane franchise comes in both consumer and FAA-certifiable professional versions. X-Plane is not a game but an engineering tool created by Laminar Research that can be used to predict the flying qualities of fixed- and rotary-wing aircraft with incredible accuracy. X-Plane 11 is the world’s most comprehensive and powerful flight simulator for personal computers and mobile devices. Welcome to our series of case studies about companies using Elixir in production. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |