Archive for November, 2009
As it turns out, my new master server probably won’t work.
Firewalls, and other bad networking conditions will likely be an issue. Combining my master server with Unity’s NAT facilitator (AKA Cool thingymabob for getting past firewalls, and such) will be impractical.
However, there is hope.
After talking with some people very well studied in the subject (Not Unity specific, but good enough to understand how the Unity Master Server works) I have found how what could be wrong with the Master Server.
First of all Unity’s Unity’s master server system is designed to run on a dedicated server. Dedicated servers can only handle so much traffic; Likewise too much traffic = super unreliable networking.
Unity’s hosted Master Server, is not intended for complete reliability, likewise it’s probably not using a super high capacity dedicated server – one capable of properly handling all of the traffic coming to it.
THis also explains why Dime Rocket has stopped working lately. A while ago, I came across a post by Aubrey, giving a link to Dime Rocket. It worked for a while (Thanks, Aubrey!), but then started to decline.
My guess is that the DimeRocket master server was well within it’s range – but then, it’s link got posted, and many needed developers – such as I – started using it. This probably gave the server more traffic than it could handle, and… Poof – buggy master server.
Now, there is hope for Space… Some time, may be never, maybe even in six months, I may be able to host a Cloud dedicated server. The advantages of this are: It’s a dedicated server – Unity appropriate – and it is Cloud; Cloud environments share the same data amongst multiple computers. Many sytems simply split one computer into quite a few, and give the data to one slice.
Cloud + Dedicated Server = Reliable master server.
No promises, though!
For now, however, I plan to migrate back to the Dime Rocket server, or find something better, and less known – at least until a long term solution is found.
New Master Server
My old master server has been bugging me for ages – connections are funky, and people had to constantly clear their cache and refresh the page, to see each other’s servers! It’s been going on for weeks. Ideas kept popping up in my head, about how I could make my own master server… Eventually these ideas lead to my current concept.
After having had this idea pop up a billion times – and having chaos occur during a beta test because of the old master server – I cracked.
I immediately disconnected from my beta chat, and started work on the PHP, and MySQL.
Here is the concept.
MySQL acts like a list of servers – each list item containing connection information.
When a player starts a server, the connection information for that server is gathered, and then send to MySQL as a list item.
MySQL then has a date function – it tells how long ago that server has pinged. The server pings every five seconds, and if a server doesn’t ping within 30 seconds of the last ping – the server is removed from the list.
This means that the Master Server (List of servers) automatically removes dead servers – when a server is closed (killed/becomes dead), it stops pinging.
The main bug in the old master server, was browser caching. The new system prevents the browsers from caching (Or storing old copies of) the master server. Instead it caches the API (Application Programming Interface) that displays, and controls the Master server. Since the API doesn’t change its self – only the results it sends to Space. Likewise, one’s browser will only store the way that the API works, not the things that the API returns.
The serve list displays the time since the last ping (LSR), in the server list. The text color moves from green, to red depending upon LSR (Last Server Response).
If a server is live, it probably won’t go above 6LSR, but the max is 30LSR for leeway.
Space’s first blog post!
Soo… I’ve lately been working on the layout of the website, and posting informative pages, such as version listings…
However, I haven’t been blogging about the development of Space!
I’ve been working on this bug for about three weeks, and just finished it today! – The bug I was working on was in the winners list of race mode. Whenever someone completed the race, it displayed them as first, no matter what place they were in! Not only that, but no one could see each other in the winners list!
Finally fixed, but along the way a few bugs arose…. (Posted on Humor America).
0th place:

1th place:

Finally working!:

I dubbed the glitch the “PC moment glitch” – because I tried eleven times, all but the last failed – some worse than others. (Joke to those whom have seen the apple commercial)