So basically, the entire reason why I am moving to Elixir is because on node, we have to utilize “multiple instances”, and then utilize Redis to share memory (and also for the Pub Sub System). Which is fine! I had no problem doing that, and it’s a fairly easy way to scale.
But, having to not utilize Redis and manage multiple instances is a huge turn on for me! And obviously the extra performance Elixir has along with its sexy syntax (IMO).
But I’m worried after I read this: http://elixir-lang.org/getting-started/processes.html
For example, our game is instance based (Similar to Diablo 2, but not P2P).
Let’s say 1000 Websocket connections are active on an Xeon E3. 500 Players are in 83 games (6 players each). Each player is moving around the map and sending socket data to the other 5 players in their respective game. [This is not including Player Skills, Dropping an Item, Chatting, Monster Loot drops, etc, etc].
With nodejs, I would have to split these players up on multiple nodes and then either use Redis` Pub Sub to notify each time a player moves [since they will be on different node instances] – (which is way too much overhead). OR, just simply transfer that user to that instance before joining the game. (Which is what I do currently, and WHY I am switching to Elixir). (I don’t like doing that and I feel like it’s unintuitive)
With that said, after reading the processing doc, does this mean I would need to incorporate communication between processes manually in my code? For example, a function that notifies all friends that a player just logged in.
The reason I ask is because I made a similar topic in the Reddit golang sub weeks ago. And they said using “goroutines and channels” would be necessary. Then, I got a message from someone saying “Elixir would do all that stuff for you”.
But I really have no idea what I’m talking about honestly, I just don’t want to have to incorporate a system in Elixir that I am trying to get away from. (This entire Pub/Sub, or sending messages between stuff)