ADRN Posted October 24 Report Share Posted October 24 (edited) Dear Wildfire dev team, I'm teaching a class entitled "Advanced Distributed Systems 2" for Master 2 students in a French Informatics university. It begins in 10 days (although, we can discuss in-length, and plan for next year's class instead). In my class, students are assigned an application, and have 5 weeks to achieve a 20min video presentation of the distributed systems challenges that their application has had to answer. For e.g. Spotify it's a walk in the park: content distribution went through P2P, then on-premise, then cloud; with Twitch they can speak about the challenges of distributing live feeds to millions of people. For Valorant it would probably be about fairness in an e-sports game despite varying hardware config and network latency. Sadly, such examples are closed-source, which sometimes makes it hard to scrutinize the software in-depth. I'd like to propose 0 A.D. as a case study. Being a RTS, it has interesting real-time challenges. Performance-wise: I've seen Valhirant's videos, I know how laggy a 6 players end-game gets. There must be some nice Distributed Systems topics to cover here! But the poor students have to base their video presentation off something, e.g. technical or scientific references. And a brief walk around Trac has showed me nothing much usable, about the ongoing or solved challenges of the game's development. Maybe I don't know where to look? Do you have some design documents (or lengthy issues) about technical challenges related to Distributed Systems? Thank you for your help, And keep up the magnificent work ADRN --- I may have to delete this topic should I propose 0 A.D. to my class, sorry. Edited October 24 by ADRN 2 Quote Link to comment Share on other sites More sharing options...
Gurken Khan Posted October 24 Report Share Posted October 24 Hi @ADRN, welcome to the forums. Maybe this thread is of interest to you: Did you go through the (unsolved and) solved tickets on trac? That might give you more insight into solved problems. Tagging @Stan`, he might have more ideas. Quote Link to comment Share on other sites More sharing options...
Norse_Harold Posted October 24 Report Share Posted October 24 (edited) 8 hours ago, ADRN said: I'm teaching a class entitled "Advanced Distributed Systems 2" for Master 2 students in a French Informatics university. I'm confused. I thought that distributed systems was a technical term for things like Beowulf clusters, where computation is done by many separate computers that communicate with each other for division of labor and collection of results. Articles here and here. I don't think that 0ad is a distributed system. It has one virtual private server hosting its services. Game matches are each hosted by one user's single computer. In multiplayer games, the state is fully simulated on each user's computer and game state hashes are sent over the network to detect out of sync (OOS) state. Does that count as a distributed system? If so then it's a trivial distributed system, because there's no speedup as a result of distributing the workload to all connected clients, because each client processes the full workload. If anything, the total efficiency decreases with each additional user connecting to the match. I once tried to use an existing open source game for a software engineering course instead of writing software from scratch. It took me months to read the source code, identify the code flow, and attempt to write Rational Unified Process documents based on it. It was impossible to accomplish within one semester, in my opinion. There was such a large amount of source code written by someone else that I had to get familiar with. My advice would be to only use source code that you're already very familiar with and that you're already certain is consistent with the expectations of the course. Beowulf related software tends to be open source, by the way. Edited October 24 by Norse_Harold Quote Link to comment Share on other sites More sharing options...
Feldfeld Posted October 24 Report Share Posted October 24 41 minutes ago, Norse_Harold said: I'm confused. I thought that distributed systems was a technical term for things like Beowulf clusters, where computation is done by many separate computers that communicate with each other for division of labor and collection of results. Articles here and here. I don't think that 0ad is a distributed system. It has one virtual private server hosting its services. Game matches are each hosted by one user's single computer. In multiplayer games, the state is fully simulated on each user's computer and game state hashes are sent over the network to detect out of sync (OOS) state. Does that count as a distributed system? If so then it's a trivial distributed system, because there's no speedup as a result of distributing the workload to all connected clients, because each client processes the full workload. If anything, the total efficiency decreases with each additional user connecting to the match. I once tried to use an existing open source game for a software engineering course instead of writing software from scratch. It took me months to read the source code, identify the code flow, and attempt to write Rational Unified Process documents based on it. It was impossible to accomplish within one semester, in my opinion. There was such a large amount of source code written by someone else that I had to get familiar with. My advice would be to only use source code that you're already very familiar with and that you're already certain is consistent with the expectations of the course. Beowulf related software tends to be open source, by the way. Indeed 0 A.D. doesn't split computation between different computers, but it does have multiple agents all in relation to each other and providing their own input. I'm not sure if it qualifies as distributed system. If I go by the Wikipedia page they even consider MMOs as distributed despite that they use dedicated servers and many of them are probably not much more technically complex than many games including the already mentioned Valorant. 0 A.D. is peer-to-peer with one peer taking the role of the host. If I go by the wikipedia page I could see an argument for it being the simplest case of a distributed system. As of right now, if any player other than the host drops, he can rejoin and the game can resume. If the host drops, the game is lost. If there was the added functionality that in case the host drops then the remaining players decide on a new host, then it would make a cool distributed system imo, but well it's too complex compared to the alternative of having a reliable dedicated server. Due to being peer-to-peer, 0 A.D. faces the NAT traversal problem. STUN was used for UDP hole punching to solve it in a22 (I found this patch https://code.wildfiregames.com/D364). Before that was the good old time of opening a UDP port. I personally implemented a simplified UDP hole punching algorithm as part of a free extension project in a distributed algorithms class. As for the simulation, the goal is to provide a smooth experience for every player, hopefully hiding issue related to connectivity. Indeed 0 A.D. is not doing that good. Let's compare approaches (to the best of my knowledge) in similar games: - 0 A.D.: the game advances as fast as the slowest computer, and bad ping of any player would slow the game for everyone. But the biggest problem is bad optimization which will be felt in late game, thus slowing the game, especially if a player is running a toaster. - AoE2: Like 0AD, it also runs with deterministic simulation I believe. With Voobly, it was similarly P2P with a peer taking the role of a host. However, if a player had bad ping with the host then only he was slowed and penalized. With DE there is a dedicated server, and a player is still penalized for having a bad connection. - Mario Kart 8 Deluxe: Also P2P with a peer taking the role of a host. It would be unplayable if you had to wait even a little to have the commands of other players, so the game runs with the other player position being only approximate, and synchronization is done as frequently as possible. Thus, unlike the above games, every player has a different state. 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted October 24 Report Share Posted October 24 Hey @ADRN Welcome to the forums. I think a lot has been said already. Quote I'm teaching a class entitled "Advanced Distributed Systems 2" for Master 2 students in a French Informatics university. I Which school if you don't mind me asking ? I'm french as well. 10 hours ago, ADRN said: But the poor students have to base their video presentation off something, e.g. technical or scientific references. And a brief walk around Trac has showed me nothing much usable, about the ongoing or solved challenges of the game's development. Maybe I don't know where to look? Do you have some design documents (or lengthy issues) about technical challenges related to Distributed Systems? I don't think there is much about that anywhere. https://gitea.wildfiregames.com/0ad/0ad/src/branch/main/docs contains some of the thesis that were done on the game. But nothing on the particular subject. Maybe @Itms or @feneur know more. 10 hours ago, ADRN said: --- I may have to delete this topic should I propose 0 A.D. to my class, sorry. Edited 10 hours ago by ADRN We can hide it and and unhide it at will maybe at the end of the course 10 hours ago, ADRN said: Thank you for your help, And keep up the magnificent work ADRN Thanks for considering the game. I've met a few people in academia interested to do things, but I've yet to see a good project flourish. We have a good contender now that Activ' Design has taken us as a project to make mods to teach students game design but it would be nice to have more. Especially in the reinforcement learning side. 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.