🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

More web admin crap

posted in DruinkJournal
Published February 27, 2006
Advertisement
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.
Previous Entry Yay, web admin
Next Entry Huffman fun
0 likes 2 comments

Comments

Mushu
Steve, I think you're the sexiest man alive.
February 27, 2006 07:21 PM
Evil Steve
What do you mean "think"?
February 28, 2006 09:25 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement