Project Metacube Devlog

Thursday, August 03, 2006

Day 1

Well, tonight I put in a good amount of work on getting the foundation for MetaCube ready. I got a message pump working which is going to be common for the different servers. Right now the Gateway server is in the works; this is also more commonly known as the login server. Essentially the client opens an SSL-encrypted tunnel to the Gateway server and then transmits their user name alongwith the hash code of their password. The password is hashed to make it secure and this also makes it a fixed length internally, so a two letter password is the same length as a 40 character one. Longer passwords are still more secure since they are harder to crack via brute force, though.

After the credentials are submitted to the Gateway server, the Gateway server does a lookup against the user database to see if an account under this name exists and if the credentials are correct or not. If they are not correct, the Gateway server rejects the connection and the client then informs the user that either their account does not exist or they need to enter different credentials. If the credentials are valid, then the Gateway server issues a REROUTE command to the client alongwith the IP to the World Server that is most suitable (could be the one with lowest amount of users, or one that's already got a copy of the world someone is joining to open, or even both).

I'm not sure what There™ uses, but I know that Second Life™ is badly stacking their servers (four maps to a server and their server code is very inefficient). I chose to use World Servers for MetaCube because I'm aiming for a distributed computing model. Let me give you an example of how this is good. World Servers only deal in maps that are actively in-use by people, so if a map has nobody on it the resources are used for better things (like a map that IS being used). World Servers can also be clustered via a Taskmaster Server which takes care of syncronizing World Servers with each other.

Joe User, who is in the USA connects to the MetaCube network. He passes through the Gateway and is rerouted to the World Server cluster in Austin, TX. He picks “Newbie Island” as his entry point. Lets say that there aren't any other newbies just yet. The Gateway informs the Taskmaster that Newbie Island needs to be loaded. The Taskmaster knows that World Server 1 has 20 people and World Server 2 has 15, and that World Server 2 is using less resources. So the Taskmaster tells World Server 2 to load Newbie Island. When Newbie Island is loaded, World Server 2 tells the Taskmaster so that it can make a note of this and then REROUTE Joe User to the World Server with the destination map key (so Joe ends up on Newbie Island and not somewhere else). Then Joe User can play away.

Amanda User connects in through the same Gateway and picks the same map. The Taskmaster knows that World Server 2 is already running Newbie Island and that it has enough resources to add another person to that map. So now Joe and Amanda are in the same map and can interact. Anyway, more goodies in tomorrows progress report.


Post a Comment

Links to this post:

Create a Link

<< Home