Archive for June, 2007

Memcache++   no comments

Posted at 9:16 am in Dev

Memcache has been a core part of my web programming lately and it’s one of the most flexible and useful systems ever come across.

Think for a second about the process when two people request the same dynamic page on a website. The code rendering one request has no idea that there is another request for the same page so effectively you do the whole process twice. Let’s also imagine that this request pulls a huge list of data out of a massive table that takes a while to query. In an ideal world the dbms should cache the query and the second request should be faster. In reality, and with a simple dbms both sets of data are returned in the same time. Now say one hundred other people also request that same page over the next few minutes, are we going to keep calling that data out of the database from the hard disk or is there a better way?

This is where memcache comes into it’s own. If, after pulling the data out of the database, it is placed in memory and not destroyed after the page is rendered it can be retrieved next time we want the same data. Hey presto, we can now serve thousands more requests per second as we are no longer asking for data from the database, we have exactly what we want waiting in memory.

Memcache isn’t without it’s problems, what if we change what’s in the database. Our version in memcache is now out of date. Thankfully we have set an expiry time on things that we give to memcache, so it falls out of memory after a period of time. What if your data is time sensitive? As with many things I am working on it is important that things happen at certain times rather than just waiting for things to fall out of memory. This is one problem I am currently working on and something I will cover in future.

Written by Jamie on June 21st, 2007

Tagged with , ,

Haze on the 360!   1 comment

Posted at 10:57 am in Genreal

It was only Monday that I was saying how angry I was that we weren’t going to see Haze on the xbox 360. Ubisoft had initially decided it was to be a Playstation 3 title but now it has been announced on the PC and xbox 360 and to be released only a week later! This adds to the already amazing xbxo 360 lineup set for later this year, including Assassins Creed, Bioshock and Halo 3.

UPDATE

I’ve just read that the release schedule was incorrect and the 360 release might not actually be happening. Oh well.

Written by Jamie on June 20th, 2007

Tagged with , ,

What is this country coming to?   1 comment

Posted at 8:43 am in Genreal

A story on bit-tech.net today reveals that Manhunt 2 has been provisionally banned from sale in the UK.

Now I didn’t play the first Manhunt and I don’t really want to play the second but this is a matter of principle we’re talking about here. More and more the regulatory and governmental bodies in the UK are slowly trying to wrap it’s public in a thick layer of bubble-wrap. Even speed limits are being lowered all over the country because some people forgot how to drive safely.

I think my main point is that soon no stupid people will be able to kill themselves and those that have anger issues will no longer be able to vent there frustrations in a video game, their only escape will be to go out into the street and release upon some poor soul (and I’m not talking about water sports).

Written by Jamie on June 20th, 2007

Tagged with , ,