Friday, September 24, 2004

UnrealWiki Dev Journal 24-09-2004

LibHTTP 3 is getting pretty solid. I've added a test class to perform various requests. I already found a few minor bugs using that test class, bugs that have been in there for quite some time.
The build is currently 133KiB, I'm not going to strip source from the package because of the simple reason that you can no longer use the package during compile time, only run-time. Stripping the source would reduce the package to 54KiB.
I've been thinking about creating a better source stripper. It doesn't strip the complete source, only the function and state body. The result would be that the TextBuffer (that usually contains the source code) only contains the declarations. This should be enough to use the package for compiling, and have a minimal size. I would add a comment to the top of the TextBuffer explaining that the code was removed to reduce size and stuff. However, creating such a tool isn't every easy. You can't simply replace the TextBuffer with a new one, you will have to update all the offsets in the file. Note that this tool is not for code protection, because you can still decompile the package. It's just to reduce the size.

Sunday, September 19, 2004

UnrealWiki Dev Journal 19-09-2004

Well found some time to work on LibHTTP version 3. So far I've made the following changes:

  • Improved easy of use: get(), post(), head()
  • Support for multipart/form-data POST data
  • Two different transfer modes: Normal and Fast (tries to download as much data as allowed within a single tick)
Previously you had to use HttpRequest to perform a request. I made this function protected and added functions for each HTTP request method. The HttpRequest function wasn't really a nice way to perform requests. Now you will have to set the cookie data before doing a request. You can't include it with the request function (was kinda useless).
As for the POST request, now both x-url-encoded data and form-data request bodies are supported. I've added some easy to use functions to add form-data fields. Using multipart/form-data you will have much more control over the posted content, for example it's possible to use Base64 to send binary data.
I also added a additional transfer mode: Fast. This will try to download as much data as allowed (defined by a couple of variables) within a single tick. This is usefull when you need to make sure certain data is downloaded as fast as possible and system impact isn't a big issue.

That's pretty much all the ideas I had to put into the new LibHTTP version, if you have requests, let me know ASAP.
Also LibHTTP3 will be shipped with the source code stripped from the binary package. This is to reduce the file size (87 KiB vs 33KiB).
Ofcourse the source code will be included seperately with the package so you don't have to download it via CVS.

Saturday, September 11, 2004

downloads.UnrealAdmin.org

Ok, finished the new download section for the UnrealAdmin page. It's a rather gloryfied directory listing. With a couple of nice touches.
It will automatically include the README file, if it exists, in the directory listing. This is useful for directory descriptions.
Also if the file has an MD5 file (filename.md5) it will be added below the filename on the listing.
Additionally, when there's a text file attached to a other filename it will show a like [toggle info]. This link will open/close the text file inline with the entry in the directory listing. This feature can be used to display the readme file per file. Very usefull for patches.

To protect the download page from being abused by other site, deep linking directly to the files so it will look like they host the file, I've added checks on the referer. If a browser doesn't send a referer, or adds bogus data, a cookie will be used to check if the user saw the notice that UnrealAdmin.org hosted the site. Ofcourse this check will only be done on full featured clients like Mozilla, Opera and MSIE. Clients like lynx, links or wget will directly download the file. So when server admins can simply download the file directly to their server from a shell.
I don't really like this protection, but it's needed because there are quite some assholes out there.

Future additions to the download page will be at least:

  • search feature
  • stats? (or maybe just Webalizer Output)
Also we could use some mirrors (hosts that mimick hour directory structure and files so we could link to them directly). I haven't thought out yet how I'm going to add the links to the directory listing, but I'll figure that out by the time we have a mirror.
I was also think about giving Epic and Ryan Gordon an account on the machine to upload beta patches directly for an instant mirror. The last beta patch for linux failed completely because Ryan's "0day" server was overloaded.

Thursday, September 09, 2004

UnrealAdmin.org - the future

I am one of the main admins on the UnrealAdmin page (ua.org). Ever since the site was started by Azazel we've been growing, and for a couple fo years we've been the authority for server administration for the Unreal games (Unreal Tournament, UT2003, UT2004). One of the main principles of our site is to stay independed as much as possible and remain free. Ofcourse being independed and free introduces some issues for hosting of the website.
In the beginning the site was hosted on a commercial host. But within a short time this wasn't enough to cope with the activity. Multiplay UK (MPUK) jumped it and provided use with a nice shared hosting solution without any hooks attached. This was great, it allowed us to continue growing. Over time ideas came up to expand our services, for that to work we need a dedicated hosting solution.
A little while ago GameServers.net (gs.net) offered to host our site. Since we where happy with our current host gs.net had to make us a better offer. So they offered us a dedicated host, that was great, it would allow us to expand has we had planned (for the future). After some discussion within the admin team we decided to do it. But before we made the final dicision Azazel first wanted to talk with MPUK and thank them for their services. MPUK responded by offering a dedicated but "jail" host on a FreeBSD machine. Well, that was nice, now we could discuss if we would take th gs.net offer or the MPUK offer.
In case of gs.net we would have to put a banner of gs.net on every site, but we would get a dedicated machine with Linux ES (RedHat). In case of MPUK we would have the same deal as before, but get a dedicated machine with FreeBSD within a jail (so no full control). The jail wouldn't matter much, it's not like I would recompile a FreeBSD kernel. The main reason for tha jail would be to allow the MPUK admins to fix the machine after we "broke" it. I would be the main person to administer the software on the machine, and I didn't care if it was a FreeBSD jail or a RedHat hell. I would prefer a nice Debian Linux machine, but nobody offered that. So I left it up to Azazel and he decided to stay with MPUK. So when our MPUK related site admin (Killing) requested the jailed machine from the MPUK admins they wouldn't give it to us. Instead, they gave use a normal (no jail) FreeBSD machine, even better.
Well, last monday I got access to the machine to install apache, php and mysql for the initial setup to host our current site. To summerise: FreeBSD package system sucks big time compared to Debian. Also FreeBSD doesn't really use stable software via the package system. For example pkg_add -r mysql-server will install a MySQL 4.1 alpha server. I had to manually download the binary package for MySQL 4.0 (there was no 3.23 package available). The alternative was to compile it manually via the ports system. Also installing PHP and requested extentions isn't as easy in FreeBSD as it is in Debian. So after two days and quite some annoyance I finally installed Apache2, PHP5 and MySQL. Ofcourse our forum software vBulletin isn't compatible with PHP5. All my own PHP scripts work perfectly, but quite some things in vBulletin just didn't work. On their site they only stated that PHP5 support was still being tested, instead of just saying "it doesn't work out of the box". So I had to replace PHP5 with PHP4. After an hour or two messing with FreeBSD I had replaced it... It could have been easier.
Right now our new machine is being tested if the current site works as it should. With a little luck I'm going to issue a site move by the end of the week (sunday or something). For this work work smoothly I'm planning to create an additional hostname to point to the new location (www2.unrealadmin.org). This is to give people direct access to the site while the DNS entries have been updated for everybody (1 or 2 days).
After that we can start planning the new stuff in the future of UnrealAdmin.org.

UnrealWiki Dev Journal 09-09-2004

I've been rather busy with school the last two weeks. So I haven't done much.

Unreal Kart: nothing much has been done, I need to "re-activate" the team, they have been slacking. In the meanwhile I've been experimenting with bot AI and path finding (to understand it better). This experimentation will result in a new gametype: Deluder

Deluder: this new gametype is a tribute to the Developers of Incredible Power. It's a rather nice gametype from an old FPS game (you might now it). This gametype might be the first step on converting more of that old game. Right now I use it for experimentation for Unreal Kart to better understand bot AI and path finding. The most important part of this gametype is a roaving token that runs away from the players, so it has a somewhat reversed hunting AI. It's rather interesting, usually you want pawns to go somewhere, but in this case I want to pawn not to go somewhere. Right now the pawn tries to move away as much as possible. However, quite often it runs past the current players, and I don't want that to happen. So, in one of the test levels (Albatros) it get's stuck on AIMarker8, the AI script of that marker doesn't do anything usefull, and the pawn doesn't just jump off the ledge for some reason, so I have to figure out what it should do there.

UnCodeX: haven't done anything since the HTML Hints for the the application. Soon I hope to implement PascalScript in the documentation generation. But my motivation for this project isn't that high, for some reason it's not really recognised, maybe I just expect too much of it. UnDox received a shit load of attention, but UnCodeX is pretty much not present, or maybe I just don't see it. However, I did receive an email from Bruce Shankle a long time ago, he was quite impressed with it. I really wonder how many people use UnCodeX.

LibHTTP: I'm working on a new version of LibHTTP, version 3. This version won't be completely backwards compatible, even tho it has the same base code. This version will ofcourse contain a couple of bug fixes (actually, just one at the moment, and it was only a bug for the UT2003 build). Some of the new features will include: easier usage via get(), post() or head() functions. Also a faster download mode when download speed is ciritcal, this will try to download more data each tick (ofcourse with setable thresholds). I'm also going to implement a document cache, and maybe some some binary options. Anyway, if you have any feature requests, let me know.