W
W
wutiarn2014-12-18 15:28:22
Java
wutiarn, 2014-12-18 15:28:22

Clustered game server in Java: is it real?

Hey! Recently moved from Python (web) to Java. And I realized that I want to do something cooler than the web. I looked around, remembered the example of the once popular Minecraft. I remembered his terrible server, I remembered the attempts to optimize it (which ended with its rewriting) by the GreenCubes project, and I thought: why not write your own Minecraft with blackjack and queens? Yes, I understand that minecraft (and its idea) has long gone through the peak of popularity. Yes, I understand that I, quite likely, will not succeed in anything worthwhile. No, I'm not going to open my minecraft server. This is just a study project.
In general, the main idea is that the server is dynamically "smeared" over a certain number of nodes if necessary. And so that the world for the player remains intact.
That is, the server is built in such a way that when the load increases, it separates a certain piece of the world and moves it to another node, quietly switching clients located in this piece there. When the load drops for a while - the unification of the world. One node dies, the neighboring one picks up its clients. Well, the same thing happens when a player simply travels around the world: he is simply transferred between nodes ..
As a client library, I look at jmonkeyengine. Because it was on it that GreenCubes wrote their client, similar to minecraft. And it didn't turn out so bad.
But what to do with the server is unclear. As a network library, I look towards netty. I don't know yet what to use as a base for the communication protocol with the client. And most importantly, I have no idea how to implement distributed storage of the world, how to organize a seamless transfer of the player from the server side. In general, javisty, help with advice. Which way to look?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lo-fi, 2014-12-19
@wutiarn

This is just the perfect task for Akka.
Messages - simple serialization on top of protobuf, failover and balancing with routing, clustering - it's all out of the box.
In general, Akka - you will not find better.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question