Moving a client around an internal cluster without discon...

…without disconnecting them. What is the technical term for this? As far as i’m aware, if you have a master server that forwards the connected client to another port on the same domain, he will first disconnect, as the other port isn’t on the same channel. Is this right? Is there a way with, say, the Photon API to maintain the channel while throwing the client to different servers/services/ports in the cluster?

I’d google it like most other things but i’m not aware of a common term used to describe this :slight_smile:

There is no way to do that. if you really need to switch servers, then a disconnect is a must because just adding up more connections isn’t really going to work on the longer go.
More importantly its a security problem (you don’t want to hand out cluster internal ip / port) and management problem should a node go down and the client require to connect to another node offering that service.

Commonly you do it by not disconnecting it to the servers directly but by having a proxy service (1+ servers) in front of the cluster that actually redirect all messages to the correct server / service within the cluster.
That way the client is always connected to the proxy without knowing whats there really as it doesn’t need to know it.

I thought that might be the case. So at some point you’re internally connected to 2 servers while the changeover occurs.

you are never connected to two servers.

always only 1 and thats the proxy.
The client does not know nor in any way access the layer behind it. so it can be 1 server, 100 distinct nodes or 1 service that runs on 100 distinct nodes and place you according load balancing.
the load balancing one is especially a good reason for the proxy as it is easier to move around players as needed among a cluster if they are never physically connected to a node.

What I meant was, your character can then have a presence on multiple servers, however you’re still routing through the proxy servers and the client itself has no idea which physical box he’s sending messages to.

Not exactly, in a proxy distribution, you are getting your information from multiple sources at one time. Your client, as dreamora is pointing out, only does 1 network connection, to the single proxy server. Think more along the lines of Eve Online. It works this way. You connect first to a master player login server, this transfers you to an appropriate available proxy host server, then from that point forward you never disconnect from the proxy but you get your game data from the servers that handle the areas of the game you are in.

For instance, I have a server that handles towns folk interaction queues, then I have a server that handles node type creatures, another that handles distinct dungeons, yet more that handle distinct areas of the game. In the mean time, you don’t “Zone” around, instead you just run around and I see where you are at all times, and determine where to pump the information from to you.

Everquest utilizes server banks to handle a single zone for load balancing only, but when you zone you actually switch server banks. World of warcraft have a combination of server banks that handle shared space then server banks that handle spawned instances. They got this idea from EQ 1 when they introduced the same thing, I forget which series, I think it was part of the sleeper series.

Anyway, to get a handle on how this works you have to walk away from Unity and dedicate time to server understanding. Ironically, you can’t do this at all with the built in Unity networking code in 2.5.1, so you will have to use Photon or something else to accomplish this task, even native Raknet can handle it.

Or you would brush up your Java / C skills a bit and get the Project Darkstar C# code to work again should it not work with Unity and use that as it offers large parts of that already. (alternative Smartfoxserver pro + terracotta is also an option if such a scaling backend is really the target).

Or you take the trivial approach as it also is used in Ragnarok and other games: 1 zone = 1 server
Drawback is that if a server goes offline for whatever reason, all players in the zone are booted, at worst travel through zones are no longer accessable (happens from time to time). But it is, if you create it yourself, the by far simplest architecture to use as there is no datasharing of any kind involved as it is with the service based cluster architectures.

I tried Smartfox, but am now trying Photon. Not that I dislike Smartfox, but I prefer to stick to C#. I’m looking in to connecting the various services via Named Pipes if they’re on the same physical machine, or via Photon if not.

Dreamora I will most likely start with 1 server = 1 zone / all services, but I want to code in the right way and in the right mindset that adding service distribution is little more than handling communication, rather than starting from scratch.

With the term “zoning”, aren’t you still, in a sense, doing just that? It may be seamless and unnoticed by the player, but it’s still occurring when he crosses boundaries in a world split into quads. As well as splitting player movement and so on between servers, I was also going to partition the DB so that if a player is requesting his inventory, it gets it from his local server rather than slamming the main DB server for everything - only truly global, necessary data should be requested from the DB, and even then, commonly requested things would probably be cached.

Service based solutions don’t have zoning normally.
You might zone on the client side, just because the client technology does not offer streamed loading, but on the server end you “just are”.

There is the positional you thats handled by the position service, there is interacting you that is handled by the interaction service, the fighting you, thats handled by a combat service, there is the inventory service handling your equipment and inventory, etc (all depending on your service layout)
Services are not bound to world local data, as nothing aside of the position services knows these at all.

In the end there are naturally various different approaches depending on the scaling that you will require and especially the amount of funding you have.
The less funding you have the less you should worry about it as getting more machines that allow you to scale is not a thing of a “few hundred bucks” and that without considering the maintenance.

For a multizone “Phatasy Star Online” / GW alike approach there is an interesting article on the ibm page (yeah I know it uses torque, but its a undeniable fact that the “I just work” dedicated server from torque makes it far easier to explain and prototype it): IBM Developer

If you are targetting at such an architecture, I would recommend to first give Project DarkStar a go (ok or potentially photon. According TobiasS they have implemented an MMO layer but we don’t know any more about that yet, they are presenting it / presented it at Unite)