Sign in to follow this  
  • entries
    557
  • comments
    1237
  • views
    421602

More web admin crap

Sign in to follow this  
Evil Steve

102 views

Well, TEH SERVAR!!1 now understands HTTP authentication, and gives you a HTTP 401 error if you try to access the web interface without supplying a username and password.
I decided to use SHA-512 for encrypting the passwords in the user DB. Yeah, it's totally overkill, but who cares. I won't be SHAing anything too often anyway.

Next up is the database. I was thinking of having a seperate DB for the login server, but that'd probably be overkill, and most likely would be pointless. I figure that I'll let the user log in to the login server, and it'll provide the user with a list of servers. The user can then select a server to connect to. The login server will send the selected game server a login key and the clients IP address. Then it gives the client the server's IP and the login key, and the client goes and connects to the server. All done.
The DB will have a note of what server users are connected to, or if they're offline. That way people can still talk to each other across servers (The servers will send the messages between themselfs).

Anyway, I don't feel like writing some libmysql code for reading the user DB just now, so I'm retiring from coding for the night. At least I shouldn't need any code to add users to the DB (That'll be done by a PHP script).

After the DB is done, I'll have to get a login server working. That should be fairly straightforwards. Then obviously it's a case of getting the login server running happily with the main server and handling users connecting / disconnecting and so on.

I've been asked to "pop in for a quick overview of the project and position on Wednesday afternoon (1st March)" to DC Studios, so I need to determine if there's any particular time they want me, and if there's anything I need to bring with me. Still, then I manage to at least see what I'm going to be coding and what the project is like (Although I imagine I'll be under an NDA).

Right. More procrastination...

EDIT: Ok, I got bored not coding and wrote a simple database class. It's only singlethreaded, so it's a bit gash, but I'll make a multithreaded version when I need to. For the multithreaded version, I'll hand back tickets to the app, which they can use to poll the status of a DB access. That way I can request user data for something, then go off and do something else while it's fetched. I'll probably do some sort of caching too.
In my MUD I just loaded the entire DB into memory, and did a table-wide UPDATE every so often, which was of course horrendous for performance. So this version will have to do things a little differently. Probably something like just grabbing user data as needed, and only storing it for a short period of time.

Since the database is working now, my web admin page also works. You can properly log into it now, and you get told your username back. Exciting stuff.
Sign in to follow this  


2 Comments


Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now