16 ms·
Hi, I made this! Was gonna wait until it was downloadable and the documentation was more complete before posting it on HN. Thanks for sharing it though. The Mi
by Jaxkr 5y ago
Hi, I made this! Was gonna wait until it was downloadable and the documentation was more complete before posting it on HN. Thanks for sharing it though.
The Minecraft setup will be available and useable by anyone Wednesday of next week. More documentation and a roadmap will follow shortly after.
- gravypod 5y agoThis is very impressive work! Do you plan to make WorldQL highly available? It seems like if it died you'd loose the server.
- Jaxkr 5y agoThank you for your kind words! WorldQL uses Postgres under-the-hood to store permanent information. I was inspired by companies like TimescaleDB which build new functionality on top of Postgres’s rock-solid base. Any high-availability solution for Postgres will also be available for WQL.
- gravypod 5y agoDo the clients of WorldQL (the workers) know how to gracefully fail over when WorldQL fails?
- Jaxkr 5y agoNo. They fail very ungracefully. But it’s something I’m planning to implement in the future.
- xupybd 5y agoDo you use postgis for spatial queries?
- Jaxkr 5y agoNo. All spatial queries use WorldQL’s in-memory k-d tree implementation and are not used for permanent world alterations. For the Minecraft world catch-up example, it’s as simple as querying Postgres for block records in a certain chunk after a certain timestamp. No fancy spatial stuff happens on the Postgres side.
- steve-chavez 5y agoCould yo elaborate on why you don't use PostGIS? I've always assumed its C algorithms are high-performance.
- tehbeard 5y agoCurious how you plan to handle Redstone and hostile mobs.
- Jaxkr 5y agoThanks for your question! Redstone is still WIP but will follow: 1. An optimistic execution strategy (the servers can run their own redstone) 2. A locking system allowing only one server to have redstone current in a given chunk at once. 3. A rollback-based system to repair race conditions caused by (1)'s optimism. Hostile mobs are ALSO still WIP and: 1. Are only synced if two players are near each-other on two different servers. 2. Have their aggression entirely managed by a WorldQL script which sends messages to the appropriate servers instructing them to call LivingEntity.setTarget on the correct player. Was hoping nail those both down before I shared it here, so please forgive me! Thanks for your interest and stay tuned.
- L3viathan 5y agoRe (2): Wouldn't that cause wonky redstone behavior on chunk borders?
- the_gipsy 5y agoI think it’s almost impossible not to break redstone. Perhaps two chunks/servers could communicate fast and precise enough for redstone. But Imagine the corner of a chunk receiving updates from two different servers.
- cdev_gl 5y agoI rent a small Linode to run a minecraft server for my extended family. Sometimes it struggles to keep up with just a half dozen of us, and when I tried swapping from a spigot based system to a forge one so the kids could have mods it was basically unplayable. I can't imagine scaling out to thousands of users, this was some amazing work. While developing this did you come up with any best practice recommendations for individual nodes?
- Jaxkr 5y agoYour single-core performance is the most important thing for a Minecraft server, especially for Forge mods. For vanilla, I’d try Paper (a high performance spigot fork) and see if you still have problems. If you’re lagging with 6 people while running Paper, you simply need a better CPU.
- MuffinFlavored 5y agoTangentially related, I had to move a web app off of DigitalOcean because the CPU performance was terrible compared to what you get for $80/mo from a dedicated server from OVH. I know Linode and DigitalOcean compete. Get a OVH dedicated server, try the CPU passmark bench or whatever and compare. AWS + Linode + DigitalOcean are all VPS and pretty slow.
- ianhawes 5y agoWhat were the specs of the server and which Spigot fork did you run? A month ago I ran a Paper instance from a Digital Ocean instance with about 4 GB of RAM and OpenJ9 JVM and it never dipped below 20 TPS even with a larger render distance. This was on Vanilla 1.17.
- eropple 5y agoHave you noticed much difference between a HotSpot-driven JRE and OpenJ9? I am somewhat irrationally biased against J9 because they made us stick it in everything at IBM, but I'm willing to reconsider for better Minecraft performance.
- Fiahil 5y agoIs there a specific reason why Minecraft hasn’t been “adapted” from the original game to a robust design that could scale to larger worlds and player populations before your project ?
- forrestthewoods 5y agoPretty much no video game engine scales with cores. There are too many dependent systems. There's no game engine that I'm aware of that effectively uses more than a couple of cores for gameplay simulation. Distributed physics is a well understood problem with no "solution". Just different trade-offs. This solution is cool, but it's not novel or anything. Minecraft is particularly challenging because the entire world is highly mutable. There are no general solutions to any of this. Just a bunch of custom one-offs. SpatialOS is trying. My opinion on it is extremely, extremely negative. And I'll leave it at that. Unity and Unreal both have primarily single-threaded gameplay. Writing multi-threaded gameplay code is extraordinarily difficult. Unity has been working on their DOTS/ECS system for years, but it does not appear to be close to ready for the mainstream. So I think the short answer is "it's really really hard. Like, radically harder than you are imagining. Even if you think it's hard. The value of that work is likely not worth the cost. If most players WANT to play on small servers with close friends then the mountain range of work to effectively support a 1000 player server is not worth it".
- 8note 5y agoCouldn't Minecraft chunks run fairly independently, with some message passing when something needs to move between chunks?
- kevingadd 5y agoYes*, but players build complex machinery fairly often that can span chunk boundaries, so that requires synchronous coordination between the chunks for those machines to work right.
- 5y ago
- fire 5y agoDo you have any articles or information available that explain why a spacial database is useful for and helps solve problems like this? This is super interesting and I'm excited that someone has finally made real progress on distributed game world software
- inyorgroove 5y agoDoes this solution handle PvP style play? Interesting project, keep up the great work!
- Arch-TK 5y agoSo obviously I have not actually played PvP on a worldql server but looking at the videos, even if there is some delay: playing at 20tps with some small overhead is much much better than playing at 4tps with no overhead. The PvP experience should be much better than the alternative.
- mentat 5y agoHave you looked at something like fly.io to do physical placement near players globally while still supporting consistency?
- 3np 5y ago> To accomplish this, the world state needed to be stored in a central database and served to Minecraft servers as they popped in and out of existence Could you elaborate on this point? To me "need" seems to strong; it could also be addressed via replication or a distributed model. Centralized is absolutely the most straight-forward (and may be the most suitable) but I'd love to see some reasoning as to why it's the only appropriate approach.