The Cloud?

LLOB

The Cloud?

Steve Mitchell:

“Testing using virtual servers on my laptop has been a great development tool, but this is not going to be practical when we start multiplayer test.

Right now I have to port forward on my domestic router to a locked local IP address of an Ubuntu VM running on my Mac laptop. Oddly, I develop using a Windows VM that also runs on my Mac – yes 3 OS’s all running side by side.

My Internet provider has the ‘good sense’ to randomise my IP address on an at least daily basis, probably to try and force me to pay for a static IP.

Although there are port forwarding services and ways I can get my code to identify a shifting IP, having a fixed IP and pointing an actual domain to it would make sense. Also, I am not planning on running my laptop 24/7 stuck to a domestic router.

Time to put the game onto a real server?

This is an issue faced by many developers today, do I plug-in a real server, go Cloud server, lease a hosted real server or perhaps even a hosted virtual server?

The costs on the Cloud look fairly cheap superficially, but it is trendy and the Cloud marketing guys have put in hidden charges that can balloon quite quickly.

Virtual hosted servers are cheap, cheaper than a hosted real server and probably more reliable. They are almost a cloud server, but you don’t upgrade or manage them in the same way.

Having a real server in my office would be great, but the internet upload speeds in Monmouth are nowhere near as good as at a hosted location, so I ruled that out.

Anyway hosted servers provide 24/7 cover, and I don’t want to be standing in a smoking wreck of an office with a fire-extinguisher clutched in my hands or driving in at 4am to recover a downed system personally.

So is it the Cloud or a hosted Virtual server?

Well, scalability suggests the cloud. They have pretty dashboards and API’s to let you control the servers. Even Microsoft’s Azure doesn’t lock you into Windows and actually gives you access to Ubuntu (and most other types of server OS). I’m evaluating Azure (yes, the free evaluation), but it appears more costly and less easy to use than 1&1’s cloud in the medium term.

I have also taken the free month for a minimal cloud package from 1&1 (which turned out to have a £10 connection fee, so, not actually free in my book – marketing people are lovely aren’t they).

The upshot is now I have a single cored minimal cloud server with 30GB SSD and 512 MB of RAM.

That is not a lot of RAM.

On a small server the desktop for a GUI will be a luxury. So, no desktop and thus no graphical user interface. I’m going to need all the RAM I can get my hands on for the game.

This sounds great. However I originally developed a GUI test interface using Tkinter, after all I thought RAM was cheap. I now realise it’s not cheap on the Cloud. So out goes an RDT GUI and in homes SSH (Secure Shell).

OK, I could upgrade my cloud server and just RDT in. This would let me run my exiting GUI test interface directly. Or, I could just admit I should have supported a test interface that would work on a client machine’s web browser in the first place… because I am going to need one now.

On the positive side I do get a free static IP address with the cloud server plus unlimited bandwidth even with their cheapest cloud package.

So it’s the £4.99 / month 1&1 cloud server.

Servers are like IP packets or emails, we don’t care where they go – just so long as we can access them securely, and they work reliably. The fact that I have over a dozen redundant servers all much more powerful than the one that I am renting on the cloud is just a painful fact – that our super slow regional data connections has made all too true. Fancy an eight core, 24 GB rack with 4 Drive RAID – the low height graphics card alone cost much more new than people dump a truck load of old rack mount servers for on Ebay (bidder collect).

In short, the Cloud has won. As everyone is going there, if we want fast connections and unlimited free band width, I guess I am going to have to go there too. I just can’t get anything like the bandwidth in my home city let alone into my actual office.

Now I did shop around. Azure looked cheap at a first glance but was substantially more and for only a 1/4 of a CPU (and what is a 1/4 of a CPU anyway).

I think Azure planned to charge for a host of other things later as well (like bandwidth maybe). The free credit they gave me appears to expire really quickly as well.

There is no such thing as free credit – just backloaded premium charges!

Minimal Ubuntu 14.04 LTS – here we come!  Yes, with just SSH access – but really, it is all I should need.

And there is my real problem; currently the test game is a single python program…

OK, yes there are multiple threads etc. but really I just run the one program and everything comes off that, data, web server and processing threads (even the test interface GUI is launched in a daughter thread).

What I really want is a master script, which I can manage from the SSH connection, that runs periodically.

When active it should check the database which contains the control information for what games are to be run and when each one needs to listen, process and ultimately output to the users.

I had developed a prototype for just that in python years ago using an SQL database. It was easily managed with PHPMyAdmin – which was all you really needed, from an ‘admin’ point of view. (I would suggest you never let a regular user on your SQL database with PHPMyAdmin.)

Sadly, after implementing that, I then made the mistake of trying to put the whole LLOB game into an SQL database. You can imagine the pain and misery. I learned then that SQL databases are for pickling your game object or storing your management information and are not for transacting your every variable change.

All the games I want could be run and launched automatically. Each game would have it’s own port and I could even manage a network of machines automatically, or instead just upgrade the cloud resources (rent more cores and RAM).

To swallow a fly I have swallowed a spider…

If this appears to have begun to look more and more complex, you are right.

  • To get the game off my laptop I’m leasing a minimal linux server.
  • To efficiently manage that I am going to have to write a periodic service to manage the game driven by an SQL database.
  • To manage the database I’ll be using either PHPMyAdmin or some new set of test and management web pages.

and so on…

If only I had better internet and some free static IPs available at either my home or office!

To add to this injury, I’m very busy with other projects this month.  This new task will need to be done in the few personal minutes I get between family, life and work.

The Cloud it is – fetch me a spider…