Friday, October 24, 2008

ServerWeave progress update

I did some major shifting around as to how header files are organized. Using a custom tool I coded called cpinventory which inventories includes, I made it easier and faster for me to add new files without having to start including them all over the place. Basically this inventory program does a few things:

1: Adds a header to each file indicating what it's for
2: When it was last modified and who, number of lines,
3:keeps track of the description if I put a Description: header before running the inventory.
4: and most importantly creates two files, includes.h and sources.h which contain include directives of all the files. In some cases I have to include within includes but I have it setup so there wont be duplicates and I try to use forward declarations as much as possible. In most cases just seperating prototypes from source helps a lot

As far as the actual progress not much functionability yet, but these last organization changes will really speed things up. So far the inventory shows this:

Inventory and header tagging completed

Files: 30
Folders: 10
Lines of code: 1088
Previous lines of code: 1041
Lines added: 47

I plan to write lot of the packet handlers tonight and possibly the packets themselves too. Working on the base class as I speak.

Lastly, this cppinventory program will be usable for Age of Valor scripts too so we can keep track of who a file was modified by and when. Well the when part is tricky as I have not coded a date/time class yet but will be easy to add it in later.

In other news I bought some cookie dough so I'll probably bake some cookies tonight. I don't think I've ever done that before hopefully I don't make them extra crispy and extra dark. :P

Wednesday, October 22, 2008

Rebuilding raid!

Borg's raid is currently rebuilding. I ordered 2 1TB hard drives of same model as one of the existing drives so I will be replacing two of the different drives so that all 3 match up. I swapped out one drive so far, and it's currently rebuilding.

This is the part where I really don't want one of the drives to fail. :P Running in degraded mode until the rebuild is complete. Once it's done I will then swap out the other drive and put in the new one and do another rebuild. At that point all 3 drives will be Hitachi Deskstars 1TB. Those have a bad history back in the day with laptop drives, but that was a specific case incident. I should be ok. :P

[root@borg raid1]# mdadm --misc --detail /dev/md0
Version : 00.90.03
Creation Time : Sat Sep 20 02:15:28 2008
Raid Level : raid5
Array Size : 1953519872 (1863.02 GiB 2000.40 GB)
Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
Raid Devices : 3
Total Devices : 3
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Wed Oct 22 12:09:18 2008
State : clean, degraded, recovering
Active Devices : 2
Working Devices : 3
Failed Devices : 0
Spare Devices : 1

Layout : left-symmetric
Chunk Size : 64K

Rebuild Status : 2% complete

UUID : 11f961e7:0e37ba39:2c8a1552:76dd72ee
Events : 0.95544

Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
3 8 32 1 spare rebuilding /dev/sdc
2 8 48 2 active sync /dev/sdd
[root@borg raid1]#

Tuesday, October 14, 2008


So I started on the network handling portion of ServerWeave. It now listens on a specified port. Does not really do anything with the packets yet, but the general code is there. I'm actually slacking TBH. It's been a few weeks and this is all I got...

Inventory and header tagging completed

Files: 31
Folders: 8
Lines of code: 842
Previous lines of code: 842
Lines added: 0

Getting there though. The core is the part of a program that holds the biggest challenges and requires lot of planning. So there's more thinking then actual coding going on. So far I have a rather solid design framework and I'm always trying to think of ways to improve it before I keep adding more components.

I also setup the inventory program to auto gen a .h file that has all the .cpp files so I'm spending less time manipulating what files to compile and stuff.

In other news, some retard from was spamming dumb crap on and just flooding the whole forum. Little did he know I have a tool in place that cleans up a mess like that in about 0.1 seconds, AND bans the account. He did it 4 times right in front of me. So I reported him to his ISP. Writing that email took longer then cleaning up his 100+ posts. He'll have to try harder.

Friday, October 10, 2008

Disk space!

It sure is nice having lot of Disk space. I don't have much more to say, just wanted to show off my new raid 5 array. :P With how cheap drives are now I'm sure some people have me beat, but I can say its 5 times more space then I had before!

Also keep in mind in that screenshot the shared drives that have the same size are the same disk, so no, they're not individual 2B arrays.

Tuesday, October 7, 2008

Introducing: ServerWeave

I finally thought of a name for my new control panel: ServerWeave. I also registered the domain before someone cybersquats it off me:

I already have a cool idea for a logo. The site is not yet priority though. Once the product is semi usable and that I've started using it for hosting, I'll probably then actually code the site for it.

Saturday, October 4, 2008

Control panel progress

I've officially started on my hosting control panel. Still not sure what I want to call it yet. I want something generic but good. Look at cpanel, its as generic as you can get as far as a name, but that's how it's remembered and known. I have a few list of rather interesting names, some of which the .com is not yet taken and show low results in Google, so I got some possible winners.

I have a decent logging system going on already, and the data/class organization is starting to come together. Sample log entry:

DEBUG: [date] Starting the program...
DEBUG: [date] Checking for config file...
DEBUG: [date] Config file found. Initializing...
DEBUG: [date] Using Apache2 module
DEBUG: [date] Loading core...
DEBUG: [date] Loading modules [2]...
DEBUG: [date] Modload: apache2
DEBUG: [date] Modload: generic
DEBUG: [date] Error Loading modules:Error loading module [generic], did you forget to inherit ConfigModule::Load()?
DEBUG: [date] Error loading core: Error loading module [generic], did you forget to inherit ConfigModule::Load()?

My plan is to have each server component be a module of the control panel. So in a typical hosting environment you'd want to have the apache module, mysql module, php module (though that would maybe be built into apache as a setting to turn on/off) a dns module, postfix module, dovecot module etc....

When enabled, users would see the module as a menu entry in the control panel and be able to configure settings based on their access level (aka, their own account). Each module would be responsible for storing the settings, and retrieving those settings, as well as applying them to their respectful program.

This setup enables me to later on add more modules, so say I want this control panel to also support sendmail, well I add a sendmail module.

When this program is first started it looks for the startup config file, if it can't find it, it starts the setup wizard which is where you choose to enable/disable modules.

So far I think I got a nice framework going on. Still a lot of core stuff go do though, like I still need to make a date/time class and what not, and still debating on if the settings will be stored in a mysql database, or if I want to use flatfiles. The beauty of flatfiles is the simplicity. If I later on add non webhosting features to this then maybe I don't want mysql to be running, or even installed. So its one dependency less to worry about. Also this program wont be storing all that much data so I can probably serialize everything into files or come up with a basic built in DB system. Server migration will be easier too, just copy and paste the files, and done.