Saturday, January 30, 2010

Lessons from a deployment deadline

This is a really overdue post, but it's the first time in a while i'm properly awake in the day ^^ which brings me to the first lesson i've learnt:

  • Sleep is an essential part of life. All repayment of owed sleep often comes with exponential interest.
For the last week, my group of 4 people, Laurence, Carolyn, Eldwin and I, have been doing night shifts of varying lengths. I, for one, can't really do coding marathons over several nights, but I.. managed somewhat. I do believe, though, that there has been at least one night where I failed to respond despite being online... having fell asleep on my keyboard. The full aftermath, however, came in the days after submission. I can't recall sleeping through most of the day for a few days on end in recent years ^^ Now that the first submission is over, I realise it could have been partially averted by observing the next lesson i've learnt:
  • Read the manual. Especially the fine print.
Our application was, up till a really short while before submission, hosted on a virtual server within our school. I was not the one who submitted the request, but was told that the space would definitely be sufficient for a collection of text files. That claim turned out... partially wrong.

On the night of our submission, I uploaded one rather essential web script onto the server. After prompting for confirmation to overwrite, it deleted the file, and attempted the write the new one.

It failed. Horribly. And left us staring at a "Disk quota exceeded" message.

Suffice to say, we had a bit of a crisis. However, we couldn't, for the life of us, imagine *how* the total file size could have exceeded what i now knew as 1GB of space! But after a while of frantic digging, we found a rather large file on the server, named error_log. It was... 1.3GB. Apparently, we had forgotten to lower PHP error reporting, and a whole clump of warnings to the tune of "Variable not declared". Exasperated, we proceeded to delete the file, but the quota busted error still remained. We guessed this status was probably refreshed on a periodic basis, and couldn't really do much at that point. Luckily, we managed to find a saviour nearby, and with him came my next lesson~
  • Always have a backup plan. Especially so during the last moments
When we realised we couldn't save our server that night, we intended to shift to AWS, which we weren't on initially as we wanted to save the credits for the Final Assignment. While trying to figure out how to connect to it's SQL service (also part of the reason we weren't on AWS), Frank offered to host it on his server. So now the application is running on a third-party host, and we actually had something to show for the submission.

So, thanks to all the help we received in the last hours, we actually managed to submit the alpha version of our as-yet-unnamed application (officially, anyway). We now have a less buggy system, a really good design, and a humongous backlog of features yet to be implemented. So I'm off to sleep a bit more for now, and resume coding very soon~

1 comment:

  1. I don't get it why you want to save the credit for final assignment :P. You will be giving enough credit to last the whole semester (and Simone agreed to give more credit if needed).

    ReplyDelete