Project Metacube Devlog

Saturday, August 12, 2006

Day 4

Back to work on the project for day four. This day I've fixed up my servlet structure so it's almost functional. In a little bit more time I can get some basic ones working and make it easy to write system services that can be polled. Logins should work soon, despite there not being any world server or taskmaster to connect onward to. MetaCube's servlets aren't entirely like HTTP ones but they are based on them.

Essentially it's the same principal to receive a request from the client, spawn a servlet object that will deal with that request and push back a responce when it's done running. The main differences are that MetaCube uses binary for headers and data instead of text data like HTML does. This makes parsing faster and easier, while also conserving bandwidth. It may not seem like much, but when you have a couple hundred people coming and going a couple bytes here and there really start adding up.

Sunday, August 06, 2006

Day 3

Not everything got done that I would have liked it to, but I did fix up the event pumps. Servlet handling is almost done which would make logins a bit easier. I don't really have much to talk about this time, but I'll let you know if anything exciting does happen .

Saturday, August 05, 2006

Day 2

I decided to take two days off as an early weekend and decided to work Saturday and Sunday. I was having a bit of a rough day yesterday and tonight I just got back home. Hopefully this will help the development of MetaCube since I'm in a much better environment.

Today I plan to give the Gateway server sockets so it can, well, do server-y things. After sockets I plan to write some remote control code so that the server can be managed remotely and maybe a little Ruby/Tk app to communicate with the server for now. After that, I think I'm going to need to write the MetaCube Binary Querying Language (MCBQL) for efficient communication of data. XML is very wasteful and I want to use as little bandwidth as I possibly can for each action so that more clients can connect on a cheaper connection to the data center. It also makes things easier on people with lower speed connections, and users on congested networks (Cable, anyone?).

After I get that working, I'm going to need to write a Ruby/Tk app or something to that effect to test MCBQL and the server's ability to check a user password and either accept or reject credentials. Then I get to work on a different type of server; the Task Master server. I'll need to make a note to come back to the Gateway server after that one is done because it needs to be able to REROUTE to the task master on a successful login.

I'll keep you posted on my project.
-Skrylar

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.

Tuesday, August 01, 2006

Project Starts Soon

Project MetaCube is an experiment in creating an online virtual reality application that can sustain use from a large amount of people online at the same time. The catch with this project is that the initial system has to be presentable (as at least workable alpha) within 30 days from the time the project is started. It hasn't started quite yet, but it will be an interesting time nonetheless.

MetaCube differs from other games like SecondLife™ and There™ in that the users are given a fair amount of freedom in what they want to do. I do not believe in censorship (There seems to.) and in my personal opinion the admins of SecondLife are incompetent of proving a fun and/or profitable environment that they claim they are running. So, come back often to see the development log of Project: MetaCube!